Comments (7)
The problem is almost certainly that your custom template needs to be updated, if it's one designed for pandoc < 2.11. For one thing, the latex environment used for CSLReferences now takes a different number of arguments. I'm sure the 1
and 0
are the values pandoc is supplying for these parameters. Here's a diff from pandoc 2.10.1 to the current version:
diff --git a/data/templates/default.latex b/data/templates/default.latex
index d6cca9c98..169661582 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -89,6 +89,7 @@ $endif$
$if(beamerarticle)$
\usepackage{beamerarticle} % needs to be loaded first
$endif$
+\usepackage{amsmath,amssymb}
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
@@ -97,7 +98,6 @@ $endif$
$if(linestretch)$
\usepackage{setspace}
$endif$
-\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
@@ -254,7 +254,8 @@ $if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(tables)$
-\usepackage{longtable,booktabs}
+\usepackage{longtable,booktabs,array}
+\usepackage{calc} % for calculating minipage widths
$if(beamer)$
\usepackage{caption}
% Make caption package work with longtable
@@ -333,7 +334,10 @@ $for(polyglossia-otherlangs)$
\setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
$endfor$
\else
- \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
+ \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
+% get rid of language-specific shorthands (see #6817):
+\let\LanguageShortHands\languageshorthands
+\def\languageshorthands#1{}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
@@ -368,10 +372,27 @@ $endif$
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
-\newenvironment{cslreferences}%
- {$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
- \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
- {\par}
+\newlength{\csllabelwidth}
+\setlength{\csllabelwidth}{3em}
+\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
+ {% don't indent paragraphs
+ \setlength{\parindent}{0pt}
+ % turn on hanging indent if param 1 is 1
+ \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
+ % set entry spacing
+ \ifnum #2 > 0
+ \setlength{\parskip}{#2\baselineskip}
+ \fi
+ }%
+ {}
+\usepackage{calc}
+\newcommand{\CSLBlock}[1]{#1\hfill\break}
+\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
+\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
+\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
+$endif$
+$if(csquotes)$
+\usepackage{csquotes}
$endif$
$if(title)$
from citeproc.
On 2: your bibtex entry has both a doi
and a url
. If you remove the empty doi, the URL will render. The default chicago-author-date.csl has
<choose>
<if variable="DOI">
<text variable="DOI" prefix="https://doi.org/"/>
</if>
<else>
<text variable="URL"/>
</else>
</choose>
I think this is a bug; the doi
variable shouldn't match if its content is empty, so this needs looking into.
On 1: I don't see the 10
when I try this. What pandoc version are you using, and what exact command did you use to produce this output?
from citeproc.
Note: I don't think the "if" clause is being triggered here. If it were, we'd get the prefix. Also, I confirmed that Correction: it is being triggered, as we can see by inserting doi
is parsed as TextVal ""
which should be considered empty.<text value="BLAH"/>
there. Not sure why though!
from citeproc.
Aha. Putting a trace in before we call citeproc
from pandoc, I see:
(Variable "doi",FancyVal (Many {unMany = fromList [Link ("",[],[]) [Str ""] ("https://doi.org/","")]}))
Culprit then is linkifyVariables
, which should do nothing when the variable is empty.
from citeproc.
I've fixed 2 in pandoc. Can't reproduce 1.
from citeproc.
Thank you very much for fixing #2, that is very much appreciated.
With respect to #1: I use pandoc version 2.11.3.1, and in vim
I call for this command:
!pandoc -t latex % --bibliography=/Users/whrose/pandocworkshop/masterwiki.bib --template=eisvowhr --top-level-division=part -F pandoc-crossref --citeproc --pdf-engine=xelatex -s -o /Users/whrose/pandocworkshop/pandoc_output.pdf
from citeproc.
from citeproc.
Related Issues (20)
- Citations inside listing captions are not resolving HOT 1
- Citeproc html error for csl styles that do not print titles HOT 5
- How to output raw issued date? HOT 3
- disambiguation error (note style)
- Detection of English-language entries only permits ISO 639-1 codes HOT 2
- Reference stripped from the output in cites with position "ibid" and a suffix without a locator HOT 7
- How could citeproc support CSL-M layout? HOT 40
- `link-bibliography` option does not hyperlink references without URLs in notes HOT 6
- Localizing parts of citations HOT 5
- Error in latex generation of portuguese quotes in CSLReferences field HOT 15
- Installing the executable HOT 2
- [Help] Author only citations BibTex HOT 1
- Incorrect sorting of bibliography HOT 12
- Stopword capitalized after abbreviation HOT 6
- Use citeproc for style development HOT 11
- Support for link/color only the year in the citations HOT 1
- Can I replace the citation key with bibliography? HOT 3
- Author-in-text citations render as superscript HOT 3
- Add support for semantic markup in bibliographies HOT 3
- Disambiguation error HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citeproc.