| 1 |
% isomath-test.tex: test and template for isomath.sty |
| 2 |
% =================================================== |
| 3 |
% |
| 4 |
% Copyright © 2008 Günter Milde |
| 5 |
% Released under the terms of the GNU General Public License (v. 2 or later) |
| 6 |
% |
| 7 |
% General settings |
| 8 |
% ---------------- |
| 9 |
% :: |
| 10 |
|
| 11 |
\documentclass[a4paper]{article} |
| 12 |
\usepackage[T1]{fontenc} |
| 13 |
% \usepackage[utf8]{inputenc} |
| 14 |
\usepackage{amsmath} |
| 15 |
\pagestyle{empty} |
| 16 |
|
| 17 |
|
| 18 |
% Customisation |
| 19 |
% ------------- |
| 20 |
% |
| 21 |
% Font packages |
| 22 |
% ~~~~~~~~~~~~~ |
| 23 |
% |
| 24 |
% (Auxiliary commands for package and option selection, so that the |
| 25 |
% selections can be shown in the test sheet.) |
| 26 |
% |
| 27 |
% Uncomment the package you want to test :: |
| 28 |
|
| 29 |
\newcommand*{\fontsetup}{\usepackage% |
| 30 |
% {ae}% \sfdefault is cmss |
| 31 |
% {anttor}% \sfdefault is cmss (use iwona) |
| 32 |
% {arev}% normal and sans identic (also in math) |
| 33 |
% {beton}% bitmap fonts |
| 34 |
% {concmath}% |
| 35 |
% {cmbright}% |
| 36 |
% {fourier}% incompatible (uses private font encoding) |
| 37 |
% [default]{gfsneohellenic}% no bold |
| 38 |
% {hfoldsty}% bitmap fonts |
| 39 |
% {iwona}% sets cmss as sans font (use iwona) |
| 40 |
% [nomathscript]{kpfonts}% "Too many math alphabets" with OMLmathsfit option |
| 41 |
% {kerkis}% no bold math, |
| 42 |
% {lmodern}% \sfdefault is cmss |
| 43 |
% {lucidabr}% commercial, subset (no math) free as bitmap |
| 44 |
% {lxfonts}% normal and sans identic, |
| 45 |
[utopia]{mathdesign}% \sfdefault is cmss, provides roman and roman-bold in OML |
| 46 |
% [charter]{mathdesign}% |
| 47 |
% [garamond]{mathdesign}% |
| 48 |
% {mathptmx}% in mathnormal, Greek is larger than Latin! |
| 49 |
% {mbtimes}% \sfdefault is cmss |
| 50 |
% {mathpazo}% \sfdefault is cmss |
| 51 |
% {newcent}% \sfdefault is cmss |
| 52 |
% {pxfonts}% needs reuseMathAlphabets, no sans-serif |
| 53 |
% {tgcursor}% avoid bitmap tt |
| 54 |
% {tgheros}% avoid bitmap sf |
| 55 |
% {tgpagella}% \sfdefault is cmss |
| 56 |
% {tgtermes}% \sfdefault is cmss |
| 57 |
% {txfonts}% no sans-serif |
| 58 |
} |
| 59 |
|
| 60 |
% Isomath setup |
| 61 |
% ~~~~~~~~~~~~~ |
| 62 |
% |
| 63 |
% Uncomment the option(s) you want to test :: |
| 64 |
|
| 65 |
\newcommand*{\isomathsetup}{\usepackage[% |
| 66 |
% reuseMathAlphabets,% |
| 67 |
OMLmathrm,% |
| 68 |
OMLmathbf,% |
| 69 |
% OMLmathsf,% |
| 70 |
% OMLmathsfit,% |
| 71 |
% OMLmathtt,% |
| 72 |
% OMLmathsans,% backwards compatibility option alias |
| 73 |
% rmdefault=zpple,% Mathpazo alternative |
| 74 |
% rmdefault=qtxmia,% TeX Gyre Termes math with alternative glyphs |
| 75 |
% sfdefault=cmbr,% default |
| 76 |
% sfdefault=iwona,% Iwona sans (Greek glyphs too close to roman) |
| 77 |
sfdefault=fav,% Arev sans (scale down (ca. 0.87)) |
| 78 |
scaled=0.875% scaling for Arev (small letters) |
| 79 |
% sfdefault=llcmss,% LX sans (glyphs too close to italic, scale down) |
| 80 |
% sfdefault=jkpss,% Kepler Sans |
| 81 |
% scaled=0.95% scaling for Kepler Sans (small letters) |
| 82 |
]{isomath}% |
| 83 |
} |
| 84 |
|
| 85 |
% Load customisable packages |
| 86 |
% -------------------------- |
| 87 |
% :: |
| 88 |
|
| 89 |
\fontsetup |
| 90 |
\isomathsetup |
| 91 |
|
| 92 |
% Auxiliary definitions |
| 93 |
% --------------------- |
| 94 |
% |
| 95 |
% Re-define \vec to comply with ISO 31:: |
| 96 |
|
| 97 |
\renewcommand*{\vec}{\vectorsym} |
| 98 |
|
| 99 |
% Fall-back definition for \mathsfit:: |
| 100 |
|
| 101 |
\providecommand*{\mathsfit}[1]% |
| 102 |
{\emph{mathsfit not defined (requires \texttt{OMLmathsfit} option)}} |
| 103 |
|
| 104 |
|
| 105 |
% use Arev as "heavy" sans serif font:: |
| 106 |
|
| 107 |
\DeclareFontShape{OML}{fav}{bx}{it}{<-> s * [0.875] zavmbi7m}{} |
| 108 |
\SetMathAlphabet{\mathsfbfit}{bold}{OML}{fav}{bx}{it} |
| 109 |
|
| 110 |
|
| 111 |
% Test sheet |
| 112 |
% ---------- |
| 113 |
% :: |
| 114 |
|
| 115 |
\begin{document} |
| 116 |
|
| 117 |
\section*{Test the isomath Package} |
| 118 |
|
| 119 |
|
| 120 |
% Print font package, isomath options, and resulting font families:: |
| 121 |
|
| 122 |
Font Setup: \detokenize\expandafter{\fontsetup}\\ |
| 123 |
Isomath: \detokenize\expandafter{\isomathsetup}\\ |
| 124 |
Default font families: |
| 125 |
\makeatletter |
| 126 |
\begin{tabular}[t]{lrlrl} |
| 127 |
Text & serif & \textsf{\rmdefault} & |
| 128 |
sans-serif & \textsf{\sfdefault}\\ |
| 129 |
Math & serif & \textsf{\isomath@rmdefault} & |
| 130 |
sans-serif & \textsf{\isomath@sfdefault}\\ |
| 131 |
\end{tabular} |
| 132 |
\makeatother |
| 133 |
|
| 134 |
% A teststring with Latin and Greek letters:: |
| 135 |
|
| 136 |
\newcommand{\teststring}{% |
| 137 |
% capital Latin letters |
| 138 |
A,B,C, |
| 139 |
% capital Greek letters |
| 140 |
\Gamma,\Delta,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Upsilon,\Phi,\Psi,\Omega, |
| 141 |
% small Greek letters |
| 142 |
\alpha,\beta,\pi,\nu,\omega, |
| 143 |
% small Latin letters: |
| 144 |
% compare \nu, \omega, v, and w |
| 145 |
v,w, |
| 146 |
% is there a true italic form of a and g? |
| 147 |
a,g, |
| 148 |
% digits |
| 149 |
0,1,9 |
| 150 |
} |
| 151 |
|
| 152 |
\subsection*{Math alphabets} |
| 153 |
|
| 154 |
If there are other symbols in place of Greek letters in a math |
| 155 |
alphabet, it uses T1 or OT1 font encoding instead of OML. |
| 156 |
|
| 157 |
\begin{eqnarray*} |
| 158 |
\mbox{mathnormal} & & \teststring \\ |
| 159 |
\mbox{mathit} & & \mathit{\teststring}\\ |
| 160 |
\mbox{mathrm} & & \mathrm{\teststring}\\ |
| 161 |
\mbox{mathbf} & & \mathbf{\teststring}\\ |
| 162 |
\mbox{mathsf} & & \mathsf{\teststring}\\ |
| 163 |
\mbox{mathtt} & & \mathtt{\teststring} |
| 164 |
\end{eqnarray*} |
| 165 |
New alphabets bold-italic, sans-serif-italic, and sans-serif-bold-italic. |
| 166 |
\begin{eqnarray*} |
| 167 |
\mbox{mathbfit} & & \mathbfit{\teststring}\\ |
| 168 |
\mbox{mathsfit} & & \mathsfit{\teststring}\\ |
| 169 |
\mbox{mathsfbfit} & & \mathsfbfit{\teststring} |
| 170 |
\end{eqnarray*} |
| 171 |
% |
| 172 |
Do the math alphabets match? |
| 173 |
|
| 174 |
$ |
| 175 |
\mathnormal {a x \alpha \omega} |
| 176 |
\mathbfit {a x \alpha \omega} |
| 177 |
\mathsfbfit{a x \alpha \omega} |
| 178 |
\quad |
| 179 |
\mathsfbfit{T C \Theta \Gamma} |
| 180 |
\mathbfit {T C \Theta \Gamma} |
| 181 |
\mathnormal {T C \Theta \Gamma} |
| 182 |
$ |
| 183 |
|
| 184 |
\subsection*{Vector symbols} |
| 185 |
|
| 186 |
Alphabetic symbols for vectors are boldface italic, |
| 187 |
$\vec{\lambda}=\vec{e}_{1}\cdot\vec{a}$, |
| 188 |
while numeric ones (e.g. the zero vector) are bold upright, |
| 189 |
$\vec{a} + \vec{0} = \vec{a}$. |
| 190 |
|
| 191 |
\subsection*{Matrix symbols} |
| 192 |
|
| 193 |
Symbols for matrices are boldface italic, too:% |
| 194 |
\footnote{However, matrix symbols are usually capital letters whereas vectors |
| 195 |
are small ones. Exceptions are physical Quantities like the force |
| 196 |
vector $\vec{F}$ or the electrical field $\vec{E}$.% |
| 197 |
} |
| 198 |
$\matrixsym{\Lambda}=\matrixsym{E}\cdot\matrixsym{A}.$ |
| 199 |
|
| 200 |
|
| 201 |
\subsection*{Tensor symbols} |
| 202 |
|
| 203 |
Symbols for tensors are sans-serif bold italic, |
| 204 |
|
| 205 |
\[ |
| 206 |
\tensorsym{\alpha} = \tensorsym{e}\cdot\tensorsym{a} |
| 207 |
\quad \Longleftrightarrow \quad |
| 208 |
\alpha_{ijl} = e_{ijk}\cdot a_{kl}. |
| 209 |
\] |
| 210 |
|
| 211 |
|
| 212 |
The permittivity tensor describes the coupling of electric field and |
| 213 |
displacement: \[ |
| 214 |
\vec{D}=\epsilon_{0}\tensorsym{\epsilon}_{\mathrm{r}}\vec{E}\] |
| 215 |
|
| 216 |
|
| 217 |
\subsection*{Bold math version} |
| 218 |
|
| 219 |
The ``bold'' math version is selected with the commands |
| 220 |
\verb+\boldmath+ or \verb+\mathversion{bold}+ |
| 221 |
\boldmath |
| 222 |
|
| 223 |
|
| 224 |
\begin{eqnarray*} |
| 225 |
\mbox{mathnormal} & & \teststring \\ |
| 226 |
\mbox{mathit} & & \mathit{\teststring}\\ |
| 227 |
\mbox{mathrm} & & \mathrm{\teststring}\\ |
| 228 |
\mbox{mathbf} & & \mathbf{\teststring}\\ |
| 229 |
\mbox{mathsf} & & \mathsf{\teststring}\\ |
| 230 |
\mbox{mathtt} & & \mathtt{\teststring} |
| 231 |
\end{eqnarray*} |
| 232 |
New alphabets bold-italic, sans-serif-italic, and sans-serif-bold-italic. |
| 233 |
\begin{eqnarray*} |
| 234 |
\mbox{mathbfit} & & \mathbfit{\teststring}\\ |
| 235 |
\mbox{mathsfit} & & \mathsfit{\teststring}\\ |
| 236 |
\mbox{mathsfbfit} & & \mathsfbfit{\teststring} |
| 237 |
\end{eqnarray*} |
| 238 |
% |
| 239 |
Do the math alphabets match? |
| 240 |
|
| 241 |
$ |
| 242 |
\mathnormal {a x \alpha \omega} |
| 243 |
\mathbfit {a x \alpha \omega} |
| 244 |
\mathsfbfit{a x \alpha \omega} |
| 245 |
\quad |
| 246 |
\mathsfbfit{T C \Theta \Gamma} |
| 247 |
\mathbfit {T C \Theta \Gamma} |
| 248 |
\mathnormal {T C \Theta \Gamma} |
| 249 |
$ |
| 250 |
|
| 251 |
\subsection*{Vector symbols} |
| 252 |
|
| 253 |
Alphabetic symbols for vectors are boldface italic, |
| 254 |
$\vec{\lambda}=\vec{e}_{1}\cdot\vec{a}$, |
| 255 |
while numeric ones (e.g. the zero vector) are bold upright, |
| 256 |
$\vec{a} + \vec{0} = \vec{a}$. |
| 257 |
|
| 258 |
|
| 259 |
\subsection*{Matrix symbols} |
| 260 |
|
| 261 |
Symbols for matrices are boldface italic, too:% |
| 262 |
\footnote{However, matrix symbols are usually capital letters whereas vectors |
| 263 |
are small ones. Exceptions are physical Quantities like the force |
| 264 |
vector $\vec{F}$ or the electrical field $\vec{E}$.% |
| 265 |
} |
| 266 |
$\matrixsym{\Lambda}=\matrixsym{E}\cdot\matrixsym{A}.$ |
| 267 |
|
| 268 |
|
| 269 |
\subsection*{Tensor symbols} |
| 270 |
|
| 271 |
Symbols for tensors are sans-serif bold italic, |
| 272 |
|
| 273 |
\[ |
| 274 |
\tensorsym{\alpha} = \tensorsym{e}\cdot\tensorsym{a} |
| 275 |
\quad \Longleftrightarrow \quad |
| 276 |
\alpha_{ijl} = e_{ijk}\cdot a_{kl}. |
| 277 |
\] |
| 278 |
|
| 279 |
The permittivity tensor describes the coupling of electric field and |
| 280 |
displacement: \[ |
| 281 |
\vec{D}=\epsilon_{0}\tensorsym{\epsilon}_{\mathrm{r}}\vec{E}\] |
| 282 |
|
| 283 |
\end{document} |