[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia lang
From: |
Juan Manuel Macías |
Subject: |
[PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists |
Date: |
Sun, 03 Oct 2021 15:28:26 +0000 |
Hi all,
I'm attaching a patch with a proposal to unify in a single constant
(named `org-latex-language-alist')
`org-latex-polyglossia-language-alist' and
`org-latex-babel-language-alist', along with some necessary (minor)
modifications in `org-latex-guess-polyglossia-language' and
`org-latex-guess-babel-language'
The new list, which is not exhaustive, is built taking as a reference
the documentation of Babel and Polyglossia in their latest versions
within TeX live 2021. It also assumes the latest improvements in the
babel package (on the current state of the art regarding the babel and
polyglossia packages, see this previous thread:
87wnmv4s87.fsf@posteo.net/">https://list.orgmode.org/87wnmv4s87.fsf@posteo.net/). I have also
corrected some minor inconsistencies in the previous two lists.
This new alist supports three types of members:
- Members with two elements: CODE BABEL/POLYGLOSSIA-OPTION.
i.e.: ("ar" "arabic")
- Members with three elements: CODE BABEL/POLYGLOSSIA-OPTION ASTERISK
(the presence of the asterisk indicates that this language is not loaded
in Babel using the old method of ldf files but using ini files. If Babel
is loaded in an Org document with these languages, the \"AUTO \"
argument is just removed, to avoid compilation errors. The new babel
method with ini files is not supported, for backward
compatibility with 'old' ldf method).
i.e. ("bo" "tibetan" "*")
- Members with four elements (for variants of languages): CODE
BABEL-OPTION POLYGLOSSIA-OPTION POLYGLOSSIA-VARIANT
i.e. ("es" "spanishmx" "spanish" "mexican")
==> babel:
\usepackage[mexican]{babel}
==> polyglossia:
\usepackage{polyglossia}
\setmainlanguage[variant=mexican]{spanish}
I also attach an Org document for testing.
Best regards,
Juan Manuel
0001-ox-latex.el-Unify-in-one-list-babel-and-polyglossia-.patch
Description: Text Data
test.org
Description: Lotus Organizer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists,
Juan Manuel Macías <=