emacs-orgmode
[Top][All Lists]
Advanced

[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: Fri, 15 Jul 2022 19:18:00 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 15/07/2022 01:17, Juan Manuel Macías wrote:
Juan Manuel Macías writes:

In any case, I personally think that org-latex-language-alist, as it is
now in this patch, is sufficient.

I agree that the lists should be merged. My point is that with unnamed fields and variable number of them it would not be possible to extend this list with additional fields. So additional step with `make-obsolete-variable' would be required.

By the way, Maxim. I have been doing some tests with pdfLaTeX. I've
known for a while now that it's no longer necessary to load the inputenc
package. But it seems that it is not even necessary to load fontenc with
the encoding of each language.

It looks like a promising feature.

In TeX live 2022 the compilation is correct (I think). It seems that
Babel (or russian/greek.ldf) loads the font encodings according to the
declared languages. From the log:

  (/usr/share/texmf-dist/tex/generic/babel/locale/es/babel-spanish.tex)

Interesting, Spanish is not mentioned in your document.

Is this normal or is it a new Babel feature? If it is a new feature, I
can't find it anywhere in the documentation.

I have tried on Ubuntu-20.04 LTS focal (Latest LTS is 22.04 jammy). Without explicit fontenc it may work, but emits a warning

Package babel Warning: No Cyrillic font encoding has been loaded so far.
(babel)                A font encoding should be declared before babel.
(babel) Default `T2A' encoding will be loaded on input line 74.

Unfortunately in the case of

    \usepackage[russian,english]{babel}

\selectlanguage{russian} is required, without it compilation fails with

   ! LaTeX Error: Command \cyrn unavailable in encoding OT1.

With \usepackage[T2A]{fontenc} it behaves accordingly to acceptable for non-important documents graceful degradation. Text is readable, but no hyphenation applied.

So I consider explicit loading of fontenc as more reliable.

If I'm not mistaken, there is now nothing like
an hypothetical 'org-latex-guess-fontenc', and org defaults to the T1
option. If I remember correctly (because I haven't used pdfLaTeX in
ages), the fontenc option for Greek is LGR. And I imagine there will be
many more cases.

That is why I am suggesting a mapping from language to font encoding.

If you or anyone wants to implement that on top of my
patch, that's fine with me.

I do not see a solution "on the top of your patch". Either an additional mapping should be added or your changes should be overwritten by some extensible structure. The former is a step backward in respect to the idea of merging alists, the latter might make unhappy developers of third party packages.




reply via email to

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