Open dimpase opened 3 years ago
Do we have documented somewhere what the minimum expected XeTeX/LuaTeX versions are that Pandoc currently supports? Even if current versions have better syntax we need to make sure we don't over-simplify past what older versions need to keep functioning as expected.
No, we don't have this documented. But we do some informal checking to make sure that changes to the templates don't require very new versions that may not be available to everyone. (A good rule of thumb for me is that if something is in debian stable, we can feel good about relying on it.)
That sounds reasonable. The LaTeX ecosystem and Debian stable are both slow moving behemoths. I'll grant they were probably made for each-other.
Perhaps that should be codified such that for any given Pandoc release the max supported version is whatever the latest texlive release is at the time of Pandoc tagging and the min supported version is whatever happens to be in Debian stable at the time of tagging. That would make it easy to evaluate whether or not it was okay to update LaTeX usage.
If that's agreeable, the next question is when did ifxetex
and ifluatex
become legacy?
https://packages.debian.org/buster/texlive says it's TeXLive 2018.20190227-2 (whatever this means - probably some kind of updated TeXLive 2018). It might be quicker to actually check on a piece of TeX code whether ifxetex and ifluatex may be skipped.
I'm testing the example which used \iftutex
from https://tex.stackexchange.com/questions/601579/unicode-maths-in-pdflatex
\documentclass{article}
\usepackage{iftex,amsmath}
\iftutex
\usepackage{unicode-math}
\else
\usepackage{amssymb}
\def\z"{}
\def\UnicodeMathSymbol#1#2#3#4{%
\ifnum#1>"A0
\DeclareUnicodeCharacter{\z#1}{#2}%
\fi}
\input{unicode-math-table}
\let\muprho\rho
\def\BbbR{\mathbb{R}}
\fi
\begin{document}
$ρ ∈ ℝ$
\end{document}
So far I know it works on texlive 2020 and 2021, but does not work on texlive 2017.
Explain the problem. LaTeX packages such as
ifxetex
andifluatex
are legacy packages that both just inputiftex
package. You can use\iftutex
which is true inxetex
andluatex
rather than the nested\ifnum
game. (copied from a comment David Carlisle in https://tex.stackexchange.com/questions/601579/unicode-maths-in-pdflatex?noredirect=1#comment1508737_601579)That SE question was posted by me as I had a bit of an issue with pandoc-converted md file which used unicode maths.
So the template ought to be simplified.
Pandoc version? Gentoo current, as well as current master.