emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-mode export to (latex) PDF


From: Stefan Nobis
Subject: Re: org-mode export to (latex) PDF
Date: Sat, 10 Jul 2021 18:44:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)

Maxim Nikulin <manikulin@gmail.com> writes:

> (add-to-list 'org-latex-inputenc-alist '("utf8" . "utf8x"))

Do not do this. Both, utf8x and ucs, are obsolete and deprecated for
quite some time.

For proper unicode support, switch from pdflatex to lualatex or
xelatex. With these newer backends (and proper adjustments for the
LaTeX preamble generated by Org) Unicode should work out of the box
(if the font supports the requested Unicode characters).

My current packages setup to support all three engines looks like
this (should work for normal documents and beamer):

--8<---------------cut here---------------start------------->8---

(setq org-latex-default-packages-alist
        '(("AUTO" "inputenc" t ("pdflatex"))
          ("T1" "fontenc" t ("pdflatex"))
          ("" "fontspec" t ("lualatex" "xelatex"))
          ("AUTO" "babel" t ("pdflatex" "lualatex"))
          ("AUTO" "polyglossia" t ("xelatex"))
          ("" "graphicx" t)
          ("" "grffile" t)
          ("" "longtable" nil)
          ("" "wrapfig" nil)
          ("" "rotating" nil)
          ("normalem" "ulem" t)
          ("" "mathtools" t)
          ("" "amssymb" t)
          ("" "textcomp" t ("pdflatex"))
          ("warnings-off={mathtools-colon,mathtools-overbracket}" 
"unicode-math" t ("lualatex" "xelatex"))
          ("" "caption" nil)
          ("" "booktabs" t)
          ("" "hyperref" nil)
          "\\tolerance=1000"))

--8<---------------cut here---------------end--------------->8---

To switch e.g. to lualatex (and e.g. use latexmk for compiling), I
use:

--8<---------------cut here---------------start------------->8---

(setq org-latex-compiler "lualatex")
(setq org-latex-bib-compiler "biber")
(setq org-latex-pdf-process '("latexmk -f -pdf -%latex -outdir=%o %f"))

--8<---------------cut here---------------end--------------->8---

--
Until the next mail...,
Stefan.



reply via email to

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