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

On 22/07/2022 21:07, Juan Manuel Macías wrote:

Forget this. On second thought, I think that the option you proposed
"#+LaTeX_Header: % \usepackage{babel}" is much better.

(I don't know where my head was and I didn't remember there was a
string-match, so your suggestion is the shortest way. However, the line
would have to be (with arguments):

#+LaTeX_Header: % \usepackage[something]{babel}


#+LaTeX_Header: % \usepackage[something]{polyglossia}

or modify the regexp in org-latex-guess-babel/polyglossia-language.

It was you who suggested


At least at first glance it works in texlive-2019 (Ubuntu-20.04), so it is not a feature from the latest release. Unless commented out, "#+latex_header: \usepackage{babel}" may be considered as an instruction to add value of #+language: to \documentclass option. I do not expect that adjusted regexp will cause a problem.

Anyway, whatever the choice, I would vote for Org not to load babel or
polyglossia by default, and for the default option of the custom
variable that handles that globally to be nil. For example, I'm in the
group of users that load babel using an external preamble (a .tex or a
.sty file or a 'latex-class'), and frankly I don't want to have to add a
new line to all my documents to prevent Org from reloading babel for me
and return an error on the compilation.

Doesn't the purpose of a custom variable is to set it to a suitable value in the init file making it unnecessary adding configuration to each org file? I did not expected that setting it to e.g. nil will be real burden for users like you.

My vote is to configure babel by default if it is possible to provide default preamble that allows reasonable quality of PDF for simple Org documents with no explicit configuration.

Ideally, the following should be possible out of the box. When no advanced features are involved, user should be able to just export document to e.g. having printed version of their notes during a meeting, to send a summary to the boss. etc. It should be possible for users completely ignorant in respect to LaTeX.

Likely language is not enough and e.g. paper size should be guessed (LC_PAPER?) as well.

If a document require careful tuning then a couple of extra lines in the org file or a couple of additional custom variables in the init file should not be a problem.

reply via email to

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