The mflogo Package for L^{A}TEX 2ε

Copyright (C) 1994 by Ulrik Vieth

January 3, 1995

1 Introduction

This contributed package for L^{A}TEX 2ε provides the necessary font declarations needed to access the logo font family in terms of NFSS.^{1} It also provides a little example package file that shows how to define the and logos and some appropriate font changing commands in these terms.

Using this package, there should no longer be a need to define special macros for the slanted version of these logos, and it should be possible to avoid such errors as on page 2 of The L^{A}TEX Companion where the logo appears in upright shape within an italics context of a book title.

\logofamily Once you have installed the font definition file Ulogo.fd provided here, you

\textlogo can use low-level NFSS commands to access the logo fonts in your documents, even if you do not plan to use the example package mflogo.sty. Apart from defining the and logos in terms of NFSS, that package file also provides a declarative font changing command \logofamily and a font changing command \textlogo with one argument. Perhaps these font changing commands might prove to be useful for typesetting little “teasers” such as in TTN 3;2, page 28.

2 The Docstrip modules

The following Docstrip modules are used in this package:

driver  produces the documentation driver
package  produces the example package file
Ulogo  produces the standard font definition file
Ulogo&local produces the extended font definition file
logosl9  produces a  source file
logosl8  produces a  source file

Except for the documentation driver (and the source files) every module intended for TEX should contain the following information for identifcation purposes. 1 ⟨∗package | Ulogo⟩

 2 \def\filename{mflogo.dtx}
 3 \def\filedate{1994/05/21}

1Throughout this document, the term NFSS should be understood to refer to release 2 of NFSS, i.e. the release that’s part of L^{A}TEX 2ε and that’s intended to become part of L^{A}TEX3 in the future.

 4 \def\fileversion{1.2}

5 ⟨/package | Ulogo⟩

3 The �������� source files:

   logosl9.mf and logosl8.mf

In this package, we assume that your TEX distribution includes the source files for the logo font family, available from the directory /systems/knuth/lib on the CTAN network. These consists of the program file logo.mf and a number of driver files for various font shapes and sizes.^{2} Some additional variants are also available from the directory /systems/knuth/local/lib, but those are not assumed to be present in every installation. However, we will support them if they are available at your site.

In order to provide a reasonably orthogonal range of sizes and shapes, some additional driver files are provided as part of this package. The 9-point version of logosl provided here is also available from /systems/knuth/local/lib; it has been included verbatim from that directory and should be identical to DEK’s version.^{3} The 8-point version, however, is new and has been added by the author of this package for completeness. Installing these two additional fonts should ensure that upright and slanted shapes of the logo font family will be available in the same range of sizes.

First, here is the 9-point version, included verbatim from DEK’s original file

in /systems/knuth/local/lib.

6 ⟨∗logosl9⟩

 7 % 9-point slanted METAFONT logo
 8 slant := 1/4;
 9 input logo9

10 ⟨/logosl9⟩

Next, here is the 8-point version added for completeness. We have simply replaced every ‘9’ by ‘8’.

11 ⟨∗logosl8⟩

12 % 8-point slanted METAFONT logo
13 slant := 1/4;
14 input logo8

15 ⟨/logosl8⟩

4 The font defintion file: Ulogo.fd

Following the tradition of the standard L^{A}TEX 2ε distribution, we begin by identifying the latest version of this file in the log file. 16 ⟨∗Ulogo⟩

2Please note that the file logo.mf has been updated by DEK in 1993, adding the letters ‘ ’ and ‘ ’ for the logo. If TEX complains about missing characters in some of the logo fonts while processing this documentation, you should consider updating your copy of logo.mf and regenerating all the logo fonts.

3Actually, the 9-point version of logosl generated from this Docstrip source will not be fully identical to DEK’s logosl9.mf because it will contain a Docstrip header and a character table, etc. To avoid this, we will include the source files separately in the distribution, but we show them here for your information.

17 \wlog{Fontdef\space file\space produced\space from\string:\space
18 \string`mflogo.dtx\string'\space \fileversion\space
19 \string<\filedate\string>\space \string(Ulrik Vieth\string)}

The first thing to do now is to declare a new font family logo using an appropriate encoding scheme. According to The book the logo fonts have the font encoding scheme "AEFMNOT only", but this has been changed to "AEFMNOPST only" recently. Clearly, this is a well-defined encoding scheme, but not one of those presently supported by NFSS. One might be tempted to define some new encoding scheme ‘MF’, but the letter ‘M’ is already reserved for 256character math fonts. Therefore, we will use the encoding scheme ‘U’ for the font family logo.

20 \DeclareFontFamily{U}{logo}{}

4.1 Font shape declarations for medium series

Now, we will discuss the font shape declarations for the medium series. We will support sizes in the range from 8 pt up to magstep 5, which should be sufficient to cover the range from \footnotesize to \Huge. We assign the logosl fonts to \itshape because their slant parameter matches that of Computer Modern Italics rather than that of Computer Modern Slanted.^{4} For \slshape we provide a silent font substitution.

21 \DeclareFontShape{U}{logo}{m}{n}{
22 <8> <9> gen * logo
23 <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logo10
24 }{}
25 \DeclareFontShape{U}{logo}{m}{it}{
26 <8> <9> gen * logosl
27 <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logosl10
28 }{}
29 \DeclareFontShape{U}{logo}{m}{sl}{
30 <-> ssub * logo/m/it
31 }{}

4.2 Font shape delarations for bold Series

Finally, we turn to the font shape declarations for the bold and bold extended series. At present, there are no slanted versions of bold logo fonts, but they could be created easily if desired. However, we do not attempt to create them here because the resulting name would be too long to fit into 8 characters, and it is not clear how it should be abbreviated.

We assign the logobf font to the semibold condensed series because there are some indications that it was designed to match Computer Modern Sans Serif Demibold Condensed, the font that was used in chapter headings in the TEX and manuals. In sizes below 10 pt, we simply substitute medium series because we want to avoid scaling down fonts below their design size.

32 \DeclareFontShape{U}{logo}{sbc}{n}{
33 <8> <9> sub * logo/m/n

4This might be due to the fact that the logosl fonts were first used in combination with Computer Modern Italics in the running heads of The book. Thus they may have been tuned for this purpose.

34 <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logobf10
35 }{}

For the bold and bold extended series we normally provide silent font substitutions. However, if you have the logod font from DEK’s additional font shapes, we leave out these font substitutions because we prefer to use logod in that case. When running the installation script, you will be asked if the logod font is available in your TEX installation, and different font definition files will be produced accordingly. This is controlled by the Docstrip option local.

36 ⟨∗!local⟩

37 \DeclareFontShape{U}{logo}{b}{n}{
38 <-> ssub * logo/sbc/n
39 }{}
40 \DeclareFontShape{U}{logo}{bx}{n}{
41 <-> ssub * logo/sbc/n
42 }{}

43 ⟨/!local⟩

If you do have the additional font shapes from /systems/knuth/local/lib, we assign the logod font to the bold and bold extended series instead of the logobf font.

Since the name logod implies a demibold version, this decision may seem a little odd, but there is a good reason behind it: As mentioned before, logobf was originally designed to match the semibold condensed version of Computer Modern Sans Serif. It also fits well in combination with the bold extended version of that font family because the weight of these two versions is not too different. However, when used in combination with the bold or bold extended version of Computer Modern Roman, the logobf font turns out to be slighlty too heavy, and the logod font seems to be a more appropriate alternative.^{5}

For this reason, we assign the logod font to the bold series (only available in Computer Modern Roman) and we also assign it to the bold extended series, assuming that Computer Modern Roman will be used in \bfseries much more frequently than Computer Modern Sans Serif. However, when using bold extended Computer Modern Sans Serif, logod will be the wrong choice and one would prefer logobf instead.

Unfortunately, there is no completely satisfactory solution to this problem because NFSS uses weight attributes relative to the generic weight of a font family, and there is no absolute weight attribute to classify different font families. Perhaps one would have to assign bold extended Computer Modern Sans Serif to ultrabold extended compared to bold extended Computer Modern Roman. However, this would only cause confusion because it would require changing the standard font definition files.

44 ⟨∗local⟩

45 \DeclareFontShape{U}{logo}{b}{n}{
46 <8> <9> sub * logo/m/n
47 <10> <10.95> <12> <14.4> <17.28> <20.74> <24.88> logod10
48 }{}
49 \DeclareFontShape{U}{logo}{bx}{n}{
50 <-> ssub * logo/b/n

5The history of the logod font is not very clear. It was first released together with updates for TEX and in March 1992. It might have been used in DEK’s book Literate Programming where bold extended Computer Modern Roman is used in headings.

51 }{}

52 ⟨/local⟩ 53 ⟨/Ulogo⟩

5 The package file: mflogo.sty

After having discussed the font definition file, we now turn to the example package that shows how to access the logo font family by defining high-level macros based on the low-level macros of NFSS.

As usual, we begin by identifying the package and its current version.

54 ⟨∗package⟩

55 \ProvidesPackage{mflogo}[\filedate\space\fileversion\space
56  Contributed LaTeX2e package]
57 \typeout{Package: `mflogo'
58 \fileversion\space <\filedate> (Ulrik Vieth)}

\logofamily First, we define the declarative font changing command \logofamily. This is accomplished using the low-level NFSS commands \fontencoding and \fontfamily

followed by \selectfont.
59 \def\logofamily{%
60 \fontencoding{U}\fontfamily{logo}\selectfont}

\textlogo Next, we define a font changing command with one argument. Since it is very unlikely that the logo fonts will be used in math mode, we do not attempt to make a robust version, instead the \textlogo macro defined here simply selects \logofamily within a group. However, we will protect it, so that it can be used within moving arguments without problems.

61 \def\textlogo{\protect\ptextlogo}
62 \def\ptextlogo#1{{\logofamily #1}}

{\MF \atop \MP} Finally, we define macros for the  and  logos. Since the

letters ‘ ’ and ‘ ’ needed for the logo were added as recently as 1993, this will only work if you have an up-to-date version of the logo fonts. To update them, you just need to install the new version of the program file logo.mf and regenerate the logo fonts using exactly the same driver files as before.

There should be no doubt that \MF is the standard abbreviation for the - logo. However, there apparently doesn’t seem to be standard abbreviation for the logo yet. We have decided to call it \MP here because according to John Hobby’s article in the EuroTEX 1992 Proceedings uses .mp as the extension of its input files just like uses .mf. However, we prefer to leave the final decision to John Hobby himself.

63 \def\MF{\textlogo{META}\-\textlogo{FONT}}
64 \def\MP{\textlogo{META}\-\textlogo{POST}}

65 ⟨/package⟩

In closing, it should be pointed out that the above definition of the logo will make it honour all font changing commands just like the TEX logo does. Thus both logos will finally behave identically with respect to font changes.

6 The documentation driver file

We have our own document class to format the L^{A}TEX 2ε documentation. In additon, we use the mflogo package because we frequently use the and logos in this documentation. 66 ⟨∗driver⟩

67 \documentclass{ltxdoc}
68 \usepackage{mflogo}

We do not need an index.

69 \DisableCrossrefs

We do want the full details.

70 \begin{document}
71 \DocInput{mflogo.dtx}
72 % \PrintIndex
73 % \PrintChanges
74 \end{document}

75 ⟨/driver⟩