emacsorphanage / ox-pandoc

Another org-mode exporter via pandoc.
GNU General Public License v2.0
46 stars 13 forks source link

Issue with citeproc and beamer #35

Closed lf-araujo closed 7 months ago

lf-araujo commented 7 months ago

Consider the example:

In a presentation:

#+TITLE: Ordered regression models
#+AUTHOR: author 
#+PANDOC_OPTIONS: number-sections:nil
# #+PANDOC_OPTIONS: csl:chicago-fullnote-modified.csl
#+BIBLIOGRAPHY: library.bib

* section

[cite: @201904DepressionProblematic2019]

Given the bib saved as library.bib:

@article{201904DepressionProblematic2019,
  title = {2019-04 {{Depression}} Is a Problematic Phenotype ({{King}}'s {{College}})},
  date = {2019-04-23},
  publisher = {{OSF}},
  doi = {10.17605/OSF.IO/QDKPW},
  url = {https://osf.io/qdkpw/},
  urldate = {2021-08-18},
  abstract = {Invited talk at the "Dissecting heterogeneity of Major Depression" symposium, organized by the Biomarkers And Genomics Theme, NIHR Maudsley Biomedical Research Centre, King's College London. Download "video.mp4" which contains both the slides and the audio-recording.       Hosted on the Open Science Framework},
  langid = {english},
  keywords = {✅,📩},
  file = {/home/luis/Zotero/storage/XG3VVTT8/jf7qe.html}
}

exporting as export-to-beamer-pdf will not detect the correct citation.

ericsfraga commented 7 months ago

Some things to note: you don't ask for the bibliography to be printed (add a #print_bibliography: line), the bib entry has no author so consider using [cite/numeric: ....], and this all has nothing to do with pandoc, as far as I can tell.

lf-araujo commented 7 months ago

Tried, and no go.

I think the issue is in ox-pandoc, the full call does not include the --citeproc flag:

Running pandoc with args: (-f org -t beamer -o /home/luis/Documents/OneDrive/Aulas/org presentations/test.pdf --bibliography=/home/luis/Documents/library.bib --variable=revealjs-url=https://revealjs.com --mathjax --standalone /home/luis/Documents/OneDrive/Aulas/org presentations/test.tmpgOMIeA.org)

If I understand the readme correctly it should include a --citeproc call every time there is a #+bibliography in the header.

a-fent commented 7 months ago

I would suggest at the moment using #+cite_export: csl to get Org mode to format your citations and bibliographies before they get passed to pandoc.

This relates to another issue, please leave this one open as it provides further information. See also https://list.orgmode.org/9217E511-2D99-420D-AA9A-1441955DA8E4@pressure.to/

lf-araujo commented 7 months ago

Can confirm that my case was related to a very old doom emacs installation. Reinstalling the distribution fixed the issue, apparently doom changed where some package files were stored, thus causing duplication of files in the system.