| 1 |
%-------- Typeface Package Test Harness -- User-configurable Section ---------- |
| 2 |
% |
| 3 |
\providecommand*\TFTESTdocumentclass{article} % or memoir, scrartcl, etc. |
| 4 |
|
| 5 |
\providecommand*\TFTESTfontfamily{rm} % set to rm, sf or tt |
| 6 |
\providecommand*\TFTESTfontsize{10pt} % 11pt, 12pt, others if memoir |
| 7 |
\providecommand*\TFTESTpapersize{a4paper} |
| 8 |
|
| 9 |
\providecommand*\TFTESTfontencoding{default} |
| 10 |
\providecommand*\TFTESTinputencoding{default} |
| 11 |
\providecommand*\TFTESTtextcomp{default} |
| 12 |
\providecommand*\TFTESTcmap{default} |
| 13 |
\providecommand*\TFTESTtypeface{default} |
| 14 |
\providecommand*\TFTESTtextfigures{default} |
| 15 |
\providecommand*\TFTESTsanstypeface{default} |
| 16 |
\providecommand*\TFTESTmonotypeface{default} |
| 17 |
\providecommand*\TFTESTmathtypeface{default} |
| 18 |
\providecommand*\TFTESTsymbolstypeface{default} |
| 19 |
\providecommand*\TFTESTfontloadorder{default} |
| 20 |
|
| 21 |
\providecommand*\TFTESTdebug{false} |
| 22 |
\providecommand*\TFTESTprintmathfonts{false} |
| 23 |
\providecommand*\TFTESTincludemicrotype{true} |
| 24 |
% |
| 25 |
%--------------- End User-configurable Section -------------------------------- |
| 26 |
|
| 27 |
% Note that this document attempts to typeset text in many font weights, |
| 28 |
% widths, shapes, variants, encodings and sizes. It calls on, e.g., |
| 29 |
% \oldstylenums regardless of loaded font. Line lengths in tables do not take |
| 30 |
% account of actual page line width. Thus, depending on the font families you |
| 31 |
% load, you should expect to receive several, if not many, warnings and |
| 32 |
% overfull boxes. Do not be concerned (unless, of course, something is |
| 33 |
% actually wrong). |
| 34 |
|
| 35 |
\documentclass[\TFTESTfontsize,\TFTESTpapersize]{\TFTESTdocumentclass} |
| 36 |
\usepackage[margin=1.0cm, |
| 37 |
%showframe, |
| 38 |
]{geometry} |
| 39 |
|
| 40 |
\usepackage{ifthen} |
| 41 |
\usepackage{parskip} |
| 42 |
|
| 43 |
% Microtype is required for substitute figures letterspacing in textnums |
| 44 |
% environments (advance usage). However, note that microtype doesn't partner |
| 45 |
% well with bitmap fonts, especially if any scaling is involved. In these |
| 46 |
% cases, microtype will very likely throw "auto expansion is only possible |
| 47 |
% with scalable fonts" errors. |
| 48 |
\ifthenelse{\equal{\TFTESTincludemicrotype}{true}}{ |
| 49 |
\usepackage[verbose=errors]{microtype} |
| 50 |
}{} |
| 51 |
|
| 52 |
\usepackage[ |
| 53 |
fontencoding=\TFTESTfontencoding, |
| 54 |
inputencoding=\TFTESTinputencoding, |
| 55 |
textcomp=\TFTESTtextcomp, |
| 56 |
cmap=\TFTESTcmap, |
| 57 |
typeface=\TFTESTtypeface, |
| 58 |
textfigures=\TFTESTtextfigures, |
| 59 |
mathtypeface=\TFTESTmathtypeface, |
| 60 |
symbolstypeface=\TFTESTsymbolstypeface, |
| 61 |
sanstypeface=\TFTESTsanstypeface, |
| 62 |
monotypeface=\TFTESTmonotypeface, |
| 63 |
fontloadorder=\TFTESTfontloadorder, |
| 64 |
debug=\TFTESTdebug, |
| 65 |
printinfo=true, |
| 66 |
]{typeface} |
| 67 |
|
| 68 |
% Redefine equation numbering simply for testing's sake |
| 69 |
\DeclareRobustCommand*\theequation{% |
| 70 |
\ifthenelse{\equal{\TFTESTfontfamily}{rm}}{% |
| 71 |
\protect\begin{textnums}3.\arabic{equation}\protect\end{textnums}% |
| 72 |
}{% |
| 73 |
\ifthenelse{\equal{\TFTESTfontfamily}{sf}}{% |
| 74 |
4.\arabic{equation}% |
| 75 |
}{% \TFTESTfontfamily=tt |
| 76 |
5.\arabic{equation}% |
| 77 |
}% |
| 78 |
}% |
| 79 |
} |
| 80 |
|
| 81 |
% While we're at it, redefine our equation numbering presentation |
| 82 |
% format, again for testing's sake |
| 83 |
\makeatletter\def\@eqnnum{{(\theequation)}}\makeatother |
| 84 |
|
| 85 |
\usepackage{bookmark}[2010/04/08] |
| 86 |
|
| 87 |
\ifthenelse{\equal{\TFTESTfontfamily}{rm}}{ |
| 88 |
\newcommand*\TFbookmark{\rmprintname} |
| 89 |
}{ |
| 90 |
\ifthenelse{\equal{\TFTESTfontfamily}{sf}} |
| 91 |
{\newcommand*\TFbookmark{\sfprintname}} |
| 92 |
{\newcommand*\TFbookmark{\ttprintname}} |
| 93 |
} |
| 94 |
|
| 95 |
\ifthenelse{\equal{\TFTESTfontfamily}{rm}} |
| 96 |
{\def\typeface{typeface}\def\typefacename{\textrm{\TFTESTtypeface}}}{}% |
| 97 |
\ifthenelse{\equal{\TFTESTfontfamily}{sf}} |
| 98 |
{\def\typeface{sanstypeface}\def\typefacename{\textsf{\TFTESTsanstypeface}}}{}% |
| 99 |
\ifthenelse{\equal{\TFTESTfontfamily}{tt}} |
| 100 |
{\def\typeface{monotypeface}\def\typefacename{\texttt{\TFTESTmonotypeface}}}{}% |
| 101 |
|
| 102 |
\begin{document} |
| 103 |
\hypertarget{\TFbookmark}{} |
| 104 |
\bookmark[dest=\TFbookmark, level=0]{\TFbookmark} |
| 105 |
\pagestyle{empty} |
| 106 |
\raggedbottom |
| 107 |
\section*{Test page: \typeface\(=\)\typefacename \space{(\TFTESTfontsize)}} |
| 108 |
\tfprintpackageoptions% |
| 109 |
\tfprintinfo% |
| 110 |
\tfprinttext{\TFTESTfontfamily}% |
| 111 |
\tfprintfigures{\TFTESTfontfamily}% |
| 112 |
\tfprintmathsample{\TFTESTfontfamily}% |
| 113 |
\tfprintmathalphabets{\TFTESTfontfamily}% |
| 114 |
\ifthenelse{\equal{\TFTESTprintmathfonts}{true}}{\tfprintmathfonts}{}% |
| 115 |
\tfprinttextsample{\TFTESTfontfamily}% |
| 116 |
\tfprinttextalphabets% |
| 117 |
{\noindent\footnotesize{\rmfamily\selectfont $footnotesize$footnotesize}% |
| 118 |
{\sffamily\selectfont footnotesize}% |
| 119 |
{\ttfamily\selectfont footnotesize}% |
| 120 |
{\rmfamily\selectfont$0123456789$\begin{textnums}0123456789\end{textnums}}% |
| 121 |
{\sffamily\selectfont\begin{textnums}0123456789\end{textnums}}% |
| 122 |
{\ttfamily\selectfont\begin{textnums}0123456789\end{textnums}}}\\% |
| 123 |
{\normalsize{\rmfamily\selectfont $Normal$Normal}% |
| 124 |
{\sffamily\selectfont Normal}% |
| 125 |
{\ttfamily\selectfont Normal}% |
| 126 |
{\rmfamily\selectfont$0123456789$\begin{textnums}0123456789\end{textnums}}% |
| 127 |
{\sffamily\selectfont\begin{textnums}0123456789\end{textnums}}% |
| 128 |
{\ttfamily\selectfont\begin{textnums}0123456789\end{textnums}}}\\% |
| 129 |
{\Large{\rmfamily\selectfont $Large$Large}% |
| 130 |
{\sffamily\selectfont Large}% |
| 131 |
{\ttfamily\selectfont Large}% |
| 132 |
{\rmfamily\selectfont$0123456789$\begin{textnums}0123456789\end{textnums}}% |
| 133 |
{\sffamily\selectfont\begin{textnums}0123456789\end{textnums}}% |
| 134 |
{\mbox{\ttfamily\selectfont\begin{textnums}0123456789\end{textnums}}}}\\% |
| 135 |
\end{document} |