From 7e1d96e677816616e29278e917aba09148ffc14d Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Tue, 5 Jul 2022 15:30:35 +0200 Subject: [PATCH] [Emacs] Remove references to minted, default to engraved backend --- org/config/emacs.org | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index 8b8ebea..4a66481 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -4398,9 +4398,9 @@ extended however we like! <> <> <> + <> <> <> - <> <> <> <> @@ -5031,18 +5031,20 @@ coloring is ~engraved~. (use-package engrave-faces :defer t :straight (:build t) - :after org - :config - (with-eval-after-load 'org - (csetq org-latex-src-block-backend 'engraved))) + :after org) #+END_SRC +#+name: org-latex-src-block-backend +#+begin_src emacs-lisp :tangle no +(require 'engrave-faces) +(csetq org-latex-src-block-backend 'engraved) +#+end_src + The default packages break my LaTeX exports: for some reasons, images are not loaded and exported in PDFs, so I needed to redifine the default packages excluding the one that broke my exports; namely, I need to remove ~inputenc~, ~fontenc~ and ~grffile~. I also added some default packages: -- ~minted~ for syntax highlighting - ~cleveref~ for better references to various elements. - ~svg~ for inserting SVG files in PDF outputs - ~booktabs~ for nicer tables @@ -5054,8 +5056,7 @@ packages: ("" "grffile" t))) (delete package org-latex-default-packages-alist)) -(dolist (package '(("" "minted") - ("capitalize" "cleveref") +(dolist (package '(("capitalize" "cleveref") ("" "svg") ("" "booktabs") ("" "tabularx"))) @@ -5071,15 +5072,6 @@ since we are using ~cleveref~: (setq org-export-latex-hyperref-format "\\ref{%s}") #+END_SRC -And Minted should be default break lines if a line is too long: -#+name: org-export-latex-minted-options -#+begin_src emacs-lisp :tangle no -(setq org-latex-minted-options '(("breaklines") - ("tabsize" "2") - ("frame" "single") - ("autogobble"))) -#+end_src - When it comes to the export itself, the latex file needs to be processed several times through XeLaTeX in order to get some references right. Don’t forget to also run bibtex!