Looking into it, it seems the following section:

$if(babel-lang)$
\babelprovide[main,import]{$babel-lang$}
$if(mainfont)$
\ifPDFTeX
\else
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
\fi
$endif$
$endif$

Is expanded to:

\babelprovide[main,import]{swedish}
\ifPDFTeX
\else
\babelfont[swedish]{rm}{Minion Pro}
\fi

While, at the same time, `mainfontoptions` is correctly expanded with setmainfont:

  % xetex/luatex font selection
$if(mainfont)$
  \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$

Expanded to:

  % xetex/luatex font selection
  \setmainfont[Numbers=OldStyle]{Minion Pro}


I don't get it. This is the default template of pandoc 3.1.6 (I upgraded).
onsdag 9 augusti 2023 kl. 10:44:06 UTC+2 skrev Stefan Björk:
`mainfontoptions: Numbers=OldStyle` works as expected when I don't specify a language with `lang`. When I specify a language, XeLaTeX seem to ignore the OldStyle settings. I suspect there are something broken with the default LaTeX template?

I'm using pandoc 3.1.1.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8bd22ba4-5a10-4e98-ad79-5d6b728381f8n%40googlegroups.com.