[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia

From: Max Nikulin
Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists
Date: Thu, 21 Jul 2022 21:36:16 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

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}


#+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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]