aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-06-05 11:35:17 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-06-05 11:35:17 -0700
commitb9d2a1595d901774a4e21b54790fb7086a4184c7 (patch)
tree96376fb7a6a5116078611cf12a8960d8ee57e4a7
parentaa67d0c69f4b122f7ce3ddb8c5586ad92f3bc6df (diff)
downloadpandoc-b9d2a1595d901774a4e21b54790fb7086a4184c7.tar.gz
Use iftex instead of ifluatex, ifxetex. Simplified template.
-rw-r--r--default.latex45
1 files changed, 17 insertions, 28 deletions
diff --git a/default.latex b/default.latex
index bb0a588c2..d68e0d188 100644
--- a/default.latex
+++ b/default.latex
@@ -2,29 +2,24 @@
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
-\usepackage{ifxetex,ifluatex}
+\usepackage{iftex}
\usepackage{fixltx2e} % provides \textsubscript
-\ifxetex
- \usepackage{fontspec,xltxtra,xunicode}
- \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
- \newcommand{\euro}{€}
-$if(mainfont)$
- \setmainfont{$mainfont$}
-$endif$
-$if(sansfont)$
- \setsansfont{$sansfont$}
-$endif$
-$if(monofont)$
- \setmonofont{$monofont$}
-$endif$
-$if(mathfont)$
- \setmathfont{$mathfont$}
+\ifPDFTeX % use microtype with pdflatex if available
+ \IfFileExists{microtype.sty}{\usepackage{microtype}}{}
+\fi
+
+\ifPDFTeX
+ \usepackage[utf8]{inputenc}
+$if(euro)$
+ \usepackage{eurosym}
$endif$
\else
- \ifluatex
- \usepackage{fontspec}
- \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
- \newcommand{\euro}{€}
+ \usepackage{fontspec}
+ \ifXeTeX
+ \usepackage{xltxtra,xunicode}
+ \fi
+ \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
+ \newcommand{\euro}{€}
$if(mainfont)$
\setmainfont{$mainfont$}
$endif$
@@ -37,12 +32,6 @@ $endif$
$if(mathfont)$
\setmathfont{$mathfont$}
$endif$
- \else
- \usepackage[utf8]{inputenc}
-$if(euro)$
- \usepackage{eurosym}
-$endif$
- \fi
\fi
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
@@ -94,7 +83,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}
@@ -129,7 +118,7 @@ $if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(lang)$
-\ifxetex
+\ifXeTeX
\usepackage{polyglossia}
\setmainlanguage{$mainlang$}
\else