diff options
Diffstat (limited to 'Master/texmf-doc/doc/english/make-tex-work/html/ch07.html')
-rw-r--r-- | Master/texmf-doc/doc/english/make-tex-work/html/ch07.html | 2409 |
1 files changed, 2409 insertions, 0 deletions
diff --git a/Master/texmf-doc/doc/english/make-tex-work/html/ch07.html b/Master/texmf-doc/doc/english/make-tex-work/html/ch07.html new file mode 100644 index 00000000000..0b39091b781 --- /dev/null +++ b/Master/texmf-doc/doc/english/make-tex-work/html/ch07.html @@ -0,0 +1,2409 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta name="generator" + content="HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org" /> + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1" /> + + <title>Chapter 7. International + Considerations</title> + <link rel="stylesheet" href="mtw.css" type="text/css" /> + <meta name="generator" + content="DocBook XSL Stylesheets V1.53.0" /> + <link rel="home" href="index.html" title="Making TeX Work" /> + <link rel="up" href="pt02.html" + title="Part II. Elements of a Complex Document" /> + <link rel="previous" href="ch06.html" + title="Chapter 6. Pictures and Figures" /> + <link rel="next" href="ch08.html" + title="Chapter 8. Printing" /> + </head> + + <body> + <div class="navheader"> + <table border="0" cellpadding="0" cellspacing="0" + width="100%" summary="Navigation table"> + <tr> + <td align="left"> <a title="Making TeX Work" + href="index.html"><img src="figures/nav-home.png" + alt="Home" border="0" /></a> <a + title="Chapter 6. Pictures and Figures" + href="ch06.html"><img src="figures/nav-prev.png" + alt="Prev" border="0" /></a> <a + title="Part II. Elements of a Complex Document" + href="pt02.html"><img src="figures/nav-up.png" alt="Up" + border="0" /></a> <a + title="Chapter 8. Printing" + href="ch08.html"><img src="figures/nav-next.png" + alt="Next" border="0" /></a></td> + + <td align="right"><i>Making TeX Work</i> Version 1.0.1 + <span class="alpha-version">(<a + href="co01.html"><em>Alpha</em></a>)</span></td> + </tr> + </table> + </div> + + <div class="chapter"> + <div class="titlepage"> + <div> + <h2 class="title"><a id="chap.foreign" + name="chap.foreign"></a>Chapter 7. International + Considerations</h2> + </div> + + <div> + <p class="releaseinfo">$Revision: 1.1 $</p> + </div> + + <div> + <p class="pubdate">$Date: 2002/08/23 14:31:13 $</p> + </div> + <hr class="component-separator" /> + </div> + + <p>Although the standard TeX macro packages and the Computer + Modern fonts were designed to typeset documents written + primarily in English, TeX enjoys widespread international + use<a id="id2890702" class="indexterm" + name="id2890702"></a><a id="id2890737" class="indexterm" + name="id2890737"></a><a id="id2890746" class="indexterm" + name="id2890746"></a>.</p> + + <p>From a technical standpoint, languages can be divided into + two categories: those that are “like English” + (meaning that they use a relatively small number of + characters and are typeset horizontally, left to right) and + those that are not. German, French, and Russian are all + “like English” in this sense. Hebrew, Chinese, + and Japanese are not (Hebrew<a id="id2890473" + class="indexterm" name="id2890473"></a> is typeset right to + left, and Chinese<a id="id2890482" class="indexterm" + name="id2890482"></a> and Japanese<a id="id2890491" + class="indexterm" name="id2890491"></a> use thousands of + characters).<sup>[<a id="id2890500" name="id2890500" + href="#ftn.id2890500">85</a>]</sup></p> + + <p>This chapter explores some of the issues that arise when + TeX is used to typeset languages other than English. For + simplicity, we'll look at languages like English first, and + then describe some environments for typesetting much more + complex languages.</p> + + <div class="section"> + <div class="titlepage"> + <div> + <h2 class="title" style="clear: both"><a + id="sec.for.printing" + name="sec.for.printing"></a>Typesetting in Any + Language</h2> + </div> + </div> + + <p>In order to typeset<a id="id2899108" class="indexterm" + name="id2899108"></a> any language with TeX, three things + have to happen:</p> + + <div class="orderedlist"> + <ol type="1"> + <li> + <p>TeX has to read the input file and perform the + correct mapping from the input file's character set + to its internal representation of each character. The + character set used in the input file will vary + depending upon the language. For instance, if you're + writing a document in French<a id="id2899141" + class="indexterm" name="id2899141"></a>, it is as + natural to use “é” in your input file as + it is to use any other letter.</p> + </li> + + <li> + <p>TeX has to typeset the document according to the + rules of the language being used. Naturally, this + means that there must be some way of declaring what + language is being used, and appropriate macros have + to exist to embody the rules of that language. Users + familiar only with English may not recognize the + importance of language-specific rules because English + has so few rules. Other languages have many. In + German<a id="id2899172" class="indexterm" + name="id2899172"></a>, for example, if the consonants + “ck” in a word are broken by a hyphen, + the “c” becomes a “k” + (“k-k”). In French<a id="id2899199" + class="indexterm" name="id2899199"></a>, small + amounts of extra space are placed around various + punctuation marks.</p> + + <p>A good reference manual for internationalization + is <span class="emphasis"><em>{Software + Internationalization and Localization: An + Introduction}</em></span> [<a + href="bi01.html#eu:international">eu:international</a>].</p> + </li> + + <li> + <p>The <tt>DVI</tt> file that results from + typesetting the document must be printed correctly. + In other words, all of the accented characters and + symbols used by the language must be available (or + constructed) for previewing and printing.</p> + </li> + </ol> + </div> + + <p>Early attempts to write documents in languages other + than English were hampered by several limitations in the + TeX program. In particular, fonts were limited to 128 + characters, and only a single set of hyphenation patterns + could be loaded (effectively preventing multilingual + documents from being hyphenated correctly). These technical + problems were corrected in TeX version 3.x (first released + in 1990). The remaining difficulties---mostly a lack of + standardization and the need to develop relevant + language-specific macros---are being addressed by the TUG<a + id="id2899266" class="indexterm" name="id2899266"></a> + Technical Working Group on Multiple Language Coordination + (TWGMLC)<a id="id2899280" class="indexterm" + name="id2899280"></a>.</p> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2899289" + name="id2899289"></a>Reading Input Files</h3> + </div> + </div> + + <p>The first point to consider when typesetting is that + every input file is written in some character set. For + example, because this book is written in English and I + work in the United States, the source code for this book + is written in 7-bit ASCII<a id="id2899303" + class="indexterm" name="id2899303"></a>. If this book + were written in another language, a different character + set, perhaps ISO Latin1, would be more appropriate.</p> + + <p>When TeX reads your input file, characters like + “é” and “\guillemet” have to be + translated into a form that TeX can use. For example, + “é” should be translated into é and, if the + DC fonts are in use, “\guillemet” should be + translated into character 19; otherwise, if the DC + fonts<a id="id2899343" class="indexterm" + name="id2899343"></a> are not in use, + “\guillemet” should be translated into + <tt>$<<$</tt> which will give the approximate + result. The DC fonts are discussed in the section called + “<a href="ch07.html#sec.for.printing" + title="Typesetting in Any Language">the section called + “Typesetting in Any Language”</a>,” + later in this chapter.</p> + + <p>It is always possible to access characters from + another symbol set by using a control sequence<a + id="id2899384" class="indexterm" name="id2899384"></a>. + Table <a href="ch07.html#tab.accentedchar" + title="Table 7.1. Standard Control Sequences for Symbols from Other Character Sets"> + Table 7.1</a> shows the standard TeX control + sequences for accessing accented characters and + characters from other alphabets.<sup>[<a id="id2899397" + name="id2899397" href="#ftn.id2899397">86</a>]</sup></p> + + <div class="table"> + <a id="tab.accentedchar" name="tab.accentedchar"></a> + + <p class="title"><b>Table 7.1. Standard + Control Sequences for Symbols from Other Character + Sets</b></p> + + <table + summary="Standard Control Sequences for Symbols from Other Character Sets" + border="1"> + <colgroup> + <col align="left" /> + <col align="left" /> + <col align="left" /> + <col align="left" /> + <col align="left" /> + </colgroup> + + <thead> + <tr> + <th align="left">\bf Control</th> + + <th align="left"> </th> + + <th align="left">\bf Control</th> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + </tr> + </thead> + + <tbody> + <tr> + <td align="left">\bf Sequence</td> + + <td align="left">\bf Symbol</td> + + <td align="left">\bf Sequence</td> + + <td align="left">\bf Symbol</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\`e</td> + + <td align="left">\`e</td> + + <td align="left">\oe</td> + + <td align="left">\oe</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\'e</td> + + <td align="left">é</td> + + <td align="left">\ae</td> + + <td align="left">\ae</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\"e</td> + + <td align="left">\"e</td> + + <td align="left">\o</td> + + <td align="left">\o</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\u{e}</td> + + <td align="left">\u{e}</td> + + <td align="left">\aa</td> + + <td align="left">\aa</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\.e</td> + + <td align="left">\.e</td> + + <td align="left">\l</td> + + <td align="left">\l</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\t{ee}</td> + + <td align="left">\t{ee}</td> + + <td align="left">\OE</td> + + <td align="left">\OE</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\d{e}</td> + + <td align="left">\d{e}</td> + + <td align="left">\AE</td> + + <td align="left">\AE</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\H{e}</td> + + <td align="left"> + {\fontfamily{cmr}\selectfont\H{e}}</td> + + <td align="left">\O</td> + + <td align="left">\O</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\^e</td> + + <td align="left">\^e</td> + + <td align="left">\AA</td> + + <td align="left">\char'302</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\v{e}</td> + + <td align="left">\v{e}</td> + + <td align="left">\L</td> + + <td align="left">\L</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\=e</td> + + <td align="left">\=e</td> + + <td align="left"><tt>?`</tt></td> + + <td align="left">?`</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\&nbsp;e</td> + + <td align="left">\ e</td> + + <td align="left"><tt>!`</tt></td> + + <td align="left">!`</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\c{e}</td> + + <td align="left">\c{e}</td> + + <td align="left">\ss</td> + + <td align="left">\ss</td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\b{e}</td> + + <td align="left">\b{e}</td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + </tr> + </tbody> + </table> + </div> + + <p>Table <a href="ch07.html#tab.newaccentedchar" + title="Table 7.2. New Control Sequences Proposed by TWGMLC"> + Table 7.2</a> shows new control sequences proposed + by the TWGMLC for characters not available in standard + TeX and LaTeX distributions.<sup>[<a id="id2899840" + name="id2899840" href="#ftn.id2899840">87</a>]</sup></p> + + <div class="table"> + <a id="tab.newaccentedchar" + name="tab.newaccentedchar"></a> + + <p class="title"><b>Table 7.2. New Control + Sequences Proposed by TWGMLC</b></p> + + <table + summary="New Control Sequences Proposed by TWGMLC" + border="1"> + <colgroup> + <col align="left" /> + <col align="center" /> + <col align="left" /> + </colgroup> + + <thead> + <tr> + <th align="left">\multicolumn{2}{l|}{\bf Control + Sequences}</th> + + <th align="center">\bf Symbols</th> + + <th align="left">\bf Description</th> + </tr> + </thead> + + <tbody> + <tr> + <td align="left"><tt>,,</tt></td> + + <td align="center"><tt>''</tt></td> + + <td align="left">\dcr\char18 \ \char16</td> + + <td>German quotations + ({\dcr\char18}G\"ansef\"u\ss{}chen{\dcr\char16})</td> + </tr> + + <tr> + <td align="left">French quotations + (guillemets)</td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + </tr> + + <tr> + <td align="left">\dh</td> + + <td align="center">\DH</td> + + <td align="left">\dcr\char240 \ \char208</td> + + <td>Icelandic eth</td> + </tr> + + <tr> + <td align="left">\dj</td> + + <td align="center">\DJ</td> + + <td align="left">\dcr\char158 \ \char208</td> + + <td>Serbocroation dj</td> + </tr> + + <tr> + <td align="left">\ng</td> + + <td align="center">\NG</td> + + <td align="left">\dcr\char173 \ \char141</td> + + <td>Sami ng</td> + </tr> + + <tr> + <td align="left">\th</td> + + <td align="center">\TH</td> + + <td align="left">\dcr\char254 \ \char222</td> + + <td>Icelandic thorn</td> + </tr> + + <tr> + <td align="left"><tt>\k e</tt></td> + + <td align="center"> </td> + + <td align="left">\dcr\char166</td> + + <td>Polish ogonek subscript</td> + </tr> + + <tr> + <td align="left"><tt>\r u</tt></td> + + <td align="center"> </td> + + <td align="left">\dcr\char183</td> + + <td>Czech circle accent</td> + </tr> + + <tr> + <td align="left">\v{d}</td> + + <td align="center">\V{D}</td> + + <td align="left">\dcr\char164 \ \char132</td> + + <td>Czech d and D with ha\v{c}ek</td> + </tr> + + <tr> + <td align="left">\v{l}</td> + + <td align="center">\V{l}</td> + + <td align="left">\dcr\char169 \ \char137</td> + + <td>Slovakian l and L with ha\v{c}ek</td> + </tr> + + <tr> + <td align="left">\v{t}</td> + + <td align="center">\V{T}</td> + + <td align="left">\dcr\char180 \ \char148</td> + + <td>Czech t and T with ha\v{c}ek</td> + </tr> + </tbody> + </table> + </div> + + <p>The only technical problem associated with using + language-specific character sets in your input files is + that you must have some way of telling TeX to perform the + appropriate substitutions. One method is to use a special + style file like <tt>isolatin1</tt>.<sup>[<a + id="id2900193" name="id2900193" + href="#ftn.id2900193">88</a>]</sup> This style uses + “active characters” to map the ISO Latin1 + input character set to TeX's representation. It could be + adapted to other character sets as well. Another + possibility is to rely on system-dependent extensions to + TeX. For example, emTeX provides extensive support for + “code pages,” which address this problem.</p> + + <p>The only other problem created by using different + input character sets is one of compatibility. If you + write files using the ISO Latin1 character set and send + them to someone who uses a different character set, the + file will appear to be incorrect.<sup>[<a id="id2900241" + name="id2900241" href="#ftn.id2900241">89</a>]</sup></p> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="id2900256" + name="id2900256"></a>Appearances can be + deceiving</h4> + </div> + </div> + + <p>A document stored on disk is really just a file + containing a series of characters, each represented by + a unique numerical value. For an editor to display a + document, each numerical value must be translated into + a visual representation of the character. Frequently + this translation is performed by the operating system + or computer hardware. In an analogous way, each numeric + value must be translated into a printable character + when the document is typeset.</p> + + <p>Figure <a href="ch07.html#fig.charmap" + title="Figure 7.1. Character mapping example"> + Figure 7.1</a> shows how this translation is + performed for display by the operating system and for + printing by TeX (using the <tt>isolatin1</tt> style, + for example). This figure shows the disparity that + occurs if the two translation tables are not the + same.</p> + + <div class="figure"> + <a id="fig.charmap" name="fig.charmap"></a> + + <p class="title"><b>Figure 7.1. Character + mapping example</b></p> +<pre class="screen"> +FIXME: +</pre> + </div> + + <p>How can this arise? Well, suppose, for example, that + a colleague is writing a document in French<a + id="id2900326" class="indexterm" name="id2900326"></a>. + He has a TeXnical problem that he would like me to + investigate. I agree to take a look, and he sends the + file to me. My colleage is using the ISO Latin1 + character set in his input file because it contains + many symbols that are convenient for writing French + (including the guillemets). I receive the file and edit + it on my PC. The file that I see displayed looks like + gibberish. That's because I'm using the IBM OEM + encoding on my PC, which is sufficient for English. All + of the special characters in the ISO Latin1 character + set appear incorrect. Bewildered, I TeX and preview the + document to see what it's supposed to look like. To my + surprise, the previewed document looks fine.</p> + + <p>In this case, I can correct the problem by changing + the “code page” used on my PC or by + translating the input file with a program like GNU + <b>recode</b><a id="id2900364" class="indexterm" + name="id2900364"></a>.<sup>[<a id="id2900372" + name="id2900372" + href="#ftn.id2900372">90</a>]</sup></p> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2900395" + name="id2900395"></a>Changing the Rules</h3> + </div> + </div> + + <p>In order to select languages, the TWGMLC has proposed + a set of language switching macros. These are shown in + Table <a href="ch07.html#tab.langswitch" + title="Table 7.3. Language Switch Macros Proposed by TUG"> + Table 7.3</a>.<sup>[<a id="id2900417" + name="id2900417" href="#ftn.id2900417">91</a>]</sup></p> + + <p>Selecting a language has three effects:</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>It establishes the correct hyphenation + environment<a id="id2900456" class="indexterm" + name="id2900456"></a>.</p> + + <p>Language-specific hyphenation patterns are + loaded, if necessary, and correct values for the + minimum length of a hyphenated word fragment are + set.</p> + + <p>At the time of this writing, hyphenation + patterns are already available, or under + development, for Armenian, Bulgarian, Cambodian, + Catalan, Croation, Czech, Danish, Dutch, English + (U.K. and U.S.), Esperanto, Estonian, Finnish, + French, German, Greek (both modern and ancient), + Hungarian, Icelandic, Italian, Kirundi, Latin, + Lithuanian, Norwegian, Polish, Portuguese, Russian, + Slovak, Swahili, Swedish, Yiddish, and Yoruba.</p> + </li> + + <li> + <p>It loads the correct fonts and special + characters.</p> + + <p>Even languages which use the same alphabet may + have different fonts<a id="id2900507" + class="indexterm" name="id2900507"></a><a + id="id2900517" class="indexterm" + name="id2900517"></a><a id="id2900527" + class="indexterm" name="id2900527"></a> in order to + provide specific features of the language. For + example, the “fi” ligature<a + id="id2900547" class="indexterm" + name="id2900547"></a> makes sense only when + typesetting English, and the \th and \TH macros + make sense only when typesetting languages that + need “{\dcr\char254}” and + “{\dcr\char222}.”</p> + + <div class="table"> + <a id="tab.langswitch" name="tab.langswitch"></a> + + <p class="title"><b>Table 7.3. Language + Switch Macros Proposed by TUG</b></p> + + <table + summary="Language Switch Macros Proposed by TUG" + border="1"> + <colgroup> + <col align="center" /> + <col align="left" /> + <col align="center" /> + <col align="left" /> + <col align="center" /> + <col align="left" /> + <col align="center" /> + <col align="left" /> + </colgroup> + + <thead> + <tr> + <th align="center">Macro Switch</th> + + <th align="left">Language</th> + + <th align="center">Macro Switch</th> + + <th align="left">Language</th> + + <th align="center">Macro Switch</th> + + <th align="left">Language</th> + + <th align="center">Macro Switch</th> + + <th align="left">Language</th> + </tr> + </thead> + + <tbody> + <tr> + <td align="center">AB</td> + + <td align="left">Abkhazian</td> + + <td align="center">FY</td> + + <td align="left">Frisian</td> + + <td align="center">MG</td> + + <td align="left">Malagasy</td> + + <td align="center">SB</td> + + <td align="left">Sorbian</td> + </tr> + + <tr> + <td align="center">OM</td> + + <td align="left">Afan Oromo</td> + + <td align="center">GL</td> + + <td align="left">Galician</td> + + <td align="center">ML</td> + + <td align="left">Malayalam</td> + + <td align="center">ES</td> + + <td align="left">Spanish</td> + </tr> + + <tr> + <td align="center">FF</td> + + <td align="left">Afar</td> + + <td align="center">KA</td> + + <td align="left">Georgian</td> + + <td align="center">MS</td> + + <td align="left">Malay</td> + + <td align="center">SU</td> + + <td align="left">Sudanese</td> + </tr> + + <tr> + <td align="center">AF</td> + + <td align="left">Afrikaans</td> + + <td align="center">DE</td> + + <td align="left">German</td> + + <td align="center">MT</td> + + <td align="left">Maltese</td> + + <td align="center">SW</td> + + <td align="left">Swahili</td> + </tr> + + <tr> + <td align="center">SQ</td> + + <td align="left">Albanian</td> + + <td align="center">EL</td> + + <td align="left">Greek</td> + + <td align="center">MI</td> + + <td align="left">Maori</td> + + <td align="center">SV</td> + + <td align="left">Swedish</td> + </tr> + + <tr> + <td align="center">AM</td> + + <td align="left">Amharic</td> + + <td align="center">KL</td> + + <td align="left">Greenlandic</td> + + <td align="center">MR</td> + + <td align="left">Marathi</td> + + <td align="center">TL</td> + + <td align="left">Tagalog</td> + </tr> + + <tr> + <td align="center">AR</td> + + <td align="left">Arabic</td> + + <td align="center">GN</td> + + <td align="left">Guarani</td> + + <td align="center">MO</td> + + <td align="left">Moldavian</td> + + <td align="center">TG</td> + + <td align="left">Tajik</td> + </tr> + + <tr> + <td align="center">HY</td> + + <td align="left">Armenian</td> + + <td align="center">GU</td> + + <td align="left">Gujarati</td> + + <td align="center">NA</td> + + <td align="left">Nauru</td> + + <td align="center">TA</td> + + <td align="left">Tamil</td> + </tr> + + <tr> + <td align="center">AS</td> + + <td align="left">Assamese</td> + + <td align="center">HA</td> + + <td align="left">Hausa</td> + + <td align="center">NE</td> + + <td align="left">Nepali</td> + + <td align="center">TT</td> + + <td align="left">Tatar</td> + </tr> + + <tr> + <td align="center">AY</td> + + <td align="left">Aymara</td> + + <td align="center">HE</td> + + <td align="left">Hebrew</td> + + <td align="center">NO</td> + + <td align="left">Norwegian</td> + + <td align="center">TE</td> + + <td align="left">Telugu</td> + </tr> + + <tr> + <td align="center">AZ</td> + + <td align="left">Azerbaijani</td> + + <td align="center">HI</td> + + <td align="left">Hindi</td> + + <td align="center">OC</td> + + <td align="left">Occitan</td> + + <td align="center">TY</td> + + <td align="left">Thai</td> + </tr> + + <tr> + <td align="center">BA</td> + + <td align="left">Bashkir</td> + + <td align="center">HU</td> + + <td align="left">Hungarian</td> + + <td align="center">OR</td> + + <td align="left">Oriya</td> + + <td align="center">BO</td> + + <td align="left">Tibetan</td> + </tr> + + <tr> + <td align="center">EU</td> + + <td align="left">Basque</td> + + <td align="center">IS</td> + + <td align="left">Icelandic</td> + + <td align="center">PS</td> + + <td align="left">Pashto</td> + + <td align="center">TI</td> + + <td align="left">Tigrinya</td> + </tr> + + <tr> + <td align="center">BN</td> + + <td align="left">Bengali</td> + + <td align="center">ID</td> + + <td align="left">Indonesian</td> + + <td align="center">FA</td> + + <td align="left">Persian</td> + + <td align="center">TO</td> + + <td align="left">Tonda</td> + </tr> + + <tr> + <td align="center">DZ</td> + + <td align="left">Bhutani</td> + + <td align="center">IA</td> + + <td align="left">Interlingua</td> + + <td align="center">PL</td> + + <td align="left">Polish</td> + + <td align="center">TS</td> + + <td align="left">Tsonga</td> + </tr> + + <tr> + <td align="center">BH</td> + + <td align="left">Bihari</td> + + <td align="center">IE</td> + + <td align="left">Interlingue</td> + + <td align="center">PT</td> + + <td align="left">Portuguese</td> + + <td align="center">TR</td> + + <td align="left">Turkish</td> + </tr> + + <tr> + <td align="center">BI</td> + + <td align="left">Bislama</td> + + <td align="center">IU</td> + + <td align="left">Inuktitut</td> + + <td align="center">PA</td> + + <td align="left">Punjabi</td> + + <td align="center">TK</td> + + <td align="left">Turkmen</td> + </tr> + + <tr> + <td align="center">BR</td> + + <td align="left">Breton</td> + + <td align="center">IK</td> + + <td align="left">Inupiak</td> + + <td align="center">QU</td> + + <td align="left">Quechua</td> + + <td align="center">TW</td> + + <td align="left">Twi</td> + </tr> + + <tr> + <td align="center">BG</td> + + <td align="left">Bulgarian</td> + + <td align="center">GA</td> + + <td align="left">Irish</td> + + <td align="center">RM</td> + + <td align="left">Rhaeto-Roman</td> + + <td align="center">GB</td> + + <td align="left">U.K. English</td> + </tr> + + <tr> + <td align="center">MY</td> + + <td align="left">Burmese</td> + + <td align="center">IT</td> + + <td align="left">Italian</td> + + <td align="center">RO</td> + + <td align="left">Romanian</td> + + <td align="center">US</td> + + <td align="left">U.S. English</td> + </tr> + + <tr> + <td align="center">BE</td> + + <td align="left">Byelorussian</td> + + <td align="center">JA</td> + + <td align="left">Japanese</td> + + <td align="center">RU</td> + + <td align="left">Russian</td> + + <td align="center">UG</td> + + <td align="left">Uigur</td> + </tr> + + <tr> + <td align="center">KM</td> + + <td align="left">Cambodian</td> + + <td align="center">JW</td> + + <td align="left">Javanese</td> + + <td align="center">SE</td> + + <td align="left">Sami</td> + + <td align="center">UK</td> + + <td align="left">Ukrainian</td> + </tr> + + <tr> + <td align="center">CA</td> + + <td align="left">Catalan</td> + + <td align="center">KN</td> + + <td align="left">Kannada</td> + + <td align="center">SM</td> + + <td align="left">Samoan</td> + + <td align="center">UR</td> + + <td align="left">Urdu</td> + </tr> + + <tr> + <td align="center">ZH</td> + + <td align="left">Chinese</td> + + <td align="center">KS</td> + + <td align="left">Kashmiri</td> + + <td align="center">SG</td> + + <td align="left">Sangho</td> + + <td align="center">UZ</td> + + <td align="left">Uzbek</td> + </tr> + + <tr> + <td align="center">CO</td> + + <td align="left">Corsican</td> + + <td align="center">KK</td> + + <td align="left">Kazakh</td> + + <td align="center">GD</td> + + <td align="left">Scots Gaelic</td> + + <td align="center">VI</td> + + <td align="left">Vietnamese</td> + </tr> + + <tr> + <td align="center">HR</td> + + <td align="left">Croatian</td> + + <td align="center">RW</td> + + <td align="left">Kinyarwanda</td> + + <td align="center">SR</td> + + <td align="left">Serbian</td> + + <td align="center">VO</td> + + <td align="left">Volapuk</td> + </tr> + + <tr> + <td align="center">CS</td> + + <td align="left">Czech</td> + + <td align="center">KY</td> + + <td align="left">Kirghiz</td> + + <td align="center">ST</td> + + <td align="left">Sesotho</td> + + <td align="center">CY</td> + + <td align="left">Welsh</td> + </tr> + + <tr> + <td align="center">DA</td> + + <td align="left">Danish</td> + + <td align="center">RN</td> + + <td align="left">Kirundi</td> + + <td align="center">TN</td> + + <td align="left">Setswana</td> + + <td align="center">WO</td> + + <td align="left">Wolof</td> + </tr> + + <tr> + <td align="center">NL</td> + + <td align="left">Dutch</td> + + <td align="center">KO</td> + + <td align="left">Korean</td> + + <td align="center">SN</td> + + <td align="left">Shona</td> + + <td align="center">XH</td> + + <td align="left">Xhosa</td> + </tr> + + <tr> + <td align="center">EO</td> + + <td align="left">Esperanto</td> + + <td align="center">KU</td> + + <td align="left">Kurdish</td> + + <td align="center">SD</td> + + <td align="left">Sindhi</td> + + <td align="center">YI</td> + + <td align="left">Yiddish</td> + </tr> + + <tr> + <td align="center">ET</td> + + <td align="left">Estonian</td> + + <td align="center">LO</td> + + <td align="left">Laothian</td> + + <td align="center">SI</td> + + <td align="left">Singhalese</td> + + <td align="center">YO</td> + + <td align="left">Yoruba</td> + </tr> + + <tr> + <td align="center">FO</td> + + <td align="left">Faroese</td> + + <td align="center">LV</td> + + <td align="left">Latvian</td> + + <td align="center">SS</td> + + <td align="left">Siswati</td> + + <td align="center">ZA</td> + + <td align="left">Zhuang</td> + </tr> + + <tr> + <td align="center">FJ</td> + + <td align="left">Fiji</td> + + <td align="center">LN</td> + + <td align="left">Lingala</td> + + <td align="center">SK</td> + + <td align="left">Slovak</td> + + <td align="center">ZU</td> + + <td align="left">Zulu</td> + </tr> + + <tr> + <td align="center">FI</td> + + <td align="left">Finnish</td> + + <td align="center">LT</td> + + <td align="left">Lithuanian</td> + + <td align="center">SL</td> + + <td align="left">Slovenian</td> + + <td align="center">FR</td> + + <td align="left">French</td> + </tr> + + <tr> + <td align="center">MK</td> + + <td align="left">Macedonian</td> + + <td align="center">SO</td> + + <td align="left">Somali</td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + + <td class="auto-generated"> </td> + </tr> + </tbody> + </table> + </div> + </li> + + <li> + <p>It defines special primitive operations, if + appropriate.</p> + + <p>For example, right-to-left typesetting + primitives are necessary only for languages like + Hebrew<a id="id2901991" class="indexterm" + name="id2901991"></a> which are typeset + right-to-left.</p> + </li> + </ul> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2902005" + name="id2902005"></a>Printing the Result</h3> + </div> + </div> + + <p>The Computer Modern Fonts<a id="id2902014" + class="indexterm" name="id2902014"></a> are insufficient + for typesetting languages other than English. In order to + overcome this difficulty, the TeX User's Group has + extended the Computer Modern encoding vector and + established a new standard.</p> + + <p>The new standard fonts are known variously as the Cork + fonts<a id="id2902035" class="indexterm" + name="id2902035"></a><a id="id2902042" class="indexterm" + name="id2902042"></a>, the DC fonts<a id="id2902053" + class="indexterm" name="id2902053"></a><a id="id2902060" + class="indexterm" name="id2902060"></a>, and the EC + fonts<a id="id2902072" class="indexterm" + name="id2902072"></a><a id="id2902079" class="indexterm" + name="id2902079"></a>. These are all synonymous. The new + standard was created following discussions at the TeX + User's Group meeting in Cork, Ireland in 1990, hence the + name Cork. The MetaFont fonts<a id="id2902090" + class="indexterm" name="id2902090"></a><a id="id2902104" + class="indexterm" name="id2902104"></a>, which embody + this encoding, will eventually become the EC fonts. The + current versions, available now, are still being refined + (in the sense that some of the letter forms are being + refined; the encoding will not change). These are called + the DC fonts.</p> + + <p>There is a distinction between the standard encoding + vector and the MetaFont fonts that replace Computer + Modern. Therefore, I will refer to the standard encoding + as the “Cork Encoding<a id="id2902133" + class="indexterm" name="id2902133"></a>” and to the + MetaFont fonts as the “DC fonts”.<sup>[<a + id="id2902146" name="id2902146" + href="#ftn.id2902146">92</a>]</sup></p> + + <p>At the time of this writing, the DC fonts are not a + complete superset of Computer Modern because the DC Math + fonts have not yet been released. (The DC fonts<a + id="id2902163" class="indexterm" name="id2902163"></a><a + id="id2902173" class="indexterm" name="id2902173"></a> + will contain the upper-case Greek<a id="id2902185" + class="indexterm" name="id2902185"></a> alphabet, which + is currently missing from the DC fonts.) When the DC Math + fonts are released, the DC fonts will be a complete + superset of Computer Modern. The only apparent difference + will be that the accents on the DC fonts are not at + exactly the same height as the accented characters + constructed with the \accent primitive using Computer + Modern.<sup>[<a id="id2902200" name="id2902200" + href="#ftn.id2902200">93</a>]</sup></p> + + <p>The Cork Encoding is shown in Table <a + href="apb.html#tab.font.corkencoding" + title="Table B.3. The Cork Font Encoding">Table B.3</a> + in Appendix <a href="apb.html" + title="Appendix B. Font Samples">Appendix B</a>, + <span class="emphasis"><em><a href="apb.html" + title="Appendix B. Font Samples">Appendix B</a></em></span>. + There are 255 symbols in this vector with one blank for + special purposes. Unlike the Computer Modern fonts, which + have different encoding vectors in some typefaces + (Computer Modern Roman is not the same as Computer Modern + Typewriter, for example), all of the DC fonts have the + same encoding vector.</p> + + <p>Several people have commented that the Cork Encoding + suffers from a “design error” because it + places characters in positions 0-31, which are frequently + inaccessible in other applications, and because it places + a nonstandard character at position 32, where a space + usually occurs. This is not a design error. Bear in mind + that the DC fonts are designed to be TeX output fonts. + Font creators, working in other environments (for + example, TrueType or PostScript) are free to divide the + Cork Encoding into two separate font files and provide a + virtual font for TeX that establishes the correct + encoding. The motivation for putting as many symbols as + possible in a single font is that TeX cannot kern<a + id="id2902271" class="indexterm" name="id2902271"></a> + across fonts.</p> + + <p>This is not meant to imply that the DC fonts should + always be virtual<a id="id2902285" class="indexterm" + name="id2902285"></a><a id="id2902295" class="indexterm" + name="id2902295"></a><a id="id2902302" class="indexterm" + name="id2902302"></a>. In fact, the DC fonts should be + the “real” fonts upon which virtual fonts are + based. A virtual Computer Modern font based upon the real + DC fonts is infinitely preferable to a virtual DC font + built on Computer Modern because:</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>You need a “real” font to make + virtual fonts, and the Computer Modern fonts don't + contain enough <span + class="emphasis"><em>real</em></span> + characters.</p> + </li> + + <li> + <p>Expressing accented characters in MetaFont is + much better than building accents inside a virtual + font. The virtual font has less information to work + with (it has only boxes).</p> + </li> + + <li> + <p>Different languages use accents at different + heights. A simple “patch” to the + MetaFont code for a real font with accents is far + superior to introducing another set of virtual + fonts for every language.</p> + </li> + </ul> + </div> + + <p>From a purely practical point of view, the correct way + to deal with these and related problems is to use the + babel style files.</p> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h2 class="title" style="clear: both"><a id="sec.babel" + name="sec.babel"></a>The Babel Styles</h2> + </div> + </div> + + <p>The babel styles<a id="id2902395" class="indexterm" + name="id2902395"></a><a id="id2902402" class="indexterm" + name="id2902402"></a> are a collection of style files for + LaTeX that provide features for typesetting in many + languages. The babel styles are compatible with Plain TeX + and all versions of LaTeX. (In particular, they are being + adopted as the standard multilingual styles in LaTeX2e and + will be the standard in LaTeX3 when it is released.)</p> + + <p>To date, babel styles exist for Catalan, Croatian, + Cyrillic, Czech, Danish, Dutch, English, Esperanto, + Finnish, French, Galician, German, Italian, Hungarian, + Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, + Slovenian, Spanish, Swedish, and Turkish, as well as + several dialects (American as a dialect of English, for + example).</p> + + <p>Example <a href="ch07.html#ex.usinglangs" + title="Example 7.1. {A Sample Multilingual Document Using English and French}"> + Example 7.1</a> shows the skeletal structure of a + document using the English and French styles. Within the + document, the \selectlanguage control sequence is used to + switch between languages.<sup>[<a id="id2890568" + name="id2890568" href="#ftn.id2890568">94</a>]</sup> The + language that is in effect by default is determined when + the format file is created.</p> + + <div class="example"> + <a id="ex.usinglangs" name="ex.usinglangs"></a> + + <p class="title"><b>Example 7.1. {A Sample + Multilingual Document Using English and French}</b></p> +<pre class="screen"> +\documentstyle[english,francais]{article} +\begin{document} +This is a document which uses both English and +French. \selectlanguage{french} Mais, je ne parle plus +fran\c{c}ais. \selectlanguage{english} So I won't try +to make this example very long. +\end{document} +</pre> + </div> + + <p>Selecting a language automatically has the following + effects:</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>It selects hyphenation patterns<a id="id2890625" + class="indexterm" name="id2890625"></a> for the + language. This means that paragraphs of text will be + hyphenated according to the conventions of the + language in use.<sup>[<a id="id2890639" + name="id2890639" href="#ftn.id2890639">95</a>]</sup> + Switching hyphenation patterns is possible only if + the format file being used by TeX contains + hyphenation rules for language<a id="id2890550" + class="indexterm" name="id2890550"></a>.</p> + </li> + + <li> + <p>It automatically translates the names of all the + document elements into the selected language. For + example, if you insert the \tableofcontents when + French<a id="id2890670" class="indexterm" + name="id2890670"></a> is the selected language, the + table of contents will be called the “Table des + mati\`eres” instead of “Table of + Contents.”</p> + </li> + + <li> + <p>It alters the format of the date produced by the + \today macro to fit the conventions of the selected + language. In American, \today is “January 30, + 1994”; in English it is “30th January + 1994”; and in French it is “30 janvier + 1994.”<a id="id2902752" class="indexterm" + name="id2902752"></a></p> + </li> + + <li> + <p>It defines particular typing shortcuts to make + writing the selected language more convenient for the + typist. For example, the French<a id="id2902772" + class="indexterm" name="id2902772"></a> style makes + several punctuation characters into macros so that + extra space is automatically inserted before them + according to French typographic conventions<a + id="id2902783" class="indexterm" + name="id2902783"></a>.</p> + </li> + </ul> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="sec.babelfmt" + name="sec.babelfmt"></a>Building Multilingual Babel + Formats</h3> + </div> + </div> + + <p>Building a multilingual format file<a id="id2902810" + class="indexterm" name="id2902810"></a> is very much like + building a format<a id="id2902819" class="indexterm" + name="id2902819"></a> for a single language. The only + difference is that instead of loading a single set of + hyphenation patterns (generally from a file called + <tt>hyphen.tex</tt>), you will need hyphenation patterns + for each language that you want to use. These can be + obtained from the CTAN archives in the directory + <tt>tex-archive/language/hyphenation</tt>.</p> + + <p>If you have a file called <tt>hyphen.tex</tt> on your + system, rename it. This file is distributed as part of + the standard TeX distribution and contains American + English hyphenation patterns, so <tt>ushyphen.tex</tt> is + an appropriate name.</p> + + <p>Next, create a file called <tt>language.dat</tt> that + contains one line for each language you want to use. Each + line should list the language name and the file + containing hyphenation patterns for that language. For + example, an appropriate <tt>language.dat</tt> file for + the format used to typeset Example <a + href="ch07.html#ex.usinglangs" + title="Example 7.1. {A Sample Multilingual Document Using English and French}"> + Example 7.1</a> might contain these lines:</p> +<pre class="screen"> +english ehyphen.tex +francais fr8hyph.tex +</pre> + + <p>Now, proceed to construct the format file using + iniTeX<a id="id2902920" class="indexterm" + name="id2902920"></a> according to the instructions + distributed with the format or by following the + suggestions in Chapter <a href="ch04.html" + title="Chapter 4. Macro Packages">Chapter 4</a>, + <span class="emphasis"><em><a href="ch04.html" + title="Chapter 4. Macro Packages">Chapter 4</a></em></span>. + When iniTeX complains that it cannot find + <tt>hyphen.tex</tt>, provide the alternate name + <tt>babel.hyphen</tt>. This will use + <tt>language.dat</tt> to load the appropriate hyphenation + patterns and associate them with the languages you + specified.</p> + + <div class="note" + style="margin-left: 0.5in; margin-right: 0.5in;"> + <h3 class="title">Note</h3> + + <p>The first language that you list in + <tt>language.dat</tt> will be the default language for + the format file that you create.</p> + </div> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h2 class="title" style="clear: both"><a + id="sec.asciijtex" name="sec.asciijtex"></a>TeX + Pitfalls</h2> + </div> + </div> + + <p>TeX 3.x, the Cork Encoding<a id="id2903012" + class="indexterm" name="id2903012"></a>, and + language-specific macro files are not “magic + bullets” that can solve all of the problems that + arise in typesetting multilingual documents or writing + macros that are useful in all language contexts. Some of + the deficiencies are really insoluble without changing the + TeX program in ways that are not allowed by Knuth. Two such + problems are mentioned here:</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>The \uppercase and \lowercase primitives are + problematic.</p> + + <p>There is a strict one-to-one mapping between + lowercase and uppercase letters in TeX. + Unfortunately, accented letters may require different + mappings. Consider these examples:</p> +<pre class="screen"> +<para> \begin{tabular}{lll} + <literal>\"I with two dots</literal> & \"I with two dots & What you typed \\ + <literal>\"i with two dots</literal> & \"i with two dots & Result of \lowercase \\ + <literal>\"\i with two dots</literal> & \"\i with two dots & Correct lowercase + \end{tabular} +</pre> + + <p>Because no information about the accent is known, + the result of passing your text to the \lowercase + primitive is not correct.</p> + + <p>This problem can be minimized by using an input + character set which contains the accented letters + that you need. This allows you to establish the + appropriate one-to-one relationships.</p> + + <p>Some of the characters chosen for the Cork + encoding were driven by this weakness as well. The + only reason that “{\dcr\char"DF}” is a + glyph is so that it can be the \uppercase character + for “{\dcr\char"FF}.”</p> + + <p>TeX doesn't distinguish between a dash used in a + compound word (for example, + “wish-fulfillment”) and a dash used for + hyphenation.</p> + + <p>This distinction isn't necessary in English + because English doesn't have any end-of-word + ligatures<a id="id2903112" class="indexterm" + name="id2903112"></a>. Imagine a language where + “sh” should become “x” at the + end of a word.<sup>[<a id="id2903130" + name="id2903130" href="#ftn.id2903130">96</a>]</sup> + A compound word like “push-ready” should + be typeset “pux-ready” whereas a word + like “pushover” should remain + “push-over” if it is hyphenated across a + line break.</p> + </li> + </ul> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h2 class="title" style="clear: both"><a id="id2903161" + name="id2903161"></a>Very Complex Languages</h2> + </div> + </div> + + <p>The following sections describe TeX packages + (collections of macros, fonts, and other files) that allow + you to typeset languages very different from English.</p> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2903174" + name="id2903174"></a>Japanese</h3> + </div> + </div> + + <p>Typesetting Japanese<a id="id2903183" + class="indexterm" name="id2903183"></a> involves solving + several problems. The first is the task of entering + Japanese text with an editor. There are many editors on + many platforms that can handle Japanese input. Although + there are also established ways to romanize Japanese text + so that it can be displayed on terminals that do not + provide support for Japanese input, these are bound to be + inconvenient for anyone seriously writing in Japanese. If + you are in a position to edit Japanese text, you are + probably already aware of several good editors.</p> + + <p>The second problem is that typesetting Japanese with + TeX requires many, many fonts. The fact that a single + font can hold no more than 256 symbols means that dozens + (perhaps hundreds) of fonts are required to represent all + of the myriad symbols used in everyday Japanese writing. + There are some hard-coded limits on the number of fonts + that a single TeX document can use, and it is possible to + bump into them pretty quickly when typesetting a language + like Japanese.</p> + + <p>Another problem is printing the output. Assembling a + collection of fonts that contain high-quality glyphs for + all of the necessary characters is a time consuming and + potentially expensive task. At present, the + freely-available fonts are of relatively low quality.</p> + + <p>A complete discussion of these issues, and many others + can be found in <span class="emphasis"><em>Understanding + Japanese Information Processing</em></span> [<a + href="bi01.html#kl:japinfoproc">kl:japinfoproc</a>].</p> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="id2903244" + name="id2903244"></a>ASCII Nihongo TeX</h4> + </div> + </div> + + <p>ASCII Nihongo TeX<a id="id2903253" class="indexterm" + name="id2903253"></a><a id="id2903264" + class="indexterm" name="id2903264"></a> (also known as + \jtex<a id="id2903278" class="indexterm" + name="id2903278"></a>) is a complete, Japanized version + of TeX. Instead of trying to shoehorn Japanese into + traditional TeX programs, all of the programs have been + modified to accept files containing standard Japanese + text (two bytes per character). This section describes + the ASCII Corporation<a id="id2903294" + class="indexterm" name="id2903294"></a>'s version of + \jtex. See the section called “<a + href="ch07.html#sec.nttjtex" title="NTT \jtex">the + section called “NTT \jtex”</a>” for + information about NTT's version of \jtex. You can get + the ASCII version of \jtex from + <tt>ftp.ascii.co.jp</tt> (133.152.1.1).</p> + + <p>ASCII Nihongo TeX is based on TeX 2.9 and can read + input files coded with JIS, Shift-JIS, EUC, and KUTEN. + The <tt>DVI</tt> files produced by ASCII \jtex are not + standard <tt>DVI</tt> files. In order to support the + large character set for Japanese writing, the + <tt>DVI</tt> files use commands that are not output by + standard TeX, so many drivers do not support them. You + cannot process <tt>DVI</tt> files produced by ASCII + \jtex with most standard DVI drivers.</p> + + <p>Release notes with version 1.7 of \jtex indicate + that it will be the last public release of \jtex. + Another product, called pTeX (for Publishing TeX) may + be released at some time in the future. One advantage + of pTeX will be the ability to typeset vertically.</p> + + <p>The primary disadvantage of the \jtex system is that + there are no freely-available fonts for it. The authors + assume that you will be using fonts resident in your + printer. You may be able to purchase Japanese fonts + from some font vendors, although I've seen no detailed + instructions for using them with \jtex. Other, albeit + more minor, disadvantages are the need to build and + maintain an entire parallel TeX distribution and the + fact that standard <tt>DVI</tt> drivers cannot process + \jtex <tt>DVI</tt> files.</p> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="sec.nttjtex" + name="sec.nttjtex"></a>NTT \jtex</h4> + </div> + </div> + + <p>\jtex\index{NTT jtex@NTT \jtex}<a id="id2903430" + class="indexterm" name="id2903430"></a> is a complete, + Japanized version of TeX. Instead of trying to shoehorn + Japanese into traditional TeX programs, all of the + programs have been modified to accept files containing + standard Japanese text (two bytes per character). This + section describes NTT's version of \jtex. See the + section called “<a href="ch07.html#sec.asciijtex" + title="TeX Pitfalls">the section called “TeX + Pitfalls”</a>” for information about ASCII + Corporation's version of \jtex. You can get the NTT + version of \jtex from <tt>ftp.math.metro-u.ac.jp</tt> + (133.86.76.25)</p> + + <p>NTT \jtex is based on TeX 3.14 and can read input + files coded with JIS, Shift-JIS, and EUC. In addition + to support for commercial Japanese fonts, NTT \jtex + includes a set of fonts generated from 24x24 dot + bitmaps (JIS C-6234). Unlike ASCII \jtex, NTT produces + standard <tt>DVI</tt> files.</p> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="id2903490" + name="id2903490"></a>Poor Man's Japanese TeX</h4> + </div> + </div> + + <p>Poor Man's Japanese TeX (\,\pmj)<a id="id2903500" + class="indexterm" name="id2903500"></a><a + id="id2903512" class="indexterm" name="id2903512"></a> + is a freely-available Japanese typesetting system that + sits on top of standard TeX. The Japanese sections of + the input file must use the Shift-JIS encoding; a + conversion program is supplied to convert JIS encoded + input files into Shift-JIS. If you use another + encoding, such as EUC<a id="id2903531" + class="indexterm" name="id2903531"></a>, you will have + to find some way to convert it into Shift-JIS before + you can use \pmj.</p> + + <p>\pmj solves the font problem in a clever way: + MetaFont outlines for Japanese characters are + mechanically produced from freely-available bitmaps. + This results in relatively low quality characters, but + at least they're free!</p> + + <p>The Paulownia Court, the opening passage from the + 800-year-old novel <span class="emphasis"><em>The Tale + of the Genji</em></span>, is shown in Figure <a + href="ch07.html#fig.pmj" + title="Figure 7.2. Poor Man's Japanese">Figure 7.2</a>. + This sample was typeset by \pmj.</p> + + <div class="figure"> + <a id="fig.pmj" name="fig.pmj"></a> + + <p class="title"><b>Figure 7.2. Poor Man's + Japanese</b></p> + + <div class="mediaobject"> + <img src="pgenji.eps" /> + </div> + </div> + + <p>The \pmj documentation lists the following + advantages and disadvantages:</p> + + <p>\pmj Advantages</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>It is available now.</p> + </li> + + <li> + <p>It is free.</p> + </li> + + <li> + <p>It works with standard TeX.</p> + </li> + + <li> + <p>It is device independent, but has relatively + poor quality fonts. The relative lack of quality + is magnified by higher resolution output devices, + unfortunately.</p> + </li> + + <li> + <p>It uses a set of free fonts mechanically + produced from bitmaps.</p> + </li> + </ul> + </div> + + <p>\pmj Disadvantages</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>It is somewhat crude and unlikely to be + improved upon to any great extent.</p> + </li> + + <li> + <p>It uses low quality fonts.</p> + </li> + + <li> + <p>It requires a large number of fonts and as a + result, lots of disk space.</p> + </li> + + <li> + <p>It provides no access to slanted, bold, or + other Japanese type-styles.</p> + </li> + + <li> + <p>It cannot typeset vertically.</p> + </li> + + <li> + <p>It may take days to build the required + fonts.</p> + </li> + </ul> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="id2903726" + name="id2903726"></a>\jemtex</h4> + </div> + </div> + + <p>\jemtex<a id="id2903735" class="indexterm" + name="id2903735"></a><a id="id2903745" + class="indexterm" name="id2903745"></a> is a lot like + \pmj; it uses fonts constructed from a collection of + 24x24 dot bitmaps. The \jemtex font maker includes a + number of options for tailoring the appearance of the + characters.</p> + + <p>A sample of Japanese typeset with \jemtex is shown + in Figure <a href="ch07.html#fig.jemtex" + title="Figure 7.3. \jemtex sample">Figure 7.3</a>.</p> + + <div class="figure"> + <a id="fig.jemtex" name="fig.jemtex"></a> + + <p class="title"><b>Figure 7.3. \jemtex + sample</b></p> + + <div class="mediaobject"> + <img src="jgenji.eps" /> + </div> + </div> + + <p>\jemtex takes a very different approach to + processing Japanese text. Instead of providing TeX + macros to interpret two-byte Japanese symbols in the + input file, \jemtex provides a preprocessor which + translates the Japanese input into equivalent TeX + input. The preprocessor understands EUC<a + id="id2903810" class="indexterm" name="id2903810"></a> + and Shift-JIS input files.</p> + + <p>Using a preprocessor has several advantages:</p> + + <div class="itemizedlist"> + <ul type="disc"> + <li> + <p>TeX can process the files very quickly. + Because the input files are not edited by hand, + they are designed to be processed quickly by TeX + rather than by human eyes.</p> + </li> + + <li> + <p>Only the fonts that are actually used must be + loaded. A system like \pmj must load all of the + Japanese fonts because it does not know which + ones will actually be used. \jemtex knows exactly + which fonts are required for each document.</p> + </li> + + <li> + <p>The preprocessor can handle subtle spacing + issues automatically.</p> + </li> + + <li> + <p>The preprocessor can provide discretionary + hyphens for TeX, thereby allowing TeX to + hyphenate Japanese correctly.</p> + </li> + </ul> + </div> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2903882" + name="id2903882"></a>Chinese</h3> + </div> + </div> + + <p>The general problems that apply to Japanese + typesetting also apply to Chinese.</p> + + <div class="section"> + <div class="titlepage"> + <div> + <h4 class="title"><a id="id2903893" + name="id2903893"></a>Poor Man's Chinese TeX</h4> + </div> + </div> + + <p>Poor Man's Chinese TeX (\pmc)<a id="id2903902" + class="indexterm" name="id2903902"></a> <a + id="id2903916" class="indexterm" name="id2903916"></a> + <a id="id2903924" class="indexterm" + name="id2903924"></a> <a id="id2903939" + class="indexterm" name="id2903939"></a> is closely + related to \pmj. The Chinese input files should be + encoded with 8-bit GB encoding (GB 2312-80). If you use + another encoding, you will have to convert it into the + 8-bit GB encoding before you can use \pmc.</p> + + <p>The \pmc package uses the same technique as \pmj to + construct Chinese fonts. The relative advantages and + disadvantages of \pmj apply equally to \pmc.</p> + + <p>Two sets of Chinese characters are available: + traditional and simplified.</p> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2903985" + name="id2903985"></a>Arabic</h3> + </div> + </div> + + <p>Typesetting in Arabic<a id="id2904001" + class="indexterm" name="id2904001"></a> can be + accomplished with the \arabTeX<a id="id2904010" + class="indexterm" name="id2904010"></a> package. \arabTeX + includes a complete set of fonts and macros for producing + documents in Persian, Arabic, and related scripts. An + example of Arabic is shown in Figure <a + href="ch07.html#fig.flang.arab" + title="Figure 7.4. Arabic text typeset with ArabTeX"> + Figure 7.4</a> on page <a + href="ch07.html#fig.flang.arab" + title="Figure 7.4. Arabic text typeset with ArabTeX"> + Figure 7.4</a>.</p> + + <div class="figure"> + <a id="fig.flang.arab" name="fig.flang.arab"></a> + + <p class="title"><b>Figure 7.4. Arabic text + typeset with ArabTeX</b></p> + + <div class="mediaobject"> + <img src="arab.eps" /> + </div> + </div> + </div> + + <div class="section"> + <div class="titlepage"> + <div> + <h3 class="title"><a id="id2904076" + name="id2904076"></a>Hebrew</h3> + </div> + </div> + + <p>Typesetting left-to-right Hebrew<a id="id2904085" + class="indexterm" name="id2904085"></a> (or occasional + Hebrew words in an English document) is relatively easy. + The required fonts and TeX macros are available from + \path|noa.huji.ac.il| and on the CTAN archives in + <tt>language/hebrew</tt>.<sup>[<a id="id2904109" + name="id2904109" href="#ftn.id2904109">97</a>]</sup></p> + + <p>Typesetting right-to-left Hebrew is more complicated. + First, you will need an editor that handles right-to-left + text entry, preferably one that displays Hebrew text.</p> + + <p>After you have constructed a document that uses + right-to-left Hebrew, you will need a special version of + TeX, called \XeT<a id="id2904128" class="indexterm" + name="id2904128"></a>, to process it. \XeT is a version + of TeX that understands right-to-left typesetting.</p> + + <p>Early versions of \XeT, called TeX-\XeT<a + id="id2904148" class="indexterm" name="id2904148"></a>, + produced nonstandard <tt>DVI</tt> files called + <tt>IVD</tt> files<a id="id2904178" class="indexterm" + name="id2904178"></a>. If you use TeX-\XeT, a special + program called <b>ivd2dvi</b><a id="id2904204" + class="indexterm" name="id2904204"></a> must be used to + translate the <tt>IVD</tt> files into <tt>DVI</tt> files + before they can be printed. More recently, \XeT has been + reimplemented to produce standard <tt>DVI</tt> files. The + new version is called TeX\hbox{-{}-}\XeT<a id="id2904243" + class="indexterm" name="id2904243"></a>.<sup>[<a + id="id2904255" name="id2904255" + href="#ftn.id2904255">98</a>]</sup> They are functionally + identical. You can get unix and PC versions of \XeT from + \path|noa.huji.ac.il|. An example of Hebrew is shown in + Figure <a href="ch07.html#fig.hebrew" + title="Figure 7.5. Hebrew">Figure 7.5</a> + on page <a href="ch07.html#fig.hebrew" + title="Figure 7.5. Hebrew">Figure 7.5</a>.</p> + + <div class="figure"> + <a id="fig.hebrew" name="fig.hebrew"></a> + + <p class="title"> + <b>Figure 7.5. Hebrew</b></p> + + <div class="mediaobject"> + <img src="hebrew-sample.eps" /> + </div> + </div> + </div> + </div> + + <div class="footnotes"> + <br /> + <hr width="100" align="left" /> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2890500" name="ftn.id2890500" + href="#id2890500">85</a>]</sup> {Chinese and Japanese are + also typeset vertically. At present, TeX does not support + vertical typesetting, although there is at least one + effort underway to provide that feature. See the section + called “<a href="ch07.html#sec.asciijtex" + title="TeX Pitfalls">the section called “TeX + Pitfalls”</a>” for more information on + vertical typesetting.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2899397" name="ftn.id2899397" + href="#id2899397">86</a>]</sup> {The accent macros are + shown with a lower case e; naturally, any letter that + needs to be accented can be used in place of the e.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2899840" name="ftn.id2899840" + href="#id2899840">87</a>]</sup> {These characters are + available in the DC fonts and were not previously + available in standard TeX.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2900193" name="ftn.id2900193" + href="#id2900193">88</a>]</sup> {<tt>isolatin1.sty</tt> + is available from the CTAN archives in + <tt>macros/latex/contrib/misc/</tt>.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2900241" name="ftn.id2900241" + href="#id2900241">89</a>]</sup> {If you use electronic + mail to send files that use any characters other than the + printable subset of 7-bit ASCII (space through tilde), + you are bound to run into problems. You can combat this + problem by using a wrapper (like uuencoding or MIME + messages) when you send the mail, but those tools are + outside the scope of this book. Ask your system + administrator for more assistance with sending binary + mail.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2900372" name="ftn.id2900372" + href="#id2900372">90</a>]</sup> {<b>recode</b> is + available from <tt>prep.ai.mit.edu</tt> and other places + where GNU software is archived.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2900417" name="ftn.id2900417" + href="#id2900417">91</a>]</sup> {These are + “low-level” macros. A higher-level interface + will be provided for each language. See the section + called “<a href="ch07.html#sec.babel" + title="The Babel Styles">the section called “The + Babel Styles”</a>” later in this chapter for + more information.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2902146" name="ftn.id2902146" + href="#id2902146">92</a>]</sup> {Because the “EC + fonts” don't exist yet, I won't mention them + again.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2902200" name="ftn.id2902200" + href="#id2902200">93</a>]</sup> {Actually, the issue of + accents is a difficult one. Different languages which + have the same letters do not always place accents at the + same height. This is yet another problem that will have + to be resolved.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2890568" name="ftn.id2890568" + href="#id2890568">94</a>]</sup> {Another control + sequence, <tt>\ iflanguage</tt>, is provided so that you + can write macros which are sensitive to the language in + use when they are expanded.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2890639" name="ftn.id2890639" + href="#id2890639">95</a>]</sup> {Paragraphs that contain + multiple languages will be hyphenated according to the + rules of the language in effect when the paragraph + ends.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2903130" name="ftn.id2903130" + href="#id2903130">96</a>]</sup> {This is a concocted + example; to my knowledge, it doesn't actually appear in + any language.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2904109" name="ftn.id2904109" + href="#id2904109">97</a>]</sup> {At the time of this + writing, the material at \path|noa.huji.ac.il| is more + up-to-date than the material in the CTAN archives.}</p> + </div> + + <div class="footnote"> + <p><sup>[<a id="ftn.id2904255" name="ftn.id2904255" + href="#id2904255">98</a>]</sup> {Yes, the only difference + between the names really is the number of hyphens!}</p> + </div> + </div> + </div> + + <div class="navfooter"> + <table width="100%" summary="Navigation table"> + <tr> + <td width="40%" align="left"><a + title="Chapter 6. Pictures and Figures" + href="ch06.html"><img src="figures/nav-prev.png" + alt="Prev" border="0" /></a> </td> + + <td width="20%" align="center"><a title="Making TeX Work" + href="index.html"><img src="figures/nav-home.png" + alt="Home" border="0" /></a></td> + + <td width="40%" align="right"> <a + title="Chapter 8. Printing" + href="ch08.html"><img src="figures/nav-next.png" + alt="Next" border="0" /></a></td> + </tr> + + <tr> + <td width="40%" align="left"> + Chapter 6. Pictures and Figures </td> + + <td width="20%" align="center"><a + title="Part II. Elements of a Complex Document" + href="pt02.html"><img src="figures/nav-up.png" alt="Up" + border="0" /></a></td> + + <td width="40%" align="right"> +  Chapter 8. Printing</td> + </tr> + </table> + </div> + </body> +</html> + |