Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

LaTeX template: use ifxetex, ifluatex instead of iftex.

iftex is not in debian.
  • Loading branch information...
commit ba5f9741a1f96e521bdfbac3795524b83645e8fb 1 parent 8806382
@jgm authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 default.latex
View
17 default.latex
@@ -2,19 +2,18 @@
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
-\usepackage{iftex}
+\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
-\ifPDFTeX % use microtype with pdflatex if available
- \IfFileExists{microtype.sty}{\usepackage{microtype}}{}
-\fi
-\ifPDFTeX
+% use microtype if available
+\IfFileExists{microtype.sty}{\usepackage{microtype}}{}
+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[utf8]{inputenc}
$if(euro)$
\usepackage{eurosym}
$endif$
-\else
+\else % if luatex or xelatex
\usepackage{fontspec}
- \ifXeTeX
+ \ifxetex
\usepackage{xltxtra,xunicode}
\fi
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
@@ -82,7 +81,7 @@ $if(graphics)$
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
-\ifXeTeX
+\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex]{hyperref}
@@ -117,7 +116,7 @@ $if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(lang)$
-\ifXeTeX
+\ifxetex
\usepackage{polyglossia}
\setmainlanguage{$mainlang$}
\else
Please sign in to comment.
Something went wrong with that request. Please try again.