From 57576de1f1fa332c62b60117049057a34f62f7b2 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Thu, 6 Jul 2023 07:33:58 +0200 Subject: [PATCH] Add LaTeX mode to the file variables for LaTeX export --- README.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 86ab17a..b1e17c6 100644 --- a/README.org +++ b/README.org @@ -3,7 +3,7 @@ #+latex_class: article-local #+latex_class_options: [11pt,a4paper,english,svgnames] #+macro: kbd (eval (by-backend-kbd-org-macro $1)) -#+options: ^:{} +#+options: ^:{} timestamp:nil #+property: header-args:emacs-lisp :exports code :tangle init.el #+startup: showeverything #+begin_src latex :noweb yes :results raw @@ -2440,6 +2440,8 @@ else: (with-eval-after-load 'ox-latex (setopt org-latex-compiler "lualatex" + org-latex-compiler-file-string + "%% -*- LaTeX; -*-\n%% Intended LaTeX compiler: %s\n" org-latex-hyperref-template "\\hypersetup{ pdfauthor={%a}, pdftitle={%t}, @@ -3354,6 +3356,9 @@ environments and non-floating breakable LaTeX environments by means of (make-variable-buffer-local 'org-export-filter-src-block-functions) (add-to-list 'org-export-filter-src-block-functions 'org-latex-engraved-source-block-filter) + (make-variable-buffer-local 'org-latex-compiler-file-string) + (setq org-latex-compiler-file-string + "%% -*- mode: LaTeX; -*-\n%% Intended LaTeX compiler: %s\n") (when (fboundp 'smart-latex-engrave-org-source-blocks) (smart-latex-engrave-org-source-blocks))) #+end_src