28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

26 Chapter 2. Text, Symbols, <strong>and</strong> Comm<strong>and</strong>s<br />

2.5.9 Typing special symbols directly<br />

The comm<strong>and</strong>s for producing the special characters <strong>and</strong> accented letters in<br />

! the previous sections may be suitable for typing isolated ‘foreign’ words, but<br />

become quite tedious for inputting large amounts of text making regular use of<br />

such characters. Most computer systems provide non-English keyboards with<br />

appropriate fonts for typing these national variants directly. Unfortunately, the<br />

coding of such extra symbols is by no means st<strong>and</strong>ard, depending very much on<br />

the computer system.<br />

For example, the text Gauß meets Ampère entered with an MS-DOS edi<strong>to</strong>r<br />

(code page 437 or 850) appears in a Windows application as Gauá meets AmpˇSre<br />

<strong>and</strong> on a Macin<strong>to</strong>sh as Gau meets Ampäre. Since LAT EX is intended <strong>to</strong> run on<br />

all systems, it simply ignores all such extra character codes on the grounds that<br />

they are not properly defined.<br />

The inputenc package solves this problem. It not only informs LAT Package:<br />

EX which<br />

inputenc input coding scheme is being used, it also tells it what <strong>to</strong> do with the extra<br />

characters. One invokes it with<br />

\usepackage[code]{inputenc}<br />

where code is the name of the coding scheme <strong>to</strong> be used. The current list of<br />

allowed values for code (more are added with each L AT E X update) can be found in<br />

Table D.1 on page 462. For most users, the most interesting codes are:<br />

cp437 IBM code page 437 (DOS, North America)<br />

cp850 IBM code page 850 (DOS, Western Europe)<br />

applemac Macin<strong>to</strong>sh encoding<br />

ansinew Windows ANSI encoding<br />

In short, you should select applemac for a Macin<strong>to</strong>sh, <strong>and</strong> ansinew for Windows,<br />

<strong>and</strong> one of the others if you are working with DOS.<br />

Documents making use of this package are fully portable <strong>to</strong> other computer<br />

systems. The source text produced with a DOS edi<strong>to</strong>r may still look very strange<br />

<strong>to</strong> a human user reading it on a Macin<strong>to</strong>sh, but when the Macin<strong>to</strong>sh L AT E X processes<br />

it, the proper DOS interpretations will be applied so that the end result is what<br />

the author intended.<br />

See Section D.5 for more details.<br />

2.5.10 Ligatures<br />

In book printing, certain combinations of letters are not printed as individuals<br />

but as a single symbol, a so-called ligature. T E X processes the<br />

letter combinations ff, fi, fl, ffi, <strong>and</strong> ffl not as<br />

ff, fi, fl, ffi, ffl but rather as ff, fi, fl, ffi, ffl<br />

Ligatures may be broken, that is, forced <strong>to</strong> be printed as separate letters,<br />

by inserting \/ between the letters. This is sometimes desired for such<br />

words as shelfful (shelf\/ful), which looks rather strange when printed<br />

with the normal ff ligature, shelfful.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!