git.iko.soy/typeable/pandoc
on master help sign in
LaTeX template: Update to iftex package (#7073)

Load the iftex package directly rather than via the ifxetex and ifluatex compatibility wrappers, which have been merged into a single package that is part of the LaTeX core. The capitalization of the commands has been changed for compatibility with older versions of TeX Live that have the version of iftex by the Persian TeX Group. This had been removed in <https://github.com/jgm/pandoc/commit/2845794c0c31b2ef1f3e6a73bb5b109da4c74f37> for compatibility with BasicTeX, but that is no longer an issue.

commit4de9edb8e82d14a0bd8f1e8b77e9019944c1440e authorAndrew Dunning <adunning@users.noreply.github.com> dateWed 3 Feb 2021, 16:54 (6 years ago) parente6c7fcc
6 files changed+28−29
MANUAL.txt+2−3 data/templates/default.latex+11−11 test/lhs-test.latex+3−3 test/lhs-test.latex+lhs+3−3 test/writer.latex+3−3 test/writers-lang-and-dir.latex+6−6
MANUAL.txt+2−3
@@ -136,7 +136,7 @@ to output the generated LaTeX. You can then test it with `pdflatex test.tex`.
136136When using LaTeX, the following packages need to be available
137137(they are included with all recent versions of [TeX Live]):
138138[`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
139−[`ifxetex`], [`ifluatex`], [`listings`] (if the
139+[`iftex`], [`listings`] (if the
140140`--listings` option is used), [`fancyvrb`], [`longtable`],
141141[`booktabs`], [`graphicx`] (if the document
142142contains images), [`hyperref`], [`xcolor`],
@@ -180,8 +180,7 @@ footnotes in tables).
180180[`graphicx`]: https://ctan.org/pkg/graphicx
181181[`grffile`]: https://ctan.org/pkg/grffile
182182[`hyperref`]: https://ctan.org/pkg/hyperref
183−[`ifluatex`]: https://ctan.org/pkg/ifluatex
184−[`ifxetex`]: https://ctan.org/pkg/ifxetex
183+[`iftex`]: https://ctan.org/pkg/iftex
185184[`listings`]: https://ctan.org/pkg/listings
186185[`lm`]: https://ctan.org/pkg/lm
187186[`longtable`]: https://ctan.org/pkg/longtable
data/templates/default.latex+11−11
@@ -98,14 +98,14 @@ $endif$
9898$if(linestretch)$
9999\usepackage{setspace}
100100$endif$
101−\usepackage{ifxetex,ifluatex}
102−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
101+\usepackage{iftex}
102+\ifPDFTeX
103103 \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
104104 \usepackage[utf8]{inputenc}
105105 \usepackage{textcomp} % provide euro and other symbols
106106\else % if luatex or xetex
107107$if(mathspec)$
108− \ifxetex
108+ \ifXeTeX
109109 \usepackage{mathspec}
110110 \else
111111 \usepackage{unicode-math}
@@ -129,7 +129,7 @@ $for(fontfamilies)$
129129$endfor$
130130$if(mathfont)$
131131$if(mathspec)$
132− \ifxetex
132+ \ifXeTeX
133133 \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
134134 \else
135135 \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
@@ -139,18 +139,18 @@ $else$
139139$endif$
140140$endif$
141141$if(CJKmainfont)$
142− \ifxetex
142+ \ifXeTeX
143143 \usepackage{xeCJK}
144144 \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
145145 \fi
146146$endif$
147147$if(luatexjapresetoptions)$
148− \ifluatex
148+ \ifLuaTeX
149149 \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
150150 \fi
151151$endif$
152152$if(CJKmainfont)$
153− \ifluatex
153+ \ifLuaTeX
154154 \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
155155 \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
156156 \fi
@@ -329,7 +329,7 @@ $for(header-includes)$
329329$header-includes$
330330$endfor$
331331$if(lang)$
332−\ifxetex
332+\ifXeTeX
333333 % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
334334 \usepackage{polyglossia}
335335 \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
@@ -346,15 +346,15 @@ $if(babel-newcommands)$
346346$endif$
347347\fi
348348$endif$
349−\ifluatex
349+\ifLuaTeX
350350 \usepackage{selnolig} % disable illegal ligatures
351351\fi
352352$if(dir)$
353−\ifxetex
353+\ifXeTeX
354354 % Load bidi as late as possible as it modifies e.g. graphicx
355355 \usepackage{bidi}
356356\fi
357−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
357+\ifPDFTeX
358358 \TeXXeTstate=1
359359 \newcommand{\RL}[1]{\beginR #1\endR}
360360 \newcommand{\LR}[1]{\beginL #1\endL}
test/lhs-test.latex+3−3
@@ -6,8 +6,8 @@
66]{article}
77\usepackage{amsmath,amssymb}
88\usepackage{lmodern}
9−\usepackage{ifxetex,ifluatex}
10−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
9+\usepackage{iftex}
10+\ifPDFTeX
1111 \usepackage[T1]{fontenc}
1212 \usepackage[utf8]{inputenc}
1313 \usepackage{textcomp} % provide euro and other symbols
@@ -81,7 +81,7 @@
8181\providecommand{\tightlist}{%
8282 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
8383\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
84−\ifluatex
84+\ifLuaTeX
8585 \usepackage{selnolig} % disable illegal ligatures
8686\fi
8787
test/lhs-test.latex+lhs+3−3
@@ -6,8 +6,8 @@
66]{article}
77\usepackage{amsmath,amssymb}
88\usepackage{lmodern}
9−\usepackage{ifxetex,ifluatex}
10−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
9+\usepackage{iftex}
10+\ifPDFTeX
1111 \usepackage[T1]{fontenc}
1212 \usepackage[utf8]{inputenc}
1313 \usepackage{textcomp} % provide euro and other symbols
@@ -48,7 +48,7 @@
4848\providecommand{\tightlist}{%
4949 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
5050\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
51−\ifluatex
51+\ifLuaTeX
5252 \usepackage{selnolig} % disable illegal ligatures
5353\fi
5454
test/writer.latex+3−3
@@ -6,8 +6,8 @@
66]{article}
77\usepackage{amsmath,amssymb}
88\usepackage{lmodern}
9−\usepackage{ifxetex,ifluatex}
10−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
9+\usepackage{iftex}
10+\ifPDFTeX
1111 \usepackage[T1]{fontenc}
1212 \usepackage[utf8]{inputenc}
1313 \usepackage{textcomp} % provide euro and other symbols
@@ -63,7 +63,7 @@
6363\providecommand{\tightlist}{%
6464 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
6565\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
66−\ifluatex
66+\ifLuaTeX
6767 \usepackage{selnolig} % disable illegal ligatures
6868\fi
6969
test/writers-lang-and-dir.latex+6−6
@@ -7,8 +7,8 @@
77]{article}
88\usepackage{amsmath,amssymb}
99\usepackage{lmodern}
10−\usepackage{ifxetex,ifluatex}
11−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
10+\usepackage{iftex}
11+\ifPDFTeX
1212 \usepackage[T1]{fontenc}
1313 \usepackage[utf8]{inputenc}
1414 \usepackage{textcomp} % provide euro and other symbols
@@ -45,7 +45,7 @@
4545\providecommand{\tightlist}{%
4646 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
4747\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
48−\ifxetex
48+\ifXeTeX
4949 % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
5050 \usepackage{polyglossia}
5151 \setmainlanguage[]{english}
@@ -69,14 +69,14 @@
6969 \newcommand{\textfrench}[2][]{\foreignlanguage{french}{#2}}
7070 \newenvironment{french}[2][]{\begin{otherlanguage}{french}}{\end{otherlanguage}}
7171\fi
72−\ifluatex
72+\ifLuaTeX
7373 \usepackage{selnolig} % disable illegal ligatures
7474\fi
75−\ifxetex
75+\ifXeTeX
7676 % Load bidi as late as possible as it modifies e.g. graphicx
7777 \usepackage{bidi}
7878\fi
79−\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
79+\ifPDFTeX
8080 \TeXXeTstate=1
8181 \newcommand{\RL}[1]{\beginR #1\endR}
8282 \newcommand{\LR}[1]{\beginL #1\endL}