|
From: | Max Nikulin |
Subject: | Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists |
Date: | Wed, 20 Jul 2022 23:12:14 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 20/07/2022 02:31, Juan Manuel Macías wrote:
Max Nikulin writes:On 19/07/2022 22:01, Juan Manuel Macías wrote:+ (replace-match + (mapconcat (lambda (option) (if (equal "AUTO" option) language option)) + (cond ((member language options) (delete "AUTO" options)) + ((member "AUTO" options) options) + (t (append options (list language)))) + ", ")In my opinion this code should not attempt to be excessively clever. If user skipped AUTO then do not append language. Test for duplicated options is redundant as well. Such cases may still be a reason to issue a warning (e.g. by `org-lint').I completely agree. I've kept that old part of the code for backwards compatibility and because, at the end of the day, it doesn't break anything new.
I am sorry, I missed the old code below the added lines.
On the other hand I would consider adding babel by default without explicit header. To suppress loading users may add #+latex_header: % \usepackage{babel}I don't understand this very well. What would happen, then, to users who prefer to use Polyglossia, or those who prefer to explicitly add babel or polyglossia code?
Certainly if polyglossia or explicit babel related commands are detected then default babel configuration is not added to preamble. The idea is to add babel if a user have not expressed her intentions explicitly.
[Prev in Thread] | Current Thread | [Next in Thread] |