summaryrefslogtreecommitdiff
path: root/fonts/psfonts/leawood/leawood.dtx
blob: bd8fa3d26c2735c28ae02d765cc61da4bb3b82a1 (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
% \iffalse meta-comment
%
% Copyright (C) 2003 by Scott Pakin <pakin@uiuc.edu>
% --------------------------------------------------
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in:
%
%    http://www.latex-project.org/lppl.txt
%
% and version 1.2 or later is part of all distributions of LaTeX
% version 1999/12/01 or later.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{leawood.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{leawood}
%<*package>
    [2003/09/03 v1.0 make ITC Leawood the default body font]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{leawood}
\IfFileExists{luximono.sty}{\usepackage{luximono}}{}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
  \DocInput{leawood.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{30}
%
% \CharacterTable
%  {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
%   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
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v1.0}{2003/09/03}{Initial version}
%
% \GetFileInfo{leawood.dtx}
%
% \DoNotIndex{\fi, \MessageBreak, \newcommand, \newif, \relax}
% \DoNotIndex{\renewcommand, \space}
%
% \hyphenation{Luxi-Mono}
% \renewcommand{\floatpagefraction}{.66}
%
% \title{The \textsf{leawood} package\thanks{This document
%   corresponds to \textsf{leawood}~\fileversion, dated \filedate.}}
% \author{Scott Pakin \\ \texttt{pakin@uiuc.edu}}
%
% \maketitle
%
% \section{Usage}
%
% The \textsf{leawood} package sets the default font to ITC Leawood.
% \textsf{leawood} makes the Leawood font available only in text mode;
% mathematical typesetting with Leawood is not currently supported.
%
% To use \textsf{leawood} simply put ``|\usepackage{leawood}|'' in your
% document's preamble.  This sets the default roman font to Leawood, the
% default sans-serif font to Helvetica, and the default monospace font
% to LuxiMono.  If LuxiMono is not available, \textsf{leawood} issues a
% warning message and leaves Computer Modern Typewriter Text as the
% default monospace font.  LuxiMono requires the T1 font encoding so you
% should also include ``|\usepackage[T1]{fontenc}|'' in your preamble to
% make LuxiMono work properly.
%
% \textsf{leawood} accepts two package options.  The first,
% ``|noluxi|'', tells \textsf{leawood} not to load the \textsf{luximono}
% package even if it's available.  The second, ``|dark|'' causes
% \textsf{leawood} to utilize darker variants of the fonts.  More
% precisely, |dark| makes \textsf{leawood} uses Leawood Medium instead
% of Leawood Book and Leawood Black instead of Leawood Bold.
%
% Tables~\ref{tbl:font-variants} and~\ref{tbl:font-variants-dark} show
% all of the font variants supported by \textsf{leawood}.
% Table~\ref{tbl:font-variants} presents the variants with the default
% weights and Table~\ref{tbl:font-variants-dark} presents the variants
% when using the |dark| package option.
%
% \begin{table}[htbp]
% \centering
% \caption{Variants of Leawood provided by the \textsf{leawood} package}
% \label{tbl:font-variants}
% \newcommand{\pangram}{Squdgy fez, blank jimp crwth vox.}
% \newsavebox{\tablebox}
% \begin{lrbox}{\tablebox}
% \begin{tabular}{@{}lll@{}}
%   \hline
%   Variant & Code & Sample \\
%   \hline
%
%   Normal &
%   \dots &
%   \pangram \\
%
%   Bold &
%   |\textbf{|\dots|}| &
%   \textbf{\pangram} \\
%
%   Italic &
%   |\textit{|\dots|}| &
%   \textit{\pangram} \\
%
%   Slanted &
%   |\textsl{|\dots|}| &
%   \textsl{\pangram} \\
%
%   Bold italic &
%   |\textbf{\textit{|\dots|}}| &
%   \textbf{\textit{\pangram}} \\
%
%   Bold slanted &
%   |\textbf{\textsl{|\dots|}}| &
%   \textbf{\textsl{\pangram}} \\
%
%   Small caps &
%   |\textsc{|\dots|}| &
%   \textsc{\pangram} \\
%
%   Bold small caps &
%   |\textbf{\textsc{|\dots|}}| &
%   \textbf{\textsc{\pangram}} \\
%   \hline
% \end{tabular}
% \end{lrbox}
% \makebox[0pt]{\usebox{\tablebox}}
% \end{table}
%
% \begin{table}[htbp]
% \centering
% \caption{Variants of Leawood provided by the \textsf{leawood} package
%   when the \texttt{dark} package option is specified}
% \label{tbl:font-variants-dark}
% \newcommand{\pangram}{Squdgy fez, blank jimp crwth vox.}
% \renewcommand{\textbf}[1]{{\fontseries{eb}\selectfont#1}}
% \renewcommand{\textnormal}[1]{{\fontseries{mb}\selectfont#1}}
% \newsavebox{\tableboxdark}
% \begin{lrbox}{\tableboxdark}
% \begin{tabular}{@{}lll@{}}
%   \hline
%   Variant & Code & Sample \\
%   \hline
%
%   Normal &
%   \dots &
%   \textnormal{\pangram} \\
%
%   Bold &
%   |\textbf{|\dots|}| &
%   \textbf{\pangram} \\
%
%   Italic &
%   |\textit{|\dots|}| &
%   \textnormal{\textit{\pangram}} \\
%
%   Slanted &
%   |\textsl{|\dots|}| &
%   \textnormal{\textsl{\pangram}} \\
%
%   Bold italic &
%   |\textbf{\textit{|\dots|}}| &
%   \textbf{\textit{\pangram}} \\
%
%   Bold slanted &
%   |\textbf{\textsl{|\dots|}}| &
%   \textbf{\textsl{\pangram}} \\
%
%   Small caps &
%   |\textsc{|\dots|}| &
%   \textnormal{\textsc{\pangram}} \\
%
%   Bold small caps &
%   |\textbf{\textsc{|\dots|}}| &
%   \textbf{\textsc{\pangram}} \\
%   \hline
% \end{tabular}
% \end{lrbox}
% \makebox[0pt]{\usebox{\tableboxdark}}
% \end{table}
%
% \StopEventually{^^A
%   \section{Legal notice}
%   
%   \begin{center}
%     Copyright \textcopyright{} 2003 by Scott Pakin
%   \end{center}
%   
%   These files may be distributed and/or modified under the conditions of
%   the \LaTeX{} Project Public License, either version~1.2 of this
%   license or (at your option) any later version.  The latest version of
%   this license is in:
%   
%   \begin{center}
%     \texttt{http://www.latex-project.org/lppl.txt}
%   \end{center}
%   
%   \noindent
%   and version~1.2 or later is part of all distributions of \LaTeX{}
%   version 1999/12/01 or later.
%   
%   \PrintIndex
% }
%
% \section{Implementation}
%
% \begin{macro}{\ilw@body}
% \begin{macro}{\ilw@bold}
% \textsf{leawood}'s |.fd| files have been specially modified to declare
% all medium and bold font shapes in terms of the macros |\ilw@body| and
% |\ilw@bold|.  For example, a bold, small-caps font with T1 encoding is
% mapped to ``|\ilw@bold c8t|'' instead of the normal ``|ilwbc8t|''.  By
% default, we use Leawood~Book as the body font and Leawood~Bold as the
% bold font:
%    \begin{macrocode}
\newcommand*{\ilw@body}{ilwk}
\newcommand*{\ilw@bold}{ilwb}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\ifilw@use@luxi}
% \begin{macro}{\ilw@use@luxitrue}
% \begin{macro}{\ilw@use@luxifalse}
% By default, we use LuxiMono as our fixed-width font.  However, we
% allow the user to suppress that setting by specifying the |noluxi|
% package option.
%    \begin{macrocode}
\newif\ifilw@use@luxi
\ilw@use@luxitrue
\DeclareOption{noluxi}{\ilw@use@luxifalse}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% The |dark| package option redefines |\ilw@body| and |\ilw@bold| to use
% Leawood~Medium as the body font and Leawood~Black as the bold font.
%    \begin{macrocode}
\DeclareOption{dark}{%
  \renewcommand*{\ilw@body}{ilwm}
  \renewcommand*{\ilw@bold}{ilwc}
}
%    \end{macrocode}
%
% Process the package options.
%    \begin{macrocode}
\ProcessOptions\relax
%    \end{macrocode}
%
%
% Leawood has a large x~height which makes lines of text look too dense.
% To improve the text's aesthetics we increase the font's leading
% by~15\%.
%    \begin{macrocode}
\linespread{1.15}
\selectfont
%    \end{macrocode}
%
% \begin{macro}{\rmdefault}
% \begin{macro}{\sfdefault}
% The most important thing this package does is make Leawood the default
% roman font.  While we're at it we also make Helvetica the default
% sans-serif font because it blends with Leawood better than Computer
% Modern Sans Serif does.  LuxiMono (font family |ul9|) works well as a
% fixed-width companion to Leawood.  Few \TeX{} distributions come with
% LuxiMono, though, so we load the corresponding package only if
% available and only if the user did not specify the |noluxi| package
% option.
%    \begin{macrocode}
\renewcommand{\rmdefault}{ilw}
\renewcommand{\sfdefault}{phv}
\ifilw@use@luxi
  \IfFileExists{luximono.sty}{%
    \RequirePackage{luximono}
  }{%
    \PackageWarningNoLine{leawood}{%
      The luximono package is unavailable.\space\space
      Using the\MessageBreak
      default fixed-width font instead of LuxiMono}
  }
\fi
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \Finale
\endinput