summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/sansmathfonts/sansmathfonts.tex
blob: a20250512c92b87e8fd3e149c485bda1ac20a100 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
% !TEX TS-program = LuaLaTeX

% sansmathfonts.tex
%
% Documentation for the sansmathfonts package
%
% author: Ariel Barton
%
% Copyright Ariel Barton, 2013--2022
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version.
% The latest version of the license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of
% LaTeX version 2003/06/01 or later.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The complete list of files considered part of this work is in
% the file `sansmathfonts.pdf' and its source code `sansmathfonts.tex'.
%
% Date: 2022/10/09

\documentclass{amsart}

\raggedbottom

\usepackage[OT1]{fontenc}
\usepackage[I]{sansmathfonts}
%\renewcommand{\sfdefault}{xcmss}\let\mathserif\mathrm
\usepackage{hyperref, amsfonts, esint, slantsc, bm}

%\let\mathserif\mathrm

\typeout{********************************}
\typeout{Current font encoding: \csname f@encoding\endcsname}

\def\sectionautorefname{Section}

\title{The \textsf{sansmathfonts} package}
\author{Ariel Barton}

\DeclareTextFontCommand{\cmsmf}
{\fontencoding{OT1}\fontfamily{cmsmf}\selectfont}


\begin{document}



\maketitle



The Computer Modern font family has a sans serif typeface. However, compared to the serif typeface, it is incomplete: there are no sans serif small caps or math fonts. Furthermore, the bold slanted font is not available as an outline font.
This leads to highly unsatisfactory typography of documents that use sans serif for the body text.


The \textsf{sansmathfonts} package provides these ``missing'' fonts. Most of the usefulness of the package is in the fonts; \texttt{sansmathfonts.sty} is a small package providing \LaTeX\ support. To use it, simply say \texttt{\char`\\usepackage\char`\{sansmathfonts\char`\}} in the document preamble.

In the default (OT1) text font encoding, and also in the T1 and U font encodings, this will redefine the document's default sans serif font family from \textsf{cmss} to \textsf{xcmss}; this will make the \textsf{\textbf{\textit{bold slanted}}} and \textsf{\textsc{Caps and small caps}} fonts available via normal \LaTeX\ font commands (\verb|\textbf|, \verb|\textit| and \verb|\textsc|). If you additionally load Harald Harder's \textsf{slantsc} package, this will make \textsf{\textit{\textsc{slanted caps and small caps}}} available.

This will also switch the math fonts to sans serif:
\[\Im \mathop{\mathrm{exp}}(i\omega)=\sin(\omega) \]
If you use symbols from the \textsf{amsfonts} or \textsf{esint} packages, they will also be replaced by appropriate sans serif versions:
\[\ointclockwise \quad \mho \quad \hbar\]
By default, the commands \verb|\mathrm| and \verb|\mathsf| both produce sans serif text. To get serifed roman text, use the command \verb|\mathserif|:
\[\mathrm{mathrm}\quad\mathsf{mathsf}\quad\mathserif{mathserif}\]
\textsf{sansmathfonts} knows about the \textsf{beamer} document class and will automatically use \textsf{beamer}'s \texttt{professionalfonts} theme.

The math fonts differ slightly from Knuth's standard sans serif fonts. Specifically, for ease of reading I have chosen to put the serifs back on the uppercase I, Pi and~Xi:
\[{I}\quad\mathrm{I}\quad\mathbf{I}\quad\bm{I}\quad
\mathit{\Pi}\quad{\Pi}\quad\mathbf{\Pi}\quad
\mathit{\Xi}\quad{\Xi}\quad\mathbf{\Xi}\quad
\text{and not\quad \textsf{\font \rawfont = cmss10 \rawfont I\quad \char5\quad\char4}}\]
\textsf{Sans serif Is outside of math mode} still have no serifs unless the package option \texttt{[I]} is used; note that this option as yet only works with the OT1 and U font encodings.


Feedback is appreciated and may be sent to \texttt{origamist@gmail.com}.

\section{Package options}

\begin{itemize}
\item \texttt{[I]} The \texttt{[I]} package option puts the serifs back on the capital I even in text mode. This option only works with the OT1 and U font encodings. It will work under \textsf{pdflatex}'s defaults; in Lua\LaTeX\ or Xe\LaTeX, you will need to change the text encoding by saying \texttt{\string\usepackage[OT1]\char`\{fontenc\char`\}}.
\item \texttt{[onlymath]}, \texttt{[nottext]}. These options provide sans serif math but do not change the text sans serif font.
\item \texttt{[onlytext]}, \texttt{[notmath]}. These options provide sans serif text fonts and improve the behavior of \texttt{\char`\\mathsf} but do not change the default math font from roman to sans serif. You can get a similar effect by not using the \textsf{sansmathfonts} package and using the line \texttt{\char`\\renewcommand\char`\{\char`\\sfdefault\char`\}\char `\{xcmss\char`\}}
or
\texttt{\char`\\renewcommand\char`\{\char`\\sfdefault\char`\}\char `\{cmsmf\char`\}}
in the document preamble.
\end{itemize}



\section{List of new fonts}\label{sec:fonts}

All of the Type 1 fonts in this package were generated using mftrace 1.2.18 and Fontforge.

The following fonts are based mainly on Donald Knuth's Computer Modern fonts.

\textsf{\fontshape{ui}\selectfont Unslanted italic} (needed for the pounds symbol \textsf{\pounds}):
\begin{itemize}
\item \textsf{cmssu10}
\end{itemize}

Text \textsf{\textsc{caps and small caps}}, OT1 encoding:

\nobreak

\noindent\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssbxcsc10}
\item \textsf{cmssxicsc10}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsscsc8}
\item \textsf{cmsscsci8}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsscsc9}
\item \textsf{cmsscsci9}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsscsc10}
\item \textsf{cmsscsci10}
\end{itemize}}

\bigskip

Math italic ($\alpha \beta \gamma abc \ell \wp$):

\nobreak

\noindent\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssmi5}
\item \textsf{cmssmi6}
\item \textsf{cmssmi7}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssmi8}
\item \textsf{cmssmi9}
\item \textsf{cmssmi10}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssmib5}
\item \textsf{cmssmib6}
\item \textsf{cmssmib7}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssmib8}
\item \textsf{cmssmib9}
\item \textsf{cmssmib10}
\end{itemize}}

\bigskip

Math symbols ($\Re\oplus \Im  $):

\nobreak

\noindent\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmsssy5}
\item \textsf{cmsssy6}
\item \textsf{cmsssy7}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsssy8}
\item \textsf{cmsssy9}
\item \textsf{cmsssy10}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssbsy5}
\item \textsf{cmssbsy6}
\item \textsf{cmssbsy7}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssbsy8}
\item \textsf{cmssbsy9}
\item \textsf{cmssbsy10}
\end{itemize}}

\bigskip


Math extended fonts ($\int \sum \prod$):

\nobreak

\noindent\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssex7}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssex8}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssex9}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmssex10}
\end{itemize}}

\bigskip

\cmsmf{Sans serif text fonts with serifed capital~I:}

\noindent\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmsmf8}
\item \textsf{cmsmf9}
\item \textsf{cmsmf10}
\item \textsf{cmsmf12}
\item \textsf{cmsmf17}
\item \textsf{cmsmfcsc8}
\item \textsf{cmsmfcsc9}
\item \textsf{cmsmfcsc10}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsmfbx8}
\item \textsf{cmsmfbx9}
\item \textsf{cmsmfbx10}
\item \textsf{cmsmfbx12}
\item \textsf{cmsmfbx17}
\item \noindent\rlap{\textsf{cmsmfbxcsc10}}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsmfi8}
\item \textsf{cmsmfi9}
\item \textsf{cmsmfi10}
\item \textsf{cmsmfi12}
\item \textsf{cmsmfi17}
\item \textsf{cmsmfcsci8}
\item \textsf{cmsmfcsci9}
\item \textsf{cmsmfcsci10}
\end{itemize}}\parbox[t]{0.25\textwidth}{\begin{itemize}
\item \textsf{cmsmfxi8}
\item \textsf{cmsmfxi9}
\item \textsf{cmsmfxi10}
\item \textsf{cmsmfxi12}
\item \textsf{cmsmfxi17}
\item \noindent\rlap{\textsf{cmsmfxicsc10}}
\end{itemize}}


\bigskip


The following fonts are based on fonts by other authors.

\nobreak

\noindent\parbox[t]{0.33\textwidth}{
\raggedright
Eddie Saudrais's \textsf{esint} package
\begin{itemize}
\item \textsf{ssesint7}
\item \textsf{ssesint8}
\item \textsf{ssesint9}
\item \textsf{ssesint10}
\end{itemize}}\parbox[t]{0.33\textwidth}{
\raggedright
AMS symbols (\textsf{amsfonts} package)
\begin{itemize}
\item \textsf{ssmsam5}
\item \textsf{ssmsam6}
\item \textsf{ssmsam7}
\item \textsf{ssmsam8}
\item \textsf{ssmsam9}
\item \textsf{ssmsam10}
\end{itemize}}\parbox[t]{0.33\textwidth}{
\raggedright
AMS symbols (\textsf{amsfonts} package)
\begin{itemize}
\item \textsf{ssmsbm5}
\item \textsf{ssmsbm6}
\item \textsf{ssmsbm7}
\item \textsf{ssmsbm8}
\item \textsf{ssmsbm9}
\item \textsf{ssmsbm10}
\end{itemize}}

\bigskip

The following fonts are based on J\"org Knappen's European Computer Modern fonts.

\nobreak

\bigskip
\noindent
\parbox[t]{0.25\textwidth}{
\font\temp = eczz1000 \temp
Normal
\begin{itemize}
\item \textsf{eczz0500}
\item \textsf{eczz0600}
\item \textsf{eczz0700}
\item \textsf{eczz0800}
\item \textsf{eczz0900}
\item \textsf{eczz1000}
\item \textsf{eczz1095}
\item \textsf{eczz1200}
\item \textsf{eczz1440}
\item \textsf{eczz1728}
\item \textsf{eczz2074}
\item \textsf{eczz2488}
\item \textsf{eczz2986}
\item \textsf{eczz3583}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\font\temp = eczi1000 \temp
Slanted
\begin{itemize}
\item \textsf{eczi0500}
\item \textsf{eczi0600}
\item \textsf{eczi0700}
\item \textsf{eczi0800}
\item \textsf{eczi0900}
\item \textsf{eczi1000}
\item \textsf{eczi1095}
\item \textsf{eczi1200}
\item \textsf{eczi1440}
\item \textsf{eczi1728}
\item \textsf{eczi2074}
\item \textsf{eczi2488}
\item \textsf{eczi2986}
\item \textsf{eczi3583}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\font\temp = eczx1000 \temp
Bold
\begin{itemize}
\item \textsf{eczx0500}
\item \textsf{eczx0600}
\item \textsf{eczx0700}
\item \textsf{eczx0800}
\item \textsf{eczx0900}
\item \textsf{eczx1000}
\item \textsf{eczx1095}
\item \textsf{eczx1200}
\item \textsf{eczx1440}
\item \textsf{eczx1728}
\item \textsf{eczx2074}
\item \textsf{eczx2488}
\item \textsf{eczx2986}
\item \textsf{eczx3583}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\font\temp = eczo1000 \temp
Bold slanted
\begin{itemize}
\item \textsf{eczo0500}
\item \textsf{eczo0600}
\item \textsf{eczo0700}
\item \textsf{eczo0800}
\item \textsf{eczo0900}
\item \textsf{eczo1000}
\item \textsf{eczo1095}
\item \textsf{eczo1200}
\item \textsf{eczo1440}
\item \textsf{eczo1728}
\item \textsf{eczo2074}
\item \textsf{eczo2488}
\item \textsf{eczo2986}
\item \textsf{eczo3583}
\end{itemize}
}

\bigskip

The \textsf{sansmathfonts} package also provides outline versions of the following fonts (supplied with Mac\TeX\ 2012 as Metafont fonts only). These provide \textsf{\textbf{bold}} and \textsf{\textsl{\textbf{bold slanted}}} fonts at varying sizes.

\noindent\parbox[t]{0.25\textwidth}{
\font\temp = eczo1000 \temp
\begin{itemize}
\item \textsf{cmssxi8}
\item \textsf{cmssxi9}
\item \textsf{cmssxi10}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssxi12}
\item \textsf{cmssxi17}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssbx8}
\item \textsf{cmssbx9}
\end{itemize}
}\parbox[t]{0.25\textwidth}{
\begin{itemize}
\item \textsf{cmssbx12}
\item \textsf{cmssbx17}
\end{itemize}
}


\section{Files in this package}\label{sec:files}

109 of the new fonts listed in \autoref{sec:fonts} come in three files each: the \TeX\ Font Metric files (extension \texttt{.tfm}), the Type 1 font file (extension \texttt{.pfb}), and Metafont source file (extension \texttt{.mf}).

The 9 \textsf{cmssxi} and \textsf{cmssbx} fonts come as \texttt{.pfb} files only, as the MetaFont sources are already part of the \TeX\ Live distribution (see also the \textsf{sauter} package at \texttt{\href{http://www.ctan.org/tex-archive/fonts/cm/sauter} {http:/\slash www.ctan.org\slash tex-archive\slash fonts\slash cm\slash sauter}}).

The 28 \textsf{cmsmf} fonts are almost identical to their \textsf{cmss} counterparts. Thus, these fonts are provided as \emph{virtual} fonts, and so come in five parts: the virtual font file (\texttt{cmsmf.vf}), the \TeX\ Font Metric file (\texttt{cmsmf.tfm}), and the font \textsf{cmsmfIPiXi} containing only the altered letters \cmsmf{I}, \cmsmf{\char4} and \cmsmf{\char5} (and \cmsmf{\textsc{i}}, in the small caps fonts); this font comes as MetaFont source (\texttt{cmsmfIPiXi.mf}), \TeX\ font metric (\texttt{cmsmfIPiXi.tfm}) and Type 1 font (\texttt{cmsmfIPiXi.pfb}).

In addition, this package should come with the following 29 supplementary Metafont source files:

\begin{itemize}
\item \texttt{eczi.mf}
\item \texttt{eczo.mf}
\item \texttt{eczx.mf}
\item \texttt{eczz.mf}
\item \texttt{sans-amsya.mf}
\item \texttt{sans-amsyb.mf}
\item \texttt{sans-asymbols.mf}
\item \texttt{sans-bigdel.mf}
\item \texttt{sans-bigint.mf}
\item \texttt{sans-bigop.mf}
\item \texttt{sans-bsymbols.mf}
\item \texttt{sans-calu.mf}
\item \texttt{sans-csc.mf}
\item \texttt{sans-greekl.mf}
\item \texttt{sans-greeku.mf}
\item \texttt{sans-IPiXi.mf}
\item \texttt{sans-IPiXicsc.mf}
\item \texttt{sans-mathex.mf}
\item \texttt{sans-mathint.mf}
\item \texttt{sans-mathsl.mf}
\item \texttt{sans-mathsy.mf}
\item \texttt{sans-roman.mf}
\item \texttt{sans-romanu.mf}
\item \texttt{sans-romms.mf}
\item \texttt{sans-slantms.mf}
\item \texttt{sans-sym.mf}
\item \texttt{sans-symbol.mf}
\item \texttt{sans-xbbold.mf}
\item \texttt{sansfontbase.mf}
\end{itemize}

This package should also come with the following 11 \LaTeX\ Font Definition files:

\begin{itemize}
\item \texttt{omlcmssm.fd}
\item \texttt{omscmsssy.fd}
\item \texttt{omxcmssex.fd}

\item \texttt{ot1cmsmf.fd}
\item \texttt{ot1xcmss.fd}
\item \texttt{t1xcmss.fd}

\item \texttt{ucmsmf.fd}
\item \texttt{ussesint.fd}
\item \texttt{ussmsa.fd}
\item \texttt{ussmsb.fd}
\item \texttt{uxcmss.fd}
\end{itemize}

Finally, it should come with the font map file, LaTeX package, and documentation:

\begin{itemize}
\item \texttt{sansmathfonts.map}
\item \texttt{sansmathfonts.sty}
\item \texttt{sansmathfonts.tex}
\item \texttt{sansmathfonts.pdf}
\end{itemize}

% The subfolders should contain:

% doc: 2 files
% map: 1 file
% tex: 12 files

% New Type 1 fonts: 	137
% Old fonts as Type 1: 	9
% Virtual fonts:		28
% Supplementary .mf:	29

% source: 166 files (=137+29)
% tfm: 165 files	(=137+28)
% type1: 146 files  (=137+9)
% vf: 28  			(=28)

\section{License}

This work (the \textsf{sansmathfonts} package) consists of the
files listed in \autoref{sec:files}.

This work may be distributed and/or modified under the
conditions of the \LaTeX\ Project Public License, either
version 1.3 of this license or (at your option) any
later version.

The latest version of the license is in
\begin{quote}
\href {http://www.latex-project.org/lppl.txt} 
{\texttt{http://www.latex-project.org/lppl.txt}}
\end{quote}
and version 1.3 or later is part of all distributions of
\LaTeX\ version 2003/06/01 or later.

This work has the LPPL maintenance status ``maintained''.

Almost all of the Metafont files in this package are very closely based on existing files in the 2011 \TeX\ Live distribution; see comments near the start of the individual files for notes on their sources. Also, note that the 
files
\begin{itemize}
\item \texttt{cmssxi8.pfb}
\item \texttt{cmssxi9.pfb}
\item \texttt{cmssxi10.pfb}
\item \texttt{cmssxi12.pfb}
\item \texttt{cmssxi17.pfb}
\item \texttt{cmssbx8.pfb}
\item \texttt{cmssbx9.pfb}
\item \texttt{cmssbx12.pfb}
\item \texttt{cmssbx17.pfb}
\end{itemize}
were derived from unedited MetaFont source files in the \textsf{sauter} package using mftrace 1.2.18 and Fontforge. 

\section{Revision history}

\begin{itemize}
\item
April 2013: Original upload
\item
February 2017: Corrected the font names in \texttt{sansmathfonts.map}; this allowed the package to be used correctly with \textsf{dvips}.  
\item
April 2019: Fixed a bug in the file \texttt{ucmsmf.fd} that prevented the \texttt{[I]} package option from working correctly; rewrote most of the \texttt{.fd} files to allow fonts to be loaded at arbitrary sizes; changed maintenance status from ``author-maintained'' to ``maintained''.
\item
June 2019: Rewrote the file \texttt{omxcmssex.fd} to allow the math extended characters to be loaded at arbitrary sizes.
\item
June 2021: Rewrote the OT1, T1, and U font definition files to substitute bold-extended fonts for bold fonts as necessary. Added some package errors and warnings if the document font encoding is not supported.
\item
October 2022: Bug fix to allow compatibility with Lua\LaTeX\ and Xe\LaTeX.
\item
November 2023: Corrected the spacing of the lowercase \textsc{i} in the caps and small caps fonts used with the \texttt{[I]} package option.
\end{itemize}
\end{document}