Re: [Question] A single *-language-alist in ox-latex.el?

2021-10-02 Thread Juan Manuel Macías
Hi Stefan,

Stefan Nobis writes:

> And, as far as I remember, babel development had nearly ceased during
> that period.
>
> Since quite some years, the development has gained much more traction
> for babel and, as far as I read, babel is today as good or superior to
> polyglossia in many regards (but polyglossia is also in quite a good
> shape today). See for example:
>
> https://tex.stackexchange.com/questions/482396/decide-between-polyglossia-and-babel-for-lualatex-in-2019
>
> In short: Babel is a very good choice in almost all cases, maybe
> except for right-to-left texts set with XeLaTeX.

Indeed, Javier Bezos (who is also the author of very popular packages
like enumitem or titlesec/titletoc) is doing a great job with Babel (you can
see the latest news here: https://latex3.github.io/babel/). And he has
added a lot of powerful features, such as babel replacements (with Lua code)
or the possibility to load languages via ini files and define new
languages with \babelprovide

I've been doing some testing, and I think this hypothetical new
unified list could support two types of members:

1. A member with 2 elements:

("lang-id" "lang-name"),

i.e.: ("it" "italian")

2. A member with 4 elements (for variants):

("lang-id" "babel-lang-name" "polyglossia-lang-name" "polyglossia-variant")

i.e.: ("la-classic" "classiclatin" "latin" "classic")

And then it would be necessary to make some minor modifications in
org-latex-guess-polyglossia-language and org-latex-guess-babel-language.

I will try to write a patch (or at least a proof of concept) in the next days 
...

Best regards,

Juan Manuel 


-- 
--
--
Juan Manuel Macías

https://juanmanuelmacias.com/



Re: [Question] A single *-language-alist in ox-latex.el?

2021-10-02 Thread Stefan Nobis
Juan Manuel Macías  writes:

> Well, if I'm not mistaken, the situation in the LaTeX ecosystem is
> this: Polyglossia appeared as a babel replacement for XelaTeX and
> LuaLaTeX, since babel, at that time, had no support for these two
> new Unicode based TeX engines.

And, as far as I remember, babel development had nearly ceased during
that period.

Since quite some years, the development has gained much more traction
for babel and, as far as I read, babel is today as good or superior to
polyglossia in many regards (but polyglossia is also in quite a good
shape today). See for example:

https://tex.stackexchange.com/questions/482396/decide-between-polyglossia-and-babel-for-lualatex-in-2019

In short: Babel is a very good choice in almost all cases, maybe
except for right-to-left texts set with XeLaTeX.

> But I think it does not make much sense to mantain in ox-latex.el
> two separate lists today. Maybe, for simplicity, it would be better
> to unify the two lists in a single db, something like
> `org-latex-language-alist'. What do you think?

+1

-- 
Until the next mail...,
Stefan.



[Question] A single *-language-alist in ox-latex.el?

2021-10-02 Thread Juan Manuel Macías
Hi,

I have seen that `org-latex-polyglossia-language-alist' contains far
more languages than `org-latex-babel-language-alist'.

Well, if I'm not mistaken, the situation in the LaTeX ecosystem is this:
Polyglossia appeared as a babel replacement for XelaTeX and LuaLaTeX,
since babel, at that time, had no support for these two new Unicode
based TeX engines. I think those two separate lists in ox-latex.el
translate that situation. But the reality is different now: babel has
full support now for LuaTeX and XeTeX and supports more languages than
polyglossia (and also supports language variants. See
http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf p.
20). In addition, babel is part of the LaTeX core and is, therefore,
better mantained.

Of course, anyone who wants to use polyglossia in their documents can
keep doing it without problems. But I think it does not make much sense
to mantain in ox-latex.el two separate lists today. Maybe, for
simplicity, it would be better to unify the two lists in a single db,
something like `org-latex-language-alist'. What do you think?

Best regards,

Juan Manuel

--
--
--
Juan Manuel Macías

https://juanmanuelmacias.com/