| 1 |
% \CheckSum{33} |
| 2 |
% \iffalse |
| 3 |
% |
| 4 |
% mflogo.dtx --- LaTeX package for Metafont and MetaPost logos. |
| 5 |
% |
| 6 |
% Copyright (C) 1994--99 Ulrik Vieth |
| 7 |
% |
| 8 |
% This program is free software; you can redistribute it and/or |
| 9 |
% modify it under the terms of the LaTeX Project Public License |
| 10 |
% as described in lppl.txt in the base LaTeX distribution; either |
| 11 |
% version 1 of the License, or (at your option) any later version. |
| 12 |
% |
| 13 |
% This program is distributed in the hope that it will be useful, |
| 14 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 16 |
% |
| 17 |
%<*driver> |
| 18 |
\documentclass{ltxdoc} |
| 19 |
\usepackage{mflogo} |
| 20 |
\GetFileInfo{mflogo.sty} |
| 21 |
\begin{document} |
| 22 |
\DocInput{mflogo.dtx} |
| 23 |
\end{document} |
| 24 |
%</driver> |
| 25 |
% \fi |
| 26 |
% |
| 27 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 28 |
% |
| 29 |
% \changes{1.0} {1994/05/02}{initial version} |
| 30 |
% \changes{1.1} {1994/05/06}{changed assignments for bold series} |
| 31 |
% \changes{1.1a}{1994/05/10}{revised documentation} |
| 32 |
% \changes{1.1b}{1994/05/12}{revised documentation} |
| 33 |
% \changes{1.1c}{1994/05/16}{renamed \cs{MPS} to \cs{MP}} |
| 34 |
% \changes{1.1d}{1994/05/18}{updated TTN reference} |
| 35 |
% \changes{1.2} {1994/05/21}{clean-up for public release} |
| 36 |
% \changes{1.3} {1994/08/21}{update for June 94 LaTeX2e distribution, |
| 37 |
% never released} |
| 38 |
% \changes{1.4} {1994/12/26}{changed font selection, assume Knuth's |
| 39 |
% local variants are available} |
| 40 |
% \changes{1.4a}{1994/12/26}{use \cs{\@} to correct space factor |
| 41 |
% after \cs{\MF} and \cs{\MP}} |
| 42 |
% \changes{1.4b}{1994/12/26}{eliminated \cs{filename}, \cs{filedate}, |
| 43 |
% use \cs{GetFileInfo}} |
| 44 |
% \changes{1.5} {1995/05/14}{major documentation rewrite} |
| 45 |
% \changes{1.5a}{1995/08/28}{minor documentation fixes} |
| 46 |
% \changes{1.5b}{1995/08/29}{added copyright notice similar to PSNFSS} |
| 47 |
% \changes{1.5c}{1995/12/04}{replaced \cs{\-} by \cs{@dischyph} |
| 48 |
% to fix problem in tabbing environment} |
| 49 |
% \changes{2.0} {1999/03/10}{use the LaTeX Project Public License} |
| 50 |
% |
| 51 |
% |
| 52 |
% \title{The \texttt{mflogo} package} |
| 53 |
% \author{Ulrik Vieth} |
| 54 |
% \date{1999-03-10 v2.0} |
| 55 |
% |
| 56 |
% \maketitle |
| 57 |
% |
| 58 |
% \section{Introduction} |
| 59 |
% |
| 60 |
% This \LaTeX{} package provides the font declarations needed to |
| 61 |
% access the \texttt{logo} font family in terms of \textsf{NFSS2}, |
| 62 |
% the no-longer-new font selection scheme used in \LaTeXe{}. |
| 63 |
% It also provides a package file that ilustrates how to define the |
| 64 |
% \MF{} and \MP{} logos and some appropriate font changing commands |
| 65 |
% in these terms. |
| 66 |
% |
| 67 |
% Using this package, there should no longer be a need to define |
| 68 |
% special macros for the slanted version of these logos, and |
| 69 |
% it should be possible to avoid such errors as on page~2 of |
| 70 |
% \textit{The \LaTeX{} Companion} where the \MF{} logo appears |
| 71 |
% in upright shape within an italics context of a book title. |
| 72 |
% |
| 73 |
% \DescribeMacro{\logofamily} |
| 74 |
% \DescribeMacro{\textlogo} |
| 75 |
% Once you have installed the font definition file |
| 76 |
% \texttt{ulogo.fd} provided here, you can use low-level \LaTeX{} |
| 77 |
% font commands to access the \texttt{logo} fonts in your |
| 78 |
% documents, even if you do not plan to use the package file |
| 79 |
% \texttt{mflogo.sty}. Apart from defining the \MF{} and \MP{} |
| 80 |
% logos in terms of \LaTeX{} font commands this package file also |
| 81 |
% provides a declarative font changing command |\logofamily| and |
| 82 |
% a font changing command |\textlogo| that takes one argument. |
| 83 |
% |
| 84 |
% |
| 85 |
% \section{The \MF{} source files} |
| 86 |
% |
| 87 |
% In this package, we assume that your \TeX{} distribution includes |
| 88 |
% the \MF{} sources for the \texttt{logo} font family, available |
| 89 |
% from the directory \texttt{/systems/knuth/lib} on CTAN archives. |
| 90 |
% These consists of the \MF{} program file \texttt{logo.mf} and a |
| 91 |
% number of \MF{} driver files for various font shapes and sizes, |
| 92 |
% all of which are described in \textit{The \MF{}book}. |
| 93 |
% (Please note that the file \texttt{logo.mf} has been updated by |
| 94 |
% DEK in 1993, adding the letters `\textlogo{P}' and~`\textlogo{S}' |
| 95 |
% for the \MP{} logo. If \TeX{} complains about missing characters |
| 96 |
% in some of the \texttt{logo} fonts while processing this |
| 97 |
% documentation, you should consider updating your copy |
| 98 |
% of~\texttt{logo.mf} and regenerating all the \texttt{logo} |
| 99 |
% fonts.) |
| 100 |
% |
| 101 |
% We also assume that your installation has the additional variants |
| 102 |
% of the \texttt{logo} fonts (\texttt{logosl9} and \texttt{logod10}) |
| 103 |
% from the directory \texttt{/systems/knuth/local/lib}. |
| 104 |
% Many modern \TeX{} distributions already have them included, |
| 105 |
% but in case you don't have them, it shouldn't be too difficult |
| 106 |
% to retrieve them individually. |
| 107 |
% |
| 108 |
% Finally, in order to provide a reasonably orthogonal range of |
| 109 |
% sizes and shapes, this package uses another non-standard variant |
| 110 |
% of the \texttt{logo} fonts (\texttt{logosl8}), which is derived |
| 111 |
% from the existing variants by analogy.^^A |
| 112 |
% \footnote{This is just a simple matter of replacing `9' by `8'.} |
| 113 |
% |
| 114 |
% The \MF{} source for this font shape is distributed separately |
| 115 |
% with this package since we want to avoid the overhead of |
| 116 |
% \textsc{DOCSTRIP} headers in such a trivial file, which would |
| 117 |
% result if it were generated from the same |.dtx| file as the |
| 118 |
% \LaTeX{} font definitions and the package file. |
| 119 |
% |
| 120 |
% |
| 121 |
% \StopEventually{} |
| 122 |
% |
| 123 |
% |
| 124 |
% \section{Hello, World!} |
| 125 |
% |
| 126 |
% First, we announce the package and the font definition file. |
| 127 |
% |
| 128 |
% \begin{macrocode} |
| 129 |
%<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01] |
| 130 |
%<package>\ProvidesPackage{mflogo} |
| 131 |
%<Ulogo>\ProvidesFile{ulogo.fd} |
| 132 |
%<+package>[1999/03/10 v2.0 LaTeX package for Metafont and MetaPost logos] |
| 133 |
%<-package>[1999/03/10 v2.0 LaTeX font defs for Metafont and MetaPost logos] |
| 134 |
% \end{macrocode} |
| 135 |
% |
| 136 |
% |
| 137 |
% \section{The font definition file: \texttt{Ulogo.fd}} |
| 138 |
% |
| 139 |
% The first thing to do is to declare a new font family |
| 140 |
% \texttt{logo} using an appropriate encoding scheme. According to |
| 141 |
% \textit{The \MF{}book} the \texttt{logo} fonts have the font |
| 142 |
% encoding scheme \texttt{"AEFMNOT only"} (or maybe |
| 143 |
% \texttt{"AEFMNOPST only"} after the recent changes). Clearly, |
| 144 |
% this is a well-defined encoding scheme, but not one of those |
| 145 |
% presently supported in \LaTeX{}. One might be tempted to define |
| 146 |
% some new encoding scheme~`MF', but the letter~`M' is already |
| 147 |
% reserved for 256-character math fonts. Therefore, we will use the |
| 148 |
% encoding scheme~`U' for the font family~\texttt{logo}. |
| 149 |
% \begin{macrocode} |
| 150 |
%<*Ulogo> |
| 151 |
\DeclareFontFamily{U}{logo}{} |
| 152 |
% \end{macrocode} |
| 153 |
% |
| 154 |
% \subsection{Font shape declarations for medium series} |
| 155 |
% |
| 156 |
% Now, we will discuss the font shape declarations for the medium |
| 157 |
% series. We will support sizes in the range from 8\,pt up to |
| 158 |
% magstep~5, which should be sufficient to cover the range from |
| 159 |
% |\footnotesize| to~|\Huge|. We assign the \texttt{logosl} fonts |
| 160 |
% to |\itshape| because their slant parameter matches that of |
| 161 |
% Computer Modern Italics rather than that of Computer Modern |
| 162 |
% Slanted.^^A |
| 163 |
% \footnote{This might be due to the fact that the \texttt{logosl} |
| 164 |
% fonts were first used in combination with Computer Modern |
| 165 |
% Italics in the running heads of \textit{The \MF{}book}. |
| 166 |
% Thus they may have been tuned for this purpose.} |
| 167 |
% For |\slshape| we provide a silent font substitution. |
| 168 |
% \begin{macrocode} |
| 169 |
\DeclareFontShape{U}{logo}{m}{n}{ |
| 170 |
<8> <9> gen * logo |
| 171 |
<10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logo10 |
| 172 |
}{} |
| 173 |
\DeclareFontShape{U}{logo}{m}{it}{ |
| 174 |
<8> <9> gen * logosl |
| 175 |
<10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logosl10 |
| 176 |
}{} |
| 177 |
\DeclareFontShape{U}{logo}{m}{sl}{ |
| 178 |
<-> ssub * logo/m/it |
| 179 |
}{} |
| 180 |
% \end{macrocode} |
| 181 |
% |
| 182 |
% \subsection{Font shape delarations for bold series} |
| 183 |
% |
| 184 |
% Finally, we turn to the font shape declarations for the bold |
| 185 |
% and bold extended series. At present, there are no slanted |
| 186 |
% versions of bold \texttt{logo} fonts, but they could be created |
| 187 |
% easily, if desired. However, we do not attempt to create them |
| 188 |
% here, because the resulting name would be too long to fit into |
| 189 |
% 8~characters and it isn't clear how it should be abbreviated. |
| 190 |
% |
| 191 |
% We assign the \texttt{logobf} font shape to the semibold condensed |
| 192 |
% series because there are some indications that it was designed |
| 193 |
% to match Computer Modern Sans Serif Demibold Condensed, the |
| 194 |
% font that was used in chapter headings in the \TeX{} and \MF{} |
| 195 |
% manuals. In sizes below 10\,pt, we simply substitute medium |
| 196 |
% series because we want to avoid scaling down fonts below their |
| 197 |
% design size. |
| 198 |
% \begin{macrocode} |
| 199 |
\DeclareFontShape{U}{logo}{sbc}{n}{ |
| 200 |
<8> <9> sub * logo/m/n |
| 201 |
<10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logobf10 |
| 202 |
}{} |
| 203 |
% \end{macrocode} |
| 204 |
% |
| 205 |
% Since we assume that the extra variants of the \texttt{logo} fonts |
| 206 |
% are available at your installation, we will use the \texttt{logod} |
| 207 |
% font shape in the bold and bold extended series. |
| 208 |
% |
| 209 |
% As the name \texttt{logod} implies a demibold version, this |
| 210 |
% decision may seem a little odd, but there is a good reason |
| 211 |
% behind it: As mentioned before, \texttt{logobf} was originally |
| 212 |
% designed to match the semibold condensed version of Computer |
| 213 |
% Modern Sans Serif. It also fits well in combination with the |
| 214 |
% bold extended version of that font family because the weight |
| 215 |
% of these two versions is not too different. However, when |
| 216 |
% used in combination with the bold or bold extended version |
| 217 |
% of Computer Modern Roman, the \texttt{logobf} font turns out |
| 218 |
% to be slightly too heavy, and the \texttt{logod} font seems |
| 219 |
% to be a more appropriate alternative.^^A |
| 220 |
% \footnote{The history of the \texttt{logod} font is not very |
| 221 |
% clear. It was first released together with updates for |
| 222 |
% \TeX{} and \MF{} in March~1992. It might have been used |
| 223 |
% in DEK's book \textit{Literate Programming} where bold |
| 224 |
% extended Computer Modern Roman is used in headings.} |
| 225 |
% |
| 226 |
% For this reason, we assign the \texttt{logod} font to the bold |
| 227 |
% series (only available in Computer Modern Roman) and set up |
| 228 |
% a silent font substitution for the bold extended series, based |
| 229 |
% on the assumption that Computer Modern Roman will be used in |
| 230 |
% |bfseries| much more frequently than Computer Modern Sans Serif. |
| 231 |
% However, when using bold extended Computer Modern Sans Serif, |
| 232 |
% \texttt{logod} will be the wrong choice and one would prefer |
| 233 |
% \texttt{logobf} instead. |
| 234 |
% |
| 235 |
% Unfortunately, there doesn't seem to be a completely satisfactory |
| 236 |
% solution to this conflict of interests, short of modifying the |
| 237 |
% standard font definitions for the Computer Modern family in |
| 238 |
% a way that bold extended CM Sans Serif would be classified as |
| 239 |
% ultrabold compared to bold extended CM Roman. |
| 240 |
% \begin{macrocode} |
| 241 |
\DeclareFontShape{U}{logo}{b}{n}{ |
| 242 |
<8> <9> sub * logo/m/n |
| 243 |
<10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logod10 |
| 244 |
}{} |
| 245 |
\DeclareFontShape{U}{logo}{bx}{n}{ |
| 246 |
<-> ssub * logo/b/n |
| 247 |
}{} |
| 248 |
%</Ulogo> |
| 249 |
% \end{macrocode} |
| 250 |
% |
| 251 |
% |
| 252 |
% \section{The package file: \texttt{mflogo.sty}} |
| 253 |
% |
| 254 |
% After having discussed the font definition file, we now turn |
| 255 |
% to the package file that shows how to access the \texttt{logo} |
| 256 |
% font family by defining high-level macros based on the low-level |
| 257 |
% \LaTeX{} font commands. |
| 258 |
% |
| 259 |
% \begin{macro}{\logofamily} |
| 260 |
% First, we define the declarative font changing command |\logofamily|. |
| 261 |
% This is accomplished using the low-level font commands |
| 262 |
% |\fontencoding| and |\fontfamily| followed by |\selectfont|. |
| 263 |
% If |\logofamily| is encountered in math mode, an error message |
| 264 |
% will be issued. |
| 265 |
% |
| 266 |
% In the definition of |\logofamily| we now use |\DeclareRobustCommand| |
| 267 |
% provided in the production \LaTeXe{} releases dated |1994/06/01| |
| 268 |
% or later. |
| 269 |
% \begin{macrocode} |
| 270 |
%<*package> |
| 271 |
\DeclareRobustCommand\logofamily{% |
| 272 |
\not@math@alphabet\logofamily\relax |
| 273 |
\fontencoding{U}\fontfamily{logo}\selectfont} |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |
| 276 |
% |
| 277 |
% \begin{macro}{\textlogo} |
| 278 |
% Next, we define a font changing command |\textlogo| with one |
| 279 |
% argument using |\DeclareTextFontCommand| also provided in the |
| 280 |
% latest \LaTeXe{} release. |
| 281 |
% \begin{macrocode} |
| 282 |
\DeclareTextFontCommand{\textlogo}{\logofamily} |
| 283 |
% \end{macrocode} |
| 284 |
% \end{macro} |
| 285 |
% |
| 286 |
% \begin{macro}{\MF} |
| 287 |
% \begin{macro}{\MP} |
| 288 |
% Finally, we define macros for the \MF{} and \MP{} logos. Since |
| 289 |
% the letters `\textlogo{P}' and~`\textlogo{S}' needed for the |
| 290 |
% \MP{} logo were added as recently as 1993, this will only work |
| 291 |
% if you have an up-to-date version of the \texttt{logo} fonts. |
| 292 |
% To update them, you just have to install the new version of the |
| 293 |
% \MF{} program file \texttt{logo.mf} and regenerate the |
| 294 |
% \texttt{logo} fonts using exactly the same \MF{} driver files as |
| 295 |
% before. |
| 296 |
% |
| 297 |
% There should be no doubt that |\MF| is the standard abbreviation |
| 298 |
% for the \MF{} logo. For \MP{}, we use the abbreviation |\MP|, |
| 299 |
% which also seems to be the standard abbreviation used for \MP{} |
| 300 |
% input files and the program itself. |
| 301 |
% |
| 302 |
% According to an e-mail message from John Hobby, he personally |
| 303 |
% prefers the spelling ``MetaPost'' (in plain roman) instead of |
| 304 |
% the \texttt{logo} font, but since it was Don Knuth himself who |
| 305 |
% introduced the alternate spelling, it is acceptable to use |
| 306 |
% the \texttt{logo} font for \MP{} as well, if you prefer that. |
| 307 |
% \changes{1.4a}{1994/12/26}{use \cs{\@} to correct space factor |
| 308 |
% after \cs{MF} and \cs{MP}} |
| 309 |
% \changes{1.5c}{1995/12/04}{replaced \cs{\-} by \cs{@dischyph} |
| 310 |
% to fix problem in tabbing environment} |
| 311 |
% \begin{macrocode} |
| 312 |
\def\MF{\textlogo{META}\@dischyph\textlogo{FONT}\@} |
| 313 |
\def\MP{\textlogo{META}\@dischyph\textlogo{POST}\@} |
| 314 |
%</package> |
| 315 |
% \end{macrocode} |
| 316 |
% In order to fix the space factor after the logos in all uppercase |
| 317 |
% letters, we better add |\@|, which expands to |\spacefactor\@m|, |
| 318 |
% at the end of our macro definitions. This is exactly how it is |
| 319 |
% done for the |\TeX| and |\LaTeX| logos in the \LaTeXe{} sources |
| 320 |
% (see |ltspace.dtx| and |ltlogos.dtx|). |
| 321 |
% |
| 322 |
% In closing, it should be pointed out that the above definitions of |
| 323 |
% the \MF{} and \MP{} logos will make them honor all font changing |
| 324 |
% commands just like the \TeX{} logo does and always did. Thus both |
| 325 |
% logos will finally behave identically with respect to font changes, |
| 326 |
% thanks to \LaTeXe{} and \textsf{NFSS2}. |
| 327 |
% \end{macro} |
| 328 |
% \end{macro} |
| 329 |
% |
| 330 |
% \Finale |
| 331 |
% |
| 332 |
\endinput |
| 333 |
% |
| 334 |
%% \CharacterTable |
| 335 |
%% {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 |
| 336 |
%% 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 |
| 337 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 338 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 339 |
%% Dollar \$ Percent \% Ampersand \& |
| 340 |
%% Acute accent \' Left paren \( Right paren \) |
| 341 |
%% Asterisk \* Plus \+ Comma \, |
| 342 |
%% Minus \- Point \. Solidus \/ |
| 343 |
%% Colon \: Semicolon \; Less than \< |
| 344 |
%% Equals \= Greater than \> Question mark \? |
| 345 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 346 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 347 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 348 |
%% Right brace \} Tilde \~} |