emacs.d/bundle/bundle--latex.el

55 lines
2 KiB
EmacsLisp

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