emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-ref not working when exporting to LaTeX
@ 2022-05-11 17:41 Alessandro Bertulli
  2022-05-11 18:14 ` Daniel Fleischer
  0 siblings, 1 reply; 6+ messages in thread
From: Alessandro Bertulli @ 2022-05-11 17:41 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Org-ref not working when exporting to LaTeX
@ 2022-05-12 14:40 Alessandro Bertulli
  0 siblings, 0 replies; 6+ messages in thread
From: Alessandro Bertulli @ 2022-05-12 14:40 UTC (permalink / raw)
  To: jkitchin, danflscr; +Cc: emacs-orgmode

Thank you professor Kitchin.

Our org-LaTeX-pdf-process differ only for the "-f" option, so I don't
think that's the cause. However, it turned out that biber was NOT
installed with my TeX distribution. After installing it, it all worked
well. Sorry if this actually silly error got some headaches.

Daniel, thanks for your suggestion. Your advice and professor Kitchin's
answer actually questioned me: I know basically nothing about the
differences between LaTeX, biblatex and CSL, so I think I need to
investigate that before deciding wich one to use.

Thanks again,
Alessandro Bertulli


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-12 14:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 17:41 Org-ref not working when exporting to LaTeX Alessandro Bertulli
2022-05-11 18:14 ` 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

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).