Debian Codegraph @

texmf-dist/doc/latex/gillcm/gillcm.dtx

raw
1 % \iffalse
2 % $Id: gillcm.dtx,v 1.6 2010-07-30 20:40:55 boris Exp $
3 %
4 % Copyright (c) 2010, Boris Veytsman
5 %
6 % All rights reserved.
7 %
8 % Redistribution and use in source and binary forms, with or without
9 % modification, are permitted provided that the following conditions
10 % are met:
11 %
12 % * Redistributions of source code must retain the above copyright
13 % notice, this list of conditions and the following disclaimer.
14 % * Redistributions in binary form must reproduce the above
15 % copyright notice, this list of conditions and the following
16 % disclaimer in the documentation and/or other materials provided
17 % with the distribution.
18 % * Neither the name of the original author nor the names of the
19 % contributors may be used to endorse or promote products derived
20 % from this software without specific prior written permission.
21 %
22 % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
23 % CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
24 % INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 % MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 % DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
27 % BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 % EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29 % TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 % DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31 % ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 % OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 % OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 % POSSIBILITY OF SUCH DAMAGE.
35 %
36 % \fi
37 % \CheckSum{138}
38 %
39 %
40 %% \CharacterTable
41 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
42 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
43 %% Digits \0\1\2\3\4\5\6\7\8\9
44 %% Exclamation \! Double quote \" Hash (number) \#
45 %% Dollar \$ Percent \% Ampersand \&
46 %% Acute accent \' Left paren \( Right paren \)
47 %% Asterisk \* Plus \+ Comma \,
48 %% Minus \- Point \. Solidus \/
49 %% Colon \: Semicolon \; Less than \<
50 %% Equals \= Greater than \> Question mark \?
51 %% Commercial at \@ Left bracket \[ Backslash \\
52 %% Right bracket \] Circumflex \^ Underscore \_
53 %% Grave accent \` Left brace \{ Vertical bar \|
54 %% Right brace \} Tilde \~}
55 %
56 %\iffalse
57 % Taken from xkeyval.dtx
58 %\fi
59 %\makeatletter
60 %\def\DescribeOption#1{\leavevmode\@bsphack
61 % \marginpar{\raggedleft\PrintDescribeOption{#1}}%
62 % \SpecialOptionIndex{#1}\@esphack\ignorespaces}
63 %\def\PrintDescribeOption#1{\strut\emph{option}\\\MacroFont #1\ }
64 %\def\SpecialOptionIndex#1{\@bsphack
65 % \index{#1\actualchar{\protect\ttfamily#1}
66 % (option)\encapchar usage}%
67 % \index{options:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar
68 % usage}\@esphack}
69 %\def\DescribeOptions#1{\leavevmode\@bsphack
70 % \marginpar{\raggedleft\strut\emph{options}%
71 % \@for\@tempa:=#1\do{%
72 % \\\strut\MacroFont\@tempa\SpecialOptionIndex\@tempa
73 % }}\@esphack\ignorespaces}
74 %\makeatother
75 %
76 %
77 % \MakeShortVerb{|}
78 % \GetFileInfo{gillcm.dtx}
79 % \title{Unslanted Italic Computer Modern Fonts Based on Eric Gill's Ideas}
80 % \author{Boris Veytsman\thanks{%
81 % \href{mailto:[email protected]}{\texttt{[email protected]}},
82 % \href{mailto:[email protected]}{\texttt{[email protected]}}}}
83 % \date{\filedate, \fileversion}
84 % \maketitle
85 % \begin{abstract}
86 % This is a demonstration of the use of virtual fonts for unusual
87 % effects. We employ virtual fonts to implement an old idea of Eric
88 % Gill. This package was written for the author's talk
89 % at TUG'2010.
90 % \end{abstract}
91 % \tableofcontents
92 % \listoffigures
93 % \listoftables
94 % \clearpage
95 %
96 % \changes{v1.0}{2010/05/08}{First fully functional version}
97 % \changes{v1.1}{2010/07/28}{Documentation update}
98 %
99 %\section{Introduction}
100 %\label{sec:intro}
101 %
102 % This package is mostly a demonstration of the use of
103 % \textsf{Fontinst}~\cite{Jeffrey04:Fontinst} for mixing and changing
104 % fonts. I wrote it as an appendix for my talk at TUG'2010. Of
105 % course, as it happens with many teachers, I myself learned a lot
106 % while making this demo.
107 %
108 % The demo assumes some knowledge of \TeX{} and the way of writing
109 % |dtx| files~\cite{Clsguide}.
110 %
111 % Eric Gill said that unslanted italics should use Roman uppercase
112 % letters~\cite{Gill:Typography}:
113 % \begin{quote}
114 % Properly speaking, there is no such thing as an alphabet of italic
115 % capitals, and where upright or nearly upright italics are used
116 % ordinary upright Roman capitals go perfectly well with them.
117 % \end{quote}
118 %
119 % Let us create a font with italic lowercase and upright uppercase.
120 % Actually we create \emph{two} fonts: one based on ``normal'', i.e.
121 % slanted italics, and one based on unslanted ones (we call them
122 % |gishape| and |gushape|). In both cases we start with Computer
123 % Modern Italics, and perform all changes using virtual fonts
124 % mechanism.
125 %
126 % Alan Hoenig in his book~\cite{Hoenig98:TeXUnbound} gives another
127 % example of a font based on Gill's idea.
128 %
129 %
130 % A couple words about the installation of the system. You need the file
131 % \url{http://ctan.tug.org/install/fonts/psfonts/public/gillcm.tds.zip}/
132 % Unzip this file in \path{$TEXMF}. Add |+cmg.map| to the
133 % configuration files of dvips, pdftex and your dvi previewer. How
134 % exactly you do this depends on the \TeX{} distribution you use. For \TeX Live you create a file
135 % \path{$TEXMF/updmap.d/50gcm.cfg} with just the line
136 % \begin{verbatim}
137 % Map gcm.map
138 % \end{verbatim}
139 % and then run |texhash| and |updmap|. If you use Debian or Ubuntu,
140 % the system-wide |updmap.d| directory is located in |/etc|, and you
141 % need to create the file |gcm.list| in
142 % \path{/var/lib/tex-common/fontmap-cfg/} with the line
143 % \begin{verbatim}
144 % 50gcm
145 % \end{verbatim}
146 %
147 %
148 % If you use Mik\TeX2.6, run
149 % \begin{verbatim}
150 % initexmf --edit-config-file updmap
151 % \end{verbatim}
152 % Add to the config file
153 % \begin{verbatim}
154 % Map gcm.map
155 % \end{verbatim}
156 % save, exit and run |updmap|.
157 %
158 % If you use Mik\TeX2.5 or earlier, edit
159 % \path{localtexmf\web2c\updmap.cfg}, adding the line
160 % \begin{verbatim}
161 % Map gcm.map
162 % \end{verbatim}
163 % and run |updmap|.
164 %
165 % After this run updmap and texhash programs to update the
166 % configuration files and file names database.
167 %
168 % Refer to your distribution documentation for the further details.
169 %
170 %
171 %
172 %
173 %\DescribeMacro{\gishape}
174 %\DescribeMacro{\gushape}
175 % To use the fonts in \LaTeX{} just add
176 % |\usepackage{gillcm}| to the preamble of your document. The style
177 % adds two new commands |\gishape| and |\gushape| that typeset
178 % ``Gillized'' italics and ``Gillized'' upright italics.
179 %
180 %
181 %
182 %
183 % \StopEventually{
184 %
185 % \section{Acknowledgements}
186 %
187 % Most of the things I know about virtual fonts I learned from the
188 % excellent book~\cite{Hoenig98:TeXUnbound} and the
189 % manual~\cite{fontinstallationguide}. I am grateful to \TeX{} Users
190 % Group and Karl Berry for encouraging my interest in virtual fonts
191 % and to my consulting customers for their support of my font
192 % projects.
193 %
194 % \bibliography{gillcm}
195 % \bibliographystyle{unsrt}}
196 %
197 %\section{Implementation}
198 %\label{sec:impl}
199 %
200 %\subsection{Identification}
201 %\label{sec:ident}
202 %
203 %
204 % We start with the declaration who we are. Most |.dtx| files put
205 % driver code in a separate driver file |.drv|. We roll this code into the
206 % main file, and use the pseudo-guard |<gobble>| for it. This means
207 % that the text between |<*gobble>| and |</gobble>| will \emph{not}
208 % end in any derived file, but it will be used to typeset this manual.
209 %
210 % We also use the following guards: |<style>| for \LaTeX{} style,
211 % |<drv>| for \textsf{Fontinst} driver |drv.tex|, |<map>| for
212 % \textsf{Fontinst} map generator |map.tex| and |<mtx>| for the font
213 % metrics file |delupper.mtx|. More about these files below. Note
214 % that |mtx| files do not allow \LaTeX{} command |\ProvidesFile|, so
215 % we do not put it there.
216 % \begin{macrocode}
217 %<style>\NeedsTeXFormat{LaTeX2e}
218 %<*gobble>
219 \ProvidesFile{gillcm.dtx}
220 %</gobble>
221 %<style>\ProvidesClass{gillcm}
222 %<drv>\ProvidesFile{drv.tex}
223 %<map>\ProvidesFile{map.tex}
224 %<*!mtx>
225 [2010/07/28 v1.1 Computer Modern Italics with Gill extensions]
226 %</!mtx>
227 % \end{macrocode}
228 % And the driver code:
229 % \begin{macrocode}
230 %<*gobble>
231 \documentclass{ltxdoc}
232 \usepackage{booktabs,amsmath}
233 \usepackage{url}
234 \usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
235 pagecolor=black,urlcolor=black,hyperindex=false]{hyperref}
236 \PageIndex
237 \CodelineIndex
238 \RecordChanges
239 \EnableCrossrefs
240 \begin{document}
241 \DocInput{gillcm.dtx}
242 \end{document}
243 %</gobble>
244 % \end{macrocode}
245 %
246 % \subsection{Preparation of Computer Modern Fonts}
247 %
248 % We deal with Type~1 fonts, so we need Computer Modern Roman and
249 % Italic in the PFB formats. They are provided, for example, by
250 % \textsf{cm-super} package. We need the files listed in
251 % Table~\ref{tab:cm}. We copy them into the working directory. Since
252 % \textsf{Fontinst} prefers ASCII files, we extract metric information
253 % from them using |pf2afm| utility.
254 %
255 % The famous |make| program allows us to write down these operations
256 % succinctly as shown on Figure~\ref{fig:afm}. Here the first
257 % paragraph lists our PFB files, the second one says that each PFB
258 % file corresponds to one AFM file, the third paragraph tells |make|
259 % to copy the PFB file from wherever they are (since |kpsewhich|) to
260 % the current directory, and the last paragraph instructs |make| to
261 % apply |pf2afm| to each PFB file. Of course if you do not want to
262 % use |make|, you can perform all these operations manually.
263 %
264 % \begin{figure}
265 % \centering
266 % \begin{verbatim}
267 % PFB =\
268 % cmti10.pfb\
269 % cmr10.pfb \
270 % cmbxti10.pfb \
271 % cmbx10.pfb
272 %
273 % AFM = ${PFB:%.pfb=%.afm}
274 %
275 % %.pfb:
276 % cp `kpsewhich $@` .
277 %
278 % %.afm: %.pfb
279 % pf2afm $<
280 % \end{verbatim}
281 % \caption{Creating AFM Files Using \texttt{Makefile}}
282 % \label{fig:afm}
283 % \end{figure}
284 %
285 %
286 % \begin{table}
287 % \centering
288 % \caption{Computer Modern Font Files}
289 % \label{tab:cm}
290 % \begin{tabular}{ll}
291 % \toprule
292 % File & Font\\
293 % \midrule
294 % |cmti10.pfb| & Computer Modern Italic\\
295 % |cmr10.pfb| & Computer Modern Roman \\
296 % |cmbxti10.pfb| & Computer Modern Bold Italic\\
297 % |cmbx10.pfb| & Computer Modern Bold\\
298 % \bottomrule
299 % \end{tabular}
300 % \end{table}
301 %
302 %\subsection{Fontinst Driver}
303 %\label{sec:drv}
304 %
305 % In this section we construct the file |drv.tex| which does most of
306 % the work.
307 %
308 %
309 % First, we read the \textsf{Fontinst} program |fontinst.sty|:
310 % \begin{macrocode}
311 %<*drv>
312 \input fontinst.sty
313 % \end{macrocode}
314 %
315 %
316 % We want to ``unslant'' the fonts. This can be imagined as negative
317 % slanting. The characteristic angle of Computer Modern Italics is
318 % $167/1000$ (technically, this is the tangent of the angle, so the
319 % angle itself is $\tan^{-1}(0.167) = 9^{\circ}28'51''$), so we use
320 % $-167/1000$ as our characteristic angle:
321 % \begin{macrocode}
322 \setint{slant}{-167}
323 % \end{macrocode}
324 %
325 % Now it is time to uncover a white lie in Table~\ref{tab:cm}: the
326 % ``bold'' fonts listed there are actually bold extended fonts: they
327 % are slightly widened in the horizontal direction. By tradition we
328 % call them nevertheless bold. The next line facilitates this white
329 % lie: it instructs \textsf{Fontinst} to silently substitute bold
330 % extended fonts whenever a user request bold fonts.
331 % \begin{macrocode}
332 \substitutesilent{bx}{b}
333 % \end{macrocode}
334 %
335 %
336 %
337 % \textsf{Fontinst} is designed to create virtual font files for \TeX.
338 % However, it also can be used to automatically create ``font maps'':
339 % special files read by |dvips| or |pdftex| to map PFB files into the
340 % virtual fonts. To do this we need to \emph{record transformations}
341 % of Type~1 fonts for the map creation program. Fortunately,
342 % \textsf{Fontinst} can do this for us too. The following command
343 % starts this recording:
344 % \begin{macrocode}
345 \recordtransforms{rec.tex}
346 % \end{macrocode}
347 % The command |\endrecordtransforms| below dumps these recordings
348 % into the file |rec.tex|. The resulting file is shown on
349 % Figure~\ref{fig:rec}.
350 %
351 % \begin{figure}
352 % \centering
353 % \begin{verbatim}
354 % \storemapdata{cmr10}{\fromafm{cmr10}{CMR10}}{}
355 % \storemapdata{cmgm8r}{\frommtx{cmr10}}{\reencodefont{8r}}
356 % \storemapdata{cmti10}{\fromafm{cmti10}{CMTI10}}{}
357 % \storemapdata{cmgmi8r}{\frommtx{cmti10}}{\reencodefont{8r}}
358 % \storemapdata{cmti10}{\fromafm{cmti10}{CMTI10}}{}
359 % \storemapdata{cmgmiu8r}{\frommtx{cmti10}}{\reencodefont{8r}\transformfont{1000}{-167}}
360 % \storemapdata{cmbx10}{\fromafm{cmbx10}{CMBX10}}{}
361 % \storemapdata{cmgb8r}{\frommtx{cmbx10}}{\reencodefont{8r}}
362 % \storemapdata{cmbxti10}{\fromafm{cmbxti10}{CMBXTI10}}{}
363 % \storemapdata{cmgbi8r}{\frommtx{cmbxti10}}{\reencodefont{8r}}
364 % \storemapdata{cmbxti10}{\fromafm{cmbxti10}{CMBXTI10}}{}
365 % \storemapdata{cmgbiu8r}{\frommtx{cmbxti10}}{\reencodefont{8r}\transformfont{1000}{-167}}
366 % \makemapentry{cmgmi8r}
367 % \makemapentry{cmgm8r}
368 % \makemapentry{cmgbi8r}
369 % \makemapentry{cmgb8r}
370 % \makemapentry{cmgmiu8r}
371 % \makemapentry{cmgm8r}
372 % \makemapentry{cmgbiu8r}
373 % \makemapentry{cmgb8r}
374 % \makemapentry{cmgmi8r}
375 % \makemapentry{cmgm8r}
376 % \makemapentry{cmgbi8r}
377 % \makemapentry{cmgb8r}
378 % \makemapentry{cmgmiu8r}
379 % \makemapentry{cmgm8r}
380 % \makemapentry{cmgbiu8r}
381 % \makemapentry{cmgb8r}
382 % \makemapentry{cmgmi8r}
383 % \makemapentry{cmgm8r}
384 % \makemapentry{cmgbi8r}
385 % \makemapentry{cmgb8r}
386 % \makemapentry{cmgmiu8r}
387 % \makemapentry{cmgm8r}
388 % \makemapentry{cmgbiu8r}
389 % \makemapentry{cmgb8r}
390 % \end{verbatim}
391 % \caption{File \texttt{rec.tex} (created automatically)}
392 % \label{fig:rec}
393 % \end{figure}
394 %
395 %
396 % Now we can create the fonts to play with. We will follow Karl
397 % Berry's scheme~\cite{fontname} for naming them. The font family
398 % will be called |cmg| (Computer Modern Gillized). The next letters
399 % are |m| for medium, |mi| for medium italic, |miu| for medium
400 % italic unslanted, and |b|, |bi|, |biu| for the corresponding bold
401 % variants. The last symbols correspond to font encoding.
402 %
403 % We start with the fonts in the |8r| (\TeX{} Base 1) encoding.
404 %
405 % First, let us create a medium Roman font. We take Computer Modern
406 % Roman file |cmr10.afm| and reencode it. The main command is
407 % |\trnasformfont|. Its first argument (|cmgm8r|) is the resulting
408 % font (remember, the family is |cmg|, the weight is |m| and the
409 % encoding is |8r|). Its second argument is the source. This argument
410 % says that we take |cmr10.afm| (|\fromafm| command) and reencode it
411 % to the required encoding (|\reencodefont|):
412 % \begin{macrocode}
413 \transformfont{cmgm8r}{\reencodefont{8r}{\fromafm{cmr10}}}
414 % \end{macrocode}
415 %
416 % In the same way we create medium italic font |cmgmi8r| from the file
417 % |cmti10.afm|:
418 % \begin{macrocode}
419 \transformfont{cmgmi8r}{\reencodefont{8r}{\fromafm{cmti10}}}
420 % \end{macrocode}
421 %
422 % The italic unslanted font |cmgmiu8r| is different: not only we
423 % reencode the source, we also unslant it, or, rather, slant it using
424 % the negative angle |\int{slant}| defined above. This is done by the
425 % command |\slantfont|:
426 % \begin{macrocode}
427 \transformfont{cmgmiu8r}{\slantfont{\int{slant}}%
428 \reencodefont{8r}{\fromafm{cmti10}}}
429 % \end{macrocode}
430 %
431 % In the similar manner we create three bold fonts: Roman, italic and
432 % italic unslanted:
433 % \begin{macrocode}
434 \transformfont{cmgb8r}{\reencodefont{8r}{\fromafm{cmbx10}}}
435 \transformfont{cmgbi8r}{\reencodefont{8r}{\fromafm{cmbxti10}}}
436 \transformfont{cmgbiu8r}{\slantfont{\int{slant}}%
437 \reencodefont{8r}{\fromafm{cmbxti10}}}
438 % \end{macrocode}
439 %
440 %
441 % Fonts in \TeX{} Base 1 encoding are useful for manipulation, but
442 % they are not directly usable in \TeX{} or \LaTeX{} documents. In
443 % this package we create fonts in the traditional \TeX{} encoding
444 % (|OT1|) and Cork encoding (|T1|). \textsf{Fontinst} can create for
445 % us both virtual font files and \LaTeX{} font description files
446 % (|.fd|). This is (rather unfortunately) called font installation.
447 % All font installation commands must be bracketed between
448 % |\installfonts| and |\endinstallfonts| directives. so we start with
449 % the first one:
450 % \begin{macrocode}
451 \installfonts
452 % \end{macrocode}
453 %
454 % Then we declare the family and encoding we are going to install.
455 % Let us start with |OT1|. Do not worry about the third (empty)
456 % argument of the |\installfamily| command.
457 % \begin{macrocode}
458 \installfamily{OT1}{cmg}{}
459 % \end{macrocode}
460 %
461 % Now the real work begins. Let us construct ``Gillized'' Computer
462 % Modern Italic font. According to our scheme it will be called
463 % |cmgmi7t|. This name is the first argument of |\installfont|
464 % command.
465 %
466 % The second argument is the set of MTX files; one can view it as
467 % instructions to \textsf{Fontinst} describing \emph{how} to construct
468 % the file. We start from the file |cmgmi8r|, created on the previous
469 % step. It is just Computer Modern Italic. The next instruction is
470 % |delupper|. It refers to the file |delupper.mtx|, which we create
471 % below (Section~\ref{sec:delupper}). For now it is enough to say
472 % that this file deletes from the font all uppercase letters. If we
473 % would stop here, the resulting font would have empty spaces instead
474 % of letters A, B, \dots{} However, we do not stop and add another
475 % instruction, |cmgm8r|. Let us recall that |cmgm8r| is Computer
476 % Modern Roman. Therefore \textsf{Fontinst} will take the characters
477 % from this font and add it to the font created so far. Which
478 % characters will be added? The lowercase characters a, b, \dots{}
479 % are already filled up (\textsf{Fontinst} does not fill the slots
480 % already taken), so only empty spaces will be taken from the Roman
481 % font---i.e. the spaces that our |delupper.mtx| emptied. We get a
482 % combined font! The last instruction, |latin| tells
483 % \textsf{Fontinst} how to construct the characters that are absent
484 % from the fonts (like the euro sign). It is always prudent to
485 % include it as the last resort.
486 %
487 % The next argument of the |\installfont| command is the encoding of
488 % the result (actually, it can include a list of the so called ETX
489 % files).
490 %
491 % The last four arguments are used to construct \LaTeX{} font
492 % definition files. They say that \LaTeX{} should consider the
493 % resulting file to have encoding |OT1|, belong to the family |cmg|,
494 % have medium weight (|m|) and ``Gill Italic'' shape (|gi|). Again,
495 % do not mind the last (empty) argument.
496 %
497 % So the command looks like the following:
498 % \begin{macrocode}
499 \installfont{cmgmi7t}{cmgmi8r,delupper,cmgm8r,latin}{ot1}{OT1}{cmg}{m}{gi}{}
500 % \end{macrocode}
501 %
502 % We repeat this with bold weight:
503 % \begin{macrocode}
504 \installfont{cmgbi7t}{cmgbi8r,delupper,cmgb8r,latin}{ot1}{OT1}{cmg}{bx}{gi}{}
505 % \end{macrocode}
506 %
507 % Unslanted italics are made in the same way, using |cmgmiu8r| and
508 % |cmgbiu8r| as the source:
509 % \begin{macrocode}
510 \installfont{cmgmiu7t}{cmgmiu8r,delupper,cmgm8r,latin}{ot1}{OT1}{cmg}{m}{gu}{}
511 \installfont{cmgbiu7t}{cmgbiu8r,delupper,cmgb8r,latin}{ot1}{OT1}{cmg}{bx}{gu}{}
512 % \end{macrocode}
513 %
514 % We repeat this with |T1| encoding. Note that for |T1| the
515 % ``instructions of the last resort'' are in the file |newlatin.mtx|:
516 % \begin{macrocode}
517 \installfamily{T1}{cmg}{}
518 \installfont{cmgmi8t}{cmgmi8r,delupper,cmgm8r,newlatin}{t1}{T1}{cmg}{m}{gi}{}
519 \installfont{cmgbi8t}{cmgbi8r,delupper,cmgb8r,newlatin}{t1}{T1}{cmg}{bx}{gi}{}
520 \installfont{cmgmiu8t}{cmgmiu8r,delupper,cmgm8r,newlatin}{t1}{T1}{cmg}{m}{gu}{}
521 \installfont{cmgbiu8t}{cmgbiu8r,delupper,cmgb8r,newlatin}{t1}{T1}{cmg}{bx}{gu}{}
522 % \end{macrocode}
523 %
524 % Fonts in |T1| encoding should be accompanied by fonts in the ``text
525 % companion'' encoding |TS1|. They include special symbols and
526 % accents:
527 % \begin{macrocode}
528 \installfamily{TS1}{cmg}{}
529 \installfont{cmgmi8c}{cmgmi8r,delupper,cmgm8r,textcomp}{ts1}{TS1}{cmg}{m}{gi}{}
530 \installfont{cmgbi8c}{cmgbi8r,delupper,cmgb8r,textcomp}{ts1}{TS1}{cmg}{bx}{gi}{}
531 \installfont{cmgmiu8c}{cmgmiu8r,delupper,cmgm8r,textcomp}{ts1}{TS1}{cmg}{m}{gu}{}
532 \installfont{cmgbiu8c}{cmgbiu8r,delupper,cmgb8r,textcomp}{ts1}{TS1}{cmg}{bx}{gu}{}
533 % \end{macrocode}
534 %
535 % This finishes our file. Let us just close the open groups:
536 % \begin{macrocode}
537 \endinstallfonts
538 \endrecordtransforms
539 \bye
540 %</drv>
541 % \end{macrocode}
542 %
543 %
544 %\subsection{Fontmap Generation}
545 %\label{sec:fontmap}
546 %
547 % The file |map.tex| is used to create font map file. In this section
548 % we create it.
549 %
550 % First, we read the corresponding \textsf{Fontinst} file:
551 % \begin{macrocode}
552 %<*map>
553 \input finstmsc.sty
554 % \end{macrocode}
555 %
556 % Next, we tell \textsf{Fontinst} that our Postscript files have the
557 % extension |.pfb| and that the resulting map should be called |cmg.map|:
558 % \begin{macrocode}
559 \resetstr{PSfontsuffix}{.pfb}
560 \adddriver{dvips}{cmg.map}
561 % \end{macrocode}
562 %
563 % Then we read the file |rec.tex| which is generated by the run of
564 % |drv.tex| (Figure~\ref{fig:rec}):
565 % \begin{macrocode}
566 \input rec.tex
567 % \end{macrocode}
568 %
569 % And that is all:
570 % \begin{macrocode}
571 \donedrivers
572 \bye
573 %</map>
574 % \end{macrocode}
575 %
576 %
577 %\subsection{Deleting Uppercase Glyphs}
578 %\label{sec:delupper}
579 %
580 %
581 % Our |\installfont| instructions include deleting all uppercase
582 % letters from the italic fonts. This is done by the file
583 % |delupper.mtx|, which we describe here.
584 %
585 %
586 % Everything between |\relax| and |\metrix| is just a comment:
587 % \begin{macrocode}
588 %<*mtx>
589 \relax
590 Unset all uppercase letters and punctuation
591 \metrics
592 % \end{macrocode}
593 %
594 % The file itself uses the command |\unsetglyph|. We unset the
595 % uppercase letters, parenthesizes, etc.
596 % \begin{macrocode}
597 \unsetglyph{A}
598 \unsetglyph{B}
599 \unsetglyph{C}
600 \unsetglyph{D}
601 \unsetglyph{E}
602 \unsetglyph{F}
603 \unsetglyph{G}
604 \unsetglyph{H}
605 \unsetglyph{I}
606 \unsetglyph{J}
607 \unsetglyph{K}
608 \unsetglyph{L}
609 \unsetglyph{M}
610 \unsetglyph{N}
611 \unsetglyph{O}
612 \unsetglyph{P}
613 \unsetglyph{Q}
614 \unsetglyph{R}
615 \unsetglyph{S}
616 \unsetglyph{T}
617 \unsetglyph{U}
618 \unsetglyph{V}
619 \unsetglyph{W}
620 \unsetglyph{X}
621 \unsetglyph{Y}
622 \unsetglyph{Z}
623 \unsetglyph{AE}
624 \unsetglyph{OE}
625 \unsetglyph{Oslash}
626 \unsetglyph{exclam}
627 \unsetglyph{parenleft}
628 \unsetglyph{parenright}
629 \unsetglyph{comma}
630 \unsetglyph{period}
631 \unsetglyph{slash}
632 \unsetglyph{zero}
633 \unsetglyph{one}
634 \unsetglyph{two}
635 \unsetglyph{three}
636 \unsetglyph{four}
637 \unsetglyph{five}
638 \unsetglyph{six}
639 \unsetglyph{seven}
640 \unsetglyph{eight}
641 \unsetglyph{nine}
642 \unsetglyph{colon}
643 \unsetglyph{semicolon}
644 \unsetglyph{exclamdown}
645 \unsetglyph{questiondown}
646 \unsetglyph{question}
647 \unsetglyph{bracketleft}
648 \unsetglyph{bracketright}
649 \endmetrics
650 %</mtx>
651 % \end{macrocode}
652 %
653 %
654 %\subsection{Creation of Fonts}
655 %\label{sec:creation}
656 %
657 % Now we are ready to create fonts. We need to run
658 % \begin{verbatim}
659 % latex drv.tex
660 % latex map.tex
661 % \end{verbatim}
662 % This will create a lot of |.pl| and |.vpl| files. They should be
663 % converted into binary format using utilities |pltotf| and |vptovf|.
664 % On Figure~\ref{fig:tfm} we show how to do all these tasks using
665 % |make|. Of course, we can run all these commands manually.
666 %
667 % \begin{figure}
668 % \centering
669 % \begin{verbatim}
670 % %.map: drv.tex map.tex $(AFM)
671 % pdflatex drv.tex
672 % pdflatex map.tex
673 % for x in *.pl; do pltotf $$x; done
674 % for x in *.vpl; do vptovf $$x; done
675 % \end{verbatim}
676 % \caption{Creating TFM and VF Files using \texttt{Makefile}}
677 % \label{fig:tfm}
678 % \end{figure}
679 %
680 %\subsection{Style File}
681 %\label{sec:style}
682 %
683 % To use the fonts in \LaTeX{} let us define commands |\gishape| and
684 % |\gushape| that select Gill Italic and Gill Unslanted Italic
685 % correspondingly. Note that they should work only in text mode;
686 % math mode should use ``normal'' italics. Here we are:
687 % \begin{macrocode}
688 %<*style>
689 \DeclareRobustCommand\gishape
690 {\not@math@alphabet\itshape\mathit
691 \fontshape{gi}\fontfamily{cmg}\selectfont}
692 \DeclareRobustCommand\gushape
693 {\not@math@alphabet\itshape\mathit
694 \fontshape{gu}\fontfamily{cmg}\selectfont}
695 %</style>
696 % \end{macrocode}
697 %
698 %
699 %\subsection{Creation of Installation Archive}
700 %\label{sec:tds}
701 %
702 % The last step is to put all the files in the structure suitable for
703 % the modern \TeX{} installations (the so called TDS structure). We
704 % will create the archive |gillcm.tds.zip| with the relevant files.
705 % The archive is packed into the |gillcm.tgz| file ready to be shipped
706 % to CTAN. Of course, we do not want to ship Computer Modern fonts,
707 % so we delete them from the directory first.
708 %
709 % The corresponding fragment of |Makefile| is shown on
710 % Figure~\ref{fig:archive}.
711 %
712 % \begin{figure}
713 % \centering
714 % \begin{verbatim}
715 % archive: all clean
716 % $(RM) cmr*.tfm cmt*.tfm cmb*.tfm
717 % $(RM) cmr*.afm cmt*.afm cmb*.afm
718 % $(RM) cmr*.vf cmt*.vf cmb*.vf
719 % mkdir -p fonts/tfm/$(FOUNDRY)/$(PACKAGE)
720 % cp *.tfm fonts/tfm/$(FOUNDRY)/$(PACKAGE)
721 % mkdir -p fonts/vf/$(FOUNDRY)/$(PACKAGE)
722 % cp *.vf fonts/vf/$(FOUNDRY)/$(PACKAGE)
723 % mkdir -p fonts/map/dvips/$(PACKAGE)
724 % cp *.map fonts/map/dvips/$(PACKAGE)
725 % mkdir -p tex/latex/$(PACKAGE)
726 % cp *.fd *.sty tex/latex/$(PACKAGE)
727 % mkdir -p doc/latex/$(PACKAGE)
728 % cp README *.pdf *.tex *.bib *.dtx *.ins doc/latex/$(PACKAGE)
729 % zip -r $(PACKAGE).tds.zip fonts tex doc
730 % tar -czvf $(PACKAGE).tgz \
731 % README $(PACKAGE).tds.zip *.tex *.pdf *.bib *.dtx *.ins
732 % \end{verbatim}
733 % \caption{Creation of Installation File for CTAN}
734 % \label{fig:archive}
735 % \end{figure}
736 %
737 %
738 % This finishes our task!
739 %
740 %\Finale
741 %\clearpage
742 %
743 %\PrintChanges
744 %\clearpage
745 %\PrintIndex
746 %
747 \endinput