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

>       . (("el"
>           :fonts (("rm" :font "Noto Serif"
>                    :props "Scale=MatchLowercase"))
>           :provide "onchar=ids fonts")
> ...
> \babelprovide[onchar=ids fonts]{greek}
>
> As you see, each language has a part linked to the language that is passed
> to \babelprovide (which is optional, but crucial), while the other part is
> passed to \babelfont (and this part is not).

I've read a section of the babel manual of the \babelprovide command, and
it looks to me that it is not really related to fonts. It is rather
fine-tuning language punctuation and detection. E.g. one can do
alternative hyphenation rules and so on.

> If we went for a flat config, we would need another variable for the
> provides and that would make housekeeping more difficult.
> Touching one variable is less prone to forgetting details than having to
> touch two (IMvHO).

IMHO, it is worth it in this case. Simply because babelprovide is not
really about fonts, maybe except onchar in particular, but that's rather
an exception. What about adding org-latex-babel-language-config variable
for babelprovide and potentially other options?

> If it weren't for that, I could live with a flatter version à la
>
> #+begin_src emacs-lisp
> ((org-mode
>   . ((org-latex-compiler . "lualatex")
>      (org-latex-multi-lang . "babel")
>      (org-latex-babel-font-config
>       . (("el" :variant "rm" :font "Noto Serif" :props
> "Scale=MatchLowercase")
>          (nil  :variant "rm" :font "CMU Serif")
>          (nil  :variant "tt" :font "Noto Sans Mono" :props
> "Scale=MatchLowercase"))))))
> #+end_src
>
> which might be more appealing to you, if I understand you correctly...

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

This idea (in by mind) seems increasingly attractive as it has a
potential to simplify the configuration.


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

Reply via email to