Open JonathanReeve opened 1 year ago
Some version information:
pandoc 2.17.1.1
Compiled with pandoc-types 1.22.2, texmath 0.12.4, skylighting 0.12.3.1,
citeproc 0.6.0.1, ipynb 0.2
User data directory: /home/jon/.local/share/pandoc
Copyright (C) 2006-2022 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
pandoc-crossref v0.3.13.0 git commit UNKNOWN (UNKNOWN) built with Pandoc v2.17.1.1, pandoc-types v1.22.2 and GHC 9.0.2
So it looks like since pandoc moved to the org-cite syntax, the "Berkeley-style" citations like [@someReferenceHere]
are no longer parsed as citations:
jon@jon-laptop ~/D/C/D/test (master)> echo "[@citation]" | pandoc -f org -t native
[ Para [ Str "[@citation]" ] ]
jon@jon-laptop ~/D/C/D/test (master)> echo "[cite:@citation]" | pandoc -f org -t native
[ Para
[ Cite
[ Citation
{ citationId = "citation"
, citationPrefix = []
, citationSuffix = []
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0
}
]
[ Str "[cite:@citation]" ]
]
]
And looking through pandoc-citeproc
's code, it looks like it assumes references are first being parsed as citations.
So a workaround to this is just to prepend cite:
to references:
#+title: Figures
#+NAME: postImpressions2
#+LABEL: fig:postImpressions2
#+CAPTION: "Post-Impressions of the Post-Impressionists"
[[../03-colors/images/post-impressions.jpg]]
Or check out [cite:@fig:postImpressions2].
[cite:@Fig:postImpressions2] is capitalized.
Which behaves as expected.
With this input:
Running
pandoc figures2.org --filter pandoc-crossref
gives:In other words, pandoc-crossref correctly numbers the figure, and assigns a caption, but the references are no longer converted to "fig. 1" and "Fig. 1," respectively.
I suppose the larger issue is that there's no documentation for org-mode input. I'll open a separate issue for that.