-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems rendering superscripts correctly for in-text citations when exporting to ODT #160
Comments
Hello, thanks a lot for the detailed report and apologies for responding only now. I can confirm the problem, which is caused, I think, by the space present between the citation in superscript and the previous word or punctuation. The best solution would be to check during Org export whether a citation starts with text in superscript and eliminate any leading space if that is the case (actually, something similar is already done for note citations). I will try to fix the problem in the Org CSL export processor in the near future. |
I've merged a pull request now (#161), which should solve the core rendering problem. I have also prepared a couple of citeproc and Org (oc-csl) patches that together delete the spaces before superscript citations -- I'll try to apply them shortly, although the Org patch might take a bit of time because of the mailing list discussions. |
...the citeproc part (#162 ) has been merged, the Org patch is WIP. |
I've also pushed the Org patch onto main so with the latest citeproc-el and Org development version these superscript citations should be properly exported to any supported format including odt. |
This is amazing. Thank you so much for your hard work! For reference, the solution in the thread linked by @kjambunathan also works for my particular use-case, but it's great to having this in Org mainstream as well. Hopefully this helps other folks with strict editing requirements. |
Thanks, I've looked into @kjambunathan's solution and it seems to be using the dedicated org-odt citeproc-el formatter which is in certain respects still a work in progress -- eventually I intend to integrate it into oc-csl too. |
Describe the bug
Hi,
I'm having trouble getting
citar
andciteproc-el
to render certain superscripted citations properly when exporting to ODT (usingorg-cite
). Basically, the generated ODT document shows the underlyingorg
shorthand (^{1}
) rather than a proper superscripted citation.Unsurprisingly, only CSL styles that rely on superscript citations (e.g.,
nature.csl
,american-medical-association.csl
, etc.) are affected. This is not an issue with certain CSL styles that don't require superscript numbers (e.g.,springer-vancouver.csl
).Some things I've noticed:
org-mode
) renders correctly in the ODT file—only the superscripted citations don't get convertedorg-ref
, so this makes me believe that something is not being piped to theox-odt
exporter appropriatelyTo Reproduce
A (stripped down) version of my configuration is below:
In the manuscript buffer, I execute
citar-citeproc-select-csl-style
and select the appropriate CSL file (e.g., Nature). I also put in the following header to ensure the proper CSL file is loaded:#+CITE_EXPORT: csl ~/Documents/Zettelkasten/Templates/Text/CSL/american-medical-association.csl
I export using
org-export-dispatch
to ODT, and the in-text citations of the resultant ODT file are displayed as^{1}
when viewed in LibreOffice.Expected behavior
Correct rendering of superscript citations in exported ODT files. Any help would be greatly appreciated!
Emacs version:
GNU Emacs 29.3
Org 9.7-pre
The text was updated successfully, but these errors were encountered: