Use iftex instead of ifluatex, ifxetex. Simplified template.
This commit is contained in:
parent
aa67d0c69f
commit
b9d2a1595d
1 changed files with 17 additions and 28 deletions
|
@ -2,29 +2,24 @@
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage{lmodern}
|
\usepackage{lmodern}
|
||||||
\usepackage{amssymb,amsmath}
|
\usepackage{amssymb,amsmath}
|
||||||
\usepackage{ifxetex,ifluatex}
|
\usepackage{iftex}
|
||||||
\usepackage{fixltx2e} % provides \textsubscript
|
\usepackage{fixltx2e} % provides \textsubscript
|
||||||
\ifxetex
|
\ifPDFTeX % use microtype with pdflatex if available
|
||||||
\usepackage{fontspec,xltxtra,xunicode}
|
\IfFileExists{microtype.sty}{\usepackage{microtype}}{}
|
||||||
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
\fi
|
||||||
\newcommand{\euro}{€}
|
|
||||||
$if(mainfont)$
|
\ifPDFTeX
|
||||||
\setmainfont{$mainfont$}
|
\usepackage[utf8]{inputenc}
|
||||||
$endif$
|
$if(euro)$
|
||||||
$if(sansfont)$
|
\usepackage{eurosym}
|
||||||
\setsansfont{$sansfont$}
|
|
||||||
$endif$
|
|
||||||
$if(monofont)$
|
|
||||||
\setmonofont{$monofont$}
|
|
||||||
$endif$
|
|
||||||
$if(mathfont)$
|
|
||||||
\setmathfont{$mathfont$}
|
|
||||||
$endif$
|
$endif$
|
||||||
\else
|
\else
|
||||||
\ifluatex
|
\usepackage{fontspec}
|
||||||
\usepackage{fontspec}
|
\ifXeTeX
|
||||||
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
\usepackage{xltxtra,xunicode}
|
||||||
\newcommand{\euro}{€}
|
\fi
|
||||||
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
||||||
|
\newcommand{\euro}{€}
|
||||||
$if(mainfont)$
|
$if(mainfont)$
|
||||||
\setmainfont{$mainfont$}
|
\setmainfont{$mainfont$}
|
||||||
$endif$
|
$endif$
|
||||||
|
@ -37,12 +32,6 @@ $endif$
|
||||||
$if(mathfont)$
|
$if(mathfont)$
|
||||||
\setmathfont{$mathfont$}
|
\setmathfont{$mathfont$}
|
||||||
$endif$
|
$endif$
|
||||||
\else
|
|
||||||
\usepackage[utf8]{inputenc}
|
|
||||||
$if(euro)$
|
|
||||||
\usepackage{eurosym}
|
|
||||||
$endif$
|
|
||||||
\fi
|
|
||||||
\fi
|
\fi
|
||||||
$if(geometry)$
|
$if(geometry)$
|
||||||
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
|
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
|
||||||
|
@ -94,7 +83,7 @@ $if(graphics)$
|
||||||
\let\Oldincludegraphics\includegraphics
|
\let\Oldincludegraphics\includegraphics
|
||||||
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
|
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
|
||||||
$endif$
|
$endif$
|
||||||
\ifxetex
|
\ifXeTeX
|
||||||
\usepackage[setpagesize=false, % page size defined by xetex
|
\usepackage[setpagesize=false, % page size defined by xetex
|
||||||
unicode=false, % unicode breaks when used with xetex
|
unicode=false, % unicode breaks when used with xetex
|
||||||
xetex]{hyperref}
|
xetex]{hyperref}
|
||||||
|
@ -129,7 +118,7 @@ $if(verbatim-in-note)$
|
||||||
\VerbatimFootnotes % allows verbatim text in footnotes
|
\VerbatimFootnotes % allows verbatim text in footnotes
|
||||||
$endif$
|
$endif$
|
||||||
$if(lang)$
|
$if(lang)$
|
||||||
\ifxetex
|
\ifXeTeX
|
||||||
\usepackage{polyglossia}
|
\usepackage{polyglossia}
|
||||||
\setmainlanguage{$mainlang$}
|
\setmainlanguage{$mainlang$}
|
||||||
\else
|
\else
|
||||||
|
|
Loading…
Add table
Reference in a new issue