emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Org-ref not working when exporting to LaTeX


From: Alessandro Bertulli
Subject: Org-ref not working when exporting to LaTeX
Date: Wed, 11 May 2022 19:41:42 +0200

Hi all!

I'm trying to set up an academic workflow, and being unsure about which
framework to use, I gave org-ref a try. However, I can't make it produce
a correct LaTeX PDF file.

I'm going to post my setup in a minute. The
point is: when exporting the org file to LaTeX (C-c C-e l o), a PDF file
gets produced, but it doesn't process the citation keys. For example, in
my file (see below), I got the key "acm:code" literally printed on the
PDF file, in a bold font.

What am I doing wrong?

This is my setup:

init.el ------------------------
(require 'org-ref)
(setq bibtex-completion-bibliography '("~/Library/debug.bib"))
(require 'org-ref-ivy)

(define-key org-mode-map (kbd "C-c ]") 'org-ref-insert-link-hydra/body)

(setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f"))

(setq org-ref-insert-link-function 'org-ref-insert-link-hydra/body
      org-ref-insert-cite-function 'org-ref-cite-insert-ivy
      org-ref-insert-label-function 'org-ref-insert-label-link
      org-ref-insert-ref-function 'org-ref-insert-ref-link
      org-ref-cite-onclick-function (lambda (_) (org-ref-citation-hydra/body)))

org-ref-test-file.org ----------------------------

#+title: Org-ref test file
#+bibliography:~/Library/debug.bib
#+latex_header: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear, 
hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true] 
{biblatex}
#+latex_header: \addbibresource{~/Library/debug.bib}

* Introduction
Lorem ipsum dolor sit amet [[cite:&acm:code]], consectetur adipisci elit, sed 
do eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim 
veniam, quis nostrum exercitationem ullamco laboriosam, nisi ut aliquid ex ea 
commodi consequatur. Duis aute irure reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non 
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

~/Library/debug.bib ------------------------

@book{acm:code,
  title = {{{ACM}} Code of Ethics and Professional Conduct. {{Affirming}} Our 
Obbligation to Use Our Skills to Benefit Society},
  editor = {{Association for Computing Machinery}},
  date = {2018},
  doi = {10.1145/3274591},
  url = 
{https://www.acm.org/binaries/content/assets/about/acm-code-of-ethics-booklet.pdf},
  shorteditor = {ACM}
}

@article{acm:teachingethics,
  title = {How to Teach Computer Ethics through Science Fiction},
  author = {Burton, Emanuelle and Goldsmith, Judy and Mattei, Nicholas},
  date = {2018-07},
  journaltitle = {Communications of The Acm},
  shortjournal = {Commun. ACM},
  volume = {61},
  number = {8},
  pages = {54--64},
  publisher = {{Association for Computing Machinery}},
  location = {{New York, NY, USA}},
  issn = {0001-0782},
  doi = {10.1145/3154485},
  url = {https://doi.org/10.1145/3154485},
  abstract = {Science fiction in particular offers students a way to cultivate 
their capacity for moral imagination.},
  issue_date = {August 2018},
  pagetotal = {11}
}

---------------------------------

Thanks for your patience,

Alessandro Bertulli



reply via email to

[Prev in Thread] Current Thread [Next in Thread]