qmcpack/manual/qmcpack_manual.sty

37 lines
849 B
TeX

\usepackage{ifpdf}
\ifpdf
%this suppresses the moaning about unicode characters
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\makeatletter
\def\UTFviii@defined#1{%
\ifx#1\relax
?%
\else\expandafter
#1%
\fi
}
\makeatother
\else
\usepackage{fontspec}
%% We need to pick a font the system has..
%% default on linux and osx lacks unicode box characters
%% The empty bracket below is false condition of the Courier New Check
\@ifpackageloaded{fontspec}%
{%
\@ifpackagelater{fontspec}{2017/01/20}% when fontspec 2.5c was included in texlive
{%
\IfFontExistsTF {XCharter Roman}%
{\setmainfont{XCharter Roman}}%
{}
\IfFontExistsTF {DejaVu Sans Mono}%
{\setmonofont{DejaVu Sans Mono}}%
{\IfFontExistsTF {Courier New}%
{\setmonofont{Courier New}}%
{}%
}%
}%
{}% fontspec is old and doesn't have IfFontExistsTF
}{}
\fi