Hey Jacob

thanks a ton! Answers inline...

On Fri, 13 Jun 2025 at 06:14, Jacob S. Gordon <jacob.as.gor...@gmail.com>
wrote:

> Hey Pedro,
>
> I just completed some testing on the feature branch, mostly on the
> `fontconfig' side (still asking around for some polyglot documents).
> It went very well; here’s what I did and found.
>
> + Compiled each of the [MWE] files you provided from the meetup
>   (`babel' and `polyglossia') under `lualatex' and `xelatex', and
>   compared all the outputs. Everything worked and the PDFs were close
>   to your references with the right fonts embedded.
>
> [MWE]
> <https://lists.gnu.org/archive/html/emacs-orgmode/2025-06/msg00143.html>
>

:-)

> + Translated a few `unicode-math' configs into the variable
>   `org-latex-fontspec-config' and compiled some math. No issues.
>
Yhx

>
> + Tried out the font fallback options with `lualatex' and it worked
>   well. This of course fails with `xelatex' since the fallback is
>   specific to `lualatex'. To ensure the `xelatex' document can still
>   be compiled in this case (albeit with missing glyphs), I think the
>   fallbacks should be skipped:
>
> #+begin_src diff
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index bfdc58d36..e716325f9 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -2105,7 +2105,8 @@ we are using neither bale nor polyglossia"
>                      (fallback (plist-get config-plist :fallback)))
>            (push (cons fname (concat "fallback_" fname)) fallback-alist)))
>        ;; (message "fallback-alist ==> %s" fallback-alist)
> -      (when fallback-alist ;; if there are fonts with fallbacks
> +      (when (and (equal compiler "lualatex") ;; no glyph-based fallbacks
> for xelatex
> +                 fallback-alist) ;; if there are fonts with fallbacks
>          ;; create the directlua header
>          (dolist (fallback fallback-alist)
>            ;; (message "fallback ===> %s" fallback)
> #+end_src
>

Very good point! And maybe include a warning if the compiler isn't
lualatex...


> + To specify the fallbacks, it might be nicer to split off the mode,
>   i.e. something like:
>
> #+begin_src emacs-lisp
> :fallback (("emoji" .  "Noto Color Emoji" "harf"))
> #+end_src
>
The idea behind the current structure is that there might be other things
beyond the mode that go in the feature list,  therefore I didn't want it to
be that specific

>
> + I didn’t see a variable to customize `defaultfontfeatures' or
>   `unimathsetup', but they might be useful.
>

This is something I'm thinking about too. I'm very tempted for math-unicode
because I sometimes don't typeset math in italics and I know the option to
do that.
Could you please elaborate a bit more on defaultfontfeatures?


>
> On 2025-06-07 01:26, Pedro Andres Aranda Gutierrez wrote:
> > PS: I would like to reiterate my request for MWE's for babel on
> _pdflatex_.
>
> Sorry if I’m missing context, but what kind of examples? Something
> like [this]?
>
> #+begin_src org
> ,#+LATEX_COMPILER: pdflatex
> ,#+LATEX_HEADER: \usepackage[main=english,czech]{babel}
>
> This is some text in english.
>
> @@latex:\foreignlanguage{czech}{@@Český jazyk neboli čeština je
> západoslovanský jazyk, nejbližší slovenštině, poté polštině a lužické
> srbštině.@@latex:}@@
> #+end_src
>

Exactly this kind of examples are what I'm looking for. Thanks a lot,

>
> [this]
> <
> https://tex.stackexchange.com/questions/244910/how-to-use-foreign-language-in-pdflatex
> >
>
> Thanks,
>
> --
> Jacob S. Gordon
> jacob.as.gor...@gmail.com
>
> ======================
>
> Please avoid sending me HTML emails and MS Office documents.
> https://useplaintext.email/#etiquette
> https://www.gnu.org/philosophy/no-word-attachments.html
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Sagen's Paradeiser, write BE!
Year 1 of the New Koprocracy

Reply via email to