Use iftex to detect luatex, xetex, ...

This commit is contained in:
John MacFarlane 2011-07-22 12:50:31 -07:00
parent d19a3dcab5
commit a053c6d1b0

View file

@ -1,18 +1,18 @@
\documentclass$if(fontsize)$[$fontsize$]$endif${article}
\usepackage{amssymb,amsmath}
$if(xetex)$
\usepackage{ifxetex}
\ifxetex
\usepackage{iftex}
\ifXeTeX
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\ifLuaTeX
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\usepackage[mathletters]{ucs}
\usepackage[utf8x]{inputenc}
\fi
$else$
\usepackage[mathletters]{ucs}
\usepackage[utf8x]{inputenc}
$endif$
\fi
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{plainnat}