Prepared font handling for fontspec (LuaLaTeX or XeLaTeX)

This commit is contained in:
Xavier Danaux
2012-07-29 14:11:08 +02:00
parent 16cf3edd49
commit a2fc3c3623
13 changed files with 67 additions and 9 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -78,14 +78,39 @@
% if... then... else... constructs
\RequirePackage{ifthen}
% TODO: move to xifthen and \isempty{<arg>} instead of \equal{<arg>}{}
% TODO: replace \newcommand by \NewDocumentCommand (LaTeX 3)
% color
\RequirePackage{xcolor}
% automatic loading of latin modern fonts if present on the system
\IfFileExists{lmodern.sty}
{\RequirePackage[T1]{fontenc}\RequirePackage{lmodern}}
{}
% font loading
%\usepackage{ifxetex,ifluatex}
%\newif\ifxetexorluatex
%\ifxetex
% \xetexorluatextrue
%\else
% \ifluatex
% \xetexorluatextrue
% \else
% \xetexorluatexfalse
% \fi
%\fi
% automatic loading of latin modern fonts
%\ifxetexorluatex
% \RequirePackage{fontspec}
% \defaultfontfeatures{Ligatures=TeX}
% \RequirePackage{unicode-math}
% \setmainfont{Latin Modern}
% \setsansfont{Latin Modern Sans}
% \setmathfont{Latin Modern Math}
%\else
\RequirePackage[T1]{fontenc}
\IfFileExists{lmodern.sty}%
{\RequirePackage{lmodern}}%
{}
%\fi
% symbols like \Telefon, \Mobilefone, \Letter and \Email
\RequirePackage{marvosym}

View File

@ -21,13 +21,27 @@
%-------------------------------------------------------------------------------
% package options
%-------------------------------------------------------------------------------
\RequirePackage{tgpagella}
\renewcommand*{\familydefault}{\rmdefault}
%-------------------------------------------------------------------------------
% overall style definition
%-------------------------------------------------------------------------------
% fonts
%\ifxetexorluatex
% \setmainfont{Tex-Gyre Pagella}
% \setsansfont{Tex-Gyre Pagella}
% \setmathfont{Tex-Gyre Pagella}
% \setmathfont[range=\mathit,\mathsfit]{Tex-Gyre Pagella Italic}
% \setmathfont[range=\mathbfup,\mathbfsfup]{Tex-Gyre Pagella Bold}
% \setmathfont[range=\mathbfit,\mathbfsfit]{Tex-Gyre Pagella Bold Italic}
%\else
\IfFileExists{tgpagella.sty}%
{%
\RequirePackage{tgpagella}%
\renewcommand*{\familydefault}{\rmdefault}}%
{}
%\fi
% commands
\newcommand*{\maketitlesymbol}{%
{~~~\textbullet~~~}}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(

View File

@ -26,6 +26,16 @@
%-------------------------------------------------------------------------------
% overall style definition
%-------------------------------------------------------------------------------
% fonts
%\ifxetexorluatex
% \setmainfont{Latin Modern Roman}
% \setsansfont{Latin Modern Sans}
% \setmathfont{Latin Modern Math}
%\else
\IfFileExists{lmodern.sty}%
{\RequirePackage{lmodern}}%
{}
%\fi
%-------------------------------------------------------------------------------

View File

@ -29,9 +29,18 @@
% overall style definition
%-------------------------------------------------------------------------------
% fonts
\IfFileExists{kurier.sty}
{\RequirePackage[light,math]{kurier}}
{}
%\ifxetexorluatex
% \setmainfont[Numbers={OldStyle,Proportional}, BoldFont={Kurier Bold}, ItalicFont={Kurier Light Italic}, BoldItalicFont={Kurier Bold Italic}]{Kurier Light}
% \setsansfont[Numbers={OldStyle,Proportional}, BoldFont={Kurier Bold}, ItalicFont={Kurier Light Italic}, BoldItalicFont={Kurier Bold Italic}]{Kurier Light}
% \setmathfont{Kurier Light}
% \setmathfont[range=\mathit,\mathsfit]{Kurier Light Italic}
% \setmathfont[range=\mathbfup,\mathbfsfup]{Kurier Bold}
% \setmathfont[range=\mathbfit,\mathbfsfit]{Kurier Bold Italic}
%\else
\IfFileExists{kurier.sty}%
{\RequirePackage[light,math]{kurier}}%
{}
%\fi
% symbols
\renewcommand*{\listitemsymbol}{\labelitemi~}