Chapter 1
Fonts

1.1 Special Characters

All the keyboard characters, except for ten characters that are used for special purposes, can be typed in directly. The nine special characters $ & % #_ { } ˜ and ^ are produced by

Image

The tenth character can be produced with $ackslash$.

1.2 Accents and Special Symbols

The following commands sequences are used to produce accented letters, foreign characters, and a few special symbols. These commands are used in the normal text mode.

Image

ImageLATEX also has a great many symbols that can be used in math mode. Rather than list them all here, a complete listing of these symbols is given in Appendix A.

1.3 Font Sizes

Image has several sizes of fonts that can be invoked by the { sizecmd text…} construct. The font-size commands (sizecmd) and the size of fonts they produce are listed below. The three options in this table refer to the default font size specified for the document as a style option in the documentstyle command.

Image

1.4 Font Styles

Standard Image has available the following font styles (shown in 10-point size). Notice that the last four styles are used only in math mode.

Image

1.5 Computer Modern Fonts

The standard font style used by Image is computer modern. A standard set of 75 different font face styles is usually installed and can be made available to Image. However, generally not all these styles are known to Image. In the file Ifonts. tex, which is used by Image to make an executable version of Image, many font definitions will be found commented out because of the limited internal memory possessed by most versions of Image. In the following table the names of the 10-point computer modern fonts that are in the standard 75-font set are listed. Those fonts not normally defined for Image are indicated by an asterisk (*).

Image

However, as long as an undefined font is available, it can still be used in a document. For a particular font to be available, its metric .TFM file (which defines each character’s size) and its bit-mapped . PK file (use by the DVI drivers for screen previewing and printing) must be where Image can find them. If the nondefined font is available, first use the ewfont command to define a font command for it. For example, suppose you want to use 10-point italic sans serif (font cmssi10). First place in the preamble or document the statement ewfont{ISS}{cmssi10} to define ISS as the font change command for this font style. Then-the sequence {ISS Italic Sans Serif} will produce Italic Sans Serif.

1.5.1 Changing the Size of a Font

In Image the ewfont command can also be used to define a new font command that magnifies or scales a specific font. For example, suppose you want to define the font command BSS (Big Sans Serif) to refer to 10-point sans serif expanded to a height of 17 points, place the following statement in your document

            ewfont{BSS}{cmsslO scaledmagstep3}

The optional parameter scaledmagstep3 indicates that the 10-point cmss10 font (computer modern, sans serif, 10 point) is to be magnified or scaled by a factor of 1.23 Image 1.728. Then in your document the sequence {BBS BigSS} will produce BigSS, which is 17 points high.

The six allowed values of magstep and their magnification factors are:

Image

Be aware that not all font styles are usually available in all magstep sizes. The less frequently used 10-point font styles, for example, are usually available only in the lower two magsteps.

1.5.2 Font Faces and Scaling

Most characters in a particular font family change slightly in shape and density as the font size is adjusted. Scaling a font does not preserve these design differences. For instance, the computer modern roman font cmrlO scaled to 17 points (magstep 3) is slightly different from the true 17-point computer modern font (cmrl7) as can be seen in the following example:

Image

Notice that the scaled font has heavier and wider characters, which are also shaped slightly differently than the corresponding 17-point characters. Generally, you should use the font designed for the specified character height. Unfortunately, not all Image fonts are available in all sizes, and when you need to use a particular font size that is unavailable then defining a scaled version of the font allows you to approximate the needed font.

1.5.3 Style and Size Availability

Not all font styles are available in all font sizes. Each style and size combination requires its own font file (.PK and .TFM files). Some are preloaded when Image is started, others are only loaded on demand to reduce memory requirements, and others are unavailable. In normal text mode, loaded and loaded-on-demand fonts behave the same. If a particular font style of some unusual size is not available, LATEX will generally substitute the font of closest size and issue a warning message. The available font style and size combinations depend on your particular Image implementation (see your local guide). Table 1.1 shows the font style and size availability for a typical implementation (in this case Image).

In normal text (paragraph and LR modes), loaded and loaded-on-demand fonts behave the same. In math mode they do not; only preloaded fonts may be used. Loaded fonts will be substituted, often without warning, for unavailable or load-on-demand fonts used in math expressions. To use load-on-demand fonts in math mode, you must first load them with the load command. Here is an example in 8-point type for which the sans serif style is not preloaded.

Image

Image

Table 1.1: Typical availability of Image font styles

1.5.4 Ligatures

Ligatures such as ff fi fl ffl ffi or ff fi fl ffl ffi are performed automatically by Image. However, on rare occasions you may wish to suppress a ligature. For example, the word “shelfful” without a ligature looks better than “shelfful” with a ligature. To suppress the ligature, use shelf{}ful.

1.6 Using Nonstandard Fonts

Image can use virtually any font once appropriate font files have been created. For this reason, Image is widely used to prepare many foreign language documents.

To use a particular nonstandard font (one that is not part of Image), the metric .TFM file (which defines each character’s size) and the bit-mapped .PK file (used by DVI drivers for screen previewing and printing) for the font set must first be obtained and made available to Image. Then the ewfont command is used in the document preamble to define a command name for specifying the use of the fonts. For example, in the preamble you might use

ewfont{Fr}{eufmlO}’%—Fraktur, medium face ewfont{Sc}{eusmlO} %—Script, medium face ewfont{Bb}{msbmlO}’%—Blackboard, med. face

Image

to define Fr, Sc, and Bb as special font commands. (The font files EUFN10.PK, EUSM10.PK, and MSBM10.PK and their corresponding .TFM files are part of Image.) To produce a scaled 12-point version of the Fraktur font use

    ewfont{Fr}{eufmlO scaledmagstepl} %-- 12pt Fraktur

To use the Fraktur (German) font in the normal text mode of Image, simply invoke {Fr .. . .} to place the text between the braces in Fraktur font. For example, {Fr ABC…XYZ}, {Sc ABC… XYZ}, and {Bb ABC…XYZ} produce

Image

1.6.1 Specifying a Particular Font Character

A Image font set contains 128 characters, many of which are not alphabetic characters and cannot be represented by a keyboard symbol. To use these characters in your document, the symbol command is used. For example, R is character 82 in EUSM10 and can be referred to as either {Sc R} or {Sc symbol{82}}. Some symbols, such as, can be invoked only with the symbol command, as in this case with {Bb symbol{121}}.

To find the decimal number of a particular character in a font file, it is necessary to obtain a listing of the characters with their numbers. Such a font character listing is often presented in a table similar to that of Table 1.2.

Table 1.2: Example decimal character table for the blackboard font set msbmlO

Image

1.6.2 Nonstandard Fonts in Math Mode

The new font commands Fr, Sc, and Bb cannot be used in math mode. You must place these fonts in an mbox if they are to be used in a formula. For example, to produce = D x R, you must use

       $mbox{Sc E} = mbox{Sc D}  imes mbox{Sc R}$.

The Image command def can be used to define a shorthand command to print a particular character from a nonstandard font set when in math mode. For example, first place in the preamble the sequences

Image

so that ɛ = DxR can be entered more compactly as $ScE = ScD imes ScR$.

1.7 Really Large Fonts

The standard font collection used by Image also has a large 1-inch font, cminch, that can be used by defining in the preamble the font commands

Image

Note, this font cannot be magnified, although its interletter spacing can be decreased by scaling it to less than the normal size of 1000 (see the previous definition of sqBIG). Here are three examples with different spacing between letters. These examples were produced with the commands {sqBIG HUGE}, {BIG HUGE}, and, to increase the normal inter let ter spacing, {BIG Hhf il Uhf il Ghfil E}.

Image

Sec. 1.8. Improvised Special Characters

1.8 Improvised Special Characters

Sometimes the standard fonts available to Image will not contain some special character that you need. Although the best solution is to use METRFONT(a font generation program) to generate a special font set that contains the needed character, you can often approximate the character by superimposing several existing characters and/or line rules. Here are three examples

1.8.1 Symbol for Cents

One symbol missing from Image’s font sets is the symbol for cents. Here are four commands that approximate this symbol:

Image

Here are the results of these different attempts. None is perfect.

Image

1.8.2 Blackboard Fonts

The following commands in the preamble will allow you to use a poor man’s approximation to blackboard fonts.

        ewcommand{BBR}{{sf Rhspace*{-0.9ex} ule{0.15ex}{l.5ex}hspace*{0.9ex}}}
        ewcommand{BBN}{{sf Nhspace*{-1. Oex} ule{0.15ex}{l.3ex}hspace*{1.0ex}}}
        ewcommand{BBQ}{{sf Qhspace*{-1.lex} ule{0.15ex}{l.5ex}hspace*{l.lex}}}
        ewcommand{BBC}{{sf Chspace*{-0.9ex} ule{0.15ex}{l.3ex}hspace*{0.9ex}}}
        ewcommand{BBD}{{sf Dhspace*{-0.9ex} ule{0.15ex}{l.5ex}hspace*{0.9ex}}}

Thus, to produce Image, enter BBR BBN BBQ BBC BBD.

1.8.3 Smiley Faces

Just for fun, here are three faces: smileyImage laheyImage f rowneyImage

The 10-point macros for smiley, frowney, and lahey are as follows (for 11-point and 12-point documents, some tweaking of the dimensions is needed).

          ’%-- Smiley Face
          def smiley{hbox{large$igcirc$hspace{-. 80em}’%
           aise.2exhbox{$cdotcdot$}kern-.61em ’%--56
          lower.2exhbox{scriptsize$smile$}} }
          %-- Frowney Face
          deffrowney{hbox{large$igcirc$hspace{-. 80em}’%
           aise.2exhbox{$cdotcdot$}kern-.635em
          lower.2exhbox{scriptsize$frown$}} }
          ’-- Blahey Face
          def lahey{hbox{large$igcirc$hspace{-. 80em}*/,
           aise.2exhbox{$cdotcdot$>kern-.46em
          lower.3exhbox{scriptsizehbox{—}}} }

1.9 The New Font Selection Scheme (NFSS)

The discussion in this chapter about using different fonts is based on the original font selection scheme described in Lamport’s book. In the late 1980s, Image wizards Frank Mittelbach and Rainer Schöpf devised an alternative and improved scheme for using fonts with Image (as well as with Image and Image). This new font selection scheme (NFSS) lets you use all the standard fonts (that is, those that come with Image) and nonstandard fonts in both text and math modes without having to preload all the fonts (and thereby consume useful memory).

The NFSS also allows you to use the old font selection scheme to ensure backward compatibility. Moreover, it is the only practical way of using Imagefonts and postscript fonts with Image. This new scheme will eventually become a standard part of Image in future releases, although many implementations of Image have already been modified to use the NFSS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.94.251