Compare commits

..

2 Commits

View File

@ -1919,15 +1919,15 @@ Emacs will complain that ~TeX-master~ is no safe local variable in case it reads
a LaTeX file that sets ~TeX-master~. The list below summarizes the main [[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]]
configuration objectives:
1. Listing [[lst:set-tex-options]] ensures installation of [[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]] and initializes
[[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]] properly for =LuaTeX= or =LuaLaTeX=. Listing [[lst:set-tex-options]] also
enables *indenting between square brackets* which is a recent feature.
[[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]] properly for Lua-TeX or Lua-LaTeX. Listing [[lst:set-tex-options]]
also enables *indenting between square brackets* which is a recent feature.
2. Listing [[lst:set-latex-related-options]] configures the Emacs =bibtex= library
to use the LaTeX =BiBTeX= dialect for backwards compatibility, disables font
scaling of section titles, and configures =latex= for a full featured
to use the LaTeX BibTeX dialect for backwards compatibility, disables font
scaling of section titles, and configures LaTeX for a full featured
=LaTeX-section-command=.
#+caption[Ensure =AUCTeX= installation and set =TeX= option]:
#+caption: Ensure =AUCTeX= installation and set =TeX= option.
#+caption[Ensure =AUCTeX= installation and set TeX options]:
#+caption: Ensure =AUCTeX= installation and set TeX options.
#+name: lst:set-tex-options
#+begin_src emacs-lisp -n :results silent
(when (ensure-package-installation 'auctex)
@ -1943,8 +1943,8 @@ configuration objectives:
TeX-electric-math nil)))
#+end_src
#+caption[Set =LaTeX= options]:
#+caption: Set =bibtex= options.
#+caption[Set BibTeX and LaTeX options]:
#+caption: Set BibTeX and LaTeX options.
#+name: lst:set-latex-related-options
#+begin_src emacs-lisp -n :results silent
(with-eval-after-load 'bibtex
@ -2006,7 +2006,7 @@ Links to Org-mode videos are:
:ID: 0D725DA1-7431-40BD-85FF-EFF4F7E4EC95
:END:
I have split the initial [[https://orgmode.org/][Org-mode]] setup over eleven listings. Here, follows a
I have divided the initial [[https://orgmode.org/][Org-mode]] setup into eleven listings. Here, follows a
list detailing and motivating each listing:
1. Listing [[lst:set-org-options]] handles basic [[https://orgmode.org/][Org-mode]] options.
2. Listing [[lst:org-capture-templates]] initializes a simple capture template.
@ -2023,10 +2023,11 @@ list detailing and motivating each listing:
constant declared "private" by two dashes in its name!
8. Listing [[lst:set-org-export-options]] selects the =non-intrusive= expert user
interface for export dispatching.
9. Listing [[lst:setup-org-for-lualatex-export]] and
[[lst:set-ox-latex-options-for-lualatex-export]] configure [[https://orgmode.org/][Org-mode]] to generate
output for the LuaLaTeX compiler.
# 10. Listing [[lst:setup-org-latex-classes]] defines [[info:org#LaTeXspecificexportsettings][org-latex-classes (info)]] for
9. Listing [[lst:setup-org-for-lualatex-preview]] allows [[https://orgmode.org/][Org-mode]] to generate
preview =png= images with Lua-LaTeX and ImageMagick.
10. Listing [[lst:set-ox-latex-options-for-lualatex-export]] configures [[https://orgmode.org/][Org-mode]] to
generate output for Lua-LaTeX.
# 11. Listing [[lst:setup-org-latex-classes]] defines [[info:org#LaTeXspecificexportsettings][org-latex-classes (info)]] for
# backward compatibility. For an explanation of the code in listing
# [[lst:setup-org-latex-classes]], type {{{kbd(C-h v org-latex-classes)}}}.
@ -2058,6 +2059,18 @@ list detailing and motivating each listing:
("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
("\\.pdf\\'" . emacs))
org-latex-default-packages-alist '(("" "fontspec" t ("lualatex"))
("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex"))
("" "graphicx" t)
("" "longtable" nil)
("" "wrapfig" nil)
("" "rotating" nil)
("normalem" "ulem" t)
("" "amsmath" t)
("" "amssymb" t)
("" "capt-of" nil)
("" "hyperref" nil))
org-modules (list 'ol-bibtex 'ol-doi 'ol-eww 'ol-info
'org-id 'org-protocol 'org-tempo)
org-use-property-inheritance t))
@ -2289,9 +2302,9 @@ def __org_babel_python_format_value(result, result_file, result_params):
(setopt org-export-dispatch-use-expert-ui t))
#+end_src
#+caption[Setup =org= for export to LuaLaTeX]:
#+caption: Setup =org= for export to LuaLaTeX.
#+name: lst:setup-org-for-lualatex-export
#+caption[Setup =org= for preview using Lua-LaTeX]:
#+caption: Setup =org= for preview using Lua-LaTeX.
#+name: lst:setup-org-for-lualatex-preview
#+begin_src emacs-lisp -n :results silent
(with-eval-after-load 'org
;; https://list.orgmode.org/87o84fd4oi.fsf@posteo.net/
@ -2310,24 +2323,11 @@ def __org_babel_python_format_value(result, result_file, result_params):
("lualatex -interaction nonstopmode -output-directory %o %f")
:image-converter
("convert -density %D -trim -antialias %f -quality 100 %O")))
(setopt
org-preview-latex-default-process 'luamagick
org-latex-default-packages-alist '(("" "fontspec" t ("lualatex"))
("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex"))
("" "graphicx" t)
("" "longtable" nil)
("" "wrapfig" nil)
("" "rotating" nil)
("normalem" "ulem" t)
("" "amsmath" t)
("" "amssymb" t)
("" "capt-of" nil)
("" "hyperref" nil))))
(setopt org-preview-latex-default-process 'luamagick))
#+end_src
#+caption[Set =ox-latex= options for export to LuaLaTeX]:
#+caption: Set =ox-latex= options for export to LuaLaTeX.
#+caption[Set =ox-latex= options for export to Lua-LaTeX]:
#+caption: Set =ox-latex= options for export to Lua-LaTeX.
#+name: lst:set-ox-latex-options-for-lualatex-export
#+begin_src emacs-lisp -n :results silent
(when (require 'ox-latex nil 'noerror) ;; To use the safe file local variables!