emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alessandro Bertulli <alessandro.bertulli96@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Org-ref not working when exporting to LaTeX
Date: Wed, 11 May 2022 19:41:42 +0200	[thread overview]
Message-ID: <871qx0dl0p.fsf@gmail.com> (raw)

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	other threads:[~2022-05-11 17:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 17:41 Alessandro Bertulli [this message]
2022-05-11 18:14 ` Org-ref not working when exporting to LaTeX Daniel Fleischer
2022-05-11 18:17   ` John Kitchin
2022-05-11 18:48     ` Daniel Fleischer
2022-05-11 18:59     ` Bruce D'Arcus
  -- strict thread matches above, loose matches on Subject: below --
2022-05-12 14:40 Alessandro Bertulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qx0dl0p.fsf@gmail.com \
    --to=alessandro.bertulli96@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).