| 1 |
\documentclass[pagesize=auto]{scrartcl} |
| 2 |
|
| 3 |
\usepackage{fixltx2e} |
| 4 |
\usepackage{etex} |
| 5 |
\usepackage{lmodern} |
| 6 |
\usepackage[T1]{fontenc} |
| 7 |
\usepackage{textcomp} |
| 8 |
\usepackage[svgnames]{xcolor} |
| 9 |
\usepackage{tikz} |
| 10 |
\usepackage{amsmath} |
| 11 |
\usepackage{mathtools} |
| 12 |
\usepackage{booktabs} |
| 13 |
\usepackage{listings} |
| 14 |
\usepackage{microtype} |
| 15 |
\usepackage{hyperref} |
| 16 |
|
| 17 |
\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} |
| 18 |
\newcommand*{\pkg}[1]{\textsf{#1}} |
| 19 |
\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} |
| 20 |
\makeatletter |
| 21 |
\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} |
| 22 |
\makeatother |
| 23 |
\newcommand*{\opt}[1]{\texttt{#1}} |
| 24 |
|
| 25 |
\addtokomafont{title}{\rmfamily} |
| 26 |
|
| 27 |
\lstset{% |
| 28 |
language=[LaTeX]TeX,% |
| 29 |
columns=flexible,% |
| 30 |
upquote=true,% |
| 31 |
numbers=left,% |
| 32 |
basicstyle=\ttfamily,% |
| 33 |
keywordstyle=\color{Navy},% |
| 34 |
commentstyle=\color{DimGray},% |
| 35 |
stringstyle=\color{SeaGreen},% |
| 36 |
numberstyle=\scriptsize\color{SlateGray}% |
| 37 |
} |
| 38 |
|
| 39 |
\title{The \pkg{type1cm} package for \LaTeX\thanks{This manual corresponds to \pkg{type1cm.sty}~v0.04, dated~2002/09/05.}} |
| 40 |
\author{David Carlisle\thanks{\mail{[email protected]}}} |
| 41 |
\date{2002/09/05} |
| 42 |
|
| 43 |
|
| 44 |
\begin{document} |
| 45 |
|
| 46 |
\maketitle |
| 47 |
|
| 48 |
\noindent |
| 49 |
\LaTeX\ separates its internal notion of font specification |
| 50 |
from the external fonts available on the system by means of |
| 51 |
`Font Shape Specifications', that are normally held in |
| 52 |
`Font Descriptor' (\textsc{fd}) files. |
| 53 |
|
| 54 |
The \textsc{fd} files that come with \LaTeX\ that refer to the standard |
| 55 |
Computer Modern set (and the related \AmS\ set) are based on |
| 56 |
the classical bitmap fonts which are available in `magstep' |
| 57 |
sizes only. For instance The specification of the main roman font is |
| 58 |
% |
| 59 |
\begin{lstlisting} |
| 60 |
\DeclareFontShape{OT1}{cmr}{m}{n} |
| 61 |
{ <5> <6> <7> <8> <9> <10> <12> gen * cmr |
| 62 |
<10.95> cmr10 |
| 63 |
<14.4> cmr12 |
| 64 |
<17.28><20.74><24.88>cmr17}{} |
| 65 |
\end{lstlisting} |
| 66 |
% |
| 67 |
which says for instance that no font is available at 10.5\,pt (\LaTeX\ % |
| 68 |
will substitute the nearest available size if you ask for this) |
| 69 |
and similarly the font is not available at all above 25\,pt. |
| 70 |
|
| 71 |
Such restrictions are essential with bitmap fonts to save generating |
| 72 |
huge numbers of bitmaps for any size that might be requested, however |
| 73 |
with scalable versions of the fonts these restrictions are not really |
| 74 |
needed. For instance the equivalent definition defined here is: |
| 75 |
% |
| 76 |
\begin{lstlisting} |
| 77 |
\DeclareFontShape{OT1}{cmr}{m}{n}{ |
| 78 |
<-6> cmr5 |
| 79 |
<6-7> cmr6 |
| 80 |
<7-8> cmr7 |
| 81 |
<8-9> cmr8 |
| 82 |
<9-10> cmr9 |
| 83 |
<10-12> cmr10 |
| 84 |
<12-17> cmr12 |
| 85 |
<17-> cmr17 |
| 86 |
}{} |
| 87 |
\end{lstlisting} |
| 88 |
% |
| 89 |
which means that you can (Although some may consider it bad style) |
| 90 |
go |
| 91 |
% |
| 92 |
\begin{verbatim} |
| 93 |
\fontsize{10.7pt}{12pt}\selectfont |
| 94 |
\end{verbatim} |
| 95 |
% |
| 96 |
and be given a suitably scaled |
| 97 |
version of \texttt{cmr10} and a baseline setting of 12\,pt. Similarly if you really |
| 98 |
want, you can go |
| 99 |
% |
| 100 |
\begin{verbatim} |
| 101 |
\fontsize{2cm}{2.5cm}\selectfont |
| 102 |
\end{verbatim} |
| 103 |
% |
| 104 |
and use \texttt{cmr17} scaled |
| 105 |
to 2\,cm height for a special display context. |
| 106 |
|
| 107 |
\begin{flushleft} |
| 108 |
\begin{tikzpicture} |
| 109 |
\node[draw=black, inner sep=2ex] (frame) {% |
| 110 |
\parbox{\dimexpr\linewidth-4ex-1pt\relax}{% |
| 111 |
If you use this setup and produce \textsc{dvi} files using these sizes, be very |
| 112 |
careful if you give the \textsc{dvi} files so created to someone using classical |
| 113 |
bitmap versions of the cm fonts. Depending on how their system is set up |
| 114 |
they will either not be able to print the file at all, as they will not |
| 115 |
have the fonts at the corrrect sizes, or the system will make all these |
| 116 |
strange sizes `on demand' and fill the disk with bitmaps. |
| 117 |
}% |
| 118 |
}; |
| 119 |
\node[fill=white] at (frame.north) {\textbf{Warning}}; |
| 120 |
\end{tikzpicture} |
| 121 |
\end{flushleft} |
| 122 |
|
| 123 |
So the default way of using this package is as a \LaTeX\ package file. |
| 124 |
Install \texttt{type1cm.sty} as described below and then just add |
| 125 |
% |
| 126 |
\begin{verbatim} |
| 127 |
\usepackage{type1cm} |
| 128 |
\end{verbatim} |
| 129 |
% |
| 130 |
to your document. This will override the definitions for all the fonts |
| 131 |
and so the standard \textsc{fd} files are not used. |
| 132 |
The disadvantage of this method is all the definitions are then loaded |
| 133 |
into memory, even for fonts you don't use in the document. (However |
| 134 |
only the size specifications are so loaded, not the fonts themselves). |
| 135 |
However the advantage is that you can always choose not to specify |
| 136 |
\verb|\usepackage{type1cm}| and so use the same font sizes (and get the |
| 137 |
same line and page breaks) as everyone else. |
| 138 |
|
| 139 |
Alternatively you may use this package to produce a set of fd |
| 140 |
files that \emph{replace} the standard files (such as \texttt{ot1cmr.fd}) |
| 141 |
You will then need to remake the \LaTeX\ format by running \texttt{initex} on |
| 142 |
\texttt{latex.ltx} (as some \textsc{fd} files are loaded into the format). Then you |
| 143 |
will not need to use \cmd{\usepackage}. All your documents will have the |
| 144 |
freedom of scalable font choices. |
| 145 |
|
| 146 |
|
| 147 |
\section{Installation instructions} |
| 148 |
|
| 149 |
\renewcommand*{\labelenumi}{\theenumi)} |
| 150 |
|
| 151 |
The installation is controlled by the file \texttt{type1cm.ins} which you may |
| 152 |
edit in two places. |
| 153 |
% |
| 154 |
\begin{enumerate} |
| 155 |
\item If you have not got the \AmS\ Font set available in scalable form |
| 156 |
remove the `\verb|%|' from the line \verb|%\def\ams{}|\\ |
| 157 |
This will cause a more restricted font specification to be used. |
| 158 |
|
| 159 |
If you have an extended \AmS\ font set available in scalable form |
| 160 |
(\textsf{msam6}, \textsf{msam8} and \texttt{msam9} in addition to \textsf{msam5}, \textsf{msam7} and \textsf{msam10}) |
| 161 |
then remove the `\verb|%|' from the line \verb|%\def\ams{ams,extra}| |
| 162 |
|
| 163 |
\item If after reading the warning above you decide to make a set of fd |
| 164 |
files, remove the `\verb|%|' from the line \verb|%\makefdtrue| |
| 165 |
\end{enumerate} |
| 166 |
|
| 167 |
Then run \texttt{tex} (or \texttt{latex}) on the file \texttt{type1cm.ins} and a package file |
| 168 |
\texttt{type1cm.sty} (and perhaps a set of \textsc{fd} files) will be produced |
| 169 |
which you should place in a directory where \TeX\ looks for input files. |
| 170 |
|
| 171 |
|
| 172 |
\section{Small technical note about the Font Shape specifications used.} |
| 173 |
|
| 174 |
I consistantly specified that given a requested size, the largest |
| 175 |
available font size smaller than the requested size should be used |
| 176 |
and then enlarged to the requested size. The exception being sizes |
| 177 |
smaller than the smallest available font, which use a reduced version |
| 178 |
of that font. The rationale for this is that enlarging a small font |
| 179 |
typically produces a rather `fat' font, but something readable, whereas |
| 180 |
shrinking a font may produce something unreadable quite quickly |
| 181 |
|
| 182 |
So for \textsf{msam} (if `\opt{extra}' is not specified) I used: |
| 183 |
% |
| 184 |
\begin{lstlisting} |
| 185 |
\DeclareFontShape{U}{msa}{m}{n}{ |
| 186 |
<-7> msam5 |
| 187 |
<7-10> msam7 |
| 188 |
<10-> msam10 |
| 189 |
}{} |
| 190 |
\end{lstlisting} |
| 191 |
% |
| 192 |
That is sizes strictly below 7\,pt use \textsf{msam5}, 7\,pt to (less than) 10\,pt |
| 193 |
use \textsf{msam7} and sizes 10\,pt and above use \textsf{msam10}. |
| 194 |
|
| 195 |
This differs from the Specification that the \AmS\ use for the scalable |
| 196 |
\AmS\ fonts (used by the \opt{psfonts} option to the \pkg{amsfonts} package) |
| 197 |
They use |
| 198 |
% |
| 199 |
\begin{lstlisting} |
| 200 |
\DeclareFontShape{U}{msa}{m}{n}{ |
| 201 |
<-6> msam5 |
| 202 |
<6-8> msam7 |
| 203 |
<8-> msam10 |
| 204 |
}{} |
| 205 |
\end{lstlisting} |
| 206 |
% |
| 207 |
This has the advantage of minimising the scaling used, so for instance |
| 208 |
a 9\,pt request is satisfied by \textsf{msam7} scaled up to~9 by this package, but |
| 209 |
by \textsf{msam10} scaled down to~9 by the \AmS\ package. |
| 210 |
|
| 211 |
In practice this is not likely to make a difference that anyone notices, |
| 212 |
but it could in principle affect line breaks etc, so I thought that |
| 213 |
I would mention it here. |
| 214 |
|
| 215 |
\clearpage |
| 216 |
|
| 217 |
|
| 218 |
\section{History} |
| 219 |
|
| 220 |
\begin{description} |
| 221 |
\item[1997/01/27 v0.02 BlueSky/Y\&Y Type1 CM font definitions (DPC)] \leavevmode \\ |
| 222 |
Possibly first public release? Maybe there was a 0.01.. |
| 223 |
|
| 224 |
\item[2002/04/01 v0.03 BlueSky/Y\&Y Type1 CM font definitions (DPC)] \leavevmode \\ |
| 225 |
\textsf{cmdunhill} hasn't worked since the beginning: \cmd{\hyp\clap{\raisebox{-1.9ex}{\rmfamily\textuparrow}}enchar} |
| 226 |
|
| 227 |
Reported by Brian Mays via the Debian bug tracking system. |
| 228 |
Also, made distribution conditions LPPL (previously unspecified) |
| 229 |
\end{description} |
| 230 |
|
| 231 |
\end{document} |