From 009023b3a08ab4f300924c0670753be475036199 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Fri, 11 Jul 2025 13:13:31 +0100 Subject: Refactor org export settings --- emacs-config.org | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'emacs-config.org') diff --git a/emacs-config.org b/emacs-config.org index 3e4f585..97e89af 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -357,7 +357,8 @@ Case-sensitive search by default and show match count in minibuffer. (with-eval-after-load 'org <> <> - <>) + <> + <>) #+end_src #+begin_src elisp :noweb yes @@ -554,17 +555,23 @@ Redisplay images when executing an org block. (org-redisplay-inline-images))))) #+end_src -*** Org LaTeX +*** Org Export +:PROPERTIES: +:header-args:elisp: :tangle no :noweb-ref org-export-settings +:END: + Use SVG LaTeX previews. #+begin_src elisp - (setq-default - org-preview-latex-default-process 'dvisvgm - org-html-with-latex 'dvisvgm) + (setq-default org-preview-latex-default-process 'dvisvgm) + (with-eval-after-load ox-html + (setq-default org-html-with-latex 'dvisvgm)) #+end_src + Set [[https://ctan.org/pkg/hyperref][hyperref]] LaTeX settings. #+begin_src elisp - (setq-default org-latex-hyperref-template + (with-eval-after-load ox-latex + (setq-default org-latex-hyperref-template "\\hypersetup{ pdfauthor={%a}, pdftitle={%t}, @@ -579,13 +586,15 @@ Set [[https://ctan.org/pkg/hyperref][hyperref]] LaTeX settings. linkcolor=blue } ") + ) #+end_src Add =doc= LaTeX class. #+begin_src elisp - (cl-pushnew - '("doc" - " + (with-eval-after-load ox-latex + (cl-pushnew + '("doc" + " % Document Type \\documentclass[11pt]{article} @@ -612,12 +621,13 @@ Add =doc= LaTeX class. \\renewcommand{\\headruleskip}{10pt} % top line padding \\renewcommand{\\footruleskip}{10pt} % bottom line padding " - ("\\section{%s}" . "\\section*{%s}") - ("\\subsection{%s}" . "\\subsection*{%s}") - ("\\subsubsection{%s}" . "\\subsubsection*{%s}") - ("\\paragraph{%s}" . "\\paragraph*{%s}") - ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) - org-latex-classes) + ("\\section{%s}" . "\\section*{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\paragraph{%s}" . "\\paragraph*{%s}") + ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) + org-latex-classes) + ) #+end_src ** Org Habit -- cgit