On 21/07/2022 04:30, Juan Manuel Macías wrote:
Max Nikulin writes:
#+language: lang
--> \usepackage[lang]{babel}
But I think also users who use custom preamble templates included in
org-latex-classes or those who load the entire preamble via an external
file (a .sty or .tex file) will want to avoid this. Maybe it would be
nice to add a defcustom, with the following values:
A custom variable may be convenient, however originally I considered
only per-document configuration. If a user do not like babel added by
default then there are some alternatives as
#+latex_header: \usepackage[AUTO]{polyglossia}
or
#+latex_header: % \usepackage{babel} % suppress babel and polyglossia
Certainly with the following variant
#+latex_header: % \usepackage{polyglossia} % no babel or polyglossia
The commented out command is a kind a hack, but I consider it as
acceptable for advanced users who have custom classes or who need to
compile document without babel (or polyglossia) for some reason.
If you feel that defcustom should be added as well, variants may be
- nil to suppress babel and polyglossia
- 'babel or 'polyglossia symbols to get language from #+language:
keyword or from LANGUAGE or LANG environment. Unsure which LC_...
variable may have greater priority.
- string for exact latex code added to preamble.