Major clean up of the "Writing LaTeX files" section
This commit is contained in:
parent
b3de63f546
commit
6ca1bf3491
70
README.org
70
README.org
@ -1940,16 +1940,11 @@ 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]]
|
a LaTeX file that sets ~TeX-master~. The list below summarizes the main [[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]]
|
||||||
configuration objectives:
|
configuration objectives:
|
||||||
1. Listing [[lst:set-tex-options]] ensures installation of [[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]] and initializes
|
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=.
|
[[https://en.wikipedia.org/wiki/AUCTeX][AUCTeX]] properly for =LuaTeX= or =LuaLaTeX=. Listing [[lst:set-tex-options]] also
|
||||||
2. Listing [[lst:set-tex-options]] also enables *indenting between square brackets*
|
enables *indenting between square brackets* which is a recent feature.
|
||||||
which is a recent feature.
|
2. Listing [[lst:set-latex-related-options]] configures the Emacs =bibtex= library
|
||||||
3. Listing [[lst:update-lualatex-opentype-font-name-database]] defines a function to
|
to use the LaTeX =BiBTeX= dialect for backwards compatibility, disables font
|
||||||
update the =OpenType Font= name database for =LuaLaTeX= when the output of
|
scaling of section titles, and configures =latex= for a full featured
|
||||||
=LuaLaTeX= shows missing fonts.
|
|
||||||
4. Listing [[lst:set-bibtex-options]] configures the Emacs =bibtex= library to use
|
|
||||||
the LaTeX =BiBTeX= dialect for backwards compatibility.
|
|
||||||
5. Listing [[lst:set-font-latex-options]] disables font scaling of section titles.
|
|
||||||
6. Listing [[lst:set-latex-options]] configures =latex= for a full featured
|
|
||||||
=LaTeX-section-command=.
|
=LaTeX-section-command=.
|
||||||
|
|
||||||
#+caption[Ensure =AUCTeX= installation and set =TeX= option]:
|
#+caption[Ensure =AUCTeX= installation and set =TeX= option]:
|
||||||
@ -1969,43 +1964,16 @@ configuration objectives:
|
|||||||
TeX-electric-math nil)))
|
TeX-electric-math nil)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Update the =LuaLaTeX OpenType Font= name database]:
|
#+caption[Set =LaTeX= options]:
|
||||||
#+caption: Update the =LuaLaTeX= =OpenType Font= name database.
|
|
||||||
#+name: lst:update-lualatex-opentype-font-name-database
|
|
||||||
#+begin_src emacs-lisp -n :results silent
|
|
||||||
(with-eval-after-load 'emacs
|
|
||||||
(defun update-lualatex-opentype-font-name-database ()
|
|
||||||
"Update the \"OpenType Font\" name database for \"LuaLaTeX\"."
|
|
||||||
(interactive)
|
|
||||||
(let* ((pair (get-program-code-output
|
|
||||||
"luaotfload-tool" "-vv" "--update" "--force"))
|
|
||||||
(return-code (car pair))
|
|
||||||
(output (cdr pair)))
|
|
||||||
(if (= 0 return-code)
|
|
||||||
(message "%s" (string-trim output))
|
|
||||||
(error "%s" (string-trim output))))))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+caption[Set =bibtex= options]:
|
|
||||||
#+caption: Set =bibtex= options.
|
#+caption: Set =bibtex= options.
|
||||||
#+name: lst:set-bibtex-options
|
#+name: lst:set-latex-related-options
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(with-eval-after-load 'bibtex
|
(with-eval-after-load 'bibtex
|
||||||
(setopt bibtex-dialect 'BibTeX))
|
(setopt bibtex-dialect 'BibTeX))
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+caption[Set =font-latex= options]:
|
|
||||||
#+caption: Set =font-latex= options.
|
|
||||||
#+name: lst:set-font-latex-options
|
|
||||||
#+begin_src emacs-lisp -n :results silent
|
|
||||||
(with-eval-after-load 'font-latex
|
(with-eval-after-load 'font-latex
|
||||||
(setopt font-latex-fontify-sectioning 1.0))
|
(setopt font-latex-fontify-sectioning 1.0))
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+caption[Set =latex= options]:
|
|
||||||
#+caption: Set =latex= options.
|
|
||||||
#+name: lst:set-latex-options
|
|
||||||
#+begin_src emacs-lisp -n :results silent
|
|
||||||
(with-eval-after-load 'latex
|
(with-eval-after-load 'latex
|
||||||
(setopt LaTeX-electric-left-right-brace t
|
(setopt LaTeX-electric-left-right-brace t
|
||||||
LaTeX-section-hook '(LaTeX-section-heading
|
LaTeX-section-hook '(LaTeX-section-heading
|
||||||
@ -2627,30 +2595,6 @@ valid directories and files. In an [[https://orgmode.org/][Org-mode]] buffer th
|
|||||||
1. src_emacs-lisp{(call-interactively 'citar-insert-citation)}.
|
1. src_emacs-lisp{(call-interactively 'citar-insert-citation)}.
|
||||||
2. src_emacs-lisp[:results silent]{(call-interactively 'citar-open)}.
|
2. src_emacs-lisp[:results silent]{(call-interactively 'citar-open)}.
|
||||||
|
|
||||||
*** TODO Compare bibtex and biblatex
|
|
||||||
1. [[https://www.economics.utoronto.ca/osborne/latex/BIBTEX.HTM][Using bibtex: a short guide]]
|
|
||||||
2. [[https://www.tug.org/texlive//devsrc/Master/texmf-dist/doc/latex/biblatex/biblatex.pdf][The biblatex package]]
|
|
||||||
3. [[https://github.com/yuchenlin/rebiber][Rebiber: A tool for normalizing bibtex with official info]]
|
|
||||||
4. [[https://github.com/josephwright/biblatex-phys][A biblatex implementation of the AIP and APS bibliography style]]
|
|
||||||
|
|
||||||
#+caption[Delete =Biber= cache when =Biber= fails to make a bibliography]:
|
|
||||||
#+caption: Delete =Biber= cache when =Biber= fails to make a bibliography.
|
|
||||||
#+name: lst:delete-biber-cache
|
|
||||||
#+begin_src emacs-lisp -n :results silent
|
|
||||||
(with-eval-after-load 'emacs
|
|
||||||
;; https://tex.stackexchange.com/a/579356 answers
|
|
||||||
;; "How to solve Biber exiting with error code 2 but no error messages?"
|
|
||||||
(defun biber-delete-cache ()
|
|
||||||
"Delete the `Biber' cache to get rid of `Biber' exit code 2."
|
|
||||||
(interactive)
|
|
||||||
(let* ((pair (get-program-code-output "rm" "-rf" "$(biber --cache)"))
|
|
||||||
(return-code (car pair))
|
|
||||||
(output (cdr pair)))
|
|
||||||
(if (= 0 return-code)
|
|
||||||
(message "%s" (string-trim output))
|
|
||||||
(error "%s" (string-trim output))))))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** [[https://github.com/tecosaur/engrave-faces#readme][Engrave Faces]]
|
*** [[https://github.com/tecosaur/engrave-faces#readme][Engrave Faces]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:engrave-faces
|
:CUSTOM_ID: sec:engrave-faces
|
||||||
|
Loading…
Reference in New Issue
Block a user