symbols-a4
symbols-a4
symbols-a4
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Table 324 showcases these accents. The TEXbook [Knu86a] or another book on TEX primitives is indispensible<br />
for understanding how the preceding code works. The basic idea is that \downparenthfill, \upparenthfill,<br />
\downbracketfill, and \upbracketfill do all of the work; they output a left symbol (e.g., \braceld [“”]<br />
for \downparenthfill), a horizontal rule that stretches as wide as possible, and a right symbol (e.g., \bracerd<br />
[“”] for \downparenthfill). \overbracket, \underbracket, \overparenthesis, and \underparenthesis<br />
merely create a table whose width is determined by the given text, thereby constraining the width of the<br />
horizontal rules.<br />
Table 324: Manually Composed Extensible Accents<br />
<br />
abc \overbracket{abc} abc \overparenthesis{abc}<br />
abc \underbracket{abc} abc<br />
<br />
\underparenthesis{abc}<br />
Note that the simplewick package provides mechanisms for typesetting Wick contractions, which utilize<br />
\overbracket- and \underbracket-like brackets of variable width and height (or depth). For example,<br />
“\acontraction{}{A}{B}{C}\acontraction[2ex]{A}{B}{C}{D}\bcontraction{}{A}{BC}{D}ABCD”<br />
produces<br />
ABCD .<br />
See the simplewick documentation for more information.<br />
Developing new <strong>symbols</strong> from scratch<br />
Sometimes is it simply not possible to define a new symbol in terms of existing <strong>symbols</strong>. Fortunately, most, if<br />
not all, TEX distributions are shipped with a tool called METAFONT which is designed specifically for creating<br />
fonts to be used with TEX. The METAFONTbook [Knu86b] is the authoritative text on METAFONT. If you<br />
plan to design your own <strong>symbols</strong> with METAFONT, The METAFONTbook is essential reading. You may also<br />
want to read the freely available METAFONT primer located at http://metafont.tutorial.free.fr/. The<br />
following is an extremely brief tutorial on how to create a new L ATEX symbol using METAFONT. Its primary<br />
purpose is to cover the L ATEX-specific operations not mentioned in The METAFONTbook and to demonstrate<br />
that symbol-font creation is not necessarily a difficult task.<br />
Suppose we need a symbol to represent a light bulb (“”). 11 The first step is to draw this in METAFONT.<br />
It is common to separate the font into two files: a size-dependent file, which specifies the design size and<br />
various font-specific parameters that are a function of the design size; and a size-independent file, which draws<br />
characters in the given size. Figure 2 shows the METAFONT code for lightbulb10.mf. lightbulb10.mf<br />
specifies various parameters that produce a 10 pt. light bulb then loads lightbulb.mf. Ideally, one should<br />
produce lightbulb〈size〉.mf files for a variety of 〈size〉s. This is called “optical scaling”. It enables, for<br />
example, the lines that make up the light bulb to retain the same thickness at different font sizes, which looks<br />
much nicer than the alternative—and default—“mechanical scaling”. When a lightbulb〈size〉.mf file does<br />
not exist for a given size 〈size〉, the computer mechanically produces a wider, taller, thicker symbol:<br />
vs. vs. vs. vs. <br />
vs.<br />
<br />
vs.<br />
<br />
10 pt. 20 pt. 30 pt. 40 pt. 50 pt. 60 pt. 70 pt.<br />
lightbulb.mf, shown in Figure 3, draws a light bulb using the parameters defined in lightbulb10.mf.<br />
Note that the the filenames “lightbulb10.mf” and “lightbulb.mf” do not follow the Berry font-naming<br />
scheme [Ber01]; the Berry font-naming scheme is largely irrelevant for symbol fonts, which generally lack bold,<br />
italic, small-caps, slanted, and other such variants.<br />
The code in Figures Figure 2 and Figure 3 is heavily commented and should demonstrate some of the<br />
basic concepts behind METAFONT usage: declaring variables, defining points, drawing lines and curves, and<br />
preparing to debug or fine-tune the output. Again, The METAFONTbook [Knu86b] is the definitive reference<br />
on METAFONT programming.<br />
11 I’m not a very good artist; you’ll have to pretend that “” looks like a light bulb.<br />
109