Added romanfont, sansfont, monofont variables to latex template.

Note: These only work with xelatex/lualatex.
This commit is contained in:
John MacFarlane 2012-03-14 14:40:47 -07:00
parent 188e01f80e
commit 6269b216b4

View file

@ -1,15 +1,26 @@
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$]{$documentclass$}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\newcommand{\SetupFonts}{%
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
$if(romanfont)$
\setromanfont{$romanfont$}
$endif$
$if(sansfont)$
\setsansfont{$sansfont$}
$endif$
$if(monofont)$
\setmonofont{$monofont$}
$endif$
}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\SetupFonts
\else
\ifluatex
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\SetupFonts
\else
\usepackage[utf8]{inputenc}
\usepackage{eurosym}