emacs-humanities
[Top][All Lists]
Advanced

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

Re: [emacs-humanities] org export to PDF


From: Marcus Kammer
Subject: Re: [emacs-humanities] org export to PDF
Date: Sat, 10 Jun 2023 22:48:09 +0200

Hello,

here are my preferred org latex pdf export settings:

#+begin_src emacs-lisp
(require 'ox-latex)

(setq org-latex-packages-alist '(("" "listings")
                                 ("" "booktabs")
                                 ("AUTO" "polyglossia" t ("xelatex" "lualatex"))
                                 ("" "grffile")
                                 ("" "unicode-math")
                                 ("" "xcolor")))

(setq org-latex-pdf-process '("latexmk -xelatex -shell-escape -quiet -f %f"))

(setq org-latex-compiler "xelatex")

(setq org-latex-listings t)
(setq org-latex-tables-booktabs t)
(setq org-latex-images-centered t)

(setq org-latex-listings-options
      '(("basicstyle" "\\ttfamily")
        ("showstringspaces" "false")
        ("keywordstyle" "\\color{blue}\\textbf")
        ("commentstyle" "\\color{gray}")
        ("stringstyle" "\\color{green!70!black}")
        ("stringstyle" "\\color{red}")
        ("frame" "single")
        ("numbers" "left")
        ("numberstyle" "\\ttfamily")
        ("columns" "fullflexible")))

(setq org-latex-inputenc-alist '((\"utf8\" . \"utf8x\")))

(with-eval-after-load 'ox-latex
  (add-to-list 'org-latex-classes
               '("koma-general"
                 "\\documentclass[11pt,captions=tableheading]{scrartcl}
  \\linespread{1.25}
  \\usepackage{fontspec}
  \\defaultfontfeatures{Mapping=tex-text, RawFeature={+zero}}
  \\setmainfont{Noto Sans}[BoldFont=*-Medium,ItalicFont=*-Italic]
  \\setsansfont{Noto Sans}[BoldFont=*-Medium,ItalicFont=*-Italic]
  \\setmonofont{Noto Sans Mono}[BoldFont=*-Medium,Scale=0.8]
  \\usepackage{fancyhdr}
  \\pagestyle{fancy}
  \\fancyhf{}
  \\fancyhead[L]{\\leftmark}  % Left header
  \\fancyhead[R]{\\thepage}  % Right header"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\subsection{%s}" . "\\subsection*{%s}")
                 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                 ("\\paragraph{%s}" . "\\paragraph*{%s}")
                 ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))

(setq org-latex-default-class "koma-general")

(eval-after-load 'ox '(require 'ox-koma-letter))
#+end_src emacs-lisp

"l@tlo" <lists@traduction-libre.org> writes:

> I'm using org-export-dispatch to try to get a PDF for my current draft but I 
> get too many
>
> ! Package inputenc Error: Unicode character   (U+2009)
> (inputenc)                not set up for use with LaTeX.
>
> and the process stops.
>
> All the characters are either French accentuated things of Japanese 
> characters.
>
> What am I supposed to do ?


--
Cheers, Marcus Kammer (Nuremberg, DE, 49.4N, 11.0E)
Written on: Sat, 10 Jun 2023 22:47 +0200
GnuPG Key: https://meta.sr.ht/~marcuskammer.pgp
Fingerprint: 86DB 0F30 F9F1 661A 54E2 1664 C374 817B E285 268F



reply via email to

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