On Sun, 30 Nov 2025 at 13:55, Ihor Radchenko <[email protected]> wrote:

> Pedro Andres Aranda Gutierrez <[email protected]> writes:



> I still think that the values are way too complex. They are definitely

complex for me, even though I have some experience with LaTeX.
>

Are we talking about everything or just about babel configuration?
What is too complex in the following config for fontspec?

((org-mode
  . ((org-latex-multi-lang . "fontspec")
     (org-latex-fontspec-default-features
      . (("Scale" . "MatchLowercase")))
     (org-latex-fontspec-config
      . (("main" :font "TeXGyreSchola"
         :fallback (("emoji" . "AppleColorEmoji:mode=harf")))
         ("sans" :font "TeXGyreHeros")
         ("mono" :font "DejaVu Sans Mono" :features "Scale=MatchLowercase)
         ("math" :font "Stix Two Math"))))))

Do you have an idea to make fallback configuration easier?


> > (<lang from #+LANGUAGES> :provide <string or list of strings>)
>
> Yes, something like this.
>

OK, we already have something like that
with org-latex-fontspec-default-features

For other options, things like shorthands, babelhyphenation, digits, etc.
> We do not really need to implement them now. :provide is enough. But
> others can be added if users ask for them.
>

With this spirit, the fontspec part could have been added ages ago...

>> Yup, it is more appealing to me. Moreover, it has a potential to merge
> >> all font-related settings into a single customization. After all, what
> >> are chances that you would need different fonts for the same language
> >> for babel vs. polyglossia?
> >
> > Contributions to conferences vs. book chapters, for example. Has happened
> > to me.
>
> Could you elaborate? Your example is a documentclass. How does it have
> anything to do wrt babel vs. polyglossia?
>

Of course I can. I have contributed to conferences and book chapters.
In some cases you don't need to do anything but use a document class from
the submission, throughout the review and at the final submission of the
camera ready version of the paper for the proceedings and that is heaven.
But I also came across situations where you were asked to include extra
customisations taking into account babel and then, when the paper was going
to be included in a book, the book's publisher was using polyglossia and
they wanted you to use specific font configurations to get the preprints,
etc.


> >> And even if you do have to do such thing, we
> >> can always have an extra property as in `org-latex-packages-alist' to
> >> limit which compilers a given font should apply to.
> >
> > I can't follow you here... And that should be easier to
> configure/customise
> > for the end user?
>
> Imagine a single customization like `org-latex-fonts'.
> Users can then
> ;; For all compilers
> (push '("CMU Serif" :family "sf") org-latex-fonts)
> (push '("Noto Sans Mono" :family "tt") org-latex-fonts)
> ;; Just for babel
> (push '("Noto Serif" :family "sf" :package "babel") org-latex-fonts)
> ;; Just for ja + babel
> (push '("Noto CJK" :lang "ja" :family "rm" :package "babel")
> org-latex-fonts)
>

I can see why disagree completely...
Mainly I can relate better to configurations if I take the language as the
base element for the configuration.
Because when reading the the LaTeX export, I check the #+LANGUAGE line in
Org and start from there.
And then because I prefer to have separate configurations coexisting in
different variables.
If there is a problem and I say I want fontspec, I prefer to inspect
org-latex-fontspec-config directly than to skim through a variable which
mixes everything and potentially miss the point (for example the languages
plist).

I wouldn't mind if, in the future, there is a layer on top of what I
designed initially, providing this kind of functionality.
I thought we had also spoken about this in the past and that's why I have
continued this development in the direction I have pursued from the
beginning.
I don't see myself writing that higher level layer, though.

-- 
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
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

Reply via email to