On Sat, 31 Jan 2026 at 12:20, Ihor Radchenko <[email protected]> wrote:

> Pedro Andres Aranda Gutierrez <[email protected]> writes:
>
> >> The default LaTeX fonts are
> >> Computer Modern Roman/Sans Serif/Typewriter (pdflatex)
> >> Latin Modern Roman/Sans/Mono (lualatex and xelatex)
> >>
> >> If not specified, they might be used as defaults.
> >> Or do I miss something?
> >
> > Maybe you are missing a corner case. You are right that for many popular
> > LaTeX classes, the lm.. fonts are used for lua/xelatex.
> > They are the default fonts, but only, as long as the LaTeX class doesn't
> > specify others internally.
> > So we don't have a 100% guarantee that these are the fonts that will be
> > needed if defining a fallback is necessart.
> > And I do hesitate to mention them, because that might lead to greater
> > confusion.
>
> Hmm. I feel that most users will default to these, and default :font
> will make things easier - without default, users will have to lookup
> default fonts anyway. But let's not argue about this. I will compile the
> things we see differently later and ask for user input in a separate
> thread.
>

My full explanation for this. The process:

1. You specify a document class (or default to article) and the class
template specifies the fonts to use.
That's LaTeX and IMvvHO one of the nicest features. Do we need to amend
something that is working?

2. You want/need to change the document's appearance
2a. You want/need the document typeset in Sans -> we already have a knob
for that
2b. You want/need to use different fonts. Then, if you use Lua/Xe-LaTeX we
have the mechanism to help you.

3. You have something in your text that is not supported by the current
fontset. Then, if you use LuaLaTeX, you will need to add fallbacks. To
identify the fonts that need to be helped with a fallback, the Org exporter
prints a table of unsupported character groups (aka scripts) you need to
add through fallbacks.

So specifying a default font in cases 1 and 2a is putting the bandage
before you are injured -if you allow me the metaphor-. This "bandage" is
actually 2b and 3.



> > What are the next steps?
>
> The next thing I find important to have is some way to define fonts
> inside Org document itself, via keywords. We can already do with
> file-local variables, but having a keyword setting will be idiomatic for
> org export.
>
> The rough idea is something like
> #+LATEX_FONT_MAIN: Font name
> #+LATEX_FONT_SANS: Font name2
> #+LATEX_FONT_MONO: Font name3
> #+LATEX_FONT_MATH: Font name4:<font props>
>
> WDYT?
>


I'm back to lectures and have little or no time for this. In the light of
the answer above, you will understand that I see little use for your
proposal, as it might introduce more confusion than actually help. There
are so many other things in the LaTeX exporter that are only controlled
with ELisp variables...


Apart from this, I think that we need to provide special handling for
> #+begin_language <lang> ... #+end_language special blocks to avoid the
> awkwardness of using different way to specify language for babel vs
> polyglossia.
>

That is something that might be interesting to work on.
IMV, it's the only major dangling point right now. If I find cycles, I will
try to come up with a proposal.

No other items in my priority list.
>
> --
> 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>
>

PS: I will continue to keep the feature branch in sync with main time
permitting.

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