Hi Max, list,
That would mean a complete rewrite of everything...
Currently, things are lower level. More on my thought process.
My (maybe candid) expectation was that people using the LaTeX exporter
would be aware that they use a LaTeX engine below Org mode.
They need to be, if they want choose, for example, the right package to
handle their linguistic needs.
I was expecting people to inform themselves enough to understand the
differences between the babel and the polyglossia package to make the right
choice. Or at least to understand why the project they are working on has
made a concrete choice and what the implications are.
Regarding linguistic choice, sometimes, a fontspec configuration with
fallbacks can do font management and adaptation to a specific language can
be as easy as a simple:
#+LATEX_HEADER: \usepackage[<language>]{<babel or polyglossia>}
Either package has its idiosyncrasies and org-latex-polyglossia-font-config
and org-latex-babel-font-config try to cater for all details (a) I have
been able to find in (mostly) official examples in the Internet and b) are
_really_ necessary to have Org produce a working LaTeX file that will
produce a readable PDF. As both variable names imply, we are talking about
font configuration here.
I've gone all the way down to support documents with multiple languages,
which we do right now.
And I've gone the path of CJK and RTL, which are well beyond my linguistic
skills (I can switch from Latin to Cyrillic and the excursion to Greek has
opened my appetite to return to language school and fill a gap: I've read
the Commentarii de Bello Gallico in the original and would like to do the
same with the Anabasis).
If something more high level is needed, it could build on the feature
branch, not replace it.
It is not that I did not look at some solutions pointed at some time ago.
It's that maybe I tend to prefer fine grain control.
Regarding your concrete proposal, I see merits in it (again FFS and as a
shell on top of what we have now).
However, for the time being, the complete use case for a shared document
would be:
1) All authors agree on a file-sharing infrastructure (ie. git)
2) Lead author provides org skeleton and images
3) Lead author provides .dir-locals.el with font configuration
4) Collaborate and be happy, as long as everyone uses the same Org mode
version
In the case of the lonely author (more or less what I have been doing for
the last year):
1) Create your default .dir-locals.el in your ~/Documents folder
2) Create subfolders for the different documents
3) If you have a specific document that doesn't go with your defaults, copy
the .dir-locals.el to the document's directory and adapt it there.
In my case, I have mirrored the font choice of the beamer template I'm
using in my .dir-locals.el and added fallback fonts for emojis. I have thus
the same look and feel in all documents.
/PA
On Sun, 23 Nov 2025 at 08:56, Max Nikulin <[email protected]> wrote:
> > On 22/11/2025 23:20, Ihor Radchenko wrote:
> >>>> ((nil
> >>>> :fonts
> >>>> ((nil :font "Noto Serif"))))
> >>>>
> >>>> That will result in
> >>>> \babelfont{rm}{Noto Serif}
> >>>> \babelfont{sf}{Noto Serif}
> >>>> \babelfont{tt}{Noto Serif}
>
> Perhaps the expectation is that
>
> ((nil
> :fonts
> ((nil :preset noto))))
>
> is expanded to (I just copied this snippet from an earlier message,
> I am unsure what is the best way to specify selected font set)
>
> \babelfont{rm}{Noto Serif}
> \babelfont{sf}{Noto Sans}
> \babelfont{tt}{Noto Mono}
>
> through a preset that is either built-in or installed as a 3rd-party
> Emacs package
>
> ((noto .
> (nil
> :fonts
> ((rm :font "Noto Serif")
> (sf :font "Noto Sans")
> (tt :font "Noto Mono")))))
>
> So that author of documents may quickly switch from 'noto to 'cmu or to
> 'free-fonts. For some scripts likely fixed set of fonts (that does not
> depend on preset) is unavoidable.
>
> I think that Ihor's confusion is a clear sign that configuration should
> be simple for those who do not care and flexible for those exactly knows
> what fonts should be used.
>
>
--
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 1 of the New Koprocracy