diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /info/beginlatex/html |
Initial commit
Diffstat (limited to 'info/beginlatex/html')
127 files changed, 29144 insertions, 0 deletions
diff --git a/info/beginlatex/html/23-part.png b/info/beginlatex/html/23-part.png Binary files differnew file mode 100644 index 0000000000..c7b13e0d6b --- /dev/null +++ b/info/beginlatex/html/23-part.png diff --git a/info/beginlatex/html/55-1L-part.png b/info/beginlatex/html/55-1L-part.png Binary files differnew file mode 100644 index 0000000000..a84c5694af --- /dev/null +++ b/info/beginlatex/html/55-1L-part.png diff --git a/info/beginlatex/html/abiword.png b/info/beginlatex/html/abiword.png Binary files differnew file mode 100644 index 0000000000..242a7a653e --- /dev/null +++ b/info/beginlatex/html/abiword.png diff --git a/info/beginlatex/html/appendix.html b/info/beginlatex/html/appendix.html new file mode 100644 index 0000000000..025f247343 --- /dev/null +++ b/info/beginlatex/html/appendix.html @@ -0,0 +1,686 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:03:11--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Appendix D — GNU Free Documentation License</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Appendix D — GNU Free Documentation License</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class="current"><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="gfdl">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">D</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>GNU Free Documentation License</h1> + <h2>Version 1.2, November 2002</h2> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#gfdl-0">PREAMBLE</a></li> + <li><a href="#gfdl-1">APPLICABILITY AND DEFINITIONS</a></li> + <li><a href="#gfdl-2">VERBATIM COPYING</a></li> + <li><a href="#gfdl-3">COPYING IN QUANTITY</a></li> + <li><a href="#gfdl-4">MODIFICATIONS</a></li> + <li><a href="#gfdl-5">COMBINING DOCUMENTS</a></li> + <li><a href="#gfdl-6">COLLECTIONS OF DOCUMENTS</a></li> + <li><a href="#gfdl-7">AGGREGATION WITH INDEPENDENT + WORKS</a></li> + <li><a href="#gfdl-8">TRANSLATION</a></li> + <li><a href="#gfdl-9">TERMINATION</a></li> + <li><a href="#gfdl-10">FUTURE REVISIONS OF THIS + LICENSE</a></li> + <li><a href="#gfdl-addendum">ADDENDUM: How to use this License + for your documents</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <blockquote class="citation"><a name="K43"> </a><p>Copyright (C) 2000,2001,2002 Free Software Foundation, + Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not + allowed. + </p> + </blockquote> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.1 <a name="gfdl-0">PREAMBLE</a></h2> + <p>The purpose of this License is to make a manual, textbook, + or other functional and useful document ‘free’ in + the sense of freedom: to assure everyone the effective freedom + to copy and redistribute it, with or without modifying it, + either commercially or noncommercially. Secondarily, this + License preserves for the author and publisher a way to get + credit for their work, while not being considered responsible + for modifications made by others. + </p> + <p>This License is a kind of ‘copyleft’, which + means that derivative works of the document must themselves be + free in the same sense. It complements the GNU General Public + License, which is a copyleft license designed for free + software. + </p> + <p>We have designed this License in order to use it for + manuals for free software, because free software needs free + documentation: a free program should come with manuals + providing the same freedoms that the software does. But this + License is not limited to software manuals; it can be used for + any textual work, regardless of subject matter or whether it + is published as a printed book. We recommend this License + principally for works whose purpose is instruction or + reference. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.2 <a name="gfdl-1">APPLICABILITY AND DEFINITIONS</a></h2> + <p><a name="gfdl-doc"></a>This License applies to any manual or other + work, in any medium, that contains a notice placed by the + copyright holder saying it can be distributed under the terms + of this License. Such a notice grants a world-wide, + royalty-free license, unlimited in duration, to use that work + under the conditions stated herein. The + ‘Document’, below, refers to any such manual or + work. Any member of the public is a licensee, and is + addressed as ‘you’. You accept the license if + you copy, modify or distribute the work in a way requiring + permission under copyright law. + </p> + <p><a name="gfdl-mod-ver"></a>A ‘Modified Version’ of the + Document means any work containing the Document or a portion + of it, either copied verbatim, or with modifications and/or + translated into another language. + </p> + <p><a name="gfdl-secnd-sect"></a>A ‘Secondary Section’ is + a named appendix or a front-matter section of the Document + that deals exclusively with the relationship of the publishers + or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that + could fall directly within that overall subject. (Thus, if + the Document is in part a textbook of mathematics, a Secondary + Section may not explain any mathematics.) The relationship + could be a matter of historical connection with the subject or + with related matters, or of legal, commercial, philosophical, + ethical or political position regarding them. + </p> + <p><a name="gfdl-inv-sect"></a>The ‘Invariant Sections’ + are certain Secondary Sections whose titles are designated, as + being those of Invariant Sections, in the notice that says + that the Document is released under this License. If a + section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document + may contain zero Invariant Sections. If the Document does not + identify any Invariant Sections then there are none. + </p> + <p><a name="gfdl-cov-text"></a>The ‘Cover Texts’ are + certain short passages of text that are listed, as Front-Cover + Texts or Back-Cover Texts, in the notice that says that the + Document is released under this License. A Front-Cover Text + may be at most 5 words, and a Back-Cover Text may be at most + 25 words. + </p> + <p><a name="gfdl-transparent"></a>A ‘Transparent’ copy of + the Document means a machine-readable copy, represented in a + format whose specification is available to the general public, + that is suitable for revising the document straightforwardly + with generic text editors or (for images composed of pixels) + generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in + an otherwise Transparent file format whose markup, or absence + of markup, has been arranged to thwart or discourage + subsequent modification by readers is not Transparent. An + image format is not Transparent if used for any substantial + amount of text. A copy that is not ‘Transparent’ + is called ‘Opaque’. + </p> + <p>Examples of suitable formats for Transparent copies + include plain ASCII without markup, Texinfo input format, + LaTeX input format, SGML or XML using a publicly available + DTD, and standard-conforming simple <small><a href="chapter10.html#HTML" class="acroref" name="A306" title="HyperText Markup Language">HTML</a></small>, + <a name="t43">PostScript</a> or PDF designed for human + modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats + that can be read and edited only by proprietary word + processors, SGML or XML for which the DTD and/or processing + tools are not generally available, and the machine-generated + <small><a href="chapter10.html#HTML" class="acroref" name="A307" title="HyperText Markup Language">HTML</a></small>, <a name="t44">PostScript</a> or PDF produced by + some word processors for output purposes only. + </p> + <p><a name="gfdl-title-page"></a>The ‘Title Page’ means, + for a printed book, the title page itself, plus such following + pages as are needed to hold, legibly, the material this + License requires to appear in the title page. For works in + formats which do not have any title page as such, ‘Title + Page’ means the text near the most prominent + appearance of the work's title, preceding the beginning + of the body of the text. + </p> + <p><a name="gfdl-entitled"></a>A section ‘Entitled XYZ’ + means a named subunit of the Document whose title either is + precisely XYZ or contains XYZ in parentheses following text + that translates XYZ in another language. (Here XYZ stands for + a specific section name mentioned below, such as + ‘Acknowledgements’, ‘Dedications’, + ‘Endorsements’, or ‘History’.) To + ‘Preserve the Title’ of such a section when you + modify the Document means that it remains a section + ‘Entitled XYZ’ according to this + definition. + </p> + <p>The Document may include Warranty Disclaimers next to the + notice which states that this License applies to the Document. + These Warranty Disclaimers are considered to be included by + reference in this License, but only as regards disclaiming + warranties: any other implication that these Warranty + Disclaimers may have is void and has no effect on the meaning + of this License. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.3 <a name="gfdl-2">VERBATIM COPYING</a></h2> + <p>You may copy and distribute the Document in any medium, + either commercially or noncommercially, provided that this + License, the copyright notices, and the license notice saying + this License applies to the Document are reproduced in all + copies, and that you add no other conditions whatsoever to + those of this License. You may not use technical measures to + obstruct or control the reading or further copying of the + copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a + large enough number of copies you must also follow the + conditions in section 3. + + </p> + <p>You may also lend copies, under the same conditions stated + above, and you may publicly display copies. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.4 <a name="gfdl-3">COPYING IN QUANTITY</a></h2> + <p>If you publish printed copies (or copies in media that + commonly have printed covers) of the Document, numbering more + than 100, and the Document's license notice requires + Cover Texts, you must enclose the copies in covers that carry, + clearly and legibly, all these Cover Texts: Front-Cover Texts + on the front cover, and Back-Cover Texts on the back cover. + Both covers must also clearly and legibly identify you as the + publisher of these copies. The front cover must present the + full title with all words of the title equally prominent and + visible. You may add other material on the covers in + addition. Copying with changes limited to the covers, as long + as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other + respects. + </p> + <p>If the required texts for either cover are too voluminous + to fit legibly, you should put the first ones listed (as many + as fit reasonably) on the actual cover, and continue the rest + onto adjacent pages. + </p> + <p>If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, + or state in or with each Opaque copy a computer-network + location from which the general network-using public has + access to download using public-standard network protocols a + complete Transparent copy of the Document, free of added + material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of + Opaque copies in quantity, to ensure that this Transparent + copy will remain thus accessible at the stated location until + at least one year after the last time you distribute an Opaque + copy (directly or through your agents or retailers) of that + edition to the public. + </p> + <p>It is requested, but not required, that you contact the + authors of the Document well before redistributing any large + number of copies, to give them a chance to provide you with an + updated version of the Document. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.5 <a name="gfdl-4">MODIFICATIONS</a></h2> + <p>You may copy and distribute a Modified Version of the + Document under the conditions of sections 2 and 3 above, + provided that you release the Modified Version under precisely + this License, with the Modified Version filling the role of + the Document, thus licensing distribution and modification of + the Modified Version to whoever possesses a copy of it. In + addition, you must do these things in the Modified + Version: + </p> + <ol type="1"> + <li>Use in the Title Page (and on the covers, + if any) a title distinct from that of the Document, and + from those of previous versions (which should, if there + were any, be listed in the History section of the + Document). You may use the same title as a previous + version if the original publisher of that version gives + permission. + + </li> + <li>List on the Title Page, as authors, one or + more persons or entities responsible for authorship of the + modifications in the Modified Version, together with at + least five of the principal authors of the Document (all + of its principal authors, if it has fewer than five), + unless they release you from this requirement. + + </li> + <li>State on the Title page the name of the + publisher of the Modified Version, as the + publisher. + </li> + <li>Preserve all the copyright notices of the + Document. + + </li> + <li>Add an appropriate copyright notice for + your modifications adjacent to the other copyright + notices. + + </li> + <li>Include, immediately after the copyright + notices, a license notice giving the public permission to + use the Modified Version under the terms of this License, + in the form shown in the <a href="appendixD.html#gfdl-addendum" title="sect1">Addendum</a> below. + + </li> + <li>Preserve in that license notice the full + lists of Invariant Sections and required Cover Texts given + in the Document's license + notice. + </li> + <li>Include an unaltered copy of this License. + + </li> + <li>Preserve the section Entitled + ‘History’, Preserve its Title, and add to it + an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title + Page. If there is no section Entitled + ‘History’ in the Document, create one stating + the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the + Modified Version as stated in the previous sentence. + + </li> + <li>Preserve the network location, if any, + given in the Document for public access to a Transparent + copy of the Document, and likewise the network locations + given in the Document for previous versions it was based + on. These may be placed in the ‘History’ + section. You may omit a network location for a work that + was published at least four years before the Document + itself, or if the original publisher of the version it + refers to gives permission. + + </li> + <li>For any section Entitled + ‘Acknowledgements’ or + ‘Dedications’, Preserve the Title of the + section, and preserve in the section all the substance and + tone of each of the contributor acknowledgements and/or + dedications given therein. + + </li> + <li>Preserve all the Invariant Sections of the + Document, unaltered in their text and in their titles. + Section numbers or the equivalent are not considered part + of the section titles. + + </li> + <li>Delete any section Entitled + ‘Endorsements’. Such a section may not be + included in the Modified Version. + + </li> + <li>Do not retitle any existing section to be + Entitled ‘Endorsements’ or to conflict in + title with any Invariant Section. + + </li> + <li>Preserve any Warranty Disclaimers. + + </li> + </ol> + <p>If the Modified Version includes new front-matter sections + or appendices that qualify as Secondary Sections and contain + no material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do + this, add their titles to the list of Invariant Sections in + the Modified Version's license notice. These titles must + be distinct from any other section titles. + </p> + <p>You may add a section Entitled + ‘Endorsements’, provided it contains nothing but + endorsements of your Modified Version by various parties--for + example, statements of peer review or that the text has been + approved by an organization as the authoritative definition of + a standard. + </p> + <p>You may add a passage of up to five words as a Front-Cover + Text, and a passage of up to 25 words as a Back-Cover Text, to + the end of the list of Cover Texts in the Modified Version. + Only one passage of Front-Cover Text and one of Back-Cover + Text may be added by (or through arrangements made by) any one + entity. If the Document already includes a cover text for the + same cover, previously added by you or by arrangement made by + the same entity you are acting on behalf of, you may not add + another; but you may replace the old one, on explicit + permission from the previous publisher that added the old + one. + </p> + <p>The author(s) and publisher(s) of the Document do not by + this License give permission to use their names for publicity + for or to assert or imply endorsement of any Modified + Version. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.6 <a name="gfdl-5">COMBINING DOCUMENTS</a></h2> + <p>You may combine the Document with other documents released + under this License, under the terms defined in <a href="appendixD.html#gfdl-4" title="sect1">section 4</a> above for modified + versions, provided that you include in the combination all of + the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + </p> + <p>The combined work need only contain one copy of this + License, and multiple identical Invariant Sections may be + replaced with a single copy. If there are multiple Invariant + Sections with the same name but different contents, make the + title of each such section unique by adding at the end of it, + in parentheses, the name of the original author or publisher + of that section if known, or else a unique number. Make the + same adjustment to the section titles in the list of Invariant + Sections in the license notice of the combined work. + </p> + <p>In the combination, you must combine any sections Entitled + ‘History’ in the various original documents, + forming one section Entitled ‘History’; likewise + combine any sections Entitled ‘Acknowledgements’, + and any sections Entitled ‘Dedications’. You + must delete all sections Entitled + ‘Endorsements’. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.7 <a name="gfdl-6">COLLECTIONS OF DOCUMENTS</a></h2> + <p>You may make a collection consisting of the Document and + other documents released under this License, and replace the + individual copies of this License in the various documents + with a single copy that is included in the collection, + provided that you follow the rules of this License for + verbatim copying of each of the documents in all other + respects. + </p> + <p>You may extract a single document from such a collection, + and distribute it individually under this License, provided + you insert a copy of this License into the extracted document, + and follow this License in all other respects regarding + verbatim copying of that document. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.8 <a name="gfdl-7">AGGREGATION WITH INDEPENDENT + WORKS</a></h2> + <p>A compilation of the Document or its derivatives with + other separate and independent documents or works, in or on a + volume of a storage or distribution medium, is called an + ‘aggregate’ if the copyright resulting from the + compilation is not used to limit the legal rights of the + compilation's users beyond what the individual works + permit. When the Document is included an aggregate, this + License does not apply to the other works in the aggregate + which are not themselves derivative works of the + Document. + </p> + <p>If the Cover Text requirement of section 3 is applicable + to these copies of the Document, then if the Document is less + than one half of the entire aggregate, the Document's + Cover Texts may be placed on covers that bracket the Document + within the aggregate, or the electronic equivalent of covers + if the Document is in electronic form. Otherwise they must + appear on printed covers that bracket the whole + aggregate. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.9 <a name="gfdl-8">TRANSLATION</a></h2> + <p>Translation is considered a kind of modification, so you + may distribute translations of the Document under the terms of + section 4. Replacing Invariant Sections with translations + requires special permission from their copyright holders, but + you may include translations of some or all Invariant Sections + in addition to the original versions of these Invariant + Sections. You may include a translation of this License, and + all the license notices in the Document, and any Warranty + Disclaimers, provided that you also include the original + English version of this License and the original versions of + those notices and disclaimers. In case of a disagreement + between the translation and the original version of this + License or a notice or disclaimer, the original version will + prevail. + </p> + <p>If a section in the Document is Entitled + ‘Acknowledgements’, ‘Dedications’, + or ‘History’, the requirement (section 4) to + Preserve its Title (section 1) will typically require changing + the actual title. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.10 <a name="gfdl-9">TERMINATION</a></h2> + <p>You may not copy, modify, sublicense, or distribute the + Document except as expressly provided for under this License. + Any other attempt to copy, modify, sublicense or distribute + the Document is void, and will automatically terminate your + rights under this License. However, parties who have received + copies, or rights, from you under this License will not have + their licenses terminated so long as such parties remain in + full compliance. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.11 <a name="gfdl-10">FUTURE REVISIONS OF THIS + LICENSE</a></h2> + <p>The Free Software Foundation may publish new, revised + versions of the GNU Free Documentation License from time to + time. Such new versions will be similar in spirit to the + present version, but may differ in detail to address new + problems or concerns. See + http://www.gnu.org/copyleft/. + </p> + <p>Each version of the License is given a distinguishing + version number. If the Document specifies that a particular + numbered version of this License ‘or any later + version’ applies to it, you have the option of + following the terms and conditions either of that specified + version or of any later version that has been published (not + as a draft) by the Free Software Foundation. If the Document + does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.12 <a name="gfdl-addendum">ADDENDUM: How to use this License + for your documents</a></h2> + <p>To use this License in a document you have written, + include a copy of the License in the document and put the + following copyright and license notices just after the title + page: + </p> + <blockquote class="citation"><a name="K43"> </a><p> + Copyright (c) YEAR YOUR NAME. Permission is granted to + copy, distribute and/or modify this document under the terms + of the GNU Free Documentation License, Version 1.2 or any + later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no + Back-Cover Texts. A copy of the license is included in the + section entitled ‘GNU Free Documentation + License’. + + </p> + </blockquote> + <p>If you have Invariant Sections, Front-Cover Texts and + Back-Cover Texts, replace the + ‘with...Texts.’ line with this: + </p> + <blockquote class="citation"><a name="K43"> </a><p> + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover + Texts being LIST. + + </p> + </blockquote> + <p>If you have Invariant Sections without Cover Texts, or + some other combination of the three, merge those two + alternatives to suit the situation. + </p> + <p>If your document contains nontrivial examples of program + code, we recommend releasing these examples in parallel under + your choice of free software license, such as the GNU General + Public License, to permit their use in free software. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="appendixC.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="bibliography.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/appendixA.html b/info/beginlatex/html/appendixA.html new file mode 100644 index 0000000000..73981543da --- /dev/null +++ b/info/beginlatex/html/appendixA.html @@ -0,0 +1,217 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:58--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Appendix A — Configuring search paths</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Appendix A — Configuring search paths</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class="current"><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="cnf">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">A</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths + </h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p><span class="TEX">T<span class="E">E</span>X</span> systems run on a huge variety of platforms, and are + typically made up of a large number of rather small files. Some + computer operating systems have problems with packages like + this, as their built-in methods for searching for a file when + needed are poor. + </p> + <p>To get around this, <span class="TEX">T<span class="E">E</span>X</span> uses a technique borrowed from the + Unix world, based on a simple hash index for each directory they + need to look in. This is known as the ls-R database, from the + Unix command (<code class="literal">ls -R</code>) which creates it. The + program which does this for <span class="TEX">T<span class="E">E</span>X</span> is actually called after this + command: <i><a name="p285">mktexlsr</a></i>, although it may be + renamed <i><a name="p286">texhash</a></i> or something else on + your system. This is the program referred to in <a href="chapter5.html#texindex">step 4</a>. + </p> + <p>However, to know where to make these indexes, and thus where + to search, <span class="TEX">T<span class="E">E</span>X</span> needs to be told about them. In a standard + <span class="TEX">T<span class="E">E</span>X</span> installation this information is in + <code>texmf/web2c/texmf.cnf</code>. The file is similar + to a Unix shell script, but the only lines of significance for + the search paths are the following (this is how they appear in + the default Unix installation, omitting the comments): + </p> + <blockquote><pre> +TEXMFMAIN = /usr/TeX/texmf +TEXMFLOCAL = /usr/TeX/texmf-local +HOMETEXMF = $HOME/texmf +TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN} +SYSTEXMF = $TEXMF +VARTEXFONTS = /var/lib/texmf +TEXMFDBS = $TEXMF;$VARTEXFONTS + </pre></blockquote> + <p>As you can see, this defines where the main <span class="TEX">T<span class="E">E</span>X</span>/METAFONT + directory is, where the local one is, and where the user's + personal (home) one is. It then defines the order in which they + are searched, and makes this the system-wide list. A temporary + directory for bitmap fonts is set up, and added to the list, + defining the places in which <i><a name="p287">texhash</a></i> + or <i><a name="p288">mktexlsr</a></i> creates its + databases. + </p> + <p>In some installations, the local directory is set up in + <code>/usr/local/share/texmf</code> or + <code>/usr/share/texmf.local</code> or similar + variations, so you would substitute this name for + <code>/usr/TeX/texmf-local</code>. Under Microsoft + Windows, the names will be full paths such as + <code>C:\Program Files\TeXLive\texmf</code>. On an Apple + Mac, it might be <code>Hard + Disk:TeX:texmf</code>. + </p> + <p>If you edit plain-text configuration files with anything + other than a plain-text editor (e.g. a wordprocessor), or + if you edit them with a plain-text editor which has been set to + word-wrap long lines, make sure you turn line-wrapping + <em>off</em> so that any long lines are preserved in + their correct format. + </p> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter10.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="appendixB.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/appendixB.html b/info/beginlatex/html/appendixB.html new file mode 100644 index 0000000000..3e3efc5424 --- /dev/null +++ b/info/beginlatex/html/appendixB.html @@ -0,0 +1,225 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:03:02--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Appendix B — Users Group membership</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Appendix B — Users Group membership</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class="current"><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="tugform">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">B</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1><span class="TEX">T<span class="E">E</span>X</span> Users Group membership + </h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The <a name="TUG" class="acroref"><span class="TEX">T<span class="E">E</span>X</span> Users Group</a> (<small>TUG</small>) was + founded in 1980 for educational and scientific purposes: to + provide an organization for those who have an interest in + typography and font design, and are users of the <span class="TEX">T<span class="E">E</span>X</span> + typesetting system invented by Donald Knuth. + TUG is run by and for its members and represents the interests + of <span class="TEX">T<span class="E">E</span>X</span> users worldwide. + </p> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>TUG membership benefits + </h4> + <p>Members of TUG help to support and promote the use of + <span class="TEX">T<span class="E">E</span>X</span>, METAFONT, and related systems worldwide. All members + receive <cite><a href="bibliography.html#tugboat" name="C43">TUGboat</a></cite>, + the journal of the <span class="TEX">T<span class="E">E</span>X</span> Users Group, the <span class="TEX">T<span class="E">E</span>X</span> Live software + distribution (a runnable <span class="TEX">T<span class="E">E</span>X</span> system), and the <small><a href="chapter5.html#CTAN" class="acroref" name="A299" title="Comprehensive Archive Network">CTAN</a></small> software distribution (containing most + of the <small><a href="chapter5.html#CTAN" class="acroref" name="A300" title="Comprehensive Archive Network">CTAN</a></small> archive). + </p> + <p>In addition, TUG members vote in TUG elections, and + receive discounts on annual meeting fees, store purchases, and + TUG-sponsored courses. TUG membership (less benefits) is + tax-deductible, at least in the USA. See the TUG Web site for + details. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Becoming a TUG member + </h4> + <p>Please see the forms and information at <a href="http://www.tug.org/join.html"><tt>http://www.tug.org/join.html</tt></a>. You can join + online, or by filling out a paper form. The NTG (Dutch) and + UKTUG (United Kingdom) <span class="TEX">T<span class="E">E</span>X</span> user groups have joint membership + agreements with TUG whereby you can receive a discount for + joining both user groups. To do this, please join via <a href="http://www.ntg.nl/newmember.html"><tt>http://www.ntg.nl/newmember.html</tt></a> (the NTG + membership page) or <a href="http://uk.tug.org/Membership/"><tt>http://uk.tug.org/Membership/</tt></a> (the UKTUG + page), respectively, and select the option for joint + membership. + </p> + <p>Each year's membership entitles you to the software and + TUGboat produced for that year (even if it is produced in a + subsequent calendar year, as is currently the case with + TUGboat). You can order older issues of TUGboat and <span class="TEX">T<span class="E">E</span>X</span> + memorabilia through the TUG store (<a href="http://www.tug.org/store"><tt>http://www.tug.org/store</tt></a>). + </p> + <p>The current TUG membership fee is $65 (US) per year + for individuals and $35 for students and seniors. Add + $10 to the membership fee after May 31 to cover + additional shipping and processing costs. The current rate for + non-voting subscription memberships (for libraries, for + example) is $85. The current institutional rate is + $500, which includes up to seven individual + memberships. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Privacy + </h4> + <p>TUG uses your personal information only to mail you + products, publications, notices, and (for voting members) + official ballots. Also, if you give explicit agreement, we may + incorporate it into a membership directory which will be made + available only to TUG members. + </p> + <p>TUG neither sells its membership list nor provides it to + anyone outside of its own membership. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="appendixA.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="appendixC.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/appendixC.html b/info/beginlatex/html/appendixC.html new file mode 100644 index 0000000000..ca14c0185c --- /dev/null +++ b/info/beginlatex/html/appendixC.html @@ -0,0 +1,424 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:03:06--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Appendix C — The ASCII character set</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Appendix C — The ASCII character set</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class="current"><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="asciicharset">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">C</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>The ASCII character set</h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The American Standard Code for Information Interchange was + invented in 1963, and after some redevelopment settled down in + 1984 as standard X3.4 of <a name="ANSI" class="acroref">American National + Standards Institute</a> (<small>ANSI</small>). It represents the 95 basic + codes for the unaccented printable characters and punctuation of + the Latin alphabet, plus 33 internal ‘control + characters’ originally intended for the control of + computers, programs, and external devices like printers and + screens. + </p> + <p>Many other character sets (strictly speaking, + ‘character repertoires’) have been standardised for + accented Latin characters and for all other non-Latin writing + systems, but these are intended for representing the symbols + people use when writing text on computers. Most programs and + computers use <small><a href="chapter2.html#ASCII" class="acroref" name="A302" title="American Standard Code for Information Interchange">ASCII</a></small> internally for all + their coding, the exceptions being <small><a href="chapter10.html#XML" class="acroref" name="A303" title="Extensible Markup Language">XML</a></small>-based languages like <small><a href="chapter10.html#XSLT" class="acroref" name="A304" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small>, which are inherently designed to be + usable with any writing system, and a few specialist systems + like APL. + </p> + <p>Although the <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file formats can easily be + used with many other encoding systems (see the discussion of the + <span class="package"><a name="m90">inputenc</a></span> in <a href="chapter2.html#accents">section 2.7</a>), they are based on <small><a href="chapter2.html#ASCII" class="acroref" name="A305" title="American Standard Code for Information Interchange">ASCII</a></small>. It is therefore important to know + where to find <em>all</em> 95 of the printable + characters, as some of them are not often used in other + text-formatting systems. The following table shows all 128 + characters, with their decimal, octal (base-8), and hexadecimal + (base-16) code numbers. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 1</i>. <a name="asciicodes">The ASCII characters</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="right">Oct</th> + <th valign="bottom" align="center" width="56">0</th> + <th valign="bottom" align="center" width="56">1</th> + <th valign="bottom" align="center" width="56">2</th> + <th valign="bottom" align="center" width="56">3</th> + <th valign="bottom" align="center" width="56">4</th> + <th valign="bottom" align="center" width="56">5</th> + <th valign="bottom" align="center" width="56">6</th> + <th valign="bottom" align="center" width="56">7</th> + <th valign="bottom" align="left">Hex</th> + </tr> + <tr> + <td valign="top" align="right" style="">'00↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">NUL</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SOH</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">STX</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ETX</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">EOT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ENQ</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ACK</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">BEL</td> + <td valign="top" align="left" style="">''0↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'01↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">BS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">HT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">LF</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">VT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">FF</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">CR</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SO</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SI</td> + <td valign="top" align="left" style="">''0↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'02↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DLE</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC1</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC2</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC3</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC4</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">NAK</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SYN</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ETB</td> + <td valign="top" align="left" style="">''1↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'03↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">CAN</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">EM</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SUB</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ESC</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">FS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">GS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">RS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">US</td> + <td valign="top" align="left" style="">''1↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'04↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;"></td> + <td valign="top" width="56" align="center" style="font-family:monospace;">!</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">"</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">#</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">$</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">%</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">&</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">'</td> + <td valign="top" align="left" style="">''2↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'05↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">(</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">)</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">*</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">+</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">,</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">-</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">.</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">/</td> + <td valign="top" align="left" style="">''2↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'06↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">0</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">1</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">2</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">3</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">4</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">5</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">6</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">7</td> + <td valign="top" align="left" style="">''3↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'07↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">8</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">9</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">:</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">;</td> + <td valign="top" width="56" align="center" style="font-family:monospace;"><</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">=</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">></td> + <td valign="top" width="56" align="center" style="font-family:monospace;">?</td> + <td valign="top" align="left" style="">''3↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'10↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">@</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">A</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">B</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">C</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">D</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">E</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">F</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">G</td> + <td valign="top" align="left" style="">''4↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'11↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">H</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">I</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">J</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">K</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">L</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">M</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">N</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">O</td> + <td valign="top" align="left" style="">''4↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'12↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">P</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Q</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">R</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">S</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">T</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">U</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">V</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">W</td> + <td valign="top" align="left" style="">''5↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'13↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">X</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Y</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Z</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">[</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">\</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">]</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">^</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">_</td> + <td valign="top" align="left" style="">''5↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'14↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">`</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">a</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">b</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">c</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">d</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">e</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">f</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">g</td> + <td valign="top" align="left" style="">''6↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'15↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">h</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">i</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">j</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">k</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">l</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">m</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">n</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">o</td> + <td valign="top" align="left" style="">''6↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'16↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">p</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">q</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">r</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">s</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">t</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">u</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">v</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">w</td> + <td valign="top" align="left" style="">''7↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'17↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">x</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">y</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">z</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">{</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">|</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">}</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">˜</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DEL</td> + <td valign="top" align="left" style="">''7↓</td> + </tr> + <tr class="headfoot"> + <th valign="top" align="right"></th> + <th valign="top" width="1cm" align="center">8</th> + <th valign="top" width="1cm" align="center">9</th> + <th valign="top" width="1cm" align="center">A</th> + <th valign="top" width="1cm" align="center">B</th> + <th valign="top" width="1cm" align="center">C</th> + <th valign="top" width="1cm" align="center">D</th> + <th valign="top" width="1cm" align="center">E</th> + <th valign="top" width="1cm" align="center">F</th> + <th valign="top" align="left"></th> + </tr> + </table> + </div> + <p>The index numbers in the first and last columns are for + finding the octal (base-8) and hexadecimal (base-16) values + respectively. Replace the arrow with the number or letter from + the top of the column (if the arrow points up) from the bottom + of the column(if the arrow points down). + </p> + <p>Example: The Escape character (ESC) is octal '033 (03 for + the row, 3 for the number at the top of the column because the + arrow points up) or hexadecimal "1B (1 for the row, B for the + letter at the bottom of the column because the arrow points + down). + </p> + <p>For the decimal value, multiply the Octal row number by + eight and add the column number from the top line (that makes + ESC 27). + </p> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="appendixB.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="appendixD.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/back.png b/info/beginlatex/html/back.png Binary files differnew file mode 100644 index 0000000000..17e0d0d118 --- /dev/null +++ b/info/beginlatex/html/back.png diff --git a/info/beginlatex/html/beginlatex.html b/info/beginlatex/html/beginlatex.html new file mode 100644 index 0000000000..953ffc97e6 --- /dev/null +++ b/info/beginlatex/html/beginlatex.html @@ -0,0 +1,13295 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:01:22--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <title>Formatting information</title> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="#intro">Introduction</a></dd> + <dd class=""><a href="#foreword">Foreword</a></dd> + <dd class=""><a href="#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="#basic">Basic document structures</a></li> + <li class=""><a href="#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="#otherdoc">Other document structures</a></li> + <li class=""><a href="#texttools">Textual tools</a></li> + <li class=""><a href="#typo">Fonts and layouts</a></li> + <li class=""><a href="#macros">Programmability (macros)</a></li> + <li class=""><a href="#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="#asciicharset">The ASCII character set</a></li> + <li class=""><a href="#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="#biblio">References</a></dd> + <dd class=""><a href="#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="intro">Introduction</a></h3> + <p>This book originally accompanied a 2-day course on using the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesetting system. It has been extensively revised and + updated and can now be used for self-study or in the classroom. + It is aimed at users of Linux, Macintosh, or Microsoft Windows + but it can be used with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems on any platform, + including other Unix workstations, mainframes, and even your + <a name="PDA" class="acroref">Personal Digital Assistant</a> (<small>PDA</small>). + </p> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Who needs this book? + </h4> + <p>The audience for the original training course was assumed + to be computer-literate and composed of professional, + business, academic, technical, or administrative computer + users. The readers of the book (you) are mostly assumed to be + in a similar position, but may also come from many other + backgrounds, including hobbyists, students, and just people + interested in quality typesetting. You are expected to have + one or more of the following or similar objectives: + </p> + <ul> + <li> + <p>producing typesetter-quality formatting;</p> + </li> + <li> + <p>formatting long, complex, highly-structured, + repetitive, or automatically-generated + documents;<sup><a href="#F1">1</a></sup></p> + </li> + <li> + <p>saving time and effort by automating common + tasks; + </p> + </li> + <li> + <p>achieving or maintaining your independence from + specific makes or models of proprietary hardware, + software, or file formats (portability); + </p> + </li> + <li> + <p>using Open Source software (free of restrictions, + sometimes also free of charge). + </p> + </li> + </ul> + <ol class="footnotes" start="1"> + <li><a name="F1"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can easily be used for once-off or short + and simple documents as well, but its real strengths + lie in consistency and automation.</a></li> + </ol> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Skills needed + </h4> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a very easy system to learn, and requires no + specialist knowledge, although literacy and some familiarity + with the publishing process is useful. It is, however, assumed + that you are completely fluent and familiar with using your + computer before you start. Specifically, effective use of this + document requires that you already know and understand the + following very thoroughly: + </p> + <ul> + <li> + <p>how to use a good plain-text + editor (<em>not</em> a wordprocessor like + <i><a name="p1">OpenOffice</a></i>, + <i><a name="p2">WordPerfect</a></i>, or Microsoft + <i><a name="p3">Word</a></i>, and + <em>not</em> a toy like Microsoft + <i><a name="p4">Notepad</a></i>); + </p> + </li> + <li> + <p>where to find all 95 of the printable <small><a href="#ASCII" class="acroref" name="A11" title="American Standard Code for Information Interchange">ASCII</a></small> characters on your keyboard and + what they mean, and how to type accents and symbols, if + you use them; + </p> + </li> + <li> + <p>how to create, open, save, + close, rename, move, and delete files and folders + (directories); + </p> + </li> + <li> + <p>how to use a Web browser and/or <a name="FTP" class="acroref">File + Transfer Protocol</a> (<small>FTP</small>) program to + download and save files from the Internet; + </p> + </li> + <li> + <p>how to uncompress and unwrap (unzip or detar) + downloaded files. + </p> + </li> + </ul> + <p>If you don't know how to do + these things yet, it's important to go and learn them + first. Trying to become familiar with the fundamentals of + using a computer <em>at the same time</em> as + learning <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is not likely to be as effective as doing + them in order. + </p> + <p>These are not specialist + skills — they are all included in the <a name="ECDL" class="acroref">European Computer Driving + Licence</a> (<small>ECDL</small>) and the relevant sections of the <small><a href="#ECDL" class="acroref" name="A14" title="European Computer Driving Licence">ECDL</a></small> syllabus are noted in the margin + above, so they are well within the capability of anyone who + uses a computer. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Objectives of this book + </h4> + <p>By the end of this book, you should be able to undertake + the following tasks: + </p> + <ul> + <li> + <p>use a plain-text editor to create and maintain your + documents; + </p> + </li> + <li> + <p>add <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> markup to identify + your document structure and formatting + requirements; + </p> + </li> + <li> + <p>typeset <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, correct simple formatting + errors, and display or print the results; + </p> + </li> + <li> + <p>identify, install, and use additional packages (using + <small><a href="#CTAN" class="acroref" name="A15" title="Comprehensive Archive Network">CTAN</a></small> for downloading where + necessary); + </p> + </li> + <li> + <p>recognise the limitations of procedural markup systems + and choose appropriate generic markup methods where + appropriate. + </p> + </li> + </ul> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Synopsis + </h4> + <p>The original course covered the following topics as + separate sessions, which are represented in the book as + chapters: + </p> + <ol type="1"> + <li> + <p>Where to get and how to install + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> (<i><a name="p5">te<span class="TEX">T<span class="E">E</span>X</span></a></i>, + <i><a name="p6">fp<span class="TEX">T<span class="E">E</span>X</span></a></i>, or + <i><a name="p7">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> from the + <span class="TEX">T<span class="E">E</span>X</span> Collection disks);<a name="I1"></a><a name="I2"></a></p> + </li> + <li> + <p>How to type <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents: + using an editor to create files + (half a dozen editors for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>); + </p> + </li> + <li> + <p>Basic structures (the Document Class Declaration and + its layout options; the document environment with sections + and paragraphs); + </p> + </li> + <li> + <p>Typesetting, viewing, and printing;</p> + </li> + <li> + <p>The use of packages and <small><a href="#CTAN" class="acroref" name="A16" title="Comprehensive Archive Network">CTAN</a></small> + to adapt formatting using standard tools; + </p> + </li> + <li> + <p>Other document structures (lists, tables, figures, + images, and verbatim text); + </p> + </li> + <li> + <p>Textual tools (footnotes, marginal notes, + cross-references, indexes and glossaries, and + bibliographic citations); + </p> + </li> + <li> + <p>Typographic considerations (white-space and typefaces; + inline markup and font changes; extra font installation + and automation); + </p> + </li> + <li> + <p>Programmability and automation (macros and modifying + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s behaviour); + </p> + </li> + <li> + <p>Conversion and compatibility with other systems + (<small><a href="#XML" class="acroref" name="A17" title="Extensible Markup Language">XML</a></small>, + <i><a name="p8">Word</a></i>, etc.). + </p> + </li> + </ol> + <p>A few changes have been made in the transition to printed + and online form, but the basic structure is the same, and the + document functions as a workbook for the course as well as a + standalone self-teaching guide. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Where's the math? + </h4> + <p>It is important to note that + the document <em>does not cover</em> mathematical + typesetting, complex tabular material, the design of + large-scale macros and document classes, or the finer points + of typography or typographic design, although it does refer to + these topics in passing on a few occasions. + </p><a name="I3"></a><p>There are several other guides, introductions, and + ‘get-started’ documents on the Web and + on <small><a href="#CTAN" class="acroref" name="A18" title="Comprehensive Archive Network">CTAN</a></small> which cover these topics and + more. Among the more popular are: + </p> + <ul> + <li> + <p><cite><a href="http://www.tug.org/begin.html" name="C9">Getting Started with <span class="TEX">T<span class="E">E</span>X</span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and friends</a></cite>, where all + beginners should start; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/lshort/" name="C10">The (Not So) Short Guide to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> in 131 Minutes</a></cite> is a good + beginner's tutorial; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/gentle/" name="C11">A Gentle Introduction to <span class="TEX">T<span class="E">E</span>X</span>: A Manual for Self-Study</a></cite> is a classic + tutorial on Plain <span class="TEX">T<span class="E">E</span>X</span>; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/epslatex.pdf/" name="C12">Using imported graphics in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span></a></cite> shows you how + to do (almost) anything with graphics: side-by-side, + rotated, etc.; + </p> + </li> + <li> + <p><cite><a href="http://www.ams.org/tex/short-math-guide.html" name="C13">Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></cite> gets you + started with the American Math Society's powerful + packages; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/" name="C14">A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></a></cite> shows over + 2,500 symbols available. + </p> + </li> + </ul> + <p>This list was taken from the + <small><a href="#CTAN" class="acroref" name="A19" title="Comprehensive Archive Network">CTAN</a></small> search page. There are also + lots of books published about <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: the most + important of these for users of this document are listed in + <a href="#docs">the last paragraph in the Foreword</a>. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="availability">Availability of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems</a></h4> + <p>Because the <span class="TEX">T<span class="E">E</span>X</span> program (the + ‘engine’ which actually does the + typesetting) is separate from whichever editor you choose, + <span class="TEX">T<span class="E">E</span>X</span>-based systems are available in a variety of different + modes using different interfaces, depending on how you want to + use them. + </p> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="gui">Graphical interface</a></h5> + <p>The normal way to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is + to use a toolbar button (icon), a menu item, or a keystroke + in your editor. Click on it and your document gets saved and + typeset. All the other features of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems (the + typeset display, spellchecker, related programs like + <i><a name="p9">makeindex</a></i> and <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>) are run + the same way. This works both in a normal <a name="GUI" class="acroref">Graphical User Interface</a> (<small>GUI</small>) as well as in + text-only interfaces. + </p> + <p>In the popular <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> editors like + <i><a name="p10">Emacs</a></i>, + <i><a name="p11"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i>, + <i><a name="p12"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>, + <i><a name="p13">WinShell</a></i>, or + <i><a name="p14">WinEdt</a></i>, a record of the + typesetting process is shown in an adjoining window so that + you can see the progress of pages being typeset, and any + errors or warnings that may occur.<sup><a href="#F2">2</a></sup></p> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="cli">Command-line interface</a></h5> + <p>However, the graphical interface + is useless if you want to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> unattended, as part of an + automated system, perhaps in a web server or e-commerce + environment, where there is no direct connection between + user and program. The underlying <span class="TEX">T<span class="E">E</span>X</span> engine is in fact + a <a name="CLI" class="acroref">Command-Line Interface</a> (<small>CLI</small>) program, + that is, it is used as a + ‘console’ program which you run from + a standard Unix or Mac terminal or shell window (or from an + MS-DOS command window in Microsoft Windows systems). You + type the command + <code class="literal">latex</code> followed by the name of your + document file (see <a href="#clidemo"></a> in <a href="#cmdwin">section 4.1.2</a> for an example). + </p> + <p>Commands like these let you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in an automated + environment like a + <a name="CGI" class="acroref">Common Gateway Interface</a> (<small>CGI</small>) script + on a web server or a batch file on a document system. All + the popular distributions for Unix and Windows, both free + and commercial, include this interface as standard + (te<span class="TEX">T<span class="E">E</span>X</span>, fp<span class="TEX">T<span class="E">E</span>X</span>, MiK<span class="TEX">T<span class="E">E</span>X</span>, pro<span class="TEX">T<span class="E">E</span>X</span>t, + PC-<span class="TEX">T<span class="E">E</span>X</span>, True<span class="TEX">T<span class="E">E</span>X</span>, + etc.). + </p> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="displays">Typeset displays</a></h5> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> usually displays your + typeset results in a separate window, redisplayed + automatically every time the document is reprocessed, + because the typesetting is done separately from the editing. + Some systems, however, can format the typesetting while you + type, at the expense of some flexibility. + </p> + <blockquote> + <dl> + <dt><b><a name="async">Asynchronous typographic displays</a></b></dt> + <dd> + <p>This method is called an <b><i><a name="asynchronous">asynchronous typographic + display</a></i></b> because the typeset window only + updates <em>after</em> you have typed + something and reprocessed it, not + <em>while</em> you are still typing, as it + would with a wordprocessor.<sup><a href="#F3">3</a></sup></p> + </dd> + <dt><b><a name="sync">Synchronous typographic displays</a></b></dt> + <dd> + <p><a name="synchro"></a>Some distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + offer a <b><i><a name="synchronous">synchronous + typographic interface</a></i></b>. In these, you type + directly into the typographic display, as with a + wordprocessor. Three popular examples are + <i><a name="p15">Textures</a></i>, + <i><a name="p16">Scientific Word</a></i>, and + <i><a name="p17">V<span class="TEX">T<span class="E">E</span>X</span></a></i> (see table below). + At least one free version (<span class="LYX">L<span class="Y">Y</span>X</span>, see <a href="#lyxwin">Figure 2.1</a> in <a href="#editors">section 2.3</a>) + offers a similar interface. + </p> + <p>With a synchronous display + you get Instant Textual Gratification™, but your + level of control is restricted to that of the <small><a href="#GUI" class="acroref" name="A23" title="Graphical User Interface">GUI</a></small> you use, which cannot provide + access to everything that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can do. For + complete control of the formatting + you may still need access to your normal source + (input) file in the same way as for asynchronous + implementations. + </p> + </dd> + <dt><b>Near-synchronous displays</b></dt> + <dd> + <p>There are several other + methods available free for Unix and some other systems + for close-to-synchronous updates of the typeset + display (including <a name="jf">Jonathan Fine</a>'s <i><a name="p18">Instant + Preview</a></i> and the <span class="TEX">T<span class="E">E</span>X</span> daemon), and + for embedding typographic fragments from the typeset + display back into the editor window (<a name="dk">David Kastrup</a>'s <span class="package"><a name="m1">preview-latex</a></span> + package). + </p> + </dd> + </dl> + </blockquote> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="commercial">Commercial distributions</a></h5> + <p>Whatever method you choose, the + <span class="TEX">T<span class="E">E</span>X</span> Collection CD and <small><a href="#CTAN" class="acroref" name="A24" title="Comprehensive Archive Network">CTAN</a></small> are + not the only source of software. The vendors listed in <a href="#vendors">Table </a> offer excellent commercial + implementations of <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + and if you are in a position where their enhanced support + and additional features are of benefit, I urge you to + support them. In most cases their companies, founders, and + staff have been good friends of the <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + communities for many years.<a name="I4"></a></p> + <div align="center" class="table"> + <table> + <caption><i>Table 1</i>. <a name="vendors">Popular commercial implementations of <span class="TEX">T<span class="E">E</span>X</span> systems</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left" width="93.60000000000001">Product</th> + <th valign="bottom" align="left" width="144">Platform</th> + <th valign="bottom" align="left" width="129.6">Company</th> + <th valign="bottom" align="left">URI</th> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">PC<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">Personal <span class="TEX">T<span class="E">E</span>X</span>, Inc + </td> + <td valign="top" align="left"><a href="www.pctex.com/"><tt>www.pctex.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">True<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">True <span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" align="left"><a href="truetex.com/"><tt>truetex.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">Textures</td> + <td valign="top" width="144" align="left">Apple Mac</td> + <td valign="top" width="129.6" align="left">Blue Sky Research</td> + <td valign="top" align="left"><a href="www.bluesky.com/"><tt>www.bluesky.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">Scientific Word</td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">Mackichan Software</td> + <td valign="top" align="left"><a href="www.mackichan.com/"><tt>www.mackichan.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">V<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows, Linux, OS/2</td> + <td valign="top" width="129.6" align="left">MicroPress, Inc</td> + <td valign="top" align="left"><a href="www.micropress-inc.com/"><tt>www.micropress-inc.com/</tt></a></td> + </tr> + </table> + </div> + </div> + <ol class="footnotes" start="2"> + <li><a name="F2">Recent versions of some editors hide this display by + default unless errors occur in the typesetting.</a></li> + <li><a name="F3">Among other reasons, <span class="TEX">T<span class="E">E</span>X</span> typesets whole + paragraphs at a time, not line-by-line as lesser + systems do, in order to get the hyphenation and + justification (H&J) right (see <a href="#handj">section 2.8</a>). + </a></li> + </ol> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="prodnote">Production note</a></h4> + <p>This document is written and maintained in <small><a href="#XML" class="acroref" name="A25" title="Extensible Markup Language">XML</a></small>, using a customized version of the + <i><a name="p19">DocBook</a></i> <small><a href="#DTD" class="acroref" name="A26" title="Document Type Definition">DTD</a></small>. Conversions were made to <small><a href="#HTML" class="acroref" name="A27" title="HyperText Markup Language">HTML</a></small> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> using <small><a href="#XSLT" class="acroref" name="A28" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> scripts and <a name="mk">Michael Kay</a>'s <i><a name="p20">Saxon</a></i> + processor. + </p> + <p>The complete source, with all ancillary files, is + available online at <a href="http://www.ctan.org/tex-archive/info/beginlatex/src/"><tt>http://www.ctan.org/tex-archive/info/beginlatex/src/</tt></a> + but if you want to try processing it yourself you must install + <i><a name="p21">Java</a></i> (from Sun, <small>IBM</small>, or a number of + others) and <i><a name="p22">Saxon</a></i> (from <a href="http://saxon.sourceforge.net/"><tt>http://saxon.sourceforge.net/</tt></a>), in addition + to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>This document is published under the terms and conditions + of the <small><a href="#GNU" class="acroref" name="A30" title="GNU's Not Unix">GNU</a></small> Free Documentation + License. Details are in <a href="#gfdl">this appendix</a>. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="symbols">Symbols and conventions</a></h4> + <p>The following typographic notations are used:</p> + <div align="center"><a name="symboltable"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="left">Notation</th> + <th valign="bottom" align="left" width="504">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c1">\command</a></code></td> + <td valign="top" width="504" align="left">Control sequences which perform an + action, e.g. <code class="command"><a name="c2">\newpage</a></code></td> + </tr> + <tr> + <td valign="top" align="left"><tt>\<a name="d1">length</a></tt></td> + <td valign="top" width="504" align="left">Control sequences which store a dimension + (measurement in units), e.g. <tt>\<a name="d2">parskip</a></tt></td> + </tr> + <tr> + <td valign="top" align="left"><tt><i><a name="l3">counter</a></i></tt></td> + <td valign="top" width="504" align="left">Values used for counting (whole numbers, as + opposed to measuring in units), e.g. <tt><i><a name="l4">secnumdepth</a></i></tt></td> + </tr> + <tr> + <td valign="top" align="left"><b><i><a name="term">term</a></i></b></td> + <td valign="top" width="504" align="left">Defining instance of a + new term + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="environment"><a name="e1">environment</a></span></td> + <td valign="top" width="504" align="left">A <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> formatting environment + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="package"><a name="m2">package</a></span></td> + <td valign="top" width="504" align="left">A <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> package (available from <small><a href="#CTAN" class="acroref" name="A31" title="Comprehensive Archive Network">CTAN</a></small>) + </td> + </tr> + <tr> + <td valign="top" align="left"><i><a name="p23">product</a></i></td> + <td valign="top" width="504" align="left">Program or product name</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">typewriter type</code></td> + <td valign="top" width="504" align="left">Examples of source code (stuff you + type) + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-family:monospace; "><u>mybook</u></span> or <span style="font-family:monospace; font-style:italic; ">value</span></td> + <td valign="top" width="504" align="left">Mnemonic examples of + things you have to supply real-life values for + </td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">x</tt></td> + <td valign="top" width="504" align="left">A key on your keyboard</td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">Ctrl</tt>–<tt class="keycap">x</tt> + </td> + <td valign="top" width="504" align="left">Two keys pressed together</td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">Esc</tt> <tt class="keycap">q</tt></td> + <td valign="top" width="504" align="left">Two keys pressed one after another</td> + </tr> + <tr> + <td valign="top" align="left"><span class="guiicon">Submit</span></td> + <td valign="top" width="504" align="left">On-screen button to click</td> + </tr> + <tr> + <td valign="top" align="left"><span class="guimenu">Menu</span>→<span class="guimenuitem">Item</span></td> + <td valign="top" width="504" align="left">Drop-down menu with items</td> + </tr> + </table> + </div> + <p>Examples of longer fragments of input are shown with a + border round them. Where necessary, the formatted output is + shown immediately beneath. Warnings are shown with a shaded + background. Exercises are shown with a double border. + </p> + </div> + </div> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="foreword">Foreword</a></h3> + <p>As noted in <a href="#intro">this Introduction</a>, + this document accompanies a two-day introductory training course. + It became obvious from repeated questions in class and + afterwards, as well as from general queries on <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> that many people do + not read the <small><a href="#FAQ" class="acroref" name="A32" title="Frequently-Asked Questions">FAQ</a></small>s, do not use the + <small><a href="#TUG" class="acroref" name="A33" title="Users Group">TUG</a></small> web site, do not buy the books and + manuals, do not use the newsgroups and mailing lists, and do not + download the free documentation. Instead, they try to get by + using the training technique known as ‘sitting by + Nelly’, which involves looking over a + colleague's shoulder in the office, lab, library, pub, or + classroom, and absorbing all his or her bad habits. + </p> + <p>In the summer of 2001 I presented a short proposal on the + marketing of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to the annual conference of the <span class="TEX">T<span class="E">E</span>X</span> Users + Group held at the University of Delaware, and showed an example + of a <a href="http://www.silmaril.ie/documents/latex-brochure/leaflet.pdf">draft + brochure</a> designed to persuade newcomers to try <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + for their typesetting requirements. As a result of questions and + suggestions, it was obvious that it needed to include a pointer + to some documentation, and I agreed to make available a revised + form of this document, expanded to be used outside the + classroom, and to include those topics on which I have had most + questions from users over the years. + </p> + <p>It turned out to mean a significant + reworking of a lot of the material. Some of it appears in almost + every other manual and book on <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> but it is essential to + the beginner and therefore bears repetition. Some of it appears + other forms elsewhere, and is included here because it needs + explaining better. And some of it appears nowhere else but this + document. I took the opportunity to revise the structure of the + training course in parallel with the book (expanding it from its + original one day to two days), and to include a more + comprehensive index. It is by no means perfect (in both senses), + and I would be grateful for comments and corrections to be sent + to me at the address given under the credits. + </p> + <p>I had originally hoped that the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> version of the + document would be processable by any freshly-installed default + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> system, but the need to include font samples which go + well beyond the default installation, and to use some packages + which the new user is unlikely to have installed, means that + this document itself is not really a simple piece of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + however simply it may describe the process itself. + </p> + <p>However, as the careful reader will have already noticed, + the master source of the document is not maintained in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + but in <small><a href="#XML" class="acroref" name="A34" title="Extensible Markup Language">XML</a></small>. A future task is therefore + to compare the packages required with those installed by + default, and flag portions of the document requiring additional + features so that an abbreviated version can be generated which + can be guaranteed to process even with a basic <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + installation. + </p> + <p><a name="docs"></a>If you are just starting with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, at an early + opportunity you should buy or borrow a copy of <cite><a href="#latexbook" name="C15"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: A Document Preparation System</a></cite> which is the original + author's manual. More advanced users should get the + <cite><a href="#companion" name="C16">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> or one of its + successors. In the same series there are also the <cite><a href="#graphicscomp" name="C17">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Graphics Companion</a></cite> and the <cite><a href="#webcomp" name="C18">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Web Companion</a></cite>. Mathematical users might want to + read <cite><a href="http://www.ams.org/tex/short-math-guide.html" name="C19">Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></cite>. + </p> + </div> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="preface">Preface</a></h3> + <p>Many people discover <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> after + years of struggling with wordprocessors and desktop publishing + systems, and are amazed to find that <span class="TEX">T<span class="E">E</span>X</span> has been around for + over 25 years and they hadn't heard of it. It's not a + conspiracy, just ‘a well-kept secret known only to a few + million people’, as one anonymous user has put + it. + </p> + <p>Perhaps a key to why it has remained + so popular is that it removes the need to fiddle with the + formatting while you write. Although playing around with fonts + and formatting is attractive to the newcomer, it is completely + counter-productive for the serious author or editor who wants to + concentrate on <em>writing</em> — ask any + journalist or professional writer. + </p> + <p>A few years ago a new <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> user expressed concern on + the <a href="comp.text.tex"><tt>comp.text.tex</tt></a> newsgroup about + ‘learning to write in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>’. <a href="news:comp.text.tex/MPG.18d82140d65ddc5898968c@news.earthlink.net">Some + excellent advice</a> was posted in response to this query, + which I reproduce with permission below [the bold text is my + emphasis]: + </p> + <blockquote class="citation"><a name="K20"> </a><tt> + <p>No, the harder part might be <em>writing</em>, + period. <span class="TEX">T<span class="E">E</span>X</span>/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is actually easy, once you relax and + stop worrying about appearance as a be-all-and-end-all. Many + people have become ‘Word Processing + Junkies’ and <strong>no longer + ‘write’ documents, they + ‘draw’ them</strong>, almost at the + same level as a pre-literate 3-year old child might pretend to + ‘write’ a story, but is just creating a + sequence of pictures with a pad of paper and box of + <i><a name="p24">Crayola</a></i>s — this is perfectly + normal and healthy in a 3-year old child who is being + creative, but is of questionable usefulness for, say, a grad + student writing a Master's or PhD thesis or a business + person writing a white paper, etc. For this reason, + <em>I</em> strongly recommend + <em>not</em> using any sort of fancy <small><a href="#GUI" class="acroref" name="A35" title="Graphical User Interface">GUI</a></small> ‘crutch’. + Use a plain vanilla text editor and treat it like an + old-fashioned typewriter. Don't waste time playing with + your mouse. + </p> + <p>Note: I am <em>not</em> saying that you should + have no concerns about the appearance of your document, just + that you should <em>write</em> the document + (completely) first and tweak the appearance + later...<em>not</em> [spend time on] lots of + random editing in the bulk of the document itself. + </p></tt><p class="citation"> (11 March 2003), <cite><a href="#heller"><a href="newscomp.text.tex"><tt>comp.text.tex</tt></a></a></cite></p> + </blockquote> + <p>Learning to write well can be hard, but authors shouldn't + have to make things even harder for themselves by using + manually-driven systems which break their concentration every + few seconds for some footling adjustment to the appearance, + simply because the software is incapable of doing it right by + itself. + </p> + <p><a name="mathtex"></a><a name="knuth">Don Knuth</a> originally wrote <span class="TEX">T<span class="E">E</span>X</span> to typeset mathematics for + the second edition of his master-work <cite><a href="#aocs" name="C21">The Art of Computer Programming</a></cite>, and it remains pretty much the only + typesetting program to include fully-automated mathematical + formatting done the way mathematicians want it. But he also + published a booklet called <cite><a href="#mathwrite" name="C22">Mathematical Writing</a></cite> which shows how + important it is to think about what you write, and how the + computer should be able to help, not hinder. + </p> + <p>And <span class="TEX">T<span class="E">E</span>X</span> is much more than math: + it's a programmable typesetting system which can be used + for almost any formatting task, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has made it usable by + almost anyone. Professor Knuth generously placed the entire system in the + public domain, so for many years there was no publicity of the + commercial kind which would have got <span class="TEX">T<span class="E">E</span>X</span> noticed outside the + technical field. + </p> + <p>Nowadays, however, there are many companies + selling <span class="TEX">T<span class="E">E</span>X</span> software or services,<sup><a href="#F4">1</a></sup> dozens + of publishers accepting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents for + publication, and hundreds of thousands of users using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + for millions of documents.<sup><a href="#F5">2</a></sup></p> + <p>To count yourself as a <span class="TEX">T<span class="E">E</span>X</span> or <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> user, visit the + <span class="TEX">T<span class="E">E</span>X</span> Users Group's + ‘<span class="TEX">T<span class="E">E</span>X</span> Counter’ web site + (and get a nice certificate!). + </p> + <p>There is occasionally some confusion among newcomers between + the two main programs, <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: + </p> + <ul> + <li> + <p><span class="TEX">T<span class="E">E</span>X</span> is a typesetting program, originally written by + Prof Knuth at Stanford around 1978. It implements a + macro-driven typesetters' programming language of some + 300 basic operations and it has formed the core of many + other <a name="DTP" class="acroref">desktop publishing</a> (<small>DTP</small>) + systems. Although it is still possible to write in the raw + <span class="TEX">T<span class="E">E</span>X</span> language, you need to study it in depth, and you need + to be able to write macros (subprograms) to perform even the + simplest of repetitive tasks. + </p> + </li> + <li> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a user interface for <span class="TEX">T<span class="E">E</span>X</span>, designed by + <a name="lamport">Leslie Lamport</a> at <a name="DEC" class="acroref">Digital Equipment + Corporation</a> (<small>DEC</small>) in 1985 to automate all the common + tasks of document preparation. It provides a simple way for + authors and typesetters to use the power of <span class="TEX">T<span class="E">E</span>X</span> without + having to learn the underlying language. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is the + recommended system for all users except professional + typographic programmers and computer scientists who want to + study the internals of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </li> + </ul> + <p>Both <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> have been + constantly updated since their inception. Knuth has now frozen + development of the <span class="TEX">T<span class="E">E</span>X</span> engine so that users and developers + can have a virtually bug-free, rock-stable platform to work + with.<sup><a href="#F6">3</a></sup> Typographic programming development continues with + the <a name="NTS" class="acroref">New Typesetting System</a> (<small>NTS</small>), planned + as a successor to <span class="TEX">T<span class="E">E</span>X</span>. The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>3 project has taken over + development of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and the current version is + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>, which is what we are concentrating on here. Details + of all developments can be had from the <small><a href="#TUG" class="acroref" name="A40" title="Users Group">TUG</a></small> at <a href="http://www.tug.org"><tt>http://www.tug.org</tt></a></p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="myths">Debunking the mythology</a></h3> + <p>Naturally, over all the years, a few myths have grown up + around <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, often propagated by people who should know + better. So, just to clear up any potential + misunderstandings... + </p> + <blockquote> + <dl> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has only got one + font’</b></dt> + <dd> + <p>Most <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems can use any OpenType, + TrueType, Adobe (<a name="t2">PostScript</a>) + Type1 or Type3, or METAFONT font. This is more than + most other known typesetting system. + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s default font is Computer Modern (based + on Monotype Series 8: see + <a href="#fontable-mf">the table in section 8.2</a>), not Times Roman, and some + people get upset because it ‘looks + different’ to Times. Typefaces differ: + that's what they're for — get used to it. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> isn't <small><a href="#WYSIWYG" class="acroref" name="A41" title="What You See Is What You Get">WYSIWYG</a></small>’</b></dt> + <dd> + <p>Simply not true. <small><a href="#DVI" class="acroref" name="A42" title="device-independent">DVI</a></small> + and <small><a href="#PDF" class="acroref" name="A43" title="Portable Document Format">PDF</a></small> preview is better + <small><a href="#WYSIWYG" class="acroref" name="A44" title="What You See Is What You Get">WYSIWYG</a></small> than any wordprocessor + and most <small><a href="#DTP" class="acroref" name="A45" title="desktop publishing">DTP</a></small> systems. What + people mean is that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s typographic display + is asynchronous with the edit window. This is only true + for the default <small><a href="#CLI" class="acroref" name="A46" title="Command-Line Interface">CLI</a></small> + implementations. See <a href="#synchro">the first paragraph in section 3 of the Introduction</a> for details of synchronous + versions. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is obsolete’</b></dt> + <dd> + <p>Quite the opposite: it's under constant + development, with new features being added almost + weekly. Check the <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> for messages about recent + uploads to <small><a href="#CTAN" class="acroref" name="A47" title="Comprehensive Archive Network">CTAN</a></small>. It's + arguably more up-to-date than most other systems: + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> had the Euro (€) before anyone else, it had + Inuktitut typesetting before the Inuit got their own + province in Canada, and it still produces better + mathematics than anything else. + </p> + </dd> + </dl> + </blockquote> + </td> + </tr> + </table> + </div> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="myths2">More mythology</a></h3> + <blockquote> + <dl> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Unix system’</b></dt> + <dd> + <p>People are also heard saying: + ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Windows system’, + ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Mac system’, etc., + etc. <i>ad nauseam</i>. + <span class="TEX">T<span class="E">E</span>X</span> systems run on almost every computer in use, from + some of the biggest supercomputers down to handhelds + (<small><a href="#PDA" class="acroref" name="A48" title="Personal Digital Assistant">PDA</a></small>s like the Sharp + <i><a name="p25">Zaurus</a></i>). That includes + Windows and Linux PCs, Macs, and all other Unix systems. + If you're using something <span class="TEX">T<span class="E">E</span>X</span> doesn't run + on, it must be either incredibly new, incredibly old, or + unbelievably obscure. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is ‘too + difficult’’</b></dt> + <dd> + <p>This has been heard from + physicists who can split atoms; from mathematicians who + can explain why <span class="math">π</span> exists; from business people who can + read a balance sheet; from historians who can grasp + Byzantine politics; from librarians who can understand + LoC and MARC; and from linguists who can decode Linear + ‘B’. It's nonsense: most people grasp + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in 20 minutes or so. It's not rocket + science (or if it is, I know any number of unemployed + rocket scientists who will teach it to you). + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is ‘only for + scientists and + mathematicians’’</b></dt> + <dd> + <p>Untrue. Although it grew up + in the mathematical and computer science fields, two of + its biggest growth areas are in the humanities and + business, especially since the rise of <small><a href="#XML" class="acroref" name="A49" title="Extensible Markup Language">XML</a></small> brought new demands for automated + web-based typesetting. + </p> + </dd> + </dl> + </blockquote> + </td> + </tr> + </table> + </div> + <ol class="footnotes" start=""> + <li><a name="F4">See, for example, the list of <span class="TEX">T<span class="E">E</span>X</span> vendors on <a href="#vendors">Table </a>, and the list of consultants + published by <small><a href="#TUG" class="acroref" name="A36" title="Users Group">TUG</a></small>.</a></li> + <li><a name="F5">A guesstimate. With free software it's impossible + to tell how many people are using it, but it's a + <em>lot</em>.</a></li> + <li><a name="F6">Knuth still fixes bugs, although the chances of finding + a bug in <span class="TEX">T<span class="E">E</span>X</span> these days approaches zero.</a></li> + </ol> + </div> + <ol class="footnotes" start=""> + <li><a name="F1"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can easily be used for once-off or short + and simple documents as well, but its real strengths + lie in consistency and automation.</a></li> + <li><a name="F2">Recent versions of some editors hide this display by + default unless errors occur in the typesetting.</a></li> + <li><a name="F3">Among other reasons, <span class="TEX">T<span class="E">E</span>X</span> typesets whole + paragraphs at a time, not line-by-line as lesser + systems do, in order to get the hyphenation and + justification (H&J) right (see <a href="#handj">section 2.8</a>). + </a></li> + </ol> + <ol class="footnotes" start=""> + <li><a name="F4">See, for example, the list of <span class="TEX">T<span class="E">E</span>X</span> vendors on <a href="#vendors">Table </a>, and the list of consultants + published by <small><a href="#TUG" class="acroref" name="A36" title="Users Group">TUG</a></small>.</a></li> + <li><a name="F5">A guesstimate. With free software it's impossible + to tell how many people are using it, but it's a + <em>lot</em>.</a></li> + <li><a name="F6">Knuth still fixes bugs, although the chances of finding + a bug in <span class="TEX">T<span class="E">E</span>X</span> these days approaches zero.</a></li> + </ol> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="get">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">1</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#editdis">Editing and display</a></li> + <li><a href="#lininst">Installation for Linux and Unix</a></li> + <li><a href="#macinst">Installation for Apple Mac</a></li> + <li><a href="#wininst">Installation for Microsoft Windows</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I5"></a><a name="I6"></a><a name="I7"></a><a name="I8"></a><a name="I9"></a><a name="I10"></a><a name="I11"></a><a name="I12"></a><a name="I13"></a><a name="I14"></a><p>This course is based on using one of + the following distributions of <span class="TEX">T<span class="E">E</span>X</span> on the 2004 <span class="TEX">T<span class="E">E</span>X</span> + Collection DVD or the 2003 <span class="TEX">T<span class="E">E</span>X</span> Live CD: + </p> + <blockquote> + <dl> + <dt><b>te<span class="TEX">T<span class="E">E</span>X</span></b></dt> + <dd> + <p>for Linux and other Unix-like systems, including Mac + OS X (<a name="esser">Thomas Esser</a>); + </p> + </dd> + <dt><b>pro<span class="TEX">T<span class="E">E</span>X</span>t</b></dt> + <dd> + <p>for Microsoft Windows (<a name="tf">Thomas Feuerstack</a>), based on <a name="cs">Christian Schenk</a>'s + Mik<span class="TEX">T<span class="E">E</span>X</span>; + </p> + </dd> + <dt><b>fp<span class="TEX">T<span class="E">E</span>X</span></b></dt> + <dd> + <p>for Microsoft Windows (<a name="popineau">Fabrice Popineau</a>) from the 2003 <span class="TEX">T<span class="E">E</span>X</span> Live CD. + </p> + </dd> + </dl> + </blockquote> + <p>Many other implementations of <span class="TEX">T<span class="E">E</span>X</span>, + such as <a name="tk">Tom Kiffe</a>'s CMac<span class="TEX">T<span class="E">E</span>X</span> for the Apple Macintosh, can be + downloaded from <small><a href="#CTAN" class="acroref" name="A50" title="Comprehensive Archive Network">CTAN</a></small>. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is + included with all modern distributions of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Collection CD is issued + annually on behalf of most of the local <span class="TEX">T<span class="E">E</span>X</span> user groups + around the world (see <a href="http://www.tug.org/lugs.html"><tt>http://www.tug.org/lugs.html</tt></a> for addresses), + and edited by <a name="sr">Sebastian Rahtz</a>, <a name="kb">Karl Berry</a>, <a name="ml">Manfred Lotz</a>, and the authors of the software mentioned above. + These people give an enormous amount of their personal time and + energy to building and distributing these systems, and they + deserve the thanks and support of the user community for all + they do. + </p> + <p>There are many other distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> both free and + commercial, as described in <a href="#intro">this Introduction</a>: they all process <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> identically, but + there are some differences in size, speed, packaging, and (in + the case of commercial distributions) price, support, and extra + software provided. + </p> + <p>One final thing before we start: publicly-maintained + software like <span class="TEX">T<span class="E">E</span>X</span> is updated faster than commercial software, + so <em>always check to see if there is a more recent + version of the installation</em>. See <a href="#latest">the item ‘Use the latest versions’ in section 1.4.3</a> for more details. + </p> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.1 <a name="editdis">Editing and display</a></h2> + <p>When you install <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> you will + have the opportunity to decide <i>a</i>) which plain-text editor[s] you want to use to create + and maintain your documents; and <i>b</i>) which preview programs you want to use to see your + typesetting. This isn't much use to you if you're + unfamiliar with editors and previewers, so have a look at the + table below, and maybe flip ahead to <a href="#editors">section 2.3</a> for a moment, where there are + descriptions and screenshots. + </p> + <p>The best bet is probably to install more than one — if + you've got the disk space — or maybe all of them, because + you can always delete the ones you don't like. + </p> + <blockquote> + <dl> + <dt><b>Editors</b></dt> + <dd> + <p>There is a wide range of editors available: probably + no other piece of software causes more flame-wars in + Internet and other discussions than your choice of + editor. It's a highly personal choice, so feel free + to pick the one you like. My personal biases are + probably revealed below, so feel equally free to ignore + them. + </p> + </dd> + <dt><b>Previewers</b></dt> + <dd> + <p>For displaying your + typesetting before printing, you will need a previewer. + All systems come with a <small><a href="#DVI" class="acroref" name="A51" title="device-independent">DVI</a></small> + previewer for standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + but if you are intending to produce industry-standard + <a name="t3">PostScript</a> or <small><a href="#PDF" class="acroref" name="A52" title="Portable Document Format">PDF</a></small> (Adobe Acrobat) files you will + need a previewer for those formats. + <i><a name="p26">GSview</a></i> displays both + <a name="t4">PostScript</a> and <small><a href="#PDF" class="acroref" name="A53" title="Portable Document Format">PDF</a></small> files; + <i><a name="p27">xpdf</a></i> and Adobe's own + <i><a name="p28">Acrobat Reader</a></i> just display + <small><a href="#PDF" class="acroref" name="A54" title="Portable Document Format">PDF</a></small> files. + </p> + </dd> + </dl> + </blockquote> + <p>For brief details of some of the most popular editors used + for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, see <a href="#editors">section 2.3</a>. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="pdfurl">Additional downloads</a></h4> + <p>For licensing reasons, the + <i><a name="p29">GSview</a></i> PostScript/PDF previewer, + the <i><a name="p30">Acrobat Reader</a></i> PDF previewer, + and the <i><a name="p31">WinEdt</a></i> editor could not + be distributed on the 2003 CDs. In those cases you have to + download and install them separately. + </p> + <ul> + <li> + <p><i><a name="p32">GSview</a></i> is available for + all platforms from <a href="http://www.ghostscript.com/gsview/index.htm"><tt>http://www.ghostscript.com/gsview/index.htm</tt></a> + (on Unix and VMS systems it's also available as + <i><a name="p33">GhostView</a></i> and + <i><a name="p34">gv</a></i>: see <a href="http://www.cs.wisc.edu/~ghost/"><tt>http://www.cs.wisc.edu/~ghost/</tt></a>) + </p> + </li> + <li> + <p><i><a name="p35">Acrobat Reader</a></i> (all + platforms) can be downloaded from <a href="http://www.adobe.com/products/acrobat/readstep2.html"><tt>http://www.adobe.com/products/acrobat/readstep2.html</tt></a></p> + </li> + <li> + <p><i><a name="p36">WinEdt</a></i> (Microsoft Windows + only) comes from <a href="http://www.winedt.com"><tt>http://www.winedt.com</tt></a></p> + </li> + </ul> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.2 <a name="lininst">Installation for Linux and Unix</a></h2> + <p>Make sure your system libraries and utilities are up to + date. If you are using Red Hat Linux, use + <i><a name="p37">yum</a></i> or + <i><a name="p38">up2date</a></i> to download and install + updates. For Debian and other distributions, use + <i><a name="p39">apt-get</a></i> or similar. On Red Hat + systems, remove any RPM version of te<span class="TEX">T<span class="E">E</span>X</span> and associated + utilities which may have been + preinstalled, in order to avoid version conflicts. + </p> + <p>If you are installing <span class="TEX">T<span class="E">E</span>X</span> Live to a new partition, and + you have the opportunity to reformat the partition before use, + use <i><a name="p40">mkfs</a></i> with a granularity as + small as it will go (usually 1024 bytes). This avoids the + partition running out of inodes because <span class="TEX">T<span class="E">E</span>X</span> uses very large + numbers of very small files. + </p> + <p>Plan the installation carefully if you are installing for + multiple users (a shared machine): read <a href="#pkginst">section 5.2</a> for some comments on where to put additional + files downloaded later, and see the FAQ on the same topic at + <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles"><tt>http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles</tt></a></p> + <p>Above all, <a name="RTFM" class="acroref">Read The Fine + Manual</a> (<small>RTFM</small>). The documentation is in + <code>live.html</code> and + <code>live.pdf</code> on the disk in the directory + <code>texlive2004/texmf-doc/doc/english/texlive-en/</code></p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name=""><span class="TEX">T<span class="E">E</span>X</span> Live installation manual</a></caption> + <div align="center" style="margin:12px"><img src="tlcdoc.png" width="75%"></div> + <hr> + </div> + <blockquote><pre> +# cd /<code><u>mnt/cdrom</u></code>/texlive2004 +# sh install-tl.sh + </pre></blockquote> + <p>The installer runs in a shell window, so it can be done + even from headless systems (those with no X Window client), + but it does need to be installed as root if you want to stick + with the default directory locations or install it system-wide + for multiple users. To install, just type the commands shown + above. + </p> + <p>The options are mostly self-explanatory, and beginners + should pick the recommended scheme and leave all other + settings at their defaults. The character-driven interface + lets you browse around the settings changing things and + looking at options before you commit to installing + anything. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.2</i>: <a name="">The Unix installation program</a></caption> + <blockquote><pre class="scriptsize"> +==================> TeX Live installation procedure <================= + +===> Note: Letters/digits in <angle brackets> indicate menu items <=== +===> for commands or configurable options <=== + + Proposed platform: Intel x86 with GNU/Linux + <P> over-ride system detection and choose platform + <B> binary systems: 1 out of 10 + <S> Installation scheme (scheme_recommended) + [customizing installation scheme: + <C> standard collections <L> language collections] + 20 out of 75, disk space required: 246857 kB + <D> directories: + TEXDIR (The main TeX directory) : /usr/TeX + TEXMFLOCAL (Directory for local styles etc): /usr/TeX/texmf-local + VARTEXMF (Directory for local config) : /usr/TeX/texmf-var + <O> options: + [ ] alternate directory for generated fonts () + [ ] create symlinks in standard directories + [ ] do not install macro/font doc tree + [ ] do not install macro/font source tree + <R> do not install files, set up to run off CD or DVD + <I> start installation + <H> help, <Q> quit + +Enter command: + </pre></blockquote> + <hr> + </div> + <p>‘Collections’ (the <i><a name="v5">C</a></i> and + <i><a name="v6">L</a></i> options) are groups of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages + that you can include or exclude. It's best to leave this + alone unless you know you need something specific. The only + options I sometimes set are under <i><a name="v7">O</a></i>: the + ‘alternate directory for generated fonts’ may + need to be on a different partition for performance reasons on + a shared system; and I always select ‘create symlinks in + standard directories’ so that the system works + immediately after the post-installation configuration (after + installation, run <i><a name="p41">texconfig</a></i> to + adjust your local settings. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.3</i>: <a name="">Running the post-installation program + <i><a name="p42">texconfig</a></i></a></caption> + <div align="center" style="margin:12px"><img src="texconfig.png" width="75%"></div> + <hr> + </div> + <p>Note that the Linux/Unix installation does not install any + editors: it is assumed you can do this yourself from your + distribution's standard package system (most likely + you will already be using <i><a name="p43">Emacs</a></i> or + <i><a name="p44">vi</a></i> anyway). + </p> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.3 <a name="macinst">Installation for Apple Mac</a></h2> + <p>This is exactly the same interface as for the Linux/Unix + installation. You need the <i><a name="p45">bash</a></i> + shell (see the warning in the manual for users of older systems). + </p> + <p>There is a choice of graphical editors for the Mac: two + are included on the DVD, <i><a name="p46"><span class="TEX">T<span class="E">E</span>X</span>Shop</a></i> + and <i><a name="p47">I<span class="TEX">T<span class="E">E</span>X</span>Mac</a></i>, but they need to be + installed separately, after installing <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4 <a name="wininst">Installation for Microsoft Windows</a></h2> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name=""><span class="TEX">T<span class="E">E</span>X</span> Collection 2004 DVD</a></caption> + <div align="center" style="margin:12px"><img src="tcdvddir.png" width="75%"></div> + <hr> + </div> + <p>Before you install <span class="TEX">T<span class="E">E</span>X</span>, make + sure you have enough disk space: the default installation + takes about 350Mb on a modern filesystem. The installation + assumes you have a fully updated version of Windows, so visit + the Microsoft Web site first (<a href="http://www.microsoft.com/"><tt>http://www.microsoft.com/</tt></a>) and click on + <i><a name="p48">Windows Update</a></i>. Select and install + all the relevant updates for your operating system (Windows + 95, 98, ME, 2000, NT, or XP). You should be doing this + regularly anyway, to keep your system healthy. You may want to + run <i><a name="p49">ScanDisk</a></i> and give your hard + disks a full surface check. <span class="TEX">T<span class="E">E</span>X</span> consists of a very large + number of quite small files, so it's important that your + disk is in good order. + </p> + <p>When you insert the distribution + DVD or CD, it should start the setup program automatically. If + you have auto-run turned off, open <i><a name="p50">My + Computer</a></i>, double-click on the DVD or CD drive, + and then double-click <i><a name="p51">Autorun</a></i> to + start the setup program.<sup><a href="#F7">1</a></sup></p> + <ol class="footnotes" start="1"> + <li><a name="F7">Some builds of Windows seem to have a bug that stops + <i><a name="p52">Autorun</a></i> starting the + installation. In that case (for the <span class="TEX">T<span class="E">E</span>X</span> Collection 2004 + DVD) double-click <code>Setup.exe</code> instead, + or (for the <span class="TEX">T<span class="E">E</span>X</span> + Collection 2003 CD) go to the <code>tpm</code> + folder and double-click on + <code>TeXSetup.exe</code>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.1 pro<span class="TEX">T<span class="E">E</span>X</span>t (<span class="TEX">T<span class="E">E</span>X</span> Collection 2004) + </h3> + <p>For pro<span class="TEX">T<span class="E">E</span>X</span>t from the <span class="TEX">T<span class="E">E</span>X</span> + Collection DVD, follow the instructions in the PDF + documentation which opens automatically when you start + the setup. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name="">pro<span class="TEX">T<span class="E">E</span>X</span>t comes with its own installation + guide</a></caption> + <div align="center" style="margin:12px"><img src="tcptpdf.png" width="50%"></div> + <hr> + </div> + <p>The documentation contains links (in large blue type) + that you click on in sequence to run the installation + process. (This is actually very good: everything worked + first time when I did it on XP.) Basically, you need to + install <i>a</i>) <i><a name="p53">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i>; <i>b</i>) <strong>either</strong> <i><a name="p54">WinEdt</a></i> + (with or without some of its add-ons) <strong>or</strong> <i><a name="p55"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>; and <i>c</i>) <i><a name="p56">GhostScript</a></i> and + <i><a name="p57">GSview</a></i>. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">You only need to install items <a href="#nldi">step 3</a> + to <a href="#td">step 5</a> if you install + <i><a name="p58">WinEdt</a></i>. + </p> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.2</i>: <a name="tcpt1">First document in + <i><a name="p59"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i></a></caption> + <div align="center" style="margin:12px"><img src="tcptfirstdoc.png" width="75%"></div> + <hr> + </div> + <ol> + <li><b>Install <i><a name="p60">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i></b><br><p><i><a name="p61">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> uses the + <i><a name="p62">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i> distribution as its + core, a long-established and popular distribution for + Windows. + </p> + </li> + <li><b>Install <i><a name="p63">WinEdt</a></i></b><br><p>This is optional: it's a good editor, + especially for the heavy user of a + <i><a name="p64">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i>-based system. This is + a free month's trial — after that it reminds you to cough + up and register. + </p> + </li> + <li><b><a name="nldi">Install the <i><a name="p65">WinEdt</a></i> New <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Document Interface</a></b><br><p>Optional again, and only applicable if you installed + <i><a name="p66">WinEdt</a></i> anyway. It lets you + save commonly-used document settings for use in other + documents of the same type. + </p> + </li> + <li><b>Install the <i><a name="p67">WinEdt</a></i> + Graphics Interface</b><br><p>Another optional add-on for + <i><a name="p68">WinEdt</a></i> to provide drag-and-drop + graphics insertion. + </p> + </li> + <li><b><a name="td">Install the <i><a name="p69">WinEdt</a></i> Table + Designer</a></b><br><p>Last optional add-on for + <i><a name="p70">WinEdt</a></i>, providing a new table editor. + </p> + </li> + <li><b>Install <i><a name="p71"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i></b><br><p>This is a free equivalent to + <i><a name="p72">WinEdt</a></i>. The interface is + slightly different (see <a href="#tcpt1">Figure 1.2</a>) but it + is becoming very popular. + </p> + </li> + <li><b>Install <i><a name="p73">GhostScript</a></i> and + <i><a name="p74">GSview</a></i></b><br><p>These are essential for viewing the PostScript and + PDF output, especially if you don't have any other PDF + viewer installed. + </p> + </li> + </ol> + <p>You get a choice of editors, + but the one which features in + <i><a name="p75">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> is + <i><a name="p76"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>. This is an + <a name="IDE" class="acroref">Integrated Development + Environment</a> (<small>IDE</small>) which lets you manage all the files + related to each document. In many cases, of course, you'll + only have one (the text itself) but if you are working with + anything beyond simple articles, you'll probably have + illustrations (images or diagrams), and possibly separate + chapter files for larger documents, plus indexes, + glossaries, bibliographies, etc. I recommend that you create + a new project for each new document, even if it's a + single-file article, as I did for the example in <a href="#tcpt1">Figure 1.2</a>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.2 <span class="TEX">T<span class="E">E</span>X</span> Live (<span class="TEX">T<span class="E">E</span>X</span> Collection 2003) + </h3> + <ol> + <lh>Once the installation program is running:</lh> + <li><b><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></b><br><p>Install <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> itself from the + <span class="guimenu">TeXLive Software</span>→<span class="guimenuitem">Install on + Hard Disk</span> menu. If you're new to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, pick Quick Install on the following screen. This + gives you everything you need to get started, and + doesn't ask any questions, it just installs it all + straight away. + </p> + <p>If you're installing under Windows NT, 2000, or + XP, you may want to click on the option to install for + all users if you have other users on your system. + </p> + <p>If you want to use <i><a name="p77">Emacs</a></i> + as your editor, click the option for Xem<span class="TEX">T<span class="E">E</span>X</span> + Support.<sup><a href="#F8">2</a></sup></p> + </li> + <li><b>Emacs</b><br><p>After installation, right-click and drag + <code>Xemacs.exe</code> from the + <code>C:\Program Files\TeXLive\bin\win32</code> + folder out onto your desktop and let go, then pick + ‘Create Shortcut’. This places + <i><a name="p79">Emacs</a></i> on your desktop for + easy access. + </p> + </li> + <li><b>WinShell and WinEdt</b><br><p>If you want to install + <i><a name="p80">WinShell</a></i>, run the installer + program in the <code>support/winshell</code> + directory. For <i><a name="p81">WinEdt</a></i> you + must go to their Web site (<a href="http://www.winedt.com/"><tt>http://www.winedt.com/</tt></a>) for a + downloadable version. + </p> + <p>You don't have to install just one editor: if + you've got the space, install them all so you can + try them out. You can always uninstall the ones you + don't want afterwards. + </p> + </li> + <li><b>GSView</b><br><p>Ghostscript is installed automatically, but for + <i><a name="p82">GSView</a></i> you need to go to + <a href="http://www.cs.wisc.edu/~ghost/gsview/"><tt>http://www.cs.wisc.edu/~ghost/gsview/</tt></a>, + and download the most recent version. + </p> + <p>If you use <i><a name="p83">GSView</a></i>, please + register your copy with Ghostgum, Pty. (<a href="http://www.ghostgum.com.au/"><tt>http://www.ghostgum.com.au/</tt></a>). + </p> + </li> + </ol> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Please read the <span class="TEX">T<span class="E">E</span>X</span> Live update pages at <a href="http://www.tug.org/texlive/bugs.html"><tt>http://www.tug.org/texlive/bugs.html</tt></a> for + details of any changes since the disks were released, and + download and install any additional software + required. + </p> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F8">Note this unfortunate choice of name is nothing + to do with <a name="em">Eberhard Matthes</a>' MS-DOS implementation of <span class="TEX">T<span class="E">E</span>X</span> + called em<span class="TEX">T<span class="E">E</span>X</span> — the ‘Xem’ is + short for <i><a name="p78">Xemacs</a></i>.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.3 Installation problems + </h3> + <p>It's always annoying when a program that's supposed to + install painlessly causes trouble, and none the more so when + everyone else seems to have been able to install it without + problems. I've installed <span class="TEX">T<span class="E">E</span>X</span> hundreds of times and very + rarely had any difficulties, but these are a few of the + occasions when I did. + </p> + <blockquote> + <dl> + <dt><b>Bad hard disks</b></dt> + <dd> + <p>As recommended in <a href="#wininst">section 1.4</a>, run a + scan and defragmentation of your hard disk[s] before + you start. It should take under an hour on a modern + machine unless you have a very large disk, and it may + need overnight on an older machine. Clean your CD or DVD + drive if it's been in heavy use. <span class="TEX">T<span class="E">E</span>X</span> uses a very + large number of very small files, so there is a lot of + disk activity during an installation. As also + recommended in <a href="#lininst">section 1.2</a>, if you have + the chance to reformat the hard disk, pick the + smallest granularity (cluster size) possible. + </p> + </dd> + <dt><b>Registry errors</b></dt> + <dd> + <p>This only affects Microsoft Windows users. The + Registry is where Microsoft want software companies + automatically to store details of all the programs you + install. Unfortunately the Registry is grossly abused + by marketing departments to try and foist undesirable + links on you, the user. You will see this with many + commercial programs, where a particular type of file + you've been able to double-click on for years suddenly + runs a different program. Some programs install + obsolete or broken copies of program libraries (DLL + files), overwriting ones which were working perfectly. + Worse, the viruses, trojans, and worms which typically + infect unprotected Windows systems can leave unwanted + links to web pages, or change some of the ways in + which Windows operates. The overall effect can be that + the whole machine slows down, or that files which are + expected to do one thing do another. The best + solution is a thorough Registry clean-out, using one + of the many programs available for the purpose. + </p> + </dd> + <dt><b><a name="latest">Use the latest versions</a></b></dt> + <dd> + <p>Before installing, check the <small><a href="#CTAN" class="acroref" name="A57" title="Comprehensive Archive Network">CTAN</a></small> web site (<a href="http://www.ctan.org/"><tt>http://www.ctan.org/</tt></a> for any updated + copy of the installation program. This is called + <code>install-tl.sh</code> for Linux and Mac + systems, and <code>Setup.exe</code> for + Microsoft Windows (on the <span class="TEX">T<span class="E">E</span>X</span> Collection 2003 CD it + was called <code>TeXSetup.exe</code>). Just + occasionally a bug slips through onto the production + CD or DVD, and although it's always fixed and notified + on <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a>, + that's a high-volume newsgroup and even the sharpest + eyes may miss an announcement. + </p> + </dd> + <dt><b>Stick to the defaults</b></dt> + <dd> + <p>Unless you're a computer scientist or a software + engineer, I suggest you never change or fiddle with + the default directories for installation. I know some + of them look odd, but they're that way for a purpose, + especially when it comes to avoiding directories will + spaces in their names, like the notorious + <code class="literal">C:\Program Files</code>. Although most + modern systems cope happily with spaces in filenames + and directory names, they are usually A Bad Design + Idea, and should be avoided like the plague (spaces + are forbidden in web addresses for the same reason: + the people who designed them knew the pitfalls). It + may look snazzier to put the installation in + <code class="literal">My Cute Stuff</code>, but please + don't: you'll just make it harder to find, harder to + fix problems, and more embarrassing if you have to + explain it to someone else trying to help you. + </p> + </dd> + </dl> + </blockquote> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="plaintext">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">2</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Using your editor to create documents</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#mark-up">Markup</a></li> + <li><a href="#quickstart">Quick start for the impatient</a></li> + <li><a href="#editors">Editors</a></li> + <li><a href="#commands"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands</a></li> + <li><a href="#specials">Special characters</a></li> + <li><a href="#quotes">Quotation marks</a></li> + <li><a href="#accents">Accents</a></li> + <li><a href="#handj">Dimensions, hyphenation, justification, and breaking</a></li> + <li><a href="#math">Mathematics</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents are all <b><i><a name="plain-text">plain-text</a></i></b> files.<sup><a href="#F9">1</a></sup> You can edit them with any editor, and transfer + them to any other computer system running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and they will + format exactly the same. Because they are plain text they cannot + corrupt your system, as they cannot be used for hiding or + transporting virus infections as binary wordprocessor files can. + Everything you can see is in the file and everything in the file + is there for you to see: there is nothing hidden or secret and + there are no manufacturers' proprietary + ‘gotchas’ like suddenly going out of date + with a new version. + </p> + <ol class="footnotes" start="1"> + <li><a name="F9">‘Plain-text’ + originally meant just the 95 printable characters of the + <a name="ASCII" class="acroref">American Standard Code for Information + Interchange</a> (<small>ASCII</small>) — see <a href="#asciicodes">Table C.1</a> — but now more commonly includes + both these <em>and</em> the relevant 8-bit + characters from <em>one</em> (only) character + set such as ISO-8859-1 (Western Latin–1) or + ISO-8859-15 (Western Latin plus the Euro sign). These are + international standards which work everywhere: you should + avoid using manufacturers' proprietary character sets + like Microsoft Windows–1252 or Apple Macintosh + Roman–8, because they may make your documents unusable + on some other systems.</a></li> + </ol> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.1 <a name="mark-up">Markup</a></h2> + <p>In a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document, you type your text along with + <b><i><a name="markup">markup</a></i></b> which identifies the + important parts of your document by name, for example + ‘title’, ‘section’, + ‘figure’, etc. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does all the formatting + for you automatically, using the markup to guide its internal + rules and external stylesheets for typesetting. + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="">Markup</a></h3> + <p>This is a term from printing, and originally meant the + notes on how to lay the document out, or the instructions + which a proofreader might add during correction. It now also + means instructions or descriptions added to a computer + document to act as guidelines for identification or + formatting. Markup has been around for + <em>ages</em>. + </p> + <div align="center"> + <table> + <tr> + <td valign="top" align="left"> + <div align="center" style="margin:12px"><img src="55-1L-part.png" width="288"></div> + </td> + <td valign="top" width="108" align="left" class="" colspan="2"><cite><a href="#tain" name="C23">Leabhar na h-Uidhri: The Book of the Dun Cow</a></cite></td> + </tr> + <tr> + <td valign="top" align="left"> + <div align="center" style="margin:12px"><img src="23-part.png" width="288"></div> + </td> + <td valign="top" width="108" align="left" class="" colspan="2"><cite><a href="#varmints" name="C24">Scribner's Magazine</a></cite></td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">.h1 Interest Rates</code></td> + <td valign="top" width="108" align="left" class="">Runoff</td> + <td valign="top" align="right"><i>c.</i>1970 + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">\section{Interest + Rates}</code></td> + <td valign="top" width="108" align="left" class=""><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></td> + <td valign="top" align="right">1984</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal"><sec><ttl>Interest + Rates</ttl>...</code></td> + <td valign="top" width="108" align="left" class=""><small><a href="#SGML" class="acroref" name="A59" title="Standard Generalized Markup Language">SGML</a></small></td> + <td valign="top" align="right">1985</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal"><H1>Interest + Rates</H1></code></td> + <td valign="top" width="108" align="left" class=""><small><a href="#HTML" class="acroref" name="A60" title="HyperText Markup Language">HTML</a></small></td> + <td valign="top" align="right">1991</td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </div> + <p>You do not need to format any of your text <em>in + your editor</em>, because <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does it + all by itself when it typesets. You can of course regularise + or neaten its appearance <em>in your editor</em> + for ease of editing (for example, keeping each item in a list + on a separate line), but this is not required. + </p> + <p>You will often hear <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> markup referred to as + ‘commands’ or sometimes ‘control + sequences’ (the proper <span class="TEX">T<span class="E">E</span>X</span>nical term for them). + For + all practical purposes these terms all mean the same + thing. + </p> + <p>This course assumes that users have one of + <i><a name="p84"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i>, + <i><a name="p85"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>, + <i><a name="p86">WinShell</a></i>, or + <i><a name="p87">WinEdt</a></i> (Windows only), or + <i><a name="p88">Emacs</a></i> or <span class="LYX">L<span class="Y">Y</span>X</span> (any platform) + installed. These are discussed briefly in <a href="#editors">section 2.3</a>, and the menus and toolbars for running + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are explained in <a href="#process">Chapter 4</a>. + </p> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.2 <a name="quickstart">Quick start for the impatient</a></h2> + <p>If you already know all this stuff about editors and + plain-text files and running programs, and you know your system + is already correctly installed (including your editor), + you'd probably like to type something in and see <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + do its job. If you don't, then skip forward to <a href="#commands">section 2.4</a> and read a bit more about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + first. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="sampledoc">Sample document</a></caption> + <blockquote><pre class="footnotesize"> +\documentclass[12pt]{article} +\usepackage{palatino,url} +\begin{document} +\section*{My first document} + +This is a short example of a \LaTeX\ document I wrote +on \today. It shows a few simple features of automated +typesetting, including + +\begin{itemize} +\item setting the default font size to 12pt; +\item specifying `article' type for formatting; +\item using the Palatino typeface; +\item adding special formatting for URIs; +\item formatting a heading in `section' style; +\item using the \LaTeX\ logo; +\item generating today's date; +\item formatting a list of items; +\item centering and italicizing; +\item autonumbering the pages. +\end{itemize} + +\subsection*{More information} + +This example was taken from `Formatting Information', +which you can download from +\url{http://www.ctan.org/tex-archive/info/beginlatex/} +and use as a teach-yourself guide. + +\begin{center} +\textit{Have a nice day!} +\end{center} + +\end{document} + </pre></blockquote> + <hr> + </div> + <ol> + <lh>Up and running in a few minutes</lh> + <li><b>Install the software</b><br><p>Make sure you have a + properly-installed <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> system and a copy of a + suitable editor. + </p> + </li> + <li><b><a name="demodoc">Create a sample document</a></b><br><p>Open your editor and type in + the text <em>exactly</em> as shown in <a href="#sampledoc">Figure 2.1</a>. Do <em>not</em> make any + changes or miss anything out or add anything different at + this stage. + </p> + </li> + <li><b>Save the document</b><br><p>Save the document as + <code>demo.tex</code></p> + </li> + <li><b>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> or <i><a name="p89">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i></b><br><p>Click on the <span class="guiicon"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> or + <span class="guiicon">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + File</span> menu item; or type <code class="literal">latex + demo</code> or <code class="literal">pdflatex demo</code> in a + command window. + </p> + </li> + <li><b>Preview the typesetting</b><br><p>Click on the <span class="guiicon">DVI</span> or + <span class="guiicon">PDFview</span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + View</span> menu item; or type your previewer + command in a terminal shell. + </p> + <p>(Note that there may be a pause the first time you use + your <small><a href="#DVI" class="acroref" name="A61" title="device-independent">DVI</a></small> viewer, while <small><a href="#WYSIWYG" class="acroref" name="A62" title="What You See Is What You Get">WYSIWYG</a></small> font files are + created.<sup><a href="#F10">2</a></sup>) + </p> + </li> + <li><b>Print it</b><br><p>Click on the <span class="guiicon">Print</span> toolbar icon + within the viewer, or use the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> Print</span> + menu item, or type + <code class="literal">dvips -f demo | lpr</code> + (Unix/Linux). + </p> + </li> + </ol> + <p>If you encounter any errors, it means you + <em>do</em> need to study this chapter after + all! + </p> + <ol class="footnotes" start="2"> + <li><a name="F10"><small><a href="#DVI" class="acroref" name="A63" title="device-independent">DVI</a></small> previewers use their + own font files specially created from the font + outlines (TrueType, OpenType, PostScript, METAFONT, + etc). The first time you use a font at a size not used + before, there will be a second or two's pause + while it gets created. The more you use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, the + less this + happens.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3 <a name="editors">Editors</a></h2><a name="I15"></a><p>All the text of your documents can be typed into your + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document from a standard keyboard using any decent + plain-text editor. However, it is more convenient to use an + editor with special features to make using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> easier. + Some of the most popular are + <i><a name="p90"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i><i><a name="p91">WinShell</a></i>, <i><a name="p92"><span class="TEX">T<span class="E">E</span>X</span>nic + Center</a></i>, and <i><a name="p93">WinEdt</a></i> + (Windows only); and <i><a name="p94"><span class="LYX">L<span class="Y">Y</span>X</span></a></i> and + <i><a name="p95">Emacs</a></i> (all platforms). + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.1 <span class="LYX">L<span class="Y">Y</span>X</span></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="lyxwin">The <span class="LYX">L<span class="Y">Y</span>X</span> document editor</a></caption> + <div align="center" style="margin:12px"><img src="lyx.png" width="75%"></div> + <hr> + </div> + <p>The <span class="LYX">L<span class="Y">Y</span>X</span> document editor (all platforms) is a special + case, as it uses the <a name="WYSIWYM" class="acroref">What You See Is + What You Mean</a> (<small>WYSIWYM</small>) model of synchronous typographic + editing as opposed to <a name="WYSIWYG" class="acroref">What You See Is + What You Get</a> (<small>WYSIWYG</small>), and many users prefer this + interface (but see the reservations in <a href="#sync">the item ‘Synchronous typographic displays’ in section 3</a>). + </p> + <p><span class="LYX">L<span class="Y">Y</span>X</span> makes a strong case for using synchronous + typographical editing: it is possible to create even quite + large and complex documents without seeing a backslash very + often, although with math or complex macros there is + probably no way to avoid having to do some manual insertion + of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> code. + </p> + <p>The free availability on multiple platforms makes this a + clear answer to the myth of ‘having to edit like a + programmer’, and as it is an Open Source project, + there is constant improvement, both to the facilities and to + the interface. + </p> + <p>Probably the only real reservation is that it does not + save native <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> files by default. It uses its own + internal format, and it can export <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for use in other + editors, but the exported files are not designed for human + legibility, only for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> processing. In a co-operative + environment this would be a serious drawback, but for the + individual user this interface is an excellent tool. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.2 <a name="texshell"><span class="TEX">T<span class="E">E</span>X</span>shell</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="texshellwin">The <span class="TEX">T<span class="E">E</span>X</span>shell editor</a></caption> + <div align="center" style="margin:12px"><img src="texshell.png" width="75%"></div> + <hr> + </div> + <p>This is one of the simplest of all the plaintext Windows + editors, but it has most of the tools needed to begin with. + Sectioning, lists, and graphics can be inserted from the + menus, and there are buttons for running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the + open document and for previewing the typeset + document. + </p> + <p>The syntactic highlighting distinguishes between + commands and your text, and it comes with options for + spellchecking (you need to install + <i><a name="p96">ispell</a></i>), and for adding math, + Greek (math), and some symbol characters from a pickchart. + The typeset display is done using your installed <small><a href="#DVI" class="acroref" name="A66" title="device-independent">DVI</a></small> viewer (there is no provision for + <small><a href="#PDF" class="acroref" name="A67" title="Portable Document Format">PDF</a></small>, although as it is + configurable, that could probably be edited into the + menus). + </p> + <p>Download the <code>.tar.gz</code> file from <small><a href="#CTAN" class="acroref" name="A68" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>support/TeXshell/</code> directory and unwrap + it into somewhere like <code>C:\Program + Files\TeXshell\</code>.<sup><a href="#F11">3</a></sup> There is a <i><a name="p97">tsconfig</a></i> + program in the same directory on <small><a href="#CTAN" class="acroref" name="A69" title="Comprehensive Archive Network">CTAN</a></small>, which is designed to help with + reconfiguring <span class="TEX">T<span class="E">E</span>X</span>shell. + </p> + <ol class="footnotes" start="3"> + <li><a name="F11">Yes, I know I said don't use directory names with + spaces in them — and so you shouldn't, for your + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents — but Windows programs are usually safe + enough in them.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.3 <a name="winshell">WinShell</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="winshellwin">The WinShell editor</a></caption> + <div align="center" style="margin:12px"><img src="winshell.png" width="75%"></div> + <hr> + </div> + <p>This is another free Windows editor for beginners with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Despite its simplicity, it is capable of a + considerable amount of document management and assistance + with editing. As well as handling stand-alone <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + files, you can create a ‘Project’ for larger + documents, which helps you keep track of additional files + like separate chapters, illustrations, diagrams, indexes, + etc. + </p> + <p>You run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> direct from the toolbar icons or with + F-key shortcuts. Both standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and + <i><a name="p98">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> are supported, as well + as creation and previewing of + <a name="t5">PostScript</a> and <small><a href="#PDF" class="acroref" name="A70" title="Portable Document Format">PDF</a></small> output. There are additional toolbars + for math characters, and there is a ‘Table + Wizard’ for handling tables. The syntax + highlighting distinguishes between commands (in blue) and + delimiters (in red), leaving your text in black. + </p> + <p>Download the + <code>WinShell<code><u>nn</u></code>.exe</code> + program (self-contained setup: the + <code><u>nn</u></code> changes with the version) from + <small><a href="#CTAN" class="acroref" name="A71" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>systems/win32/winshell/</code> directory and + double-click it to start the setup. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.4 <a name="texniccenter"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="texniccenterwin">The <span class="TEX">T<span class="E">E</span>X</span>nicCenter editor</a></caption> + <div align="center" style="margin:12px"><img src="texniccenter.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p99"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i> is a powerful + Windows editor suitable both for the beginner and the more advanced + user. Its ‘Project’ environment keeps track of + multiple files, and the processing function (the bit which + actually runs <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, here called + ‘Build’) tries to ensure that all the files you + need for a large or complex document are in place before you + start typesetting, to avoid errors like missing + illustrations. + </p> + <p>It's a much more wordprocessor-like control + interface, with configurable toolbars and button-controls + for lists, math, tables, and previewing options. + </p> + <p>Download the + <code>TXCSetup<code><u>xxx</u></code>.exe</code> + program (self-contained setup: the + <code><u>xxx</u></code> bit changes with the version) + from <small><a href="#CTAN" class="acroref" name="A72" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>systems/win32/TeXnicCenter/</code> directory + and double-click it to start the setup. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.5 <a name="winedt">WinEdt</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="winedtpic">The <i><a name="p100">WinEdt</a></i> editor</a></caption> + <div align="center" style="margin:12px"><img src="winedt.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p101">WinEdt</a></i> is a highly + configurable plain-text editor for Windows. It comes with a + host of special functions and shortcuts for + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, based on the Mik<span class="TEX">T<span class="E">E</span>X</span> distribution. It + is supplied on the <span class="TEX">T<span class="E">E</span>X</span> Collection 2004 DVD and the + <i><a name="p102">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> CD. You can also + download it from <a href="http://www.winedt.com"><tt>http://www.winedt.com</tt></a> — in either case + there's a 1-month free trial, then it reminds you to + buy it. + </p> + <p><i><a name="p103">WinEdt</a></i> uses a built-in + toolbar of configurable buttons, preset for use with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and it provides syntactic coloring of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands. Both the positioning and effect of the + buttons can be changed, using an editable file of icons and + a configuration panel. This flexibility lets you bind a + program and arguments (equivalent to a typed command) to a + particular icon. + </p> + <p>There are default buttons on the toolbar for one-click + typesetting, previewing, and + <a name="t6">PostScript</a> or <small><a href="#PDF" class="acroref" name="A73" title="Portable Document Format">PDF</a></small> generation from <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, + and it manages multi-file document projects like most of the + other editors. <i><a name="p104">Winedt</a></i> is also + used by many people for normal plaintext file-editing tasks, + in preference to more limited programs like + <i><a name="p105">Notepad</a></i>. If you're using the + fp<span class="TEX">T<span class="E">E</span>X</span> which came with the 2003 <span class="TEX">T<span class="E">E</span>X</span> + Collection, some editing of the menus is required (explained + in the local installation document) because the default + setup is for + Mik<span class="TEX">T<span class="E">E</span>X</span>/pro<span class="TEX">T<span class="E">E</span>X</span>t. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.6 GNU Emacs + </h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="">Emacs editing <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></caption> + <div align="center" style="margin:12px"><img src="emacs.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p106">Emacs</a></i> is a product of the + <small><a href="#GNU" class="acroref" name="A74" title="GNU's Not Unix">GNU</a></small> Project.<sup><a href="#F12">4</a></sup> Versions are available for all makes and models + of computer, and it has a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-mode which provides + syntactic colouring (‘fontification’ + in <i><a name="p107">Emacs</a></i>-speak) and mouseclick + processing from a menu or toolbar. + </p> + <p><i><a name="p108">Emacs</a></i> + is a very large and powerful editor, with + ‘modes’ (plug-ins) to handle almost + everything you do on a computer. Many users run + <i><a name="p109">Emacs</a></i> once on logging in, and + never leave it for the rest of the day — or month. As + well as edit, you can use it to read your mail, browse the + Web, read Usenet news, do wordprocessing and spreadsheets, + compile programs, help you write in any computer + language — including <small><a href="#XML" class="acroref" name="A76" title="Extensible Markup Language">XML</a></small> and + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> — and it provides a few games as well. + </p> + <p><i><a name="p110">Emacs</a></i> + knows about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and how to process it, so it comes with + a menu full of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> operations to click on. If you are + editing complex documents with mathematics, there is a mode + (<i><a name="p111">AUC<span class="TEX">T<span class="E">E</span>X</span></a></i>) which has even more + functionality. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> support is well-developed, and there + is a hierarchy of newsgroups for + <i><a name="p112">Emacs</a></i> support. + </p> + <p>Because <i><a name="p113">Emacs</a></i> runs on + Microsoft Windows, Macs, Linux, and most other platforms, + many <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users who have multiple machines (and those + who have multiple users to support) prefer it to other + editors because it provides the same environment regardless + of which platform they are using. + </p> + <p>It's sometimes criticised for a steep learning + curve, but in fact it's no worse in this respect than + any other editor, given the power that it provides, and it + is significantly better than most which lack many of the + authorial tools available in Emacs. + </p> + <ol class="footnotes" start="4"> + <li><a name="F12">‘<a name="GNU" class="acroref">GNU's Not + Unix</a> (<small>GNU</small>)’ is a project to make a + computing environment completely free of + restrictions.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.7 Mac editors + </h3> + <p>Mac users will be disappointed that I haven't included + any of the Mac interfaces here. It's simple: I don't have a + Mac right now to try them out on. I hope to remedy this for a + future edition. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4 <a name="commands"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands</a></h2> + <p><a name="bsol"></a><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands all begin with a + <b><i><a name="backslash">backslash</a></i></b> + (<code class="literal">\</code>)<sup><a href="#F13">5</a></sup> and are usually made up of lowercase + letters only, for example: + </p> + <blockquote><pre> +\tableofcontents + </pre></blockquote> + <p>The + <code class="command"><a name="c3">\tableofcontents</a></code> command is an instruction + to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to insert the Table of Contents at this point. You + would usually use this in a book or report (or perhaps a very + long article) somewhere close to the beginning. You don't have + to do anything else. Provided that you have used the + sectioning commands described in <a href="#sections">section 3.5</a>, + all the formatting and numbering for the Table of Contents is + completely automated. + </p> + <ol class="footnotes" start="5"> + <li><a name="F13">Do not confuse the backslash + with the forward slash (<code class="literal">/</code>). They are + two different characters. The forward slash is used on the + Web and on Unix systems to separate directory names and + filenames. The backslash is used in Microsoft Windows + (only) for the same purpose, and in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to begin a + command.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.1 <a name="simplecmd">Simple commands</a></h3> + <p><a name="swallow"></a>Simple one-word commands like + <code class="command"><a name="c4">\tableofcontents</a></code> must be separated from + any following text with <b><i><a name="wsp">white-space</a></i></b>. This means a + normal space, or a newline [linebreak] or a TAB character. + For example either of these two forms will work: + </p> + <blockquote><pre> +\tableofcontents Thanks to Aunt Mabel for all her help +with this book. + </pre></blockquote> + <blockquote><pre> +\tableofcontents +Thanks to Aunt Mabel for all her help with this book. + </pre></blockquote> + <p>If you forget the white-space, as in the following + example, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will try to read it as a command + called <code class="literal">\tableofcontentsThanks</code>. There's no + such command, of course, so <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will complain at you by + displaying an error message (see <a href="#undefcs">section 4.2.3.2</a>). + </p> + <blockquote><pre> +\tableofcontentsThanks to Aunt Mabel for all her help +with this book. + </pre></blockquote> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> swallows any white-space which follows a command + ending in a letter. It does this automatically, so you + don't get unwanted extra space in your typeset output, + but it does mean that any simple command which ends in a + letter and has no arguments (see below) must be followed by + white-space before normal text starts again, simply to keep + it separate from the text. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.2 <a name="cmdargs">Commands with arguments</a></h3> + <p>Many <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands are followed by one or more + <b><i><a name="arguments">arguments</a></i></b>, a term from + the field of Computer Science, meaning information to be acted + upon. Here are two examples: + </p> + <blockquote><pre> +\chapter{Poetic Form} +\label{pform} + </pre></blockquote> + <p>Such arguments always go in + <code class="literal">{</code><b><i><a name="curly">curly + braces</a></i></b><code class="literal">}</code> like + those shown above. Be careful not to confuse the + curly braces on your keyboard with round parentheses + <code class="literal">( )</code>, square brackets + <code class="literal">[ ]</code>, or angle brackets + <code class="literal">< ></code>. They are all + different and they do different things. + </p> + <p>With commands that take arguments you do + <em>not</em> need to use extra white-space after + the command, because there is an argument following it + which will keep it separate from any normal text with + follows after that. The following is therefore perfectly + correct (although unusual because it's harder to edit: + normally you'd leave a blank line between the chapter title or + label and the start of the first paragraph). + </p> + <blockquote><pre> +\chapter{Poetic Form}\label{pform}The shape of poetry +when written or printed distinguishes it from prose. + </pre></blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.3 <a name="white-space">White-space in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h3><a name="I17"></a><p>In <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, all <em>multiple</em> + spaces, newlines (linebreaks), and TAB characters are + treated as if they were a <em>single</em> space + or newline during typesetting. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does its own spacing + and alignment using the instructions you give it, so you + have extremely precise control. You are therefore free to + use extra white-space in your editor for optical ease and + convenience when editing. + </p> + <p> + The following is therefore exactly equivalent to the example + in the preceding section: + </p> + <blockquote><pre> +\chapter {Poetic + Form}\label + {pform} + +The shape of poetry when written or printed +distinguishes it from prose. + </pre></blockquote> + <p>That is, it will get typeset exactly the same. In + general, just leave a blank line between paragraphs and a + single space between words and sentences. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will take + care of the formatting. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.5 <a name="specials">Special characters</a></h2><a name="I18"></a><p>There are ten keyboard characters which have special + meaning to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and cannot be used on their own except for + the following purposes: + </p> + <div align="center"> + <table cellpadding="1mm"> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left">Meaning</th> + <th valign="bottom" align="center"><em>If you need<br> the actual character<br> itself, + type:</em></th> + <th valign="bottom" align="center">Character</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">\</tt></td> + <td valign="top" align="left">The command character</td> + <td valign="top" align="center"><code class="command"><a name="c5">\textbackslash</a></code></td> + <td valign="top" align="center">\</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">$</tt></td> + <td valign="top" align="left">Math typesetting delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c6">\$</a></code></td> + <td valign="top" align="center">$</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">%</tt></td> + <td valign="top" align="left">The comment character</td> + <td valign="top" align="center"><code class="command"><a name="c7">\%</a></code></td> + <td valign="top" align="center">%</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">^</tt></td> + <td valign="top" align="left">Math superscript character</td> + <td valign="top" align="center"><code class="command"><a name="c8">\^</a></code></td> + <td valign="top" align="center">^</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">&</tt></td> + <td valign="top" align="left">Tabular column separator</td> + <td valign="top" align="center"><code class="command"><a name="c9">\&</a></code></td> + <td valign="top" align="center">&</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">_</tt></td> + <td valign="top" align="left">Math subscript character</td> + <td valign="top" align="center"><code class="command"><a name="c10">\_</a></code></td> + <td valign="top" align="center">_</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">˜</tt></td> + <td valign="top" align="left">Non-breaking space</td> + <td valign="top" align="center"><code class="command"><a name="c11">\˜</a></code></td> + <td valign="top" align="center">˜</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">#</tt></td> + <td valign="top" align="left">Macro parameter symbol</td> + <td valign="top" align="center"><code class="command"><a name="c12">\#</a></code></td> + <td valign="top" align="center">#</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">{</tt></td> + <td valign="top" align="left">Argument start delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c13">$\{$</a></code></td> + <td valign="top" align="center">{</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">}</tt></td> + <td valign="top" align="left">Argument end delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c14">$\}$</a></code></td> + <td valign="top" align="center">}</td> + </tr> + </table> + </div> + <p>These characters were deliberately chosen, either because + they are rare in normal text, or (in the case of $, + #, &, and %) they already had an + established special meaning on computers as <b><i><a name="metacharacters">metacharacters</a></i></b> (characters + standing as symbols for something else) by the time <span class="TEX">T<span class="E">E</span>X</span> was + written, and it would have been misleading to choose + others. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.5.1 Using the special characters + </h3> + <p>We have already seen (<a href="#bsol">the first paragraph in section 2.4</a>) how + to use the backslash to start a command, and curly braces to + delimit an argument. The remaining special + characters are: + </p> + <blockquote> + <dl> + <dt><b><tt class="keycap">$</tt></b></dt> + <dd> + <p>Because of the special mathematical meaning + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses for the dollar-sign on its own, if you + want to print $35.99 you type + <code class="literal">\$35.99</code></p> + </dd> + <dt><b><tt class="keycap">%</tt></b></dt> + <dd> + <p><a name="comment"></a>The <b><i><a name="commentchar">comment character</a></i></b> makes + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> ignore the remainder of the line in your + document, so you can see it in your editor, but it + will never get typeset. For example <br><code class="literal">Today's price per kilo is £22.70 % get Mike to update this</code><br>If you want to print 45% you need + to type <code class="literal">45\%</code></p> + </dd> + <dt><b><tt class="keycap">^</tt></b></dt> + <dd> + <p>The caret sign lets you type + <code class="literal">\(E=mc^2\)</code> to get <span class="math"><i>E=mc</i><sup>2</sup></span>. If you need the circumflex accent + on a letter like ê, just type the letter or use the + symbolic notation <code class="literal">\^e</code>. + </p> + </dd> + <dt><b><tt class="keycap">&</tt></b></dt> + <dd> + <p>The ampersand is used in tables to separate + columns (see <a href="#tables">section 6.3</a>). If you want to + print AT&T you need to type + <code class="literal">AT\&T</code>. + </p> + </dd> + <dt><b><tt class="keycap">_</tt></b></dt> + <dd> + <p>The underscore lets you type + <code class="literal">\(r_2\)</code> for <span class="math"><i>r</i><i>2</i></span>. If you want to underline text + (extremely rare in typesetting) see <a href="#uline">the last paragraph in section 8.2.3</a>. + </p> + </dd> + <dt><b><a name="tilde"><tt class="keycap">˜</tt></a></b></dt> + <dd> + <p>The tilde prints as a space, but prevents a + linebreak ever occurring at that point. It's often + used between a person's initials and their surname, eg + <code class="literal">Prof D.E.~Knuth</code></p> + </dd> + <dt><b><tt class="keycap">#</tt></b></dt> + <dd> + <p>If you want a + <b><i><a name="hash">hash mark</a></i></b> (the + <b><i><a name="octothorpe">octothorpe</a></i></b> or + American number or ‘pound’ [weight] sign) + you type <code class="literal">\#</code>. For a pound + (sterling)<a name="I19"></a> + sign £, now nearly obsolete except in the UK and + some of its former dependencies, use your + <tt class="keycap">£</tt> key or type + <code class="command"><a name="c15">\textsterling</a></code>. + </p> + </dd> + </dl> + </blockquote> + <p>While we're on the subject of money, an unusual but + interesting serif-font Euro<a name="I20"></a> sign <span style="font-family:serif; ">€</span> + is got with the <code class="command"><a name="c16">\texteuro</a></code> command from the + <span class="package"><a name="m3">textcomp</a></span> package. The standard + sans-serif <span style="font-family:sans-serif; ">€</span> needs the + <span class="package"><a name="m4">marvosym</a></span> package and is done with + the <code class="command"><a name="c17">\EUR</a></code> command.<sup><a href="#F14">6</a></sup></p> + <ol class="footnotes" start="6"> + <li><a name="F14">The European Commission has specified that everyone + use the sans-serif design, even in serif text, but this + is amazingly ugly and most designers rightly ignore + it.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.6 <a name="quotes">Quotation marks</a></h2><a name="I21"></a><p>Do <em>not</em> use the unidirectional + typewriter keyboard <tt class="keycap">"</tt> key for quotation + marks. Correct typographic quotes are got with the <tt class="keycap">`</tt> key and the <tt class="keycap">'</tt> key, doubled if you want double + quotes: + </p> + <blockquote class="example"><pre> +He said, ``I'm just going out.'' + </pre><p class="example"><span style="font-family:Times; ">He said, + ‘‘I'm just going out.’’</span></p> + </blockquote> + <p>This ensures you get real left-hand + and right-hand (opening and closing) quotes (usually shaped + like tiny + 66 and 99 + or as symmetrically-balanced strokes). If you are using + <i><a name="p114">Emacs</a></i> as your editor, the + <tt class="keycap">"</tt> key is specially programmed in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-mode to think for itself and produce correct <span style="font-family:monospace; ">``</span> and + <code class="literal">''</code> characters (so this is one occasion when + you <em>can</em> use the <tt class="keycap">"</tt> + key). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are reading this in a + browser, or if you have reprocessed the file using different + fonts, it may not show you real quotes (some old browser + fonts are defective) and the <code class="command"><a name="c18">\thinspace</a></code> + below may be too wide. Download the typeset (<small><a href="#PDF" class="acroref" name="A77" title="Portable Document Format">PDF</a></small>) version of this document to see the + real effect. + </p> + </blockquote> + <p><a name="thinspace"></a>When typing one quotation inside another, + there is a special command <code class="command"><a name="c19">\thinspace</a></code> which + provides just enough separation between double and single + quotes (a normal space is too much and could allow an unwanted + linebreak): + </p> + <blockquote class="example"><pre> +He said, `Her answer was ``never''\thinspace'. + </pre><p class="example">He said, ‘Her answer was + ‘‘never’’ ’. + </p> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.7 <a name="accents">Accents</a></h2><a name="I22"></a><p>For accented letters in western + European languages<sup><a href="#F15">7</a></sup> or other Latin-alphabet character sets just use + the accented keys on your keyboard — if you have the right + ones. You must also tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> what character repertoire + (‘input encoding’) you are using. You + specify this by using the <span class="package"><a name="m5">inputenc</a></span> + package<sup><a href="#F16">8</a></sup> in your preamble + with the relevant option. For example, to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> you + will be typing ISO Latin–1 accented characters, + use: + </p> + <blockquote><pre> +\usepackage[latin1]{inputenc} + </pre></blockquote> + <p>If you have a real Unicode editor, which lets you insert + any letter or symbol from any language on the planet (for + example, mixed European, Asian, and other languages), use + <code class="literal">utf8</code> instead of <code class="literal">latin1</code>. + The encoding definitions that are available on your system are + in <code>/texmf/tex/latex/base</code> (all files + ending in <code>.def</code>). + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="keystrokes">If you don't have accented letters</a></h3> + <p>This is for users whose keyboards do not have native + accent characters on them. See your Operating System manual + for full details. Here are two common examples: + </p> + <ul> + <li> + <p>Under Linux systems the letter + é is usually got with + <tt class="keycap">AltGr</tt>–<tt class="keycap">;</tt> <tt class="keycap">e</tt>. Refer to the + <i><a name="p115">xkeycaps</a></i> utility for a table + of key codes and combinations (get it from <a href="http://www.jwz.org/xkeycaps/"><tt>http://www.jwz.org/xkeycaps/</tt></a>). + </p> + </li> + <li> + <p>Under Microsoft Windows the letter é is got with + <tt class="keycap">Ctrl</tt>–<tt class="keycap">'</tt> <tt class="keycap">e</tt> or by holding down the + <tt class="keycap">Alt</tt> key and typing + <tt class="keycap">0</tt> <tt class="keycap">1</tt> <tt class="keycap">3</tt> <tt class="keycap">0</tt> + on the numeric keypad (<em>not</em> the top + row of shifted numerals). Refer to the + <i><a name="p116">charmap</a></i> utility for a table + of key codes and combinations (find it in the + <code>C:\Windows</code> folder). + </p> + </li> + </ul> + </td> + </tr> + </table> + </div> + <p>If you don't have accented letter keys on your + keyboard, you'll need to use your operating system's + standard keyboard <tt class="keycap">Ctrl</tt> or + <tt class="keycap">Alt</tt> key combinations to generate the + characters (see <a href="#keystrokes">the panel ‘If you don't have accented letters’ in this section</a>). + </p> + <p>If you cannot generate accented characters from your + keyboard at all, or if you need additional accents or symbols + which are not in any of the keyboard tables, you can use the + symbolic notation in <a href="#accentcodes">Table 2.1</a>. In fact, + this can be used to put any accent over any letter: if you + particularly want a g˜ you can have one with the command + <code class="command"><a name="c20">\˜</a></code><code class="literal">g</code> (and Welsh + users can get ŵ with + <code class="command"><a name="c21">\^</a></code><code class="literal">w</code>). + </p> + <p>If you use this symbolic method only, you do not need to + use the <span class="package"><a name="m6">inputenc</a></span> package. Before the + days of keyboards and screens with their own real accented + characters, the symbolic notation was the + <em>only</em> way to get accents, so you may come + across a lot of older documents (and users!) using this method + all the time: it does have the advantage in portability that + the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file remains plain <small><a href="#ASCII" class="acroref" name="A78" title="American Standard Code for Information Interchange">ASCII</a></small>, which will work on all machines + everywhere, regardless of their internal encoding, and even + with very old <span class="TEX">T<span class="E">E</span>X</span> installations.<sup><a href="#F17">9</a></sup></p> + <div align="center" class="table"> + <table> + <caption><i>Table 2.1</i>. <a name="accentcodes">Built-in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> accents</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Accent</th> + <th valign="bottom" align="center">Example</th> + <th valign="bottom" align="center">Characters to type</th> + </tr> + <tr> + <td valign="top" align="left">Acute (fada)</td> + <td valign="top" align="center">é</td> + <td valign="top" align="center"><code class="literal">\'e</code></td> + </tr> + <tr> + <td valign="top" align="left">Grave</td> + <td valign="top" align="center">è</td> + <td valign="top" align="center"><code class="literal">\`e</code></td> + </tr> + <tr> + <td valign="top" align="left">Circumflex</td> + <td valign="top" align="center">ê</td> + <td valign="top" align="center"><code class="literal">\^e</code></td> + </tr> + <tr> + <td valign="top" align="left">Umlaut or diæresis</td> + <td valign="top" align="center">ë</td> + <td valign="top" align="center"><code class="literal">\"e</code></td> + </tr> + <tr> + <td valign="top" align="left">Tilde</td> + <td valign="top" align="center">ñ</td> + <td valign="top" align="center"><code class="literal">\~n</code></td> + </tr> + <tr> + <td valign="top" align="left">Macron</td> + <td valign="top" align="center">ō</td> + <td valign="top" align="center"><code class="literal">\=o</code></td> + </tr> + <tr> + <td valign="top" align="left">Bar-under</td> + <td valign="top" align="center"><span style=""><u>o</u></span></td> + <td valign="top" align="center"><code class="literal">\b o</code></td> + </tr> + <tr> + <td valign="top" align="left">Dot-over (séımhıú)</td> + <td valign="top" align="center"><span style=""><img src="mdot.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\.m</code></td> + </tr> + <tr> + <td valign="top" align="left">Dot-under</td> + <td valign="top" align="center"><span style=""><img src="sdot.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\d s</code></td> + </tr> + <tr> + <td valign="top" align="left">Breve</td> + <td valign="top" align="center">ŭ</td> + <td valign="top" align="center"><code class="literal">\u u</code></td> + </tr> + <tr> + <td valign="top" align="left">Háček (caron)</td> + <td valign="top" align="center">ŭ</td> + <td valign="top" align="center"><code class="literal">\v u</code></td> + </tr> + <tr> + <td valign="top" align="left">Long umlaut</td> + <td valign="top" align="center">ő</td> + <td valign="top" align="center"><code class="literal">\H o</code></td> + </tr> + <tr> + <td valign="top" align="left">Tie-after</td> + <td valign="top" align="center"><span style=""><img src="ootie.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\t oo</code></td> + </tr> + <tr> + <td valign="top" align="left">Cedilla</td> + <td valign="top" align="center">ç</td> + <td valign="top" align="center"><code class="literal">\c c</code></td> + </tr> + <tr> + <td valign="top" align="left">O-E ligature</td> + <td valign="top" align="center">œ, Œ</td> + <td valign="top" align="center"><code class="literal">\oe</code>, + <code class="literal">\OE</code></td> + </tr> + <tr> + <td valign="top" align="left">A-E ligature</td> + <td valign="top" align="center">æ, Æ</td> + <td valign="top" align="center"><code class="literal">\ae</code>, + <code class="literal">\AE</code></td> + </tr> + <tr> + <td valign="top" align="left">A-ring</td> + <td valign="top" align="center">å, Å</td> + <td valign="top" align="center"><code class="literal">\aa</code>, + <code class="literal">\AA</code></td> + </tr> + <tr> + <td valign="top" align="left">O-slash</td> + <td valign="top" align="center">ø, Ø</td> + <td valign="top" align="center"><code class="literal">\o</code>, + <code class="literal">\O</code></td> + </tr> + <tr> + <td valign="top" align="left">Soft-l</td> + <td valign="top" align="center"><span style="font-family:Times; ">ł, Ł</span></td> + <td valign="top" align="center"><code class="literal">\l</code>, + <code class="literal">\L</code></td> + </tr> + <tr> + <td valign="top" align="left">Ess-zet (scharfes-S)</td> + <td valign="top" align="center">ß</td> + <td valign="top" align="center"><code class="literal">\ss</code></td> + </tr> + </table> + </div> + <p>Irish and Turkish dotless-ı is done with the + special command <code class="command"><a name="c22">\i</a></code>, so an í-fada + (which is normally typed with <tt class="keycap">í</tt>) + requires <code class="literal">\'\i</code> if you need to type it in + the long format, followed by a backslash-space or dummy pair of + curly braces if it comes at the end of a word and there is no + punctuation, because of the rule that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> control + sequences which end in a letter (see <a href="#swallow">the first paragraph in section 2.4.1</a>) always absorb any following space. So + what you might see as <cite>Rí + Teamhraċ</cite> has to be <code class="literal">R\'\i\ + Tea\.mra\.c</code> when typed in full (there are not + usually any keyboard keys for the dotless-ı or the + lenited characters). A similar rule applies to dotless-<span style="font-family:Times; ">j</span> and to uppercase + Í. + </p> + <ol class="footnotes" start="7"> + <li><a name="F15">ISO 8859-1 (Latin–1, Western European) to + 8859-15 (includes the Euro).</a></li> + <li><a name="F16">We haven't covered the use of + packages yet. Don't worry, see <a href="#packages">section 5.1</a> + if you're curious.</a></li> + <li><a name="F17">Remember not everyone is lucky enough to be able to + install new software: many users on corporate and academic + networks still have to use old versions of <span class="TEX">T<span class="E">E</span>X</span> because + their system administrators are too busy to + install new ones.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8 <a name="handj">Dimensions, hyphenation, justification, and breaking</a></h2><a name="I23"></a><a name="I24"></a><a name="I25"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal measurement system is + extraordinarily accurate. The underlying <span class="TEX">T<span class="E">E</span>X</span> engine + conducts all its business in units smaller than the wavelength + of visible light, so if you ask for 15mm space, that's + what you'll get — within the limitations of your + screen or printer, of course. Most screens cannot show + dimensions of less than + <span class="math">1/96</span>″ without resorting to magnification + or scaling; and on printers, even at 600dpi, fine oblique + lines or curves can still sometimes be seen to stagger the + dots. + </p> + <p>At the same time, many dimensions in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + preprogrammed formatting are specially set up to be flexible: + so much space, plus or minus certain limits to allow the + system to make its own adjustments to accommodate variations + like overlong lines, unevenly-sized images, and non-uniform + spacing around headings. + </p> + <p><span class="TEX">T<span class="E">E</span>X</span> uses a very sophisticated + justification algorithm to achieve a smooth, even texture to + normal paragraph text. The programming for this has been + borrowed by a large number of other DTP systems, and users of + these are often quite unaware that they are in fact using a + significant part of <span class="TEX">T<span class="E">E</span>X</span> in their work. + Occasionally, however, you will need to hand-correct an + unusual word-break or line-break, and there are facilities for + doing this on individual occasions as well as throughout a + document. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.1 <a name="dimensions">Specifying size units</a></h3><a name="I27"></a><a name="I28"></a><p>Most people in printing and publishing habitually use + points and picas and ems. Some designers use cm and mm. Many + English-language speakers still use inches. You can specify + lengths in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in any of these units, plus some others + (see <a href="#units">Table 2.1</a>). + </p><a name="I29"></a><a name="I30"></a><a name="I31"></a><a name="I32"></a><a name="I33"></a><a name="I34"></a><a name="I35"></a><a name="I36"></a><a name="I37"></a><a name="I38"></a><a name="I39"></a><a name="I40"></a><a name="I41"></a><div align="center" class="table"> + <table> + <caption><i>Table 2.1</i>. <a name="units">Units in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Unit</th> + <th valign="bottom" align="left" width="576">Size</th> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Printers' fixed measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">pt</td> + <td valign="top" width="576" align="left" style="">Anglo-American standard points (72.27 to the + inch) + </td> + </tr> + <tr> + <td valign="top" align="left">pc</td> + <td valign="top" width="576" align="left" style="">pica ems (12pt)</td> + </tr> + <tr> + <td valign="top" align="left">bp</td> + <td valign="top" width="576" align="left" style="">Adobe ‘big’ points (72 + to the inch) + </td> + </tr> + <tr> + <td valign="top" align="left">sp</td> + <td valign="top" width="576" align="left" style=""><span class="TEX">T<span class="E">E</span>X</span> ‘scaled’ points + (65,536 to the pt) + </td> + </tr> + <tr> + <td valign="top" align="left">dd</td> + <td valign="top" width="576" align="left" style="">Didot (European standard) points (67.54 to the + inch) + </td> + </tr> + <tr> + <td valign="top" align="left">cc</td> + <td valign="top" width="576" align="left" style="">Ciceros (European pica ems, 12dd)</td> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Printers' relative measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">em</td> + <td valign="top" width="576" align="left" style="">ems of the current point size (historically the + width of a letter ‘M’ but see + below) + </td> + </tr> + <tr> + <td valign="top" align="left">ex</td> + <td valign="top" width="576" align="left" style="">x-height of the current font (height of letter + ‘x’) + </td> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Other measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">cm</td> + <td valign="top" width="576" align="left" style="">centimeters (2.54 to the inch)</td> + </tr> + <tr> + <td valign="top" align="left">mm</td> + <td valign="top" width="576" align="left" style="">millimeters (25.4 to the inch)</td> + </tr> + <tr> + <td valign="top" align="left">in</td> + <td valign="top" width="576" align="left" style="">inches</td> + </tr> + </table> + </div> + <p>The em can cause beginners some puzzlement because + it's based on the ‘point size’ + of the type, which is itself misleading. The point size + refers to the depth of the metal body on which foundry type + was cast in the days of metal typesetting, + <em>not</em> the printed height of the letters + themselves. Thus the letter-size of 10pt type in one face + can be radically different from 10pt type in another (look + at <a href="#fontable-adobe">the table in section 8.2</a>, where all the examples are + 10pt). An em is the height of the type-body in a specific size, + so 1em of 10pt type is 10pt and 1em of 24pt type is + 24pt. + </p> + <p>Another name for a 1em space is a + ‘quad’, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a command + <code class="command"><a name="c23">\quad</a></code> for leaving exactly that much + horizontal space. A special name is given to the 12pt em, a + ‘pica’ em, as it has become a fixed + measure in its own right. + </p> + <p>If you are working with other DTP users, watch out for + those who think that Adobe points (bp) are the only ones. + The difference is only .27pt per inch, but in 10″ of + text (a full page of A4) that's 2.7pt, which is nearly + 1mm, enough to be clearly visible if you're trying to + align one sample with another. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.2 <a name="hyph">Hyphenation</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> hyphenates automatically according to the + language you use (see <a href="#langs">section 2.8.6</a>). To specify + different breakpoints for an individual word, you can insert + soft-hyphens<a name="I42"></a> (discretionary hyphens, done with + <code class="command"><a name="c24">\-</a></code>) wherever you need them, for + example: + </p> + <blockquote><pre> +When in Mexico, we visited Popoca\-tépetl by helicopter. + </pre></blockquote> + <p>To specify hyphenation points for all occurrences of a + word, use the <code class="command"><a name="c25">\hyphenation</a></code> command in your + preamble (see <a href="#preamble">the panel ‘The Preamble’ in section 3.4</a>) with one or more + words in its argument, separated by spaces. This will even + let you break ‘helico-<br>pter’ correctly. In this command + you use normal hyphens, not soft-hyphens.<a name="I43"></a></p> + <blockquote><pre> +\hyphenation{helico-pter Popoca-tépetl +im-mer-sion} + </pre></blockquote> + <p>If you have frequent hyphenation problems with long, + unusual, or technical words, ask an expert about changing + the value of <tt>\<a name="d8">spaceskip</a></tt>, + which controls the flexibility of the space between words. + This is not something you would normally want to do, as it + can change the appearance of your document quite + significantly. + </p> + <p>If you are using a lot of unbreakable text (see next + section and also <a href="#inlineverb">section 6.6.1</a>) it may also + cause justification problems. One possible solution to this + is shown in <a href="#macargs">section 9.3</a>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.3 Unbreakable text + </h3> + <p>To force <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to treat a word as unbreakable, use + the <code class="command"><a name="c26">\mbox</a></code> command: + <code class="literal">\mbox{pneumonoultramicroscopicsilicovolcanoconiosis}</code>. + <br>This may have undesirable results, however, if + you change margins or the width of the text: + + <nobr>pneumonoultramicroscopicsilicovolcanoconiosis</nobr>... + </p> + <p>To tie two words together with an unbreakable + space<a name="I44"></a><a name="I45"></a> (hard space), use a tilde (<code class="literal">~</code>) + instead of the space (see <a href="#tilde">the item ‘˜’ in section 2.5.1</a>). This + will print as a normal space but + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never break the line at that point. You should + make this standard typing practice for things like + people's initials followed by their surname, as in + Prof. D. E. Knuth: + <code class="literal">Prof.\ D.~E.~Knuth</code>. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Note that a full point after a lowercase letter is + treated as the end of a sentence, and creates more space + before the next word. Here, after + ‘Prof.’, it's + <em>not</em> the end of a sentence, and the + backslash-space forces <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to insert just an ordinary + word-space because it's OK to break the line after + ‘Prof.’, whereas it would look + wrong to have initials separated with Prof. D.<br>E. Knuth broken over a line-end. + </p> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.4 Dashes + </h3> + <p>For a long dash — what printers call an + ‘em rule’ like this — use three + hyphens typed together, <code class="literal">like~--- this</code>, + and bind them to the preceding word with a tilde to avoid + the line being broken before the dash. It's also common + to see the dash printed without spaces—like that: the + difference is purely æsthetic. <em>Never</em> + use a single hyphen for this purpose. + </p> + <p>Between digits like page ranges (35–47), it is + normal to use the short dash (what printers call an en-rule) + which you get by typing two hyphens together, as in + <code class="literal">35--47</code>. If you want a minus sign, use math + mode (<a href="#math">section 2.9</a>). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.5 Justification + </h3> + <p>The default mode for typesetting is justified (two + parallel margins, with word-spacing adjusted automatically + for the best optical fit). In justifying, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never + add space between letters, only between words. There is a + special package called <span class="package"><a name="m7">so</a></span> + (‘space-out’) if you need special + effects like letter-spacing, but these are best left to the + expert. + </p> + <p>There are two commands + <code class="command"><a name="c27">\raggedright</a></code> and + <code class="command"><a name="c28">\raggedleft</a></code> which set ragged-right (ranged + left) and ragged-left (ranged right). Use them inside a + group (see <a href="#grouping">the panel ‘Grouping’ in section 8.2.2</a>) to confine their + action to a part of your text. + </p> + <p align="right">These modes also exist as + ‘environments’ (see <a href="#environments">the last paragraph in section 3.2</a>) called + <span class="environment"><a name="e2">raggedright</a></span> and + <span class="environment"><a name="e3">raggedleft</a></span> which are more convenient + when applying this formatting to a whole paragraph or more, + like this one. + </p> + <blockquote><pre> +\begin{raggedleft} +These modes also exist as environments called raggedright +and raggedleft which is more convenient when applying this +formatting to a whole paragraph or more, like this one. +\end{raggedleft} + </pre></blockquote> + <p>Ragged setting turns off hyphenation. There is a package + <span class="package"><a name="m8">ragged2e</a></span> which retains hyphenation + in ragged setting, useful when you have a lot of long + words. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.6 <a name="langs">Languages</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can typeset in the native manner for several + dozen languages. This affects hyphenation, word-spacing, + indentation, and the names of the parts of documents used as + headings (e.g. Table of Contents). + </p> + <p>Most distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> come with US English and + one or more other languages installed by default, but it is + easy to add the <span class="package"><a name="m9">babel</a></span> package and + specify any of the supported languages or variants, for + example: + </p> + <blockquote><pre> +\usepackage[frenchb]{babel} +... +\selectlanguage{frenchb} + </pre></blockquote> + <p>Changing the language with + <span class="package"><a name="m10">babel</a></span> automatically changes the + names of the structural units and identifiers like + ‘Abstract’, + ‘Index’, etc. to their + translated version. For example, using French as above, + chapters will start with + ‘<i>Chapitre</i>’.<sup><a href="#F18">10</a></sup></p> + <ol class="footnotes" start="10"> + <li><a name="F18">Note that the <span class="package"><a name="m11">babel</a></span> package + also sets the hyphenation patterns <em>provided + your version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has them + precompiled</em> (see the start of your log + files for a list). For other languages you need to set + the hyphenation separately (outside the scope of this + book).</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.9 <a name="math">Mathematics</a></h2><a name="I46"></a><p>As explained in <a href="#mathtex">the text in the Preface</a>, <span class="TEX">T<span class="E">E</span>X</span> was + originally written to automate the typesetting of books + containing mathematics. The careful reader will already have + noticed that mathematics is handled differently from normal + text, which is why it has to be typeset specially. This + document does not cover mathematical typesetting, which is + explained in detail in many other books and Web pages, so all + we will cover here is the existence of the math mode commands, + and some characters which have special meaning, so they + don't trip you up elsewhere. + </p> + <p>In addition to the 10 special characters listed in <a href="#specials">section 2.5</a>, there are three more characters which + only have any meaning inside mathematics mode:<a name="I47"></a></p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">|</tt></td> + <td valign="top" align="left">Vertical bar</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap"><</tt></td> + <td valign="top" align="left">Less-than</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">></tt></td> + <td valign="top" align="left">Greater-than</td> + </tr> + </table> + </div> + <p>If you type any of these in normal text (ie outside math + mode), you will get very weird things happening and lots of + error messages. If you need to print these characters, you + <em>must</em> type them using math mode, or use + their symbolic names from the <span class="environment"><a name="e4">textcomp</a></span> + package (<code class="command"><a name="c29">\textbrokenbar</a></code>, + <code class="command"><a name="c30">\textlangle</a></code>, and + <code class="command"><a name="c31">\textrangle</a></code>). + </p> + <p>The hyphen also has an extra meaning in math mode: it + typesets as a minus sign, so if you want to write about + negative numbers you need to type the number in math mode so + the minus sign and the spacing come out right. + </p> + <p>To use math mode within a paragraph, enclose your math + expression in <code class="command"><a name="c32">\(</a></code> and <code class="command"><a name="c33">\)</a></code> + commands. You can get the much-quoted equation + <span class="math"><i>E=mc</i><sup>2</sup></span> by typing + <code class="literal">\(E=mc^2\)</code>, and to get a temperature like + −30° you need to type + <code class="literal">\(-30\)°</code>.<sup><a href="#F19">11</a></sup></p> + <p>To typeset a math expression as ‘displayed + math’ (centered between paragraphs), enclose it + in the commands <code class="command"><a name="c35">\[</a></code> and + <code class="command"><a name="c36">\]</a></code>.<sup><a href="#F20">12</a></sup></p> + <blockquote class="example"><pre> +\[\bar n^*_j(s)=\frac{\left\{s\sum_{i=1}^k +n_i(0)p^*{i,k+1}(s)+M^*(s)\right\}\sum_{i=1}^k +p_{0i}p^*{ij}(s)}{1-s\sum_{i=1}^kp_{0i}p^*_{i, +k+1}(s)}+\sum_{i=1}^kn_i(0)p^*_{ij}(s)[j= +1,2,\dots,k].\] + </pre><p class="example"><img src="math.png" width="75%"></p> + </blockquote> + <p>Displayed equations can be auto-numbered with the + <span class="environment"><a name="e5">equation</a></span> environment instead of the + <code class="command"><a name="c41">\[</a></code> and <code class="command"><a name="c42">\]</a></code> commands. + </p> + <ol class="footnotes" start="11"> + <li><a name="F19">Bear in mind that the degree symbol is a non-<small><a href="#ASCII" class="acroref" name="A79" title="American Standard Code for Information Interchange">ASCII</a></small> character, so you must specify + what input encoding you are using if you want to type it: + see the example of the <span class="package"><a name="m12">inputenc</a></span> + package in <a href="#accents">section 2.7</a>. If you don't + want to use non-<small><a href="#ASCII" class="acroref" name="A80" title="American Standard Code for Information Interchange">ASCII</a></small> characters + (or if you are using a system which cannot generate them), + you can use the command <code class="command"><a name="c34">\textdegree</a></code> to + get the degree sign.</a></li> + <li><a name="F20">You will also see dollar signs used for math mode. + This is quite common but deprecated: it's what plain + <span class="TEX">T<span class="E">E</span>X</span> used in the days before <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and the habit got + ingrained in many mathematicians. It still works as a + convenient shorthand like <code class="literal">$x=y$</code>, as do + double-dollars for display-mode math like + <code class="literal">$$E=mc^2$$</code>, but they are only mentioned + here to warn readers seeing them in other authors' + work that <code class="command"><a name="c37">\(</a></code>...<code class="command"><a name="c38">\)</a></code> + and <code class="command"><a name="c39">\[</a></code>...<code class="command"><a name="c40">\]</a></code> are + the proper <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands.</a></li> + </ol> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="basic">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">3</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Basic document structures</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#docdecl">The Document Class Declaration</a></li> + <li><a href="#docenv">The document environment</a></li> + <li><a href="#titling">Titling</a></li> + <li><a href="#abstracts">Abstracts and summaries</a></li> + <li><a href="#sections">Sections</a></li> + <li><a href="#paragraphs">Ordinary paragraphs</a></li> + <li><a href="#toc">Table of contents</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I48"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s approach to formatting is to aim for + consistency. This means that as long as you identify each + <b><i><a name="element">element</a></i></b> of your document + correctly, it will be typeset in the same way as all the other + elements like it, so that you achieve a consistent finish with + minimum effort. Consistency helps make documents easier to read + and understand. + </p> + <p>Elements are the component parts of a document, all the + pieces which make up the whole. Almost everyone who reads books, + newspapers, magazines, reports, articles, and other classes of + documents will be familiar with the popular structure of + chapters, sections, subsections, subsubsections, paragraphs, + lists, tables, figures, and so on, even if they don't + consciously think about it. + </p> + <p>Consistency is also what publishers look for. They have a + house style, and often a reputation to keep, so they rightly + insist that if you do something a certain way once, you should + do it the same way each time. + </p> + <p>To help achieve this consistency, every <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document + starts by declaring what <b><i><a name="documentclass">document + class</a></i></b> it belongs to. + </p> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1 <a name="docdecl">The Document Class Declaration</a></h2><a name="I49"></a><p>To tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> what class of document you are going to + create, you type a special first line into your file which + identifies it.<sup><a href="#F21">1</a></sup> To start a report, for + example, you would type the <code class="command"><a name="c43">\documentclass</a></code> + command like this as your first line: + </p> + <blockquote><pre> +\documentclass{report} + </pre></blockquote> + <p>There are four built-in classes provided, and many others + that you can download (some may already be installed for + you): + </p> + <blockquote> + <dl> + <dt><b><span class="package"><a name="m13">report</a></span></b></dt> + <dd> + <p>for business, technical, legal, academic, or + scientific reports; + </p> + </dd> + <dt><b><span class="package"><a name="m14">article</a></span></b></dt> + <dd> + <p>for white papers, magazine or journal articles, + reviews, conference papers, or research notes; + </p> + </dd> + <dt><b><span class="package"><a name="m15">book</a></span></b></dt> + <dd> + <p>for books and theses;</p> + </dd> + <dt><b><span class="package"><a name="m16">letter</a></span></b></dt> + <dd> + <p>for letters.<sup><a href="#F22">2</a></sup></p> + </dd> + </dl> + </blockquote> + <p>The <span class="package"><a name="m20">article</a></span> class in particular + can be used (some would say ‘abused’) for almost + any short piece of typesetting by simply omitting the titling + and layout (see below). + </p> + <p>The built-in classes are intended as starting-points, + especially for drafts and for compatibility when exchanging + documents with other <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users, as they come with every + copy of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and are therefore guaranteed to format + identically everywhere. <em>They are <strong>not</strong> intended as final-format + publication-quality layouts.</em> For most other + purposes, especially for publication, you use + add-in <a href="#packages" title="sect1">packages</a> to extend + these classes to do what you need: + </p> + <ul> + <li> + <p>The <span class="package"><a name="m21">memoir</a></span> and + <span class="package"><a name="m22">komascript</a></span> packages contain + more sophisticated replacements for all the built-in + classes; + </p> + </li> + <li> + <p>Many academic and scientific publishers provide their + own special class files for articles and books (often on + their Web sites for download); + </p> + </li> + <li> + <p>Conference organisers may also provide class files for + authors to write papers for presentation; + </p> + </li> + <li> + <p>Many universities provide their own thesis document + class files in order to ensure exact fulfillment of their + formatting requirements; + </p> + </li> + <li> + <p>Businesses and other organizations can provide their + users with corporate classes on a central server and + configure <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installations to look there first for + packages, fonts, etc. + </p> + </li> + </ul> + <p>Books and journals are not usually printed on office-size + paper. Although <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s layouts are designed to fit on + standard A4 or Letter stationery for draft purposes, it makes + them look odd: the margins are too wide, or the positioning is + unusual, or the font size is too small, because the finished + job will normally be trimmed to a different size + entirely — try trimming the margins of the <small><a href="#PDF" class="acroref" name="A84" title="Portable Document Format">PDF</a></small> version of this book to 185mm by 235mm + (the same as <cite><a href="#companion" name="C26">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> series) + and you'll be amazed at how it changes the appearance! + + </p> + <ol class="footnotes" start="1"> + <li><a name="F21">Readers familiar with <small><a href="#SGML" class="acroref" name="A81" title="Standard Generalized Markup Language">SGML</a></small>, + <small><a href="#HTML" class="acroref" name="A82" title="HyperText Markup Language">HTML</a></small>, or <small><a href="#XML" class="acroref" name="A83" title="Extensible Markup Language">XML</a></small> will recognize the concept as + similar to the Document Type + Declaration.</a></li> + </ol> + <ol class="footnotes" start="2"> + <li><a name="F22">The built-in <span class="package"><a name="m17">letter</a></span> + class is rather idiosyncratic: there are much better + ones you can download, such as + the <span class="package"><a name="m18">memoir</a></span> and + <span class="package"><a name="m19">komascript</a></span> packages.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1.1 <a name="doclayout">Document class options</a></h3><a name="I50"></a><p>The default layouts are designed to fit as drafts on US + Letter size paper.<sup><a href="#F23">3</a></sup> To create documents with the correct proportions + for standard A4 paper, you need to specify the paper size in + an optional argument in square brackets before the document + class name, e.g. + </p> + <blockquote><pre> +\documentclass[a4paper]{report} + </pre></blockquote> + <p>The two most common options are <span class="option"><a name="o1">a4paper</a></span> + and <span class="option"><a name="o2">letterpaper</a></span>. However, many European + distributions of <span class="TEX">T<span class="E">E</span>X</span> now come preset for A4, not Letter, and + this is also true of all distributions of + <i><a name="p117">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>. + </p> + <p>The other default settings are for: <i>a</i>) 10pt type (all document classes); <i>b</i>) two-sided printing (books and reports) or + one-sided (articles and letters); and <i>c</i>) separate title page (books and reports + only). These can be modified with the following + document class options which you can add in the same set of + square brackets, separated by commas: + </p><a name="I51"></a><blockquote> + <dl> + <dt><b><span class="option"><a name="o3">11pt</a></span></b></dt> + <dd> + <p>to specify 11pt type (headings, footnotes, + etc. get scaled up or down in + proportion); + </p> + </dd> + <dt><b><span class="option"><a name="o4">12pt</a></span></b></dt> + <dd> + <p>to specify 12pt type (again, headings + scale); + </p> + </dd> + <dt><b><span class="option"><a name="o5">oneside</a></span></b></dt> + <dd> + <p>to format one-sided printing for books and + reports; + </p> + </dd> + <dt><b><span class="option"><a name="o6">twoside</a></span></b></dt> + <dd> + <p>to format articles for two-sided printing;</p> + </dd> + <dt><b><span class="option"><a name="o7">titlepage</a></span></b></dt> + <dd> + <p>to force articles to have a separate title + page; + </p> + </dd> + <dt><b><span class="option"><a name="o8">draft</a></span></b></dt> + <dd> + <p>makes <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> indicate hyphenation and + justification problems with a small square in the + right-hand margin of the problem line so they can be + located quickly by a human. + </p> + </dd> + </dl> + </blockquote> + <p>If you were using pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for a report to be in 12pt + type on Letter paper, but printed one-sided in draft mode, you + would use: + </p> + <blockquote><pre> +\documentclass[12pt,letterpaper,oneside,draft]{report} + </pre></blockquote> + <p>There are extra preset options for other type sizes + which can be downloaded separately, but 10pt, 11pt, and 12pt + between them cover probably 99% of all document + typesetting. In addition there are the hundreds of add-in + packages which can automate other layout and formatting + variants without you having to program anything by hand or + even change your text. + </p> + <blockquote class="exercise"><a name="firstline"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 1</i>. Create a new document + </h4> + <ol type="1"> + <li> + <p>Use your editor to create a new document.</p> + </li> + <li> + <p>Type in a Document Class Declaration as shown + above. + </p> + </li> + <li> + <p>Add a font size option if you wish.</p> + </li> + <li> + <p>In North America, omit the + <span class="option"><a name="o9">a4paper</a></span> option or change it to + <span class="option"><a name="o10">letterpaper</a></span>. + </p> + </li> + <li> + <p>Save the file (make up a name) ensuring the name + ends with <code>.tex</code></p> + </li> + </ol> + <hr> + </blockquote> + <ol class="footnotes" start="3"> + <li><a name="F23">Letter size is 8½″×11″, which is the + trimmed size of the old Demi Quarto, still in use in + North America. The other common US office size is + ‘Legal’, which is + 8½″×14″, a bastard cutting close to + the old Foolscap (8¼″×13¼″). ISO + standard ‘A’, + ‘B’, and + ‘C’ paper sizes are still + virtually unknown in many parts of North America.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.2 <a name="docenv">The document environment</a></h2> + <p>After the Document Class Declaration, the text of your + document is enclosed between two commands which identify the + beginning and end of the actual document: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} + +\begin{document} +... +\end{document} + </pre></blockquote> + <p>(You would put your text where the dots are.) The reason + for marking off the beginning of your text is that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + allows you to insert extra setup specifications before it + (where the blank line is in the example above: we'll be + using this soon). The reason for marking off the end of your + text is to provide a place for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to be programmed to do + extra stuff automatically at the end of the document, like + making an index. + </p> + <p>A useful side-effect of marking the end of the document + text is that you can store comments or temporary text + underneath the <code class="literal">\end{document}</code> in the + knowledge that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never try to typeset them. + </p> + <blockquote><pre> +... +\end{document} +Don't forget to get the extra chapter from Jim! + </pre></blockquote> + <p><a name="environments"></a>This + <code class="command"><a name="c44">\begin</a></code> ...<code class="command"><a name="c45">\end</a></code> + pair of commands is an example of a common <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> structure called an + <b><i><a name="environment">environment</a></i></b>. + Environments enclose text which is to be handled in a particular + way. All environments start with + <code class="literal">\begin{...}</code> and end with + <code class="literal">\end{...}</code> (putting the name of the + environment in the curly braces). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 2</i>. Adding the document environment + </h4> + <ol type="1"> + <li> + <p>Add the <span class="environment"><a name="e6">document</a></span> environment to + your file. + </p> + </li> + <li> + <p>Leave a blank line between the Document Class + Declaration and the <code class="literal">\begin{document}</code> + (you'll see why later). + </p> + </li> + <li> + <p>Save the file.</p> + </li> + </ol> + <hr> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.3 <a name="titling">Titling</a></h2><a name="I52"></a><p>The first thing you put in the + <span class="environment"><a name="e7">document</a></span> environment is almost always the + document title, the author's name, and the date (except + in letters, which have a special set of commands for + addressing which we'll look at later). The title, author, + and date are all examples of <b><i><a name="metadata">metadata</a></i></b> or <b><i><a name="metainformation">metainformation</a></i></b> (information + <em>about</em> information). + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} + +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\end{document} + </pre></blockquote> + <p>The <code class="command"><a name="c46">\title</a></code>, <code class="command"><a name="c47">\author</a></code>, + and <code class="command"><a name="c48">\date</a></code> commands are + self-explanatory. You put the title, author name, and date in + curly braces after the relevant command. The title and author + are usually compulsory; if you omit the + <code class="command"><a name="c49">\date</a></code> command, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses today's + date by default. + </p> + <p>You always finish the metadata with the + <code class="command"><a name="c50">\maketitle</a></code> command, which tells + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> that it's complete and it can typeset the titling + information at this point. If you omit + <code class="command"><a name="c51">\maketitle</a></code>, the titling will never be + typeset. This command is reprogrammable so you can alter the + appearance of titles (like I did for the printed version of + this document). + </p> + <p>The double backslash (<code class="literal">\\</code>) is the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> command for forced linebreak. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> normally decides by + itself where to break lines, and it's usually right, but + sometimes you need to cut a line short, like here, and start a + new one. I could have left it out and just used a comma, so my + name and my company would all appear on the one line, but I + just decided that I wanted my company name on a separate line. + In some publishers' document classes, they provide a special + <code class="command"><a name="c52">\affiliation</a></code> command to put your company + or institution name in instead. + </p> + <p>When this file is typeset, you get something like this + (I've cheated and <a href="#colorpkg" title="sect2">done it in + colour</a> for fun — yours will be in black and white + for the moment): + </p> + <div align="center" style="margin:12px"><img src="title.png" style="border:thin solid black;" width="80%"></div> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 3</i>. Adding the metadata + </h4> + <ol type="1"> + <li> + <p>Add the <code class="command"><a name="c53">\title</a></code>, + <code class="command"><a name="c54">\author</a></code>, <code class="command"><a name="c55">\date</a></code>, and + <code class="command"><a name="c56">\maketitle</a></code> commands to your + file. + </p> + </li> + <li> + <p>Use your own name, make up a title, and give a + date. + </p> + </li> + </ol> + <p>The order of the first three commands is not important, + but the <code class="command"><a name="c57">\maketitle</a></code> command must come + last. + </p> + <hr> + </blockquote> + <p>The document isn't really ready for printing like this, + but if you're really impatient, look at <a href="#process">Chapter 4</a> to see how to typeset and display + it. + </p> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.4 <a name="abstracts">Abstracts and summaries</a></h2><a name="I53"></a><a name="I54"></a><p>In reports and articles it is normal for the author + to provide an Summary or Abstract, in which you describe + briefly what you have written about and explain its + importance. Abstracts in articles are usually only a few + paragraphs long. Summaries in reports can run to several + pages, depending on the length and complexity of the report + and the readership it's aimed at. + </p> + <p>In both cases (reports and articles) the Abstract or + Summary is optional (that is, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> doesn't force you + to have one), but it's rare to omit it because readers want + and expect it. In practice, of course, you go back and type + the Abstract or Summary <em>after</em> having + written the rest of the document, but for the sake of the + example we'll jump the gun and type it now. + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage[latin1]{inputenc} +\renewcommand{\abstractname}{Summary} +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\begin{abstract} +This document presents the basic concepts of +typesetting in a form usable by non-specialists. It +is aimed at those who find themselves (willingly or +unwillingly) asked to undertake work previously sent +out to a professional printer, and who are concerned +that the quality of work (and thus their corporate +æsthetic) does not suffer unduly. +\end{abstract} + +\end{document} + </pre></blockquote> + <p>After the <code class="command"><a name="c58">\maketitle</a></code> you use the + <span class="environment"><a name="e8">abstract</a></span> environment, in which you simply + type your Abstract or Summary, leaving a blank line between + paragraphs if there's more than one (see <a href="#paragraphs">section 3.6</a> for this convention). + </p> + <p>In business and technical documents, the Abstract is often + called a Management Summary, or Executive Summary, or Business + Preview, or some similar phrase. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> lets you change the + name associated with the <span class="environment"><a name="e9">abstract</a></span> + environment to any kind of title you want, using the + <code class="command"><a name="c59">\renewcommand</a></code> command to give the command + <code class="command"><a name="c60">\abstractname</a></code> a new value: + </p> + <blockquote><pre> +\renewcommand{\abstractname}{Executive Summary} + </pre></blockquote> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 4</i>. Using an Abstract or Summary + </h4> + <ol type="1"> + <li> + <p>Add the <code class="command"><a name="c61">\renewcommand</a></code> as shown + above to your Preamble. + </p> + <p>The Preamble is at the start of the document, in + that gap <em>after</em> the + <code class="command"><a name="c62">\documentclass</a></code> line but + <em>before</em> the + <code class="literal">\begin{document}</code> (remember I said + we'd see what we left it blank for: see <a href="#preamble">the panel ‘The Preamble’ in section 3.4</a>). + </p> + </li> + <li> + <p>Add an <span class="environment"><a name="e10">abstract</a></span> environment + after the <code class="command"><a name="c63">\maketitle</a></code> and type in a + paragraph or two of text. + </p> + </li> + <li> + <p>Save the file (no, I'm not paranoid, just + careful). + </p> + </li> + </ol> + <hr> + </blockquote> + <p>Notice how the name of the command you are renewing (here, + <code class="command"><a name="c64">\abstractname</a></code>) goes in the first set of + curly braces, and the new value you want it to have goes in + the second set of curly braces (this is an example of a + command with two arguments). The environment you use is still + called <span class="environment"><a name="e11">abstract</a></span> (that is, you still type + <code class="literal">\begin{abstract}</code>...<code class="literal">\end{abstract}</code>). + What the <code class="command"><a name="c65">\abstractname</a></code> does is change the + name that gets displayed and printed, not the name of the + environment you store the text in. + </p> + <p>If you look carefully at the example document, you'll + see I sneakily added an extra command to the Preamble. + We'll see later what this means (Brownie points for + guessing it, though, if you read <a href="#accents">section 2.7</a>). + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="preamble">The Preamble</a></h3> + <p>Modifications which you want to affect a whole document + go at the start of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file, immediately + after the <code class="command"><a name="c66">\documentclass</a></code> line and before + the <code class="literal">\begin{document}</code> line: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\renewcommand{\abstractname}{Sneak Preview} +\begin{document} +... +\end{document} + </pre></blockquote> + <p>This position, between the Document Class Declaration + and the beginning of the <span class="environment"><a name="e12">document</a></span> + environment, is called the <b><i><a name="pre">preamble</a></i></b>, and it is used for small or + temporary modifications to the style and behaviour of the + document. Major or permanent modifications should go in a + <code>.sty</code> file and be invoked with a + <code class="command"><a name="c67">\usepackage</a></code> command. + </p> + </td> + </tr> + </table> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5 <a name="sections">Sections</a></h2><a name="I55"></a><p>In the body of your document, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides seven + levels of division or sectioning for you to use in structuring + your text. They are all optional: it is perfectly possible to + write a document consisting solely of paragraphs of + unstructured text. But even novels are normally divided into + chapters, although short stories are often made up solely of + paragraphs. + </p> + <p>Chapters are only + available in the <span class="package"><a name="m23">book</a></span> and + <span class="package"><a name="m24">report</a></span> document classes, because they + don't have any meaning in articles and letters. Parts are + also undefined in letters.<sup><a href="#repchap">4</a></sup></p> + <div align="center"><a name="secdepths"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="center">Depth</th> + <th valign="bottom" align="left">Division</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Notes</th> + </tr> + <tr> + <td valign="top" align="center"><span class="math">−1</span></td> + <td valign="top" align="left">Part</td> + <td valign="top" align="left"><code class="command"><a name="c68">\part</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">0</td> + <td valign="top" align="left">Chapter</td> + <td valign="top" align="left"><code class="command"><a name="c69">\chapter</a></code></td> + <td valign="top" align="left">Books and reports</td> + </tr> + <tr> + <td valign="top" align="center">1</td> + <td valign="top" align="left">Section</td> + <td valign="top" align="left"><code class="command"><a name="c70">\section</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">2</td> + <td valign="top" align="left">Subsection</td> + <td valign="top" align="left"><code class="command"><a name="c71">\subsection</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">3</td> + <td valign="top" align="left">Subsubsection</td> + <td valign="top" align="left"><code class="command"><a name="c72">\subsubsection</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">4</td> + <td valign="top" align="left">Titled paragraph</td> + <td valign="top" align="left"><code class="command"><a name="c73">\paragraph</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">5</td> + <td valign="top" align="left">Titled subparagraph</td> + <td valign="top" align="left"><code class="command"><a name="c74">\subparagraph</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + </table> + </div> + <p>In each case the title of the part, chapter, section, + etc. goes in curly braces after the command. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + automatically calculates the correct numbering and prints the + title in bold. You can turn section numbering off at a + specific depth: details in <a href="#secnum">section 3.5.1</a>. + </p> + <blockquote><pre> +\section{New recruitment policies} +... +\subsection{Effect on staff turnover} +... +\chapter{Business plan 2005--2007} + </pre></blockquote> + <p>There are packages<sup><a href="#F25">5</a></sup> to let you control the typeface, style, spacing, + and appearance of section headings: it's much easier to + use them than to try and reprogram the headings manually. Two + of the most popular are the <span class="package"><a name="m25">ssection</a></span> + and <span class="package"><a name="m26">sectsty</a></span> packages. + </p> + <p>Headings also get put automatically into the Table of + Contents, if you specify one (it's optional). But if you + make manual styling changes to your heading, for example a + very long title, or some special line-breaks or unusual + font-play, this would appear in the Table of Contents as well, + which you almost certainly <em>don't</em> + want. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> allows you to give an optional extra version of + the heading text which only gets used in the Table of Contents + and any running heads, if they are in effect <a href="#runningheads" title="sect2"></a>. This optional alternative + heading goes in [square brackets] before the curly + braces: + </p> + <blockquote><pre> +\section[Effect on staff turnover]{An analysis of the +effect of the revised recruitment policies on staff +turnover at divisional headquarters} + </pre></blockquote> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 5</i>. Start your document text + </h4> + <ol type="1"> + <li> + <p>Add a <code class="command"><a name="c75">\chapter</a></code> command after your + Abstract or Summary, giving the title of your first + chapter. + </p> + </li> + <li> + <p>If you're planning ahead, add a few more + <code class="command"><a name="c76">\chapter</a></code> commands for + subsequent chapters. Leave a few blank lines between + them to make it easier to add paragraphs of text + later. + </p> + </li> + <li> + <p>By now I shouldn't need to tell you what to do + after making significant changes to your document + file. + </p> + </li> + </ol> + <hr> + </blockquote> + <ol class="footnotes" start="4"> + <li><a name="F24">It is arguable that chapters also have no place in + reports, either, as these are conventionally divided into + sections as the top-level division. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, however, + assumes your reports have chapters, but this is only the + default, and can be changed very simply (see + <a href="#reprog">section 9.6</a>).</a></li> + </ol> + <ol class="footnotes" start="5"> + <li><a name="F25">Details of how to use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages are in <a href="#packages">section 5.1</a>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5.1 <a name="secnum">Section numbering</a></h3><a name="I56"></a><p>All document divisions get numbered automatically. Parts + get Roman numerals (Part I, Part II, etc.); + chapters and sections get decimal numbering like this + document, and Appendixes (which are just a special case of + chapters, and share the same structure) are lettered (A, B, + C, etc.). + </p> + <p>You can change the depth to which section numbering + occurs, so you can turn it off selectively. In this document + it is set + to 3. + If you only want parts, chapters, and sections numbered, not + subsections or subsubsections etc., you can change the + value of the <tt><i><a name="l9">secnumdepth</a></i></tt> + counter using the the <code class="command"><a name="c77">\setcounter</a></code> command, + giving the depth value from <a href="#secdepths">the table in section 3.5</a>: + </p> + <blockquote><pre> +\setcounter{secnumdepth}{1} + </pre></blockquote> + <p>A related counter is <tt><i><a name="l10">tocdepth</a></i></tt>, which specifies what + depth to take the Table of Contents to. It can be reset in + exactly the same way as <tt><i><a name="l11">secnumdepth</a></i></tt>. The current setting + for this document is 2. + </p> + <blockquote><pre> +\setcounter{tocdepth}{3} + </pre></blockquote> + <p>To get an <em>unnumbered</em> section + heading which does <em>not</em> go into the + Table of Contents, follow the command name with an asterisk + before the opening curly brace: + </p> + <blockquote><pre> +\subsection*{Shopping List} + </pre></blockquote> + <p>All the divisional commands from + <code class="command"><a name="c78">\part*</a></code> to <code class="command"><a name="c79">\subparagraph*</a></code> + have this ‘starred’ version which can + be used on special occasions for an unnumbered heading when + the setting of <tt><i><a name="l12">secnumdepth</a></i></tt> + would normally mean it would be numbered. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.6 <a name="paragraphs">Ordinary paragraphs</a></h2> + <p>After section headings comes your text. Just type it and + leave a blank line between paragraphs. That's all + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> needs. + </p> + <p>The blank line means ‘start a new paragraph + here’: it does <em>not</em> (repeat: + <strong>not</strong>) mean you get a blank + line in the typeset output. Now read this paragraph + again and again until that sinks in. + </p> + <p>The spacing between paragraphs is a separately definable + quantity, a <b><i><a name="dimension">dimension</a></i></b> or + <b><i><a name="length">length</a></i></b> called <tt>\<a name="d13">parskip</a></tt>. This is normally zero + (no space between paragraphs, because that's how books + are normally typeset), but you can easily set it to any size + you want with the <code class="command"><a name="c80">\setlength</a></code> command in the + Preamble: + </p> + <blockquote><pre> +\setlength{\parskip}{1cm} + </pre></blockquote> + <p><a name="paraspace"></a>This will set the space between paragraphs + to 1cm. See <a href="#dimensions">section 2.8.1</a> for details of the + various size units <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use. <em>Leaving + multiple blank lines between paragraphs in your source + document achieves nothing</em>: all extra blank lines + get ignored by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> because the space between paragraphs + is + controlled only by the value of <tt>\<a name="d14">parskip</a></tt>. + </p> + <p>White-space in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can also be made flexible (what + Lamport calls + ‘rubber’ lengths). This means that + values such as <tt>\<a name="d15">parskip</a></tt> can + have a default dimension plus an amount of expansion minus an + amount of contraction. This is useful on pages in complex + documents where not every page may be an exact number of + fixed-height lines long, so some give-and-take in vertical + space is useful. You specify this in a + <code class="command"><a name="c81">\setlength</a></code> command like this: + </p> + <blockquote><pre> +\setlength{\parskip}{1cm plus4mm minus3mm} + </pre></blockquote> + <p>Paragraph indentation can also be set with the + <code class="command"><a name="c82">\setlength</a></code> command, although you would + always make it a fixed size, never a flexible one, otherwise + you would have very ragged-looking paragraphs. + </p> + <blockquote><pre> +\setlength{\parindent}{6mm} + </pre></blockquote> + <p>By default, the first paragraph after a heading follows + the standard Anglo-American publishers' practice of + <em>no</em> indentation. Subsequent paragraphs are + indented by the value of <tt>\<a name="d16">parindent</a></tt> (default + 18pt).<sup><a href="#F26">6</a></sup> You can change this in the same way as any other + length. + </p> + <p>In the printed copy of this document, the paragraph + indentation is set to 12pt and the space + between paragraphs is set to 0pt. These values do not + apply in the Web (<small><a href="#HTML" class="acroref" name="A85" title="HyperText Markup Language">HTML</a></small>) version because not all browsers are + capable of that fine a level of control, and because users can + apply their own stylesheets regardless of what this document + proposes. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 6</i>. Start typing! + </h4> + <ol type="1"> + <li> + <p>Type some paragraphs of text. Leave a blank line + between each. Don't bother about line-wrapping or + formatting — <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will take care of all + that. + </p> + </li> + <li> + <p>If you're feeling adventurous, add a + <code class="command"><a name="c83">\section</a></code> command with the title of a + section within your first chapter, and continue typing + paragraphs of text below that. + </p> + </li> + <li> + <p>Add one or more <code class="command"><a name="c84">\setlength</a></code> + commands to your Preamble if you want to experiment with + changing paragraph spacing and indentation. + </p> + </li> + </ol> + <hr> + </blockquote> + <p>To turn off indentation completely, set it to zero (but + you still have to provide units: it's still a + measure!). + </p> + <blockquote><pre> +\setlength{\parindent}{0in} + </pre></blockquote> + <p>If you do this, though, and leave <tt>\<a name="d17">parskip</a></tt> set to zero, your readers + won't be able to tell easily where each paragraph begins! + If you want to use the style of having no indentation with a + space between paragraphs, use the + <span class="package"><a name="m28">parskip</a></span> package, which does it for + you (and makes adjustments to the spacing of lists and other + structures which use paragraph spacing, so they don't get + too far apart). + </p> + <ol class="footnotes" start="6"> + <li><a name="F26">Paragraph spacing and indentation are cultural + settings. If you are typesetting in a language other than + English, you should use the <span class="package"><a name="m27">babel</a></span> + package, which alters many things, including the spacing + and the naming of sections, to conform with the standards + of different countries and languages.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.7 <a name="toc">Table of contents</a></h2><a name="I57"></a><p>All auto-numbered headings get entered in the Table of + Contents (ToC) automatically. You don't have to print a + ToC, but if you want to, just add the command + <code class="command"><a name="c85">\tableofcontents</a></code> at the point where you want + it printed (usually after the Abstract or Summary). + </p> + <p>Entries for the ToC are recorded each time you process + your document, and reproduced the <em>next</em> + time you process it, so you need to re-run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> one extra + time to ensure that all ToC page-number references + are correctly calculated. + </p> + <p>We've already seen in <a href="#sections">section 3.5</a> how + to use the optional argument to the sectioning commands to add + text to the ToC which is slightly different from the one + printed in the body of the document. It is also possible to + add extra lines to the ToC, to force extra or unnumbered + section headings to be included. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 7</i>. Inserting the table of contents + </h4> + <ol type="1"> + <li> + <p>Go back and add a <code class="command"><a name="c86">\tableofcontents</a></code> + command after the <code class="literal">\end{abstract}</code> command + in your document. + </p> + </li> + <li> + <p>You guessed.</p> + </li> + </ol> + <hr> + </blockquote> + <p><a name="loflot"></a>The commands <code class="command"><a name="c87">\listoffigures</a></code> + and <code class="command"><a name="c88">\listoftables</a></code> work in exactly the same + way as <code class="command"><a name="c89">\tableofcontents</a></code> to automatically + list all your tables and figures. If you use them, they + normally go after the <code class="command"><a name="c90">\tableofcontents</a></code> + command. + </p> + <p>The <code class="command"><a name="c91">\tableofcontents</a></code> command normally + shows only numbered section headings, and only down to the + level defined by the <tt><i><a name="l18">tocdepth</a></i></tt> counter (see <a href="#secnum">section 3.5.1</a>), but you can add extra entries with the + <code class="command"><a name="c92">\addcontentsline</a></code> command. For example if you + use an unnumbered section heading command to start a + preliminary piece of text like a Foreword or Preface, you can + write:<a name="I58"></a></p> + <blockquote><pre> +\subsection*{Preface} +\addcontentsline{toc}{subsection}{Preface} + </pre></blockquote> + <p>This will format an unnumbered ToC entry for + ‘Preface’ in the + ‘subsection’ style. You can use + the same mechanism to add lines to the List of Figures or List + of Tables by substituting <code>lof</code> or + <code>lot</code> for <code>toc</code>. + </p> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="process">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">4</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Typesetting, viewing and printing</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#setting">Typesetting</a></li> + <li><a href="#errmsg">Errors and warnings</a></li> + <li><a href="#dvi">Screen preview</a></li> + <li><a href="#print">Printer output</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I59"></a><a name="I60"></a><a name="I61"></a><p>We've now got far enough to typeset what you've + entered. I'm assuming at this stage that you have typed + some sample text in the format specified in the previous + chapter, and you've saved it in a plain-text file with a + filetype of + <code class="literal">.tex</code> and a name of your own choosing. + </p><a name="I62"></a><blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 8</i>. Saving your file + </h4> + <p>If you haven't already saved your file, do so now + (some editors and interfaces let you typeset the document + without saving it!). + </p> + <p>Pick a sensible filename in a sensible directory. Names + should be short enough to display and search for, but + descriptive enough to make sense. See <a href="#filenames">the panel ‘Picking suitable filenames’ in this chapter</a> for more details. + </p> + <hr> + </blockquote> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="filenames">Picking suitable filenames</a></h3> + <p>Never, ever use directories (folders) or file names + which contain spaces. Although your operating system + probably supports them, some don't, and they will + only cause grief and tears with <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <p>Make filenames as short or as long as you wish, but + strictly avoid spaces. Stick to upper- and lower-case + letters without accents (A–Z and a–z), the + digits 0–9, the hyphen (<code class="literal">-</code>), and + the full point or period (<code class="literal">.</code>), (similar + to the conventions for a Web <small><a href="#URI" class="acroref" name="A86" title="Uniform Resource Indicator">URI</a></small>): it will let you refer to <span class="TEX">T<span class="E">E</span>X</span> + files over the Web more + easily and make your files more portable. + </p> + </td> + </tr> + </table> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1 <a name="setting">Typesetting</a></h2> + <p>Typesetting your document is usually done by clicking + on a button in a toolbar or an entry in a menu. Which one you + click on depends on what output you want — there are two + formats available: + </p> + <ul> + <li> + <p>The standard (default) <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> program produces a + <a name="DVI" class="acroref">device-independent</a> (<small>DVI</small>) file which + can be used with any <span class="TEX">T<span class="E">E</span>X</span> previewer or printer driver on any + make or model of computer. There are dozens of these + available: at least one of each (previewer and printer + driver) should have been installed with your distribution + of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </li> + <li> + <p>The <i><a name="p118">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> program + produces an Adobe Acrobat <small><a href="#PDF" class="acroref" name="A88" title="Portable Document Format">PDF</a></small> + file which can be used with any suitable previewer, such + as <i><a name="p119">GSview</a></i>, + <i><a name="p120">PDFview</a></i>, + <i><a name="p121">Xpdf</a></i>, the + <i><a name="p122">Opera</a></i> browser, or Adobe's + own <i><a name="p123">Acrobat Reader</a></i>. + </p> + </li> + </ul> + <p>Depending on which one you choose, you may have to + [re]configure your editor so that it runs the right program. + They can all do all of them, but they don't always come + pre-set with buttons or menus for every possible option, + because they can't guess which one you want. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.1 Standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h3> + <p>There are also two ways of running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: from the + toolbar or menu, or from the command line. Toolbars and + menus are most common in graphical systems, and are the + normal way to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Command lines are used in + non-graphical systems and in automated processes where + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is run + unattended (so-called ‘batch’ or + ‘scripted’ processing). + </p> + <p>Whichever way you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, it will process your + file and display a log or record of what it's doing + (see <a href="#terminal">the example ‘Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window’ in section 4.1.2</a>: it looks the + same no matter what system you use). This is to let you see + where (if!) there are any errors or problems. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 9</i>. Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from the toolbar or menu + </h4> + <p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on your file. According to which system + you're using this will either be the + <span class="guiicon"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + File</span> menu item. + </p> + <p>Your editor may suggest you save your file if you + haven't already done so. Do it. + </p> + <hr> + </blockquote> + <p>If <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reports any errors — easily identifiable + as lines in the log beginning with an exclamation mark + (!) — <em>don't panic!</em> Turn to <a href="#errmsg">section 4.2</a>, identify what went wrong, and fix it in + your input file. Then re-run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. If there were no + errors, your file is ready for displaying or + printing. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.2 <a name="cmdwin">Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from a command window</a></h3> + <p>This is worth practising even if you normally use a + <small><a href="#GUI" class="acroref" name="A89" title="Graphical User Interface">GUI</a></small>, so that you understand what it + does. See <a href="#cliex">Figure 4.1</a> for an example. + </p> + <blockquote class="exercise"><a name="terminal"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 10</i>. Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window + </h4> + <ul> + <li> + <p>Under graphical Unix-based systems (Linux and Mac) + you open a command (shell) window by clicking on the + shell or screen icon in the control panel at the + bottom of your screen. + </p> + </li> + <li> + <p>Under Microsoft Windows you open a command window + by clicking on the + <span class="guimenu">Start</span>→<span class="guisubmenu">Programs</span>→<span class="guimenuitem">MS-DOS</span> + or + <span class="guimenu">Start</span>→<span class="guisubmenu">Command + Prompt</span> menu item. + </p> + </li> + </ul> + <p>When the command window appears, type</p> + <blockquote><pre> +cd <code><u>documents</u></code> +latex <code><u>mybook</u></code> + </pre></blockquote> + <p>Substitute the relevant directory and file name. + Remember to press the <tt class="keycap">Enter</tt> key at the + end of each line. + </p> + <hr> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 4.1</i>: <a name="cliex">Command-line usage</a></caption> + <div align="center" style="margin:12px"><img src="terminal.png" width="75%"></div> + <hr> + </div> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.3 pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h3> + <p>If your editor is set up to generate <small><a href="#PDF" class="acroref" name="A90" title="Portable Document Format">PDF</a></small> files direct instead of <small><a href="#DVI" class="acroref" name="A91" title="device-independent">DVI</a></small> files, then you can click the + <span class="guiicon">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or type the + command <code class="literal">pdflatex + <code><u>filename</u></code></code> in a terminal + (console) window. <i><a name="p124">Emacs</a></i> does not + have a default menu configured for + <i><a name="p125">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> but if you have + already run standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the file, you can type ther + <code class="literal">pdflatex</code> command in the + <code class="literal">*TeX-Shell*</code> pane. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2 <a name="errmsg">Errors and warnings</a></h2> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> describes what it's typesetting while it does it, + and if it encounters something it doesn't understand or can't + do, it will display a message saying what's wrong. It may + also display warnings for less serious conditions. + </p> + <p><em>Don't panic if you see error + messages</em>: it's very common for beginners to + mistype or mis-spell commands, forget curly braces, type a + forward slash instead of a backslash, or use a special + character by mistake. Errors are easily spotted and easily + corrected in your editor, and you can then run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> again + to check you have fixed everything. Some of the most common + errors are described in <a href="#errmsg">section 4.2</a> with an + explanation of how to fix them. + </p> + <div align="center" style="margin:12px"><img src="dontpanic.png" width="50%"></div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.1 <a name="errs">Error messages</a></h3> + <p>The format of an error message is always the same. Error + messages begin with an exclamation mark at the start of the + line, and give a description of the error, followed by another + line starting with the number, which refers to the line-number + in your document file which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> was processing when the + error was spotted. Here's an example, showing that the user + mistyped the <code class="command"><a name="c93">\tableofcontents</a></code> + command: + </p> + <blockquote><pre> +! Undefined control sequence. +l.6 \tableofcotnetns + </pre></blockquote> + <p>When <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> finds an error like this, it displays the + error message and pauses. You must type one of the following + letters to continue: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left" width="576">Meaning</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">x</tt></td> + <td valign="top" width="576" align="left">Stop immediately and e<strong>x</strong>it the program. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">q</tt></td> + <td valign="top" width="576" align="left">Carry on <strong>q</strong>uietly as best you can and + don't bother me with any more error + messages. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">e</tt></td> + <td valign="top" width="576" align="left">Stop the program but re-position the text in my + <strong>e</strong>ditor at the point + where you found the error.<sup><a href="#F1a"><i>a</i></a></sup></td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">h</tt></td> + <td valign="top" width="576" align="left">Try to give me more <strong>h</strong>elp. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">i</tt></td> + <td valign="top" width="576" align="left">(followed by a correction) means <strong>i</strong>nput the correction in + place of the error and carry on.<sup><a href="#F1b"><i>b</i></a></sup></td> + </tr> + </table> + <div align="left"> + <ol class="footnotes" type="a"> + <li><a name="F1a">This only works if you're using an editor + which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can communicate with.</a></li> + <li><a name="F1b">This is only a temporary fix to get the file + processed. You still have to make that + correction in the editor.</a></li> + </ol> + </div> + </div> + <p>Some systems (<i><a name="p126">Emacs</a></i> is one + example) run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with a + ‘non-stop’ switch turned on, so it + will always process through to the end of the file, + regardless of errors, or until a limit is reached. + </p> + <ol class="footnotes" start="0"></ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.2 <a name="warn">Warnings</a></h3> + <p>Warnings don't begin with an exclamation mark: they are + just comments by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> about things you might want to look + into, such as + overlong or underrun lines (often caused by unusual hyphenations, for + example), pages running short or long, and other typographical + niceties (most of which you can ignore until later). + </p> + <p>Unlike other systems, which try to hide unevennesses in + the text — usually unsuccessfully — by interfering + with the letter-spacing, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> takes the view that the + author or editor should be able to contribute. While it is + certainly possible to set <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s parameters so that + the spacing is sufficiently sloppy that you will almost never + get a warning about badly-fitting lines or pages, you will + almost certainly just be delaying matters until you start to + get complaints from your readers or publishers. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3 Examples + </h3> + <p>Only a few common error messages are given here: those + most likely to be encountered by beginners. If you find + another error message not shown here, and it's not + clear what you should do, ask for help. + </p> + <p>Most error messages are self-explanatory, but be aware + that the place where + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> spots and reports an error may be later in the file + than the place where it actually occurred. For example if + you forget to close a curly brace which encloses, say, + italics, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> won't report this until something else + occurs which can't happen until the curly brace is + encountered (eg the end of the document!) Some errors can + only be righted by humans who can read and understand what + the document is supposed to mean or look like. + </p> + <p>Newcomers should remember to check the list of special + characters in <a href="#specials" title="sect1"></a>: a very large + number of errors when you are learning <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are due to + accidentally typing a special character when you didn't + mean to. This disappears after a few days as you get used to + them. + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.1 <a name="toomany">Too many }'s</a></h4><a name="I63"></a><a name="I64"></a><blockquote><pre> +! Too many }'s. +l.6 \date December 2004} + </pre></blockquote> + <p>The reason <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> thinks there are too many + <code class="literal">}</code>'s here is that the opening curly + brace is missing after the <code class="command"><a name="c94">\date</a></code> control + sequence and before the word <code class="literal">December</code>, + so the closing curly brace is seen as one too many (which + it is!). + </p> + <p>In fact, there are other things which can follow the + <code class="command"><a name="c95">\date</a></code> command apart from a date in curly + braces, so <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> cannot possibly guess that + you've missed out the opening curly brace — until + it finds a closing one! + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.2 <a name="undefcs">Undefined control sequence</a></h4><a name="I65"></a><a name="I66"></a><blockquote><pre> +! Undefined control sequence. +l.6 \dtae + {December 2004} + </pre></blockquote> + <p>In this example, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is complaining that it has + no such command (‘control + sequence’) as <code class="literal">\dtae</code>. + Obviously it's been mistyped, but only a human can + detect that fact: all <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> knows is + that <code class="literal">\dtae</code> is not a command it knows + about — it's undefined. + </p> + <p>Mistypings are the commonest source of error. If your + editor has drop-down menus to insert common commands and + environments, use them! + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.3 <a name="runaway">Runaway argument</a></h4><a name="I67"></a><a name="I68"></a><blockquote><pre> +Runaway argument? +{December 2004 \maketitle +! Paragraph ended before \date was complete. +<to be read again> + \par +l.8 + </pre></blockquote> + <p>In this error, the closing curly brace has been + omitted from the date. It's the opposite of the error in + <a href="#toomany">section 4.2.3.1</a>, and it results in + <code class="command"><a name="c96">\maketitle</a></code> trying to format the title + page while <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is still expecting more text for the + date! As + <code class="command"><a name="c97">\maketitle</a></code> creates new paragraphs on the + title page, this is detected and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> complains that + the + previous paragraph has ended but <code class="command"><a name="c98">\date</a></code> + is not yet finished. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.4 <a name="underfull">Underfull hbox</a></h4><a name="I69"></a><a name="I70"></a><blockquote><pre> +Underfull \hbox (badness 1394) in paragraph +at lines 28--30 +[][]\LY1/brm/b/n/10 Bull, RJ: \LY1/brm/m/n/10 +Ac-count-ing in Busi- +[94] + </pre></blockquote> + <p>This is a warning that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> cannot stretch the + line wide enough to fit, without making the spacing bigger + than its currently permitted maximum. The + <b><i><a name="badness">badness</a></i></b> (0–10,000) indicates + how severe this is (here you can probably ignore a badness + of 1394). It says what lines of your file it was + typesetting when it found this, and the number in square + brackets is the number of the page onto which the + offending line was printed. + </p> + <p>The codes separated by slashes are the typeface and + font style and size used in the line. Ignore them for the + moment: details are in <a href="#fdfiles">step 11</a> if you're + curious. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.5 <a name="overfull">Overfull hbox</a></h4><a name="I71"></a><a name="I72"></a><blockquote><pre> +[101] +Overfull \hbox (9.11617pt too wide) in paragraph +at lines 860--861 +[]\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see +\LY1/brm/m/n/10 X Win- + </pre></blockquote> + <p>And the opposite warning: this line is too + long by a shade over 9pt. The chosen hyphenation point + which minimises the error is shown at the end of the line + (<em>Win-</em>). Line numbers and page numbers + are given as before. In this case, 9pt is too much to + ignore (over 3mm or more than <span class="math">1/8</span>″), and a manual correction needs + making (such as a change to the hyphenation), or the + flexibility settings need changing (outside the scope of + this book). + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.6 <a name="nopkg">Missing package</a></h4><a name="I73"></a><a name="I74"></a><blockquote><pre> +! LaTeX Error: File `paralisy.sty' not found. + +Type X to quit or <RETURN> to proceed, +or enter new name. (Default extension: sty) + +Enter file name: + </pre></blockquote> + <p>When you use the <code class="command"><a name="c99">\usepackage</a></code> command + to request <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to use a certain package, it will look + for a file with the specified name and the filetype + <code>.sty</code>. In this case the user has + mistyped the name of the <span class="package"><a name="m29">paralist</a></span> + package, so it's easy to fix. However, if you get the name + right, but the package is not installed on your machine, + you will need to download and install it before continuing + (see <a href="#ctan">Chapter 5</a>). + </p> + </div> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3 <a name="dvi">Screen preview</a></h2><a name="I75"></a><p>Once the file has been processed without errors (or even + if there are still errors, but you want to see what it's + doing with them), standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will have created a + <small><a href="#DVI" class="acroref" name="A92" title="device-independent">DVI</a></small> file with the same name as your + document but the filetype + <code class="literal">.dvi</code>. If you're using + <i><a name="p127">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, a <small><a href="#PDF" class="acroref" name="A93" title="Portable Document Format">PDF</a></small> file will have been created, and you + can skip to + <a href="#pdfview">section 4.3.3</a>. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.1 <a name="dvipreview">Previewing DVI output</a></h3> + <p>To see the typeset output, click on the + <span class="guiicon">dvi</span> Preview toolbar icon or use the + <span class="guimenu">TeX</span>→<span class="guimenuitem">TeX View</span> + menu item. A <small><a href="#WYSIWYG" class="acroref" name="A94" title="What You See Is What You Get">WYSIWYG</a></small> preview window will appear with + your typeset display (see <a href="#dviview">Figure 4.1</a>). + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="bitmappreview">Bitmap preview fonts in DVI viewers</a></h4> + <p>The first time you display your <small><a href="#DVI" class="acroref" name="A95" title="device-independent">DVI</a></small> output with a new installation of + <span class="TEX">T<span class="E">E</span>X</span>, there may be a short pause if the previewer needs + to create the special bitmaps used for screen previews of + some fonts. These give greater accuracy on low-resolution + devices like screens. As you continue to work with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and your system accumulates these font files, the + pause for generating them will disappear. Recent versions + of <span class="TEX">T<span class="E">E</span>X</span> work directly with Type 1 fonts, however, + and don't have this delay. + </p> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 4.1</i>: <a name="dviview">DVI preview</a></caption> + <div align="center" style="margin:12px"><img src="xdvi.png" width="75%"></div> + <hr> + </div> + <p>Most previewers have a wide range of scaling, zooming, + and measuring functions, but remember this is a + <em>picture</em> of your output: you cannot edit + the image. To change it, you always edit your source text + and reprocess the file. + </p> + <p>With <i><a name="p128">xdvi</a></i> and its derivatives + like <i><a name="p129">dviview</a></i>, you can leave the + display window open, and after you've reprocessed your + document through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, moving your mouse back into the + window will make the display update automatically (click + your mouse if your windowing system needs a + click to focus). + </p> + <p><a href="#dviview">Figure 4.1</a> shows + <i><a name="p130">xdvi</a></i> displaying a page. With a + standard three-button mouse you get three levels of + micro-zoom to let you inspect fine details. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.2 <a name="makeps">Previewing with PostScript</a></h3> + <p><a name="t7">PostScript</a> is a page description + language invented by Adobe and used in laser printers and + high-end typesetters. It's been the universal standard + for electronically-formatted print files for nearly two + decades, and all printers and publishers are accustomed to + using it. <small><a href="#PDF" class="acroref" name="A96" title="Portable Document Format">PDF</a></small> is a descendant of + PostScript, and is rapidly taking over, but + <a name="t8">PostScript</a> itself is still extremely + common, largely because it is very robust, and is usually an + <small><a href="#ASCII" class="acroref" name="A97" title="American Standard Code for Information Interchange">ASCII</a></small> file, which makes it very + portable and easy to generate (it is actually a programming + language in its own right). The drawback is the large size + of <a name="t9">PostScript</a> files, especially if + they contain bitmapped graphics. + </p> + <p>The <i><a name="p131">dvips</a></i> program which comes + with all <span class="TEX">T<span class="E">E</span>X</span> systems is used to generate + <a name="t10">PostScript</a> files directly from your + <small><a href="#DVI" class="acroref" name="A98" title="device-independent">DVI</a></small> output. These + <code>.ps</code> files can be viewed, printed, sent + to a platemaker or filmsetter, or put online for + downloading. + </p> + <p><small><a href="#DVI" class="acroref" name="A99" title="device-independent">DVI</a></small> viewers cannot render some + <a name="t11">PostScript</a> graphical manipulations + like rotating and deforming, so an alternative to viewing + the DVI file direct is to generate a + <a name="t12">PostScript</a> file and use a + <a name="t13">PostScript</a> viewer. You may have to to + do this for your publisher anyway, and many editors can be + configured to do this by default. Look for a + <span class="guiicon">dvips</span> toolbar icon or menu entry and + click on it. + </p> + <p>It's also very simple to do manually: let's + assume your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file was called + <code>mydoc.tex</code>, so processing it has created + <code>mydoc.dvi</code>. Just type: + </p> + <blockquote><pre> +dvips -o mydoc.ps mydoc + </pre></blockquote> + <p>in a command window (see <a href="#terminal">the example ‘Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window’ in section 4.1.2</a> for how to use one) + and <i><a name="p132">dvips</a></i> will create + <code>mydoc.ps</code> which can be used both for + previewing and printing. + </p> + <p>To view a <a name="t14">PostScript</a> file, you + need a <a name="t15">PostScript</a> previewer like + <i><a name="p133">GSview</a></i>, which works with the + <a name="t16">PostScript</a> interpreter + <i><a name="p134">Ghostscript</a></i>, which should have + been installed automatically along with your <span class="TEX">T<span class="E">E</span>X</span> system + (if not, install both now: <i><a name="p135">GSview</a></i> + is separately licensed and cannot legally be included in + some older <span class="TEX">T<span class="E">E</span>X</span> distributions, so you may have to download + it yourself). + </p> + <p><i><a name="p136">GSview</a></i> can be set to watch + the <a name="t17">PostScript</a> file and automatically + update the display any time the file is changed, without you + even having to click on the window. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.3 <a name="pdfview">Previewing with PDF</a></h3> + <p>The <a name="PDF" class="acroref">Portable Document Format</a> (<small>PDF</small>) + is a derivative of <a name="t18">PostScript</a>. + Whereas <a name="t19">PostScript</a> is a programming + language in itself, <small><a href="#PDF" class="acroref" name="A101" title="Portable Document Format">PDF</a></small> is in effect + the <em>result</em> of processing a document + through <a name="t20">PostScript</a>: it's a binary + file format, extremely compact, and well-supported on all + platforms. + </p> + <p>If your system is configured to generate <small><a href="#PDF" class="acroref" name="A102" title="Portable Document Format">PDF</a></small> files direct instead of <small><a href="#DVI" class="acroref" name="A103" title="device-independent">DVI</a></small> files, just open the + <code>.pdf</code> file using any <small><a href="#PDF" class="acroref" name="A104" title="Portable Document Format">PDF</a></small> previewer or browser. + </p> + <p>Most editors are configured to display a toolbar icon + which will pop up <i><a name="p137">Acrobat Reader</a></i> + or some other viewer with the current <small><a href="#PDF" class="acroref" name="A105" title="Portable Document Format">PDF</a></small> output file. + </p> + <p>Adobe's <i><a name="p138">Acrobat Reader</a></i> + cannot automatically update the view if you reprocess your + document, in the way that <i><a name="p139">xdvi</a></i> + and <i><a name="p140">GSview</a></i> can. You + have to close the display with <tt class="keycap">Ctrl</tt>–<tt class="keycap">W</tt> and reload the file with <tt class="keycap">Alt</tt>–<tt class="keycap">F</tt> <tt class="keycap">1</tt>. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Bitmap preview fonts in Acrobat Reader</a></h4> + <p>Acrobat Reader is extremely poor at rendering + Type 3 (bitmap) fonts. If you are using these (either + in an old <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installation which has not been + upgraded to Type 1, or with files using specialist + fonts only available in Type 3 format), you will see + a very fuzzy display at low magnifications. It will print + perfectly, but Acrobat Reader's display is + disappointing. The solution is to use a better previewer + or to upgrade to the Type 1 versions of the fonts + if possible, or both. If you need to + use Type 3 fonts in <small><a href="#PDF" class="acroref" name="A106" title="Portable Document Format">PDF</a></small>s, + you probably need to warn your readers to expect a fuzzy + display from Acrobat Reader (but good printout), and to + change to a better reader if they can. + </p> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.4 <a name="print">Printer output</a></h2><a name="I76"></a><p><span class="TEX">T<span class="E">E</span>X</span> systems print on almost anything from the simplest + dot-matrix printers to the biggest phototypesetters, including + all the laser printers and a host of other devices in between. + <em>How</em> you do it varies slightly according + to how you do your typesetting and previewing: + </p> + <blockquote> + <dl> + <dt><b>If you are using DVI</b></dt> + <dd> + <p>and you have a previewer which has a + <b>print</b> function configured for your + printer, you can use that. If not, create a + <a name="t21">PostScript</a> file and use + <i><a name="p141">GSview</a></i> instead. + </p> + </dd> + <dt><b>If you are using PDF</b></dt> + <dd> + <p>you can print directly from your <small><a href="#PDF" class="acroref" name="A107" title="Portable Document Format">PDF</a></small> viewer. Be careful about using + the ‘Fit to page’ options, as they will + change the size of your document so all your + measurements will be different. + </p> + </dd> + <dt><b>Non-<a name="t22">PostScript</a> printers</b></dt> + <dd> + <p>You can create a <a name="t23">PostScript</a> + file with <i><a name="p142">dvips</a></i> (see <a href="#makeps">section 4.3.2</a>) and use + <i><a name="p143">GSview</a></i> to print it + (<i><a name="p144">GSview</a></i> can print + <a name="t24">PostScript</a> files to almost any + make or model of non-<a name="t25">PostScript</a> + printer). + </p> + <p></p> + </dd> + <dt><b>If you have a real <a name="t26">PostScript</a> + printer</b></dt> + <dd> + <p>or you are using a system with built-in + <a name="t27">PostScript</a> printing support (such + as Linux or Mac), you can create and send + <a name="t28">PostScript</a> output directly from + your editor to the printer without the need to open it + in a previewer first. In + <i><a name="p145">Emacs</a></i>, for example, this is + what happens when you use the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + Print</span> menu item. + </p> + </dd> + </dl> + </blockquote> + <p>Both the <i><a name="p146">dvips</a></i> program and all + the previewers that print tend to have facilities for printing + selected pages, printing in reverse, scaling the page size, + <a name="I77"></a><a name="I78"></a><a name="I79"></a> and printing only odd or even pages for two-sided + work. If you are using <a name="t29">PostScript</a> there + are programs for manipulating the output + (<i><a name="p147">pstops</a></i>), for example to perform + page imposition to get 4, 8, or 16 pages to a sheet for making + booklets (<i><a name="p148">psnup</a></i>). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 11</i>. Print it! + </h4> + <p>Show that you have understood the process of + typesetting, previewing, and printing, by displaying your + document and printing it. + </p> + <hr> + </blockquote> + <p>If you need a + non-<a name="t30">PostScript</a>/<i><a name="p149">Ghostscript</a></i> + solution, install a separate <span class="TEX">T<span class="E">E</span>X</span> print driver for your + printer. Some + may be supplied with your <span class="TEX">T<span class="E">E</span>X</span> installation, and there are + dozens more on <small><a href="#CTAN" class="acroref" name="A108" title="Comprehensive Archive Network">CTAN</a></small>. Their names all + start with <code>dvi</code> and are followed by an + abbreviation for the printer make or model like + <i><a name="p150">dvieps</a></i> for Epson, + <i><a name="p151">dvihp</a></i> for Hewlett-Packard, + <i><a name="p152">dvialw</a></i> for Apple LaserWriters, + etc.. Configure the driver to print directly to the print + queue, or pipe it to the print queue manually. On Linux with + an HP printer, for example, this would be + </p> + <blockquote><pre> +dvihp mydoc | lpr + </pre></blockquote> + <p>Microsoft Windows has no easy way to bypass the print + spool, but you can do it from an MS-DOS command window + with (using a HP printer as an example): + </p> + <blockquote><pre> +dvihp mydoc -o mydoc.hp +copy /b mydoc.hp LPT1: + </pre></blockquote> + <p>Read the documentation for the driver, as the options and + defaults vary. + </p> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="ctan">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">5</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>CTAN, packages, and online help</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#packages">Packages</a></li> + <li><a href="#pkginst">Downloading and installing packages</a></li> + <li><a href="#help">Online help</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The <a name="CTAN" class="acroref">Comprehensive <span class="TEX">T<span class="E">E</span>X</span> Archive + Network</a> (<small>CTAN</small>) is a repository of Web and <small><a href="#FTP" class="acroref" name="A110" title="File Transfer Protocol">FTP</a></small> servers worldwide which contain copies of + almost every piece of free software related to <span class="TEX">T<span class="E">E</span>X</span> and + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p><small><a href="#CTAN" class="acroref" name="A111" title="Comprehensive Archive Network">CTAN</a></small> is based on three main + servers, and there are several online indexes available. There + are complete <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems for all platforms, + utilities for text and graphics processing, conversion programs + into and out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, printer drivers, extra typefaces, and + (possibly the most important) the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages. The three + main servers are: + </p> + <ul> + <li> + <p><span class="TEX">T<span class="E">E</span>X</span> Users Group: <a href="http://www.ctan.org/"><tt>http://www.ctan.org/</tt></a></p> + </li> + <li> + <p>UK <span class="TEX">T<span class="E">E</span>X</span> Users Group: <a href="http://www.tex.ac.uk/"><tt>http://www.tex.ac.uk/</tt></a></p> + </li> + <li> + <p>Deutschsprachige Anwendervereinigung <span class="TEX">T<span class="E">E</span>X</span> e.V. (DANTE, + the German-speaking <span class="TEX">T<span class="E">E</span>X</span> Users Group); <a href="http://dante.ctan.org/"><tt>http://dante.ctan.org/</tt></a></p> + </li> + </ul> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <p><small><a href="#CTAN" class="acroref" name="A112" title="Comprehensive Archive Network">CTAN</a></small> should + <em>always</em> be your first port of call when + looking for a software update or a feature you want to use. + Please don't ask the <a href="#help" title="sect1">network help + resources</a> until you have checked <small><a href="#CTAN" class="acroref" name="A113" title="Comprehensive Archive Network">CTAN</a></small> and the <small><a href="#FAQ" class="acroref" name="A114" title="Frequently-Asked Questions">FAQ</a></small> (<a href="#faq">section 5.3.1</a>). + </p> + </td> + </tr> + </table> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1 <a name="packages">Packages</a></h2><a name="I80"></a><p>Add-on features for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are known as <b><i><a name="pack">packages</a></i></b>. Dozens of these are + pre-installed with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and can be used in your documents + immediately. They should all be stored in subdirectories of + <code>texmf/tex/latex</code> named after each package. + To find out what other packages are available and what they + do, you should use the <a href="http://www.ctan.org/search"><small><a href="#CTAN" class="acroref" name="A115" title="Comprehensive Archive Network">CTAN</a></small> search page</a> which includes a + link to Graham Williams' comprehensive package + catalogue. + </p> + <p>A package is a file or collection of files containing + extra <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands and programming which add new styling + features or modify those already existing. Installed package + files all end with <code>.sty</code> (there may be + ancillary files as well). + </p> + <p>When you try to typeset a document which requires a + package which is not installed on your system, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will + warn you with an error message that it is missing (see <a href="#nopkg">section 4.2.3.6</a>), and you can + then download the package and install it using the + instructions in <a href="#pkginst">section 5.2</a>. You can also + download updates to packages you already have (both the ones + that were installed along with your version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> as + well as ones you added). + </p> + <p>There is no limit to the number of packages you can have + installed on your computer (apart from disk space!), but there + is probably a physical limit to the number that can be used + inside any one <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document at the same time, although it + depends on how big each package is. In practice there is no + problem in having even a couple of dozen packages active (the + style file for this document uses over 30). + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1.1 <a name="colorpkg">Using an existing package</a></h3> + <p>To use a package already installed on your system, + insert a <code class="command"><a name="c100">\usepackage</a></code> command in your + document preamble with the package name in curly braces, as + we have already seen in earlier chapters. For example, to + use the <span class="package"><a name="m30">color</a></span> package, which lets + you typeset in colours (I warned you this was + coming!), you would type: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage{color} +\begin{document} +... +\end{document} + </pre></blockquote> + <p>You can include several package names in one + <code class="command"><a name="c101">\usepackage</a></code> command by separating the + names with commas, and you can have more than one + <code class="command"><a name="c102">\usepackage</a></code> command. + </p> + <p>Some packages allow optional settings in square + brackets. If you use these, you must give the package its + own separate <code class="command"><a name="c103">\usepackage</a></code> command, like + <span class="package"><a name="m31">geometry</a></span> shown below: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage{pslatex,palatino,avant,graphicx,color} +\usepackage[margin=2cm]{geometry} +\begin{document} + +\title{\color{red}Practical Typesetting} +\author{\color{blue}Peter Flynn\\Silmaril Consultants} +\date{\color{green}December 2005} +\maketitle + +\end{document} + </pre></blockquote> + <p>(Incidentally, this is a rather crude way to do colours in + titling on a once-off basis: if it's for a repeatable + style we'll see in <a href="#macros">Chapter 9</a> how it can + be automated and kept out of the author's way.) + </p> + <p>Many packages can have additional formatting + specifications in optional arguments in square brackets, in + the same way as <span class="package"><a name="m32">geometry</a></span> + does. Read the documentation for the package concerned to + find out what can be done. + </p> + <blockquote class="exercise"><a name="geoex"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 12</i>. Add colour + </h4> + <p>Use the <span class="package"><a name="m33">color</a></span> package to add + some colour to your document. Stick with primary colours + for the moment. + </p> + <p>Use the <span class="package"><a name="m34">geometry</a></span> + package to change the margins. + </p> + <p>Reprocess and print your document if you have a colour + printer (monochrome printers should print it in shades of + grey). + </p> + <hr> + </blockquote> + <p><small><a href="#CMYK" class="acroref" name="A116" title="Cyan-Magenta-Yellow-Black">CMYK</a></small> and <small><a href="#RGB" class="acroref" name="A117" title="Red-Green-Blue">RGB</a></small> are not the only colour + models. <a name="ul">Uwe Kern</a>'s + <span class="package"><a name="m35">xcolor</a></span> package defines half a + dozen, and includes facilities for converting colour + values from one model to another. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1.2 <a name="packagedoc">Package documentation</a></h3><a name="I81"></a><p>To find out what commands a package provides (and thus + how to use it), you need to read the documentation. In the + <code>texmf/doc</code> subdirectory of your + installation there should be directories full of + <code>.dvi</code> files, one for every package + installed. These can be previewed or printed like any other + <small><a href="#DVI" class="acroref" name="A118" title="device-independent">DVI</a></small> file (see + <a href="#dvipreview">section 4.3.1</a>). If your installation + procedure has not installed the documentation, the <small><a href="#DVI" class="acroref" name="A119" title="device-independent">DVI</a></small> files can all be downloaded from + <small><a href="#CTAN" class="acroref" name="A120" title="Comprehensive Archive Network">CTAN</a></small>. + </p> + <p>Before using a package, you should read the + documentation carefully, especially the subsection usually + called ‘User Interface’, which + describes the commands the package makes available. You + cannot just guess and hope it will work: you have to read it + and find out. + </p> + <p>See the next section for details of how to create the + documentation <code>.dvi</code> file for additional + packages you install yourself. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 13</i>. Read all about it + </h4> + <p>Find and view (or print) the documentation on the + <span class="package"><a name="m36">geometry</a></span> package you used in + <a href="#geoex">the example ‘Add colour’ in section 5.1.1</a>. + </p> + <p>Investigate some of the other package documentation + files in the directory. + </p> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2 <a name="pkginst">Downloading and installing packages</a></h2><a name="I82"></a><a name="I83"></a><p>Once you have identified a package you need and + haven't already got (or you have got it and need to + update it), use the indexes on any <small><a href="#CTAN" class="acroref" name="A121" title="Comprehensive Archive Network">CTAN</a></small> server to find the package you need + and the directory where it can be downloaded from. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.1 <a name="downloadpkg">Downloading packages</a></h3> + <p>What you need to look for is always <em>two + files</em>, one ending in <code>.dtx</code> + and the other in <code>.ins</code>. The first is a + DOC<span class="TEX">T<span class="E">E</span>X</span><a name="I84"></a> file, which combines the package program and its + documentation in a single file. The second is the + installation routine (much smaller). You <em>must + always</em> download <em>both</em> + files. + </p> + <p>If the two files are not there, it means one of two + things: + </p> + <ul> + <li> + <p><em>Either</em> the package is part of a + much larger bundle which you shouldn't normally update + unless you change version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>;<sup><a href="#F29">1</a></sup></p> + </li> + <li> + <p><em>or</em> it's one of a few rare or + unusual packages still supplied as a single + <code>.sty</code> file intended for the now + obsolete <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> 2.09.<sup><a href="#F30">2</a></sup></p> + </li> + </ul> + <p><a name="packinst"></a>Download both files to a <b><i><a name="tempdir">temporary directory</a></i></b>. If you use + Windows, keep a folder like <code>C:\tmp</code> or + <code>C:\temp</code> for this; Mac and Linux systems + already have a <code>/tmp</code> directory. + </p> + <ol class="footnotes" start="1"> + <li><a name="F29">For example, there is no + <code>color.dtx</code> and + <code>color.ins</code> for the + <span class="package"><a name="m37">color</a></span> package because it + forms part of the <span class="package"><a name="m38">graphics</a></span> + bundle, which is installed on all <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems + anyway. Such packages change very rarely, as they + + form part of the core of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and are very + stable. In + general you should never try to update these + packages in isolation.</a></li> + <li><a name="F30">You can try to use these if you wish but they + are not guaranteed to work, and have now almost all + been replaced by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> versions. Always look for + the + <code>.dtx</code> and + <code>.ins</code> pair of files + first.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.2 <a name="installpkg">Installing a package</a></h3> + <p>There are four steps to installing a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + package: + </p><a name="I85"></a><ol> + <li><b><a name="extract">Extract the files</a></b><br><p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the <code>.ins</code> file. + That is, open the file in your editor and process it as + if it were a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document (which is it), or if you + prefer, type <code class="literal">latex</code> followed by the + <code>.ins</code> filename in a command window + in your temporary directory. + </p> + <p>This will extract all the files needed from the + <code>.dtx</code> file (which is why you must + have both of them present in the temporary directory). + Note down or print the names of the files created if + there are a lot of them (read the log file if you want + to see their names again). + </p> + </li> + <li><b><a name="dtxdoc">Create the documentation</a></b><br><p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the <code>.dtx</code> file + twice. This will create a <code>.dvi</code> file + of documentation explaining what the package is for and + how to use it. Two passes through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are needed in + order to resolve any internal crossreferences in the + text (a feature we'll come onto later). If you + prefer to create <small><a href="#PDF" class="acroref" name="A122" title="Portable Document Format">PDF</a></small> then run + <i><a name="p153">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> instead. View or + print this file in the usual manner (see <a href="#dvi">section 4.3</a>). + </p> + </li> + <li><b>Install the files</b><br><p>While the documentation is printing, move or copy + the files created in <a href="#extract">step 1</a> + from your temporary directory to the right place[s] in + your <span class="TEX">T<span class="E">E</span>X</span> <em>local</em> installation + directory tree — always your ‘local’ + directory tree, <i>a</i>) to prevent your new package accidentally + overwriting files in the main <span class="TEX">T<span class="E">E</span>X</span> + directories; and <i>b</i>) to avoid your newly-installed files being + overwritten when you next update your version of + <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 5.1</i>. <a name="where">Where to put files from packages</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Type</th> + <th valign="bottom" align="left">Directory (under + <code>texmf-local/</code>) + </th> + <th valign="bottom" align="left" width="216">Description</th> + </tr> + <tr> + <td valign="top" align="left"><code>.cls</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/base</td> + <td valign="top" width="216" align="left" style="font-size:small;">Document class file</td> + </tr> + <tr> + <td valign="top" align="left"><code>.sty</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">Style file: the normal package + content + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.bst</code></td> + <td valign="top" align="left" style="font-family:monospace;">bibtex/bst/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> style + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.mf</code></td> + <td valign="top" align="left" style="font-family:monospace;">fonts/source/public/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">METAFONT outline</td> + </tr> + <tr> + <td valign="top" align="left"><code>.fd</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/mfnfss</td> + <td valign="top" width="216" align="left" style="font-size:small;">Font Definition files for METAFONT fonts</td> + </tr> + <tr> + <td valign="top" align="left"><code>.fd</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/psnfss</td> + <td valign="top" width="216" align="left" style="font-size:small;">Font Definition files for PostScript + Type 1 fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.pfb</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/type1/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">PostScript Type 1 outline</td> + </tr> + <tr> + <td valign="top" align="left"><code>.afm</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/afm/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">Adobe Font Metrics for Type 1 + fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.tfm</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/tfm/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="TEX">T<span class="E">E</span>X</span> Font Metrics for METAFONT and + Type 1 fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.vf</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/vf/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="TEX">T<span class="E">E</span>X</span> virtual fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.dvi</code></td> + <td valign="top" align="left" style="font-family:monospace;">/doc</td> + <td valign="top" width="216" align="left" style="font-size:small;">package documentation</td> + </tr> + <tr> + <td valign="top" align="left"><code>.pdf</code></td> + <td valign="top" align="left" style="font-family:monospace;">/doc</td> + <td valign="top" width="216" align="left" style="font-size:small;">package documentation</td> + </tr> + <tr> + <td valign="top" align="left">others</td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">other types of file unless instructed + otherwise + </td> + </tr> + </table> + </div> + <p>‘The right place’ sometimes causes + confusion, especially if your <span class="TEX">T<span class="E">E</span>X</span> installation is old + or does not conform to the <span class="TEX">T<span class="E">E</span>X</span> + Directory Structure (UNDEFINED ACRONYM). For a <small><a href="#TDS" class="acroref" name="A124" title="Directory Structure">TDS</a></small>-conformant system, this is either + <i>a</i>) for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages, a suitably-named + subdirectory of + <code>texmf-local/tex/latex/</code><sup><a href="#F31">3</a></sup>; or <i>b</i>) a suitably-named subdirectory of + <code>texmf-local/</code> for files like + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> styles which are not just for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> but can + be used in other <span class="TEX">T<span class="E">E</span>X</span> systems. + </p> + <p>‘Suitably-named’ means sensible and + meaningful (and probably short). For a package like + <span class="package"><a name="m39">paralist</a></span>, for example, I'd call + the directory <code>paralist</code>. + </p> + <p>Often there is just a <code>.sty</code> file + to move but in the case of complex packages there may be + more, and they may belong in different locations. For + example, new <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> packages or font packages will + typically have several files to install. This is why it + is a good idea to create a subdirectory for the package + rather than dump the files into + <code>misc</code> along with other unrelated + stuff. + </p> + <p>If there are configuration or other files, read the + documentation to find out if there is a special or + preferred location to move them to. + </p> + </li> + <li><b><a name="texindex">Update your index</a></b><br><a name="I86"></a><p>Finally, run your <span class="TEX">T<span class="E">E</span>X</span> indexer program to update + the package database. This program comes with every + modern version of <span class="TEX">T<span class="E">E</span>X</span> and is variously called + <i><a name="p154">texhash</a></i>, + <i><a name="p155">mktexlsr</a></i>, or even + <i><a name="p156">configure</a></i>, or it might just + be a mouse click on a button or menu in your editor. + Read the documentation that came with your installation + to find out which it is. + </p> + </li> + </ol> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">This last step is <em>utterly + essential</em>, otherwise nothing will + work. + </p> + </blockquote> + <blockquote class="exercise"><a name="insttest"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 14</i>. Install a package + </h4> + <p>Download and install the + <span class="package"><a name="m40">paralist</a></span> package (which + implements inline lists). + </p> + <hr> + </blockquote> + <p>The reason this process has not been automated widely is + that there are still thousands of installations which do not + conform to the <small><a href="#TDS" class="acroref" name="A125" title="Directory Structure">TDS</a></small>, such as old + shared Unix systems and some Microsoft Windows systems, so + there is no way for an installation program to guess where + to put the files: <em>you</em> have to know + this. There are also systems where the owner, user, or + installer has chosen <em>not</em> to follow the + recommended <small><a href="#TDS" class="acroref" name="A126" title="Directory Structure">TDS</a></small> directory + structure, or is unable to do so for political or security + reasons (such as a shared system where she cannot write to a + protected directory). + </p> + <p>The reason for having the + <code>texmf-local</code> directory (called + <code>texmf.local</code> on some systems) is to + provide a place for local modifications or personal updates, + especially if you are a user on a shared or managed system + (Unix, Linux, VMS, Windows NT/2000/XP, etc.) where you may + not have write-access to the main <span class="TEX">T<span class="E">E</span>X</span> + installation directory tree. You can also have a personal + <code>texmf</code> subdirectory in your own login + directory. Your installation must be configured to look in + these directories first, however, so that any updates to + standard packages will be found there + <em>before</em> the superseded copies in the + main <code>texmf</code> tree. All modern <span class="TEX">T<span class="E">E</span>X</span> + installations should do this anyway, but if not, you can + edit <code>texmf/web2c/texmf.cnf</code> yourself. + There is an example in <a href="#cnf">this appendix</a>. + </p> + <ol class="footnotes" start="3"> + <li><a name="F31">See <a href="#rightplace">section 5.2.3</a> for how + to create a parallel structure in your local + directory if your installation didn't create + one for you.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.3 <a name="rightplace">Replicating the TDS</a></h3> + <p>The <a name="TDS" class="acroref"><span class="TEX">T<span class="E">E</span>X</span> Directory + Structure</a> (<small>TDS</small>) is documented at <a href="http://www.tug.org/tds/"><tt>http://www.tug.org/tds/</tt></a>. I find it useful to + make the directory structure of + <code>texmf-local</code> the same as that of + <code>texmf</code>. Examine the subdirectories of + <code>texmf/tex/latex/</code> for examples. For + updates of packages which came with your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + distribution (as distinct from new ones you are adding + yourself), you can then use the same subdirectory name and + position in <code>texmf-local/...</code> as the + original used in <code>texmf/...</code>. + </p> + <p>If you want to create the entire subdirectory structure + ready for use, you can do it under Unix with the following + commands: + </p> + <blockquote><pre> +cd /usr/TeX/texmf +find . -type d -exec mkdir -p /usr/TeX/texmf-local/{} \; + </pre></blockquote> + <p>If you are using Microsoft Windows, you can download + <i><a name="p157">Cygwin</a></i>, which provides you with + the standard Unix tools in a shell window. The above command + should also work on a Mac running OS X. In all cases, + if your installation directory is not + <code>/usr/TeX</code>, you need to substitute the + actual paths to your <code>texmf</code> and + <code>texmf-local</code> directories. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3 <a name="help">Online help</a></h2><a name="I87"></a><p>The indexes and documentation files on <small><a href="#CTAN" class="acroref" name="A128" title="Comprehensive Archive Network">CTAN</a></small> are the primary online resource for + self-help on specific packages, and you should read these + carefully before asking questions about packages. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.1 <a name="faq">The FAQ</a></h3> + <p>For general queries you should read the <a name="FAQ" class="acroref">Frequently-Asked Questions</a> (<small>FAQ</small>) document so + that you avoid wasting online time asking about things for + which there is already an easily-accessible answer. + </p> + <p>The <small><a href="#FAQ" class="acroref" name="A130" title="Frequently-Asked Questions">FAQ</a></small> is managed by the UK + <span class="TEX">T<span class="E">E</span>X</span> Users Group and can be found at <a href="http://www.tex.ac.uk/faq/"><tt>http://www.tex.ac.uk/faq/</tt></a> . + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.2 The <span class="TEX">T<span class="E">E</span>X</span>hax mailing list + </h3> + <p>Another support resource is the mailing list <a href="texhax@tug.org"><tt>texhax@tug.org</tt></a>. Again, feel free to ask + questions, but again, try to answer the question yourself + first (and say what you've tried in your + message). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.3 Web sites + </h3> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Users Group, as well as most local user + groups, maintains a web site (<a href="http://www.tug.org"><tt>http://www.tug.org</tt></a>) with lots of information + about various aspects of the <span class="TEX">T<span class="E">E</span>X</span> + system. See <a href="#tugform">this appendix</a> for information on + joining TUG. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.4 News + </h3> + <p>The Usenet newsgroup <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> is the principal forum for other + questions and answers about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Feel free to ask + questions, but + please do not ask frequently-asked questions: read the + <small><a href="#FAQ" class="acroref" name="A131" title="Frequently-Asked Questions">FAQ</a></small> instead. The people who answer + the questions do so voluntarily, unpaid, and in their own + time, so please don't treat this as a commercial + support service. + </p> + <p>To access Usenet news, type the following <small><a href="#URI" class="acroref" name="A132" title="Uniform Resource Indicator">URI</a></small> into your browser's + ‘Location’ or + ‘Address’ window: + <code>news:comp.text.tex</code> (if your browser + doesn't support Usenet news properly, change it for one + that does, like <a href="http://www.mozilla.org/"><i><a name="p158">Mozilla</a></i></a>), or download one of the many free newsreaders.<sup><a href="#F32">4</a></sup></p> + <ol class="footnotes" start="4"> + <li><a name="F32">Note that this means newsreaders for the Usenet News + (NNTP) service. It does <em>not</em> mean + syndication readers for RSS, which are a different thing + entirely — these are unfortunately also sometimes + referred to as ‘newsreaders’.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.5 Commercial support + </h3> + <p>If you need commercial levels of support, such as + 24-hour phone contact, or macro-writing services, you can + buy one of the several excellent commercial versions of + <span class="TEX">T<span class="E">E</span>X</span>, or contact a consultancy which deals with <span class="TEX">T<span class="E">E</span>X</span> + (details on the TUG Web site). + </p> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="otherdoc">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">6</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Other document structures</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#briefstruct">A little think about structure</a></li> + <li><a href="#lists">Lists</a></li> + <li><a href="#tables">Tables</a></li> + <li><a href="#figures">Figures</a></li> + <li><a href="#images">Images</a></li> + <li><a href="#verbatim">Verbatim text</a></li> + <li><a href="#boxes">Boxes, sidebars, and panels</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>It is perfectly possible to write whole documents using + nothing but section headings and paragraphs. As mentioned in + <a href="#sections">section 3.5</a>, novels, for example, usually consist + just of chapters divided into paragraphs. However, it's more + common to need other features as well, especially if the + document is technical in nature or complex in structure. + </p> + <p>It's worth pointing out that + ‘technical’ doesn't necessarily mean + ‘computer technical’ or + ‘engineering technical’: it just means it + contains a lot of τηχνε (<i>tekne</i>), the + specialist material or artistry of its field. A literary + analysis such as <cite><a href="#macnamara" name="C28">La Textualisation de Madame + Bovary</a></cite> (on the + marginal notes in the manuscripts of Flaubert's novel) is every bit as + technical in the literary or linguistic field as the maintenance + manual for the Airbus 380 is in the aircraft engineering + field. + </p> + <p>This chapter covers the most common features needed in + writing structured documents: lists, tables, figures (including + images), sidebars like boxes and panels, and verbatim text + (computer program listings). In <a href="#texttools">Chapter 7</a> we + will cover footnotes, cross-references, citations, and other + textual tools. + </p> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.1 <a name="briefstruct">A little think about structure</a></h2> + <p>It's very easy to sit down at a keyboard with a + traditional wordprocessor and just start typing. If it's + a very short document, or something transient or relatively + unimportant, then you just want to type it in and make it look + ‘right’ by highlighting with the mouse + and clicking on font styles and sizes. + </p> + <p>In doing so, you may achieve the effect you wanted, but + your actions have left no trace behind of + <em>why</em> you made these changes. This is + usually unimportant for trivial or short-term documents, but + if you write longer or more complex documents, or if you often + write documents to a regular pattern, then making them + consistent by manual methods becomes a nightmare. + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s facilities for automation are based on you + providing this ‘why’ + information. + </p> + <p>If your documents have any of the features below, then you + have probably already started thinking about structure. + </p> + <ul> + <li> + <p>The document naturally divides into sections (parts, + chapters, etc.). + </p> + </li> + <li> + <p>The document is long.</p> + </li> + <li> + <p>There is lots of repetitive formatting in the + document. + </p> + </li> + <li> + <p>The document is complex (intellectually or + visually). + </p> + </li> + <li> + <p>There are lots of figures or tables (or examples, + exercises, panels, sidebars, etc.). + </p> + </li> + <li> + <p>Accuracy is important in formatting the + document. + </p> + </li> + <li> + <p>A master copy is needed for future reference or + reprinting. + </p> + </li> + <li> + <p>This is a formal or official document needing special + care and attention. + </p> + </li> + <li> + <p>It's <em>my</em> thesis, book, + leaflet, pamphlet, paper, article, etc. + <em>That</em>'s why I care. + </p> + </li> + <li> + <p>The document (or part of it) may need ongoing or + occasional re-editing and republishing. + </p> + </li> + </ul> + <p>If you've got that far, you're over half-way + done. Using a structural editor — even a simple + outliner — can make a huge difference to the quality of + your thinking because you are consciously organising your + thoughts before setting them down. And it can make just as big + a difference to your formatting as well: more consistent, + better presented, easier for the reader to navigate through, + and more likely to be read and understood — which is + presumably why you are writing the document in the first + place. + </p> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2 <a name="lists">Lists</a></h2><a name="I88"></a><p>Lists are useful tools for arranging thoughts in a + digestible format, usually a small piece of information at a + time. There are four basic types of list, shown in <a href="#listtypes">Table 6.1</a>. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 6.1</i>. <a name="listtypes">Types of lists</a></caption> + <tr> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Random or arbitrary lists</b></dt> + <dd>(sometimes called + ‘itemized’ or + ‘bulleted’ lists) where the + order of items is unimportant. The + items are often prefixed with a bullet or other + symbol for clarity or decoration, but are + sometimes simply left blank, looking like + miniature paragraphs (when they are known as + ‘simple’ or + ‘trivial’ lists). + </dd> + </dl> + </td> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Enumerated or sequential lists</b></dt> + <dd>(sometimes called + ‘numbered’ lists) where the + order of items is critical, such as sequences of + instructions or rankings of importance. The + enumeration can be numeric (Arabic or Roman), or + lettered (uppercase or lowercase), and can even be + programmed to be hierarchical (1.a.viii, 2.3.6, + etc.). + </dd> + </dl> + </td> + </tr> + <tr> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Descriptive or labelled lists</b></dt> + <dd>(sometimes called + ‘discussion’ lists), which + are composed of subheadings or topic labels + (usually unnumbered but typographically distinct), + each followed by one or more indented paragraphs + of discussion or explanation. + </dd> + </dl> + </td> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Inline lists</b></dt> + <dd>which are sequential in nature, just like + enumerated lists, but are + <i>a</i>) formatted <em>within</em> + their paragraph; and <i>b</i>) usually labelled with letters, like this example. The items + are often mutually inclusive or exclusive, with + the final item prefixed by + ‘and’ or + ‘or’ respectively. + </dd> + </dl> + </td> + </tr> + </table> + </div> + <p>There are actually two other types, segmented lists and + reference lists, but these are much rarer, and outside the + scope of this document. + </p><a name="I89"></a><p>The structure of lists in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is identical for each + type, but with a different environment name. Lists are another + example of this <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> technique (environments), where a pair + of matched commands surrounds some text which needs special + treatment. + </p> + <p>Within a list environment, list items are always + identified by the command <code class="command"><a name="c104">\item</a></code> (followed by + an item label in [square brackets] in the case of labelled + lists). You don't type the bullet or the number or the + formatting, it's all automated. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.1 Itemized lists + </h3><a name="I90"></a><a name="I91"></a><p>To create an itemized list, use the the + <span class="environment"><a name="e13">itemize</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{itemize} + +\item Itemized lists usually have a bullet; + +\item Long items use `hanging indentation', +whereby the text is wrapped with a margin +which brings it clear of the bullet used in +the first line of each item; + +\item The bullet can be changed for any other +symbol, for example from the \textsf{bbding} +or \textsf{pifont} package. + +\end{itemize} + </pre><ul> + <li> + <p>Itemized lists usually have a bullet;</p> + </li> + <li> + <p>Long items use ‘hanging + indentation’, whereby the text is + wrapped with a margin which brings it clear of the + bullet used in the first line of each item; + </p> + </li> + <li> + <p>The bullet can be changed for any other symbol, + for example from the <span class="package"><a name="m41">bbding</a></span> + or <span class="package"><a name="m42">pifont</a></span> package. + </p> + </li> + </ul> + </blockquote> + <p>The default list bullet is round and solid<sup><a href="#F33">1</a></sup> (舦) which is also available with the + command <code class="command"><a name="c105">\textbullet</a></code> if you load the + <span class="package"><a name="m43">textcomp</a></span> package. See <a href="#bullets">section 9.6.1</a> for details of how to change the + settings for list item bullets. + </p> + <ol class="footnotes" start="1"> + <li><a name="F33">If your browser font doesn't show it, don't + worry: most don't. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.2 Enumerated lists + </h3><a name="I92"></a><a name="I93"></a><p>To create an enumerated list, use the + <span class="environment"><a name="e14">enumerate</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{enumerate} + +\item Enumerated lists use numbering on each +item (can also be letters or roman numerals); + +\item Long items use `hanging indentation' +just the same as for itemized lists; + +\item The numbering system can be changed for +any level. + +\end{enumerate} + </pre><ol type="1"> + <li> + <p>Enumerated lists use numbering on each + item (can also be letters or roman numerals); + </p> + </li> + <li> + <p>Long items use ‘hanging + indentation’, just the same as for + itemized lists; + </p> + </li> + <li> + <p>The numbering system can be changed for any + level. + </p> + </li> + </ol> + </blockquote> + <p>See <a href="#numberschemes">section 6.2.6</a> for details of how + to change the numbering schemes for each level. + </p> + <p>In standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document classes, the vertical + spacing between items, and above and below the lists as a + whole, is more than between paragraphs. If you want + tightly-packed lists, use the + <span class="package"><a name="m44">mdwlist</a></span> package, which provides + ‘starred’ versions + (<span class="environment"><a name="e15">itemize*</a></span>, + <span class="environment"><a name="e16">enumerate*</a></span>, etc). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.3 <a name="desc">Description lists</a></h3><a name="I94"></a><a name="I95"></a><p>To create a description list, use the + <span class="environment"><a name="e17">description</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{description} + +\item[Identification:] description lists +require a topic for each item given in +square brackets; + +\item[Hanging indentation:] Long items use +this in the same way as all other lists; + +\item[Reformatting:] Long topics can be +reprogrammed to fold onto multiple lines. + +\end{description} + </pre><blockquote> + <dl> + <dt><b>Identification:</b></dt> + <dd> + <p>description lists require a topic for each item + given in square brackets; + </p> + </dd> + <dt><b>Hanging indentation:</b></dt> + <dd> + <p>Long items use this in the same way as all other + lists; + </p> + </dd> + <dt><b>Reformatting:</b></dt> + <dd> + <p>Long topics can be reprogrammed to fold onto + multiple lines. + </p> + </dd> + </dl> + </blockquote> + </blockquote> + <p>All three of these types of lists can have multiple + paragraphs per item: just type the additional paragraphs in + the normal way, with a blank line between each. So long as + they are still contained within the enclosing environment, + they will automatically be indented to follow underneath their + item. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.4 <a name="inlinelists">Inline lists</a></h3><a name="I96"></a><p>Inline lists are a special case as they require the use + of the <span class="package"><a name="m45">paralist</a></span> package which + provides the <span class="environment"><a name="e18">inparaenum</a></span> environment + (with an optional formatting specification in square + brackets): + </p> + <blockquote class="example"><pre> +\usepackage{paralist} +... +\textbf{\itshape Inline lists}, which are +sequential in nature, just like enumerated +lists, but are \begin{inparaenum}[\itshape +a\upshape)]\item formatted within their +paragraph; \item usually labelled with +letters; and \item usually have the final +item prefixed with `and' or +`or'\end{inparaenum}, like this example. + </pre><p class="example"><b><i><a name="inlines">Inline lists</a></i></b>, + which are sequential in nature, just like enumerated + lists, but are <i>a</i>) formatted within their paragraph; <i>b</i>) usually labelled with letters; and <i>c</i>) usually have the final + item prefixed with ‘and’ or + ‘or’, like this example. + </p> + </blockquote> + <p>See <a href="#typo">Chapter 8</a> for details of the + font-changing commands used in the optional argument to + <span class="environment"><a name="e19">inparaenum</a></span>. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 15</i>. List practice + </h4> + <p>Add some lists to your document. Pick any two of the + ones described here to practice with. + </p> + <p>If you successfully installed + <span class="package"><a name="m46">paralist</a></span> in <a href="#insttest">the example ‘Install a package’ in section 5.2.2</a> then you can use inline lists as + described in <a href="#inlinelists">section 6.2.4</a>. + </p> + <hr> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.5 Reference lists and segmented lists + </h3> + <p>Reference lists are visually indistinguishable from + numbered or lettered lists, but the numbering or lettering + does <em>not</em> imply a sequence. The numbers + or letters are just used as labels so that the items can be + referred to from elsewhere in the text (as in ‘see + item 501(c)3’). In this sense they are really a + kind of sub-sectional division, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + <code class="command"><a name="c106">\paragraph</a></code> or + <code class="command"><a name="c107">\subparagraph</a></code> commands (with appropriate + renumbering) would probably be a far better solution than + using a list. Label them and refer to them with + <code class="command"><a name="c108">\label</a></code> and <code class="command"><a name="c109">\ref</a></code> as for + any other cross-reference (see <a href="#xrefs">section 7.4</a>). + </p> + <p>Segmented lists are a highly specialised structure and + outside the scope of this document. For details of their + usage, see the the chapter ‘Segmentation and + Alignment’ in <cite><a href="#teiguide" name="C30">Guidelines for the Text Encoding Initiative</a></cite>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.6 <a name="numberschemes">Lists within lists</a></h3> + <p>You can start a new list environment within the item of + an existing list, so you can embed one list inside another + up to four deep. The lists can be of any type, so you can + have a description list containing an item in which there is + a numbered sub-list, within which there is an item + containing a bulleted sub-sub-list. + </p> + <ol type="1"> + <li> + <p>by default an outer enumerated list is numbered in + Arabic numerals; + </p> + <ol type="a"> + <li> + <p>an embedded enumerated list is lettered in + lowercase; + </p> + <ol type="i"> + <li> + <p>a third level is numbered in lowercase Roman + numerals; + </p> + <ol type="A"> + <li> + <p>the fourth level uses uppercase + alphabetic letters. + </p> + </li> + </ol> + </li> + </ol> + </li> + </ol> + </li> + </ol> + <p>Multiple embedded lists automatically change the bullet + or numbering scheme so that the levels don't get + confused, and the spacing between levels is adjusted to + become fractionally tighter for more deeply nested + levels. + </p> + <p>These are only defaults and can easily be changed by + redefining the relevant set of values. You could also add a + fifth and further levels, although I suspect that would mean + your document structure needed some careful analysis, as + lists embedded five deep will probably confuse your + readers. + </p> + <p>The values for lists come in pairs: for each level there + is a counter to count the items and a command to produce the + label:<sup><a href="#F34">2</a></sup></p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="right">Level</th> + <th valign="bottom" align="center">Default</th> + <th valign="bottom" align="left">Counter</th> + <th valign="bottom" align="left">Label command</th> + </tr> + <tr> + <td valign="top" align="right">1</td> + <td valign="top" align="center">digit.</td> + <td valign="top" align="left"><tt><i><a name="l21">enumi</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c110">\theenumi</a></code></td> + </tr> + <tr> + <td valign="top" align="right">2</td> + <td valign="top" align="center">(letter)</td> + <td valign="top" align="left"><tt><i><a name="l22">enumii</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c111">\theenumii</a></code></td> + </tr> + <tr> + <td valign="top" align="right">3</td> + <td valign="top" align="center">roman.</td> + <td valign="top" align="left"><tt><i><a name="l23">enumiii</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c112">\theenumiii</a></code></td> + </tr> + <tr> + <td valign="top" align="right">4</td> + <td valign="top" align="center">LETTER.</td> + <td valign="top" align="left"><tt><i><a name="l24">enumiv</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c113">\theenumiv</a></code></td> + </tr> + </table> + </div> + <p>Note that each counter and command ends with the Roman + numeral value of its level (this is to overcome the rule + that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands can only be made of + letters — digits wouldn't work here). To + change the format of a numbered list item counter, just + renew the meaning of its label: + </p> + <blockquote><pre> +\renewcommand{\theenumi}{\Alph{enumi}} +\renewcommand{\theenumii}{\roman{enumii}} +\renewcommand{\theenumiii}{\arabic{enumiii}} + </pre></blockquote> + <p><a name="thecounter"></a>This would make the + outermost list use uppercase letters, the second level use + lowercase roman, and the third level use ordinary Arabic + numerals. The fourth level would remain unaffected. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 16</i>. Nesting + </h4> + <p>Extend your use of lists by nesting one type inside a + different one. + </p> + <hr> + </blockquote> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Lists: a caution to the unwary</a></h4> + <p>Treat lists with care: people sometimes use tables for + labelled information which is really a list and would be + better handled as such. They often do this because their + wordprocessor has no way to do what they want (usually to + place the item label level with the description or + explanation) <em>except</em> by using a table, + hence they are misled into believing that their text is + really a table when it's actually not. + </p> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F34">In fact, any time you define a counter in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + you automatically get a command to reproduce its value. + So if you defined a new counter <tt><i><a name="l19">example</a></i></tt> to use in a teaching + book, by saying <code class="literal">\newcounter{example}</code>, + that automatically makes available the command + <code class="literal">\theexample</code> for use when you want to + display the current value of <tt><i><a name="l20">example</a></i></tt>.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3 <a name="tables">Tables</a></h2><a name="I97"></a><p>Tabular typesetting is the most complex and time-consuming + of all textual features to get right. This holds true whether + you are typing in plain-text form, using a wordprocessor, + using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, using <small><a href="#HTML" class="acroref" name="A133" title="HyperText Markup Language">HTML</a></small> or + <small><a href="#XML" class="acroref" name="A134" title="Extensible Markup Language">XML</a></small>, using a <small><a href="#DTP" class="acroref" name="A135" title="desktop publishing">DTP</a></small> system, or some other text-handling + package. Fortunately, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides a + table model with a mixture of defaults and configurability to + let it produce very high quality tables with a minimum of + effort. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Terminology</a></h4> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, in common with standard typesetting + practice, uses the word ‘Table’ to + mean a formal textual feature, numbered and with a caption, + referred to from the text (as in ‘See + Table 5’). Sometimes you can get + ‘informal’ tables, which simply occur + between two paragraphs, without caption or number. + </p> + <p>The arrangement of information in rows and columns + <em>within</em> either of these structures is + called a ‘tabulation’ or + ‘tabular matter’. + </p> + <p>It is important to keep this distinction firmly in mind + for this section. + </p> + </blockquote> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.1 <a name="floats">Floats</a></h3><a name="I98"></a><p>Tables and Figures are what printers refer to as + ‘floats’. This means they are not + part of the normal stream of text, but separate entities, + positioned in a part of the page to themselves (top, middle, + bottom, left, right, or wherever the designer specifies). + They always have a caption describing them and they are + always numbered so they can be referred to from elsewhere in + the text. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> automatically floats Tables and Figures, + depending on how much space is left on the page at the point + that they are processed. If there is not enough room on the + current page, the float is moved to the top of the next + page. This can be changed by moving the Table or Figure + definition to an earlier or later point in the text, or by + adjusting some of the parameters which control automatic + floating. + </p> + <p>Authors sometimes have many floats occurring in rapid + succession, which raises the problem of how they are + supposed to fit on the page and still leave room for text. + In this case, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> stacks them all up and prints them + together if possible, or leaves them to the end of the + chapter in protest. The skill is to space them out within + your text so that they intrude neither on the thread of your + argument or discussion, nor on the visual balance of the + typeset pages. But this is a skill few authors have, and + it's one point at which professional typographic advice + or manual intervention may be needed. + </p> + <p>There is a <span class="environment"><a name="e20">float</a></span> package which lets + you create new classes of floating object (perhaps Examples + or Exercises). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.2 Formal tables + </h3> + <p>To create a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Table, use the <span class="environment"><a name="e21">table</a></span> + environment containing a <code class="command"><a name="c114">\caption</a></code> command + where you type the caption, and a <code class="command"><a name="c115">\label</a></code> + command to give the Table a label by which you can refer to + it. + </p> + <blockquote><pre> +\begin{table} +\caption{Project expenditure to year-end 2006} +\label{ye2006exp} +... +\end{table} + </pre></blockquote> + <p>Numbering is automatic, but the <code class="command"><a name="c116">\label</a></code> + command <em>must follow</em> the + <code class="command"><a name="c117">\caption</a></code> command, not precede it. The + numbering automatically includes the chapter number in + document classes where this is appropriate (but this can of + course be overridden). The <code class="command"><a name="c118">\caption</a></code> + command has an optional argument to provide a short caption + if the full caption would be too long for the <a href="#loflot" title="para">List of Tables</a>: + </p> + <blockquote><pre> +\caption[Something short]{Some very long caption that +will only look reasonable in the full figure.} + </pre></blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.3 Tabular matter + </h3> + <p>Within a Table, you can either typeset the tabular + matter using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, or include a table captured as an + image from elsewhere. We will see how to include images in + <a href="#figures">section 6.4</a> on Figures, where they are more + common. + </p> + <p>To typeset tabular matter, use the + <span class="environment"><a name="e22">tabular</a></span> environment. The + <code class="literal">\begin{tabular}</code> command must be followed + by a compulsory second argument in curly braces giving the + alignment of the columns. These are specified for each + column using one of single letters <code class="literal">l</code>, + <code class="literal">c</code>, and <code class="literal">r</code> for + left-aligned, centered, or right-aligned text, or the letter + <code class="literal">p</code> followed by a width argument if you + want a long entry to wrap to several lines (a miniature + paragraph as a single cell on each row). + </p> + <p><span class="TEX">T<span class="E">E</span>X</span>'s original tabular settings were designed + for classical numerical tabulations, where each cell + contains a single value. The <code class="literal">p</code> + specification allows a cell to be a miniature paragraph set + to a specific width. These are <code class="literal">p</code> column + specifications are <em>not</em> multi-row + entries, they are single cells which contain multiple lines + of typesetting: the distinction is very important. + Auto-adjusting space between columns is possible with the + <span class="package"><a name="m47">tabularx</a></span> package, but the + auto-resizing column widths used in web pages are not + available in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>The <span class="package"><a name="m48">array</a></span> package provides for + many other typographic variations such as left-aligned, + right-aligned, and centred multi-line columns, and other + packages provide decimal-aligned columns, row-spanning and + column-spanning, multi-page, and rotated (landscape format) + tables. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 6.1</i>. <a name="ye2006exp">Project expenditure to year-end 2006</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="center"></th> + <th valign="bottom" align="left">Item</th> + <th valign="bottom" align="right">€ Amount</th> + </tr> + <tr> + <td valign="top" align="center">a)</td> + <td valign="top" align="left">Salaries (2 research assistants)</td> + <td valign="top" align="right">28,000</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Conference fees and travel expenses</td> + <td valign="top" align="right">14,228</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Computer equipment (5 workstations)</td> + <td valign="top" align="right">17,493</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Software</td> + <td valign="top" align="right">3,562</td> + </tr> + <tr> + <td valign="top" align="center">b)</td> + <td valign="top" align="left">Rent, light, heat, etc.</td> + <td valign="top" align="right">1,500</td> + </tr> + <tr class="headfoot"> + <th valign="top" align="center"></th> + <th valign="top" align="left">Total</th> + <th valign="top" align="right">64,783</th> + </tr> + </table> + <div align="left"> + <p><small>The Institute also contributes to (a) and + (b).</small></p> + </div> + </div> + <p>As an example, a tabular setting with three columns, the + first one centered, the second left-aligned, and the third + one right-aligned, would therefore be specified as + <code class="literal">{clr}</code>, as in the example below. Note the + use of indentation to make the elements of the table clear + for editing, and note also how the typeset formatting is + unaffected by this (see <a href="#ye2006exp">Table 6.1</a>). + </p> + <blockquote><pre> +\begin{table} + \caption{Project expenditure to year-end 2006} + \label{ye2006exp} + \begin{center} + \begin{tabular}{clr} + &Item&\EUR\ Amount\\ + \hline + a)&Salaries (2 research assistants)&28,000\\ + &Conference fees and travel expenses&14,228\\ + &Computer equipment (5 workstations)&17,493\\ + &Software&3,562\\ + b)&Rent, light, heat, etc.&1,500\\\cline{3-3} + &Total&64,783 + \end{tabular} + \par\medskip\footnotesize +The Institute also contributes to (a) and (b). + \end{center} +\end{table} + </pre></blockquote> + <p>You do not need to format the tabular data in your + editor: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does this for you when it typesets the + table, using the column specifications you provided. Extra + space is automatically added between columns, and can be + adjusted by changing the <tt>\<a name="d25">tabcolsep</a></tt> dimension. + <a name="tak">Takaaki Ota</a> provides an excellent Tables mode for + <i><a name="p159">Emacs</a></i> which provides a + spreadsheet-like interface and can generate <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> table + source code (see <a href="#tabmode">Figure 6.1</a>). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="tabmode">Tables mode for + <i><a name="p160">Emacs</a></i></a></caption> + <div align="center" style="margin:12px"><img src="table.png" width="75%"></div> + <hr> + </div> + <p>It is conventional to centre the tabular setting within + the Table, using the <span class="environment"><a name="e23">center</a></span> environment + (note US spelling) or the <code class="command"><a name="c119">\centering</a></code> + command. The entries for each cell are separated by an + ampersand character (<code class="literal">&</code>) and the end + of a row is marked by + the double-backslash (<code class="literal">\\</code>). + </p> + <p>The <code class="command"><a name="c120">\hline</a></code> command draws a rule across + all columns and the <code class="command"><a name="c121">\cline</a></code> command draws a + rule across a range of columns (here, under column three + only — the argument needs a range). If used, these commands <em>follow</em> + the + <code class="literal">\\</code> of the row they apply to. There are + some extra formatting commands after the tabular material in + the example. These are explained in + <a href="#typo">Chapter 8</a>. + </p> + <p>If there is no data for a cell, just don't type + anything — but you still need the + <code class="literal">&</code> separating it from the next + column's data. The astute reader will already have + deduced that for a table of + <span class="math"><i>n</i></span> columns, there must always be + <span class="math"><i>n</i>−1</span> ampersands in each row. The exception to + this is when the <code class="command"><a name="c122">\multicolumn</a></code> command is + used to create cells which span multiple columns. There is + also a package (<span class="environment"><a name="e24">multirow</a></span>) to enable + cells to span multiple rows, but both of these techniques + are outside the scope of this document. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.4 Tabular techniques for alignment + </h3> + <p>As mentioned earlier, it's also perfectly possible + to typeset tabular matter outside a formal Table, where you + want to lay out an informal tabulation between paragraphs + where a fully floating formal Table would be unnecessary + (these are usually quite short: there are several of them in + this document). + </p> + <p>Tabular mode can also be used wherever you need to align + material side by side, such as in designing letterheads, + where you may want your company logo and address on one side + and some other information on the other. + </p> + <p>By default, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesets + <span class="environment"><a name="e25">tabular</a></span> environments inline to the + surrounding text, so if you want your alignment displayed by + itself, put it inside a positioning environment like + <span class="environment"><a name="e26">center</a></span>, + <span class="environment"><a name="e27">flushright</a></span>, or + <span class="environment"><a name="e28">flushleft</a></span>, or leave a blank line or + <code class="command"><a name="c123">\par</a></code> before and after so it gets typeset + separately. + </p> + <p>There is much more to tabular setting: + full details are in the manuals mentioned in + <a href="#docs">the last paragraph in the Foreword</a>. One final note to remind you of the + automated crossreferencing features: because the example + table is labelled, it can be referenced from anywhere in the + document as <a href="#ye2006exp">Table 6.1</a> just by using + <code class="literal">\ref{ye2006exp}</code>, regardless of how much + the surrounding document or structure is moved or + edited. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 17</i>. Create a tabulation + </h4> + <p>Create one of the following in your document:</p> + <ul> + <li> + <p>a formal Table with a caption showing the number + of people in your class broken down by age and + sex; + </p> + </li> + <li> + <p>an informal tabulation showing the price for three + products; + </p> + </li> + <li> + <p>the logo <img src="y2klogo.png" align="middle" height="10px" alt="\setlength{\fboxsep}{-3pt}\setlength{\fboxrule}{.4pt} \fbox{\begin{tabular}{cc}\tiny YEAR\\[-.8em]\tiny 2 0 0 0\vrule depth1em width0pt\end{tabular}}" width="48"> (hint: <a href="#fbox">section 6.7.2</a>) + </p> + </li> + </ul> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.4 <a name="figures">Figures</a></h2><a name="I99"></a><a name="I100"></a><p>As explained in <a href="#floats">section 6.3.1</a>, Figures and + Tables float to a vacant part of the page, as they are not + part of the sequence of sentences making up your text, but + illustrative objects that you refer to. + </p> + <p>Figures can contain text, diagrams, pictures, or any other + kind of illustration. To create a figure, use the + <span class="environment"><a name="e29">figure</a></span> environment: like Tables, they + automatically get numbered, and must include a caption (with a + label after the caption, if needed, exactly the same as for + Tables) + </p> + <blockquote><pre> +\begin{figure} +\caption{Total variable overhead variance (after + \citeauthor[p.191]{bull}} +\label{workeff} +\begin{center} +\includegraphics[width=.75\columnwidth]{diagram} +\end{center} +\end{figure} + </pre></blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="workeff">Total variable overhead variance (after <a href="#bull" name="K31">Bull</a> (1972) p.191)</a></caption> + <div align="center" style="margin:12px"><img src="diagram.png" width="75%"></div> + <hr> + </div> + <p>You can see that the structure is very similar to the + <span class="environment"><a name="e30">table</a></span> environment, but in this case we + have a graphic included. Details of this command + (<code class="command"><a name="c124">\includegraphics</a></code>) are in the next section. + Details of the bibliographic citation mechanism are in <a href="#bib">section 7.4.2</a></p> + <p>The content of the Figure could of course also be textual, + in the form of a list or a text diagram. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a simple + drawing environment called <span class="environment"><a name="e31">picture</a></span>, which + lets you create a limited set of lines and curves, but for a + diagram of any complexity, you should use a standard vector + drawing program (see <a href="#graphictypes">section 6.5.1</a>). + </p> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5 <a name="images">Images</a></h2><a name="I101"></a><a name="I102"></a><p>Images (graphics) can be included anywhere in a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + document, although in most cases of formal documents they will + occur in Figures (see preceding section). To use graphics, you + need to use the <span class="package"><a name="m49">graphicx</a></span> package in + your preamble: + <code class="literal">\usepackage{graphicx}</code><sup><a href="#F35">3</a></sup></p> + <p>This enables the command + <code class="command"><a name="c125">\includegraphics</a></code> which is used to insert an + image in the document. The command is followed by the name of + your graphics file <em>without the filetype</em>, + for example: <code class="literal">\includegraphics{myhouse}</code> + (we'll see in a minute why you don't include the + filetype). + </p> + <p>In most cases you should just make sure the image file is + in the same folder (directory) as the document you use it in. + This avoids a lot of messing around remembering where you put + the files. If you have images you want to use in several + different documents in different places on your disk, there is + a way to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> where to look (see <a href="#graphicsdir">section 6.5.2</a>). + </p> + <p>For standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with + <i><a name="p161">dvips</a></i>, graphics files + <em>must</em> be in <a name="EPS" class="acroref">Encapsulated + PostScript</a> (<small>EPS</small>) format: this has been the publishing + industry standard for portable graphics for many years, and no + other format will work portably in standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>.<sup><a href="#F36">4</a></sup></p> + <p>All good graphics packages can save images as <small><a href="#EPS" class="acroref" name="A141" title="Encapsulated PostScript">EPS</a></small>, but be very careful because some + packages, especially on Microsoft Windows platforms, use a + very poor quality driver, which creates very poor quality + <small><a href="#EPS" class="acroref" name="A142" title="Encapsulated PostScript">EPS</a></small> files. If in doubt, check with + an expert. If you find an <small><a href="#EPS" class="acroref" name="A143" title="Encapsulated PostScript">EPS</a></small> + graphic doesn't print, the chances are it's been + badly made by the graphics software. Download Adobe's own + PostScript driver from their Web site instead. + </p> + <p>For <i><a name="p162">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, graphics files + can be in <a name="PNG" class="acroref">Portable Network + Graphic</a> (<small>PNG</small>), <a name="JPG" class="acroref">Joint Photographic + Experts Group</a> (<small>JPG</small>), or <small><a href="#PDF" class="acroref" name="A146" title="Portable Document Format">PDF</a></small> + format, <em>not</em> <small><a href="#EPS" class="acroref" name="A147" title="Encapsulated PostScript">EPS</a></small>. This means if you want to use both + standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> as well + as <i><a name="p163">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, you need to keep + your graphics in two formats, <small><a href="#EPS" class="acroref" name="A148" title="Encapsulated PostScript">EPS</a></small> + and one of the others. This is why you don't include the + filetype in the filename you give with + <code class="command"><a name="c126">\includegraphics</a></code>: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will assume + <small><a href="#EPS" class="acroref" name="A149" title="Encapsulated PostScript">EPS</a></small> and + <i><a name="p164">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> will look for <small><a href="#JPG" class="acroref" name="A150" title="Joint Photographic Experts Group">JPG</a></small>, <small><a href="#PNG" class="acroref" name="A151" title="Portable Network Graphic">PNG</a></small> or + <small><a href="#PDF" class="acroref" name="A152" title="Portable Document Format">PDF</a></small> files matching the name. + </p> + <p>The <code class="command"><a name="c127">\includegraphics</a></code> command can take + optional arguments within square brackets before the filename + to specify either the height or width, and the other dimension + will automatically change to scale. If you specify both, the + image will be distorted to fit. You can scale an image by a + factor instead of specifying height or width; clip it to + specified coordinates; and rotate it in either direction. + Multiple optional arguments are separated with commas. + </p> + <blockquote class="example"><pre> +\begin{center} +\includegraphics[width=3cm]{twithcat} +\end{center} + </pre><div align="center" style="margin:12px"><img src="twithcat.png" width="168"></div> + </blockquote> + <p>For details of all the arguments, see the documentation on + the <span class="package"><a name="m51">graphicx</a></span> package or a copy of the + <cite><a href="#companion" name="C32">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite>. This package also + includes commands to <img src="rotate.png" align="middle" height="10px" alt="\raisebox{1ex}{\rotatebox{180}{rotate}}">, + <img src="mirror.png" align="middle" height="10px" alt="\scalebox{-1}[1]{mirror}">, and + <img src="scale.png" align="middle" height="10px" alt="\scalebox{2}[1]{scale}"> text. + <a name="I103"></a><a name="I104"></a><a name="I105"></a></p> + <p>It is in fact possible to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to generate the + right file format by itself, but this requires an external + command-line graphics converter, and as it gets done afresh + each time, it slows things down rather a lot. + </p> + <p><small><a href="#EPS" class="acroref" name="A153" title="Encapsulated PostScript">EPS</a></small> files, especially bitmaps, + can be very large indeed, because they are stored in <small><a href="#ASCII" class="acroref" name="A154" title="American Standard Code for Information Interchange">ASCII</a></small> format. + <a name="sw">Staszek Wawrykiewicz</a> has drawn my attention to a useful MS-DOS program to + overcome this, called <i><a name="p165">cep</a></i> + (‘Compressed Encapsulated Postscript’) available + from <small><a href="#CTAN" class="acroref" name="A155" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>support/pstools</code> directory, which can + compress <small><a href="#EPS" class="acroref" name="A156" title="Encapsulated PostScript">EPS</a></small> files to a fraction of + their original size. The original file can be replaced by the + new smaller version and still used directly with + <code class="command"><a name="c128">\includegraphics</a></code>. + </p> + <ol class="footnotes" start="3"> + <li><a name="F35">You may find a lot of old files which use a package + called <span class="package"><a name="m50">epsf</a></span>. Don't use it. + It's obsolete.</a></li> + </ol> + <ol class="footnotes" start="4"> + <li><a name="F36">Some distributions of <span class="TEX">T<span class="E">E</span>X</span> systems allow other + formats to be used, such as <small><a href="#PNG" class="acroref" name="A137" title="Portable Network Graphic">PNG</a></small>, + <a name="BMP" class="acroref">Microsoft Bitmap</a> (<small>BMP</small>) files, + Hewlett-Packard's <a name="PCL" class="acroref">Printer Control + Language</a> (<small>PCL</small>) files, and others; but you cannot + send such documents to other <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users and expect + them to work if they don't have the same distribution + installed as you have. Stick to <small><a href="#EPS" class="acroref" name="A140" title="Encapsulated PostScript">EPS</a></small>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5.1 <a name="graphictypes">Making images</a></h3> + <p>There are two types of image: bitmaps and + vectors. + </p> + <blockquote> + <dl> + <dt><b>Bitmaps</b></dt> + <dd> + <p>Bitmap images are made of coloured dots, so if you + enlarge them, they go jagged at the edges, and if you + shrink them, they go blurry. Bitmaps are fine for + photographs, where every dot is a different colour, + and no-one will notice if you don't shrink or enlarge + too much. Bitmaps for diagrams and drawings, however, + are almost always the wrong choice, and + often disastrously bad. + </p> + </dd> + <dt><b>Vectors</b></dt> + <dd> + <p>Vector drawings are made from instructions (eg + ‘draw this from here to here, using a line this + thick’). They can be enlarged or shrunk as + much as you like, and never lose accuracy, because + they <em>get redrawn</em> automatically at + any size. You can't do photographs as vectors, but + it's the only acceptable method for drawings or + diagrams. + </p> + </dd> + </dl> + </blockquote> + <p>Vector graphic packages are also better suited for + saving your image directly in <small><a href="#EPS" class="acroref" name="A157" title="Encapsulated PostScript">EPS</a></small> + or <small><a href="#PDF" class="acroref" name="A158" title="Portable Document Format">PDF</a></small> format (both of which use + vectors internally). All the major graphics-generating + packages in all disciplines output vector formats: + <i><a name="p166">AutoCAD</a></i>, + <i><a name="p167">ChemDraw</a></i>, + <i><a name="p168">MathCAD</a></i>, + <i><a name="p169">Maple</a></i>, + <i><a name="p170">Mathematica</a></i>, + <i><a name="p171">ArcInfo</a></i>, and so on. <small><a href="#EPS" class="acroref" name="A159" title="Encapsulated PostScript">EPS</a></small> is the universally-accepted format + for creating vector graphics for publication, with <small><a href="#PDF" class="acroref" name="A160" title="Portable Document Format">PDF</a></small> a close second. Most of the major + graphics (drawing) packages can also save as <small><a href="#EPS" class="acroref" name="A161" title="Encapsulated PostScript">EPS</a></small>, such as + <i><a name="p172">PhotoShop</a></i>, <i><a name="p173">PaintShop + Pro</a></i>, Adobe + <i><a name="p174">Illustrator</a></i>, Corel + <i><a name="p175">Draw</a></i>, and + <i><a name="p176">GIMP</a></i>. There are also some free + vector plotting and diagramming packages available like + <i><a name="p177">tkPaint</a></i> and + <i><a name="p178">GNUplot</a></i> which do the same. Never, + ever (except in the direst necessity) save any + <em>diagram</em> as a bitmap. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="">The diagram from <a href="#workeff">Figure 6.1</a> shrunk and + enlarged</a></caption> + <div align="center" style="margin:12px"><img src="diagram.png" style="border:thin solid black;" width="221.20000000000002"> <img src="diagram.png" style="border:thin solid black;"></div> + <hr> + </div> + <p>Bitmap formats like <small><a href="#JPG" class="acroref" name="A162" title="Joint Photographic Experts Group">JPG</a></small> and + <small><a href="#PNG" class="acroref" name="A163" title="Portable Network Graphic">PNG</a></small> are ideal for photographs, as + they are also able to compress the data substantially + without too much loss of quality. However, compressed + formats are bad for screenshots, if you are documenting + computer tasks, because too much compression makes them + blurry. The popular <a name="GIF" class="acroref">Graphics Interchange + Format</a> (<small>GIF</small>) is good for screenshots, but is not + supported by <span class="TEX">T<span class="E">E</span>X</span>: use <small><a href="#PNG" class="acroref" name="A165" title="Portable Network Graphic">PNG</a></small> + instead, with the compression turned down to minimum. Avoid + uncompressible formats like <small><a href="#BMP" class="acroref" name="A166" title="Microsoft Bitmap">BMP</a></small> as + they produce enormous and unmanageable files. The <a name="TIFF" class="acroref">Tagged Image File Format</a> (<small>TIFF</small>), popular with + graphic designers, should also be avoided because far too + many companies have designed and implemented non-standard, + conflicting, proprietary extensions to the format, making it + virtually useless for transfer between different types of + computers (except in faxes, where it's still used in a + much stricter version). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 18</i>. Adding pictures + </h4> + <p>Add <code class="literal">\usepackage{graphicx}</code> to the + preamble of your document, and copy or download an image + you want to include. Make sure it is a <small><a href="#JPG" class="acroref" name="A168" title="Joint Photographic Experts Group">JPG</a></small>, <small><a href="#PNG" class="acroref" name="A169" title="Portable Network Graphic">PNG</a></small>, or + <small><a href="#PDF" class="acroref" name="A170" title="Portable Document Format">PDF</a></small> image if you use + <i><a name="p179">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, or an <small><a href="#EPS" class="acroref" name="A171" title="Encapsulated PostScript">EPS</a></small> image if you use standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>Add <code class="command"><a name="c129">\includegraphics</a></code> and the + filename in curly braces (without the filetype), and + process the document and preview or print it. + </p> + <p>Make it into a figure following the example in <a href="#figures">section 6.4</a>. + </p> + <p>Be aware that some <small><a href="#DVI" class="acroref" name="A172" title="device-independent">DVI</a></small> + previewers are not able to display all types of graphics, + and some cannot display colour. For best results, use + <small><a href="#PDF" class="acroref" name="A173" title="Portable Document Format">PDF</a></small> or + <a name="t31">PostScript</a> preview. + </p> + <hr> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5.2 <a name="graphicsdir">Graphics storage</a></h3> + <p>I mentioned earlier that there was a way to tell + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> where to look if you had stored images centrally + for use in many different documents. The answer is in a + command <code class="command"><a name="c130">\graphicspath</a></code> which you supply + with an argument giving the name of an additional directory + path you want searched when a file uses the + <code class="command"><a name="c131">\includegraphics</a></code> command, for + example: + </p> + <blockquote><pre> +\graphicspath{c:\mypict~1\camera} +\graphicspath{/var/lib/images} +\graphicspath{HardDisk:Documents:Reports:Pictures} + </pre></blockquote> + <p>I've used the ‘safe’ + (MS-DOS) form of the Windows <code>My + Pictures</code> folder because it's A Bad Idea to + use directory names containing spaces (see <a href="#filenames">the panel ‘Picking suitable filenames’ in chapter 4</a>). Using + <code class="command"><a name="c132">\graphicspath</a></code> does make your file less + portable, though, because file paths tend to be specific + both to an operating system and to your computer, like the + examples above. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6 <a name="verbatim">Verbatim text</a></h2><a name="I106"></a><p>If you are documenting computer procedures, you probably + need fixed-width type for examples of programming or data + input or output. Even if you are writing about completely + non-computer topics, you may often want to quote a <small><a href="#URI" class="acroref" name="A174" title="Uniform Resource Indicator">URI</a></small> or email address which needs to be + typeset specially. It is particularly important in these two + examples to avoid hyphenating them if they have to break over + a line-end, because the hyphen might be taken by the user as a + part of the address. + </p> + <p>Standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> includes two features for handling + fixed-format text, and there are many more available in + packages. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6.1 <a name="inlineverb">Inline verbatim</a></h3> + <p>To specify a word or phrase as verbatim text in + typewriter type within a sentence, use the special command + <code class="command"><a name="c133">\verb</a></code>, followed by your piece of text + surrounded by any suitable character which does + <em>not</em> occur in the text itself. This is a + very rare exception to the rule that arguments go in curly + braces. I often use the plus sign for this, for example to + show a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> command, I type + <code class="literal">\verb+\includegraphics[width=3in]{myhouse}+</code> + in order to display + <code class="literal">\includegraphics[width=3in]{myhouse}</code>, but + sometimes I use the + <b><i><a name="grave">grave accent</a></i></b> (<b><i><a name="backtick">backtick</a></i></b> or open-quote) or the + vertical bar when the phrase already has a plus sign in it, + like <code class="literal">\verb|\(y=a+2x^2\)|</code> when + illustrating the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> equation + <code class="literal">\(y=a+x^2\)</code>. + </p> + <p>This command has the advantage that it turns off all + special characters (see <a href="#specials">section 2.5</a>) except + the one you use as the delimiter, so you can easily quote + sequences of characters in any computer syntax without + problems. However, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never break the argument of + <code class="command"><a name="c134">\verb</a></code> at a line-end when formatting a + paragraph, even if it contains spaces, so if it happens to + be long, and falls towards the end of a line, it will stick + out into the margin. See <a href="#hyph">section 2.8.2</a> for more + information on line-ends and hyphenation. + </p> + <p>The <span class="package"><a name="m52">url</a></span> package avoids this by + providing the command <code class="command"><a name="c135">\url</a></code> which works in + the same way as <code class="command"><a name="c136">\verb</a></code>, with the argument + enclosed in a pair of characters, but performs a hyphenless + break at punctuation characters, as in <code>http://www.ucc.ie:8080/cocoon/cc/<br>docs/siteowner.xml</code>. + It was designed for Web <small><a href="#URI" class="acroref" name="A175" title="Uniform Resource Indicator">URI</a></small>s,<sup><a href="#F37">5</a></sup> so it understands their syntax and will never + break mid-way through an unpunctuated word, only at slashes + and full points. Bear in mind, however, that spaces are + forbidden in <small><a href="#URI" class="acroref" name="A179" title="Uniform Resource Indicator">URI</a></small>s, so using spaces + in <code class="command"><a name="c137">\url</a></code> arguments will fail, as will using + other non-<small><a href="#URI" class="acroref" name="A180" title="Uniform Resource Indicator">URI</a></small>-valid + characters. + </p> + <ol class="footnotes" start="5"> + <li><a name="F37">The original term <a name="URL" class="acroref">Uniform Resource + Locator</a> (<small>URL</small>) is now strongly deprecated in the Web + community in favour of the more accurate <a name="URI" class="acroref">Uniform Resource Indicator</a> (<small>URI</small>). For + details see <a href="http://www.w3.org/Addressing/"><tt>http://www.w3.org/Addressing/</tt></a>. + Unfortunately the older term still persists, especially + in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and <small><a href="#XML" class="acroref" name="A178" title="Extensible Markup Language">XML</a></small> + markup.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6.2 Display verbatim + </h3> + <p>For longer (multiline) chunks of fixed-format text, use + the <span class="environment"><a name="e32">verbatim</a></span> environment: + </p> + <blockquote><pre> +\begin{verbatim} +\documentclass[11pt,a4paper,oneside]{report} +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\end{document} +\end{verbatim} + </pre></blockquote> + <p>Like <code class="command"><a name="c138">\verb</a></code>, this turns off all special + characters, so you can include anything at all in the + verbatim text except the exact line + <code class="literal">\end{verbatim}</code></p> + <p>For more control over formatting, however, I recommend + the use of the <span class="package"><a name="m53">fancyvrb</a></span> package, + which provides a <span class="environment"><a name="e33">Verbatim</a></span> environment + (note the capital letter) which lets you draw a rule round + the verbatim text, change the font size, and even have + typographic effects inside the <span class="environment"><a name="e34">Verbatim</a></span> + environment. It can also be used in conjunction with the + <span class="package"><a name="m54">fancybox</a></span> package (see <a href="#fancybox">section 6.7.3</a>), and it can add reference line numbers + (useful for chunks of data or programming), and it can even + include entire external files. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 19</i>. Try some fixed-format text + </h4> + <p>Add your email address and home page <small><a href="#URI" class="acroref" name="A181" title="Uniform Resource Indicator">URI</a></small> using the <code class="command"><a name="c139">\verb</a></code> + and <code class="command"><a name="c140">\url</a></code> commands. You'll need to + <code class="literal">\usepackage{url}</code> for the latter. + </p> + <p>If you know some programming, try a few lines enclosed + in <span class="environment"><a name="e35">verbatim</a></span> and + <span class="environment"><a name="e36">Verbatim</a></span> environments. + </p> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7 <a name="boxes">Boxes, sidebars, and panels</a></h2><a name="I107"></a><a name="I108"></a><a name="I109"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, like most typesetting systems, works by setting + text into boxes. The default box is the width of the current + page, and works like an old compositor's galley (tray) + from the days of metal type: it accumulates typeset text until + it's a bit longer than the specified page height. At this + stage <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> works out how much of it really will fit on a + page, snips it off and ships it out to the <small><a href="#DVI" class="acroref" name="A182" title="device-independent">DVI</a></small> or <small><a href="#PDF" class="acroref" name="A183" title="Portable Document Format">PDF</a></small> file, + and puts the rest back into the galley to accumulate towards + the following page. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.1 <a name="boxtext">Boxes of text</a></h3> + <p>Because of this ‘box’ model, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can typeset any text into a box of any width + wherever on the page you need it. + </p> + <p>The simplest command for small amounts of text is + <code class="command"><a name="c141">\parbox</a></code>. This command needs two arguments + in curly braces: the first is the width you want the text + set to, and the second is the text itself, for + example: + </p> + <blockquote class="example"><pre> +\parbox{1in}{Please make sure you send in your + completed forms by January 1st + next year, or the penalty clause + 2(a) will apply} + </pre><div align="center"> + <table> + <tr> + <td valign="top" width="144" align="left">Please make sure you send in your completed + forms by January 1st next year, or the penalty + clause 2(a) will apply + </td> + </tr> + </table> + </div> + </blockquote> + <p>The text is typeset to the required width, and the box + is extended downwards for as long as is required to fit the + text. Note that the baseline of a <code class="command"><a name="c142">\parbox</a></code> + is set to the midpoint of the box; that is, if you include a + <code class="command"><a name="c143">\parbox</a></code> in mid-sentence, the centre of the + box will be lined up with the line of type currently being + set.<img src="parbox1.png" width="28" align="middle"> You can specify that it should be the top or + bottom by adding an optional <span class="option"><a name="o11">t</a></span> or + <span class="option"><a name="o12">b</a></span> in square brackets before the width. For + example, + <code class="literal">\parbox[t]{1in}{...}</code> will produce + <img src="parbox2.png" width="72" align="top"></p> + <p>Notice that when setting very narrow measures with type + that is too large, the spacing may become uneven and there + may be too much hyphenation. Either use + <code class="command"><a name="c144">\raggedright</a></code> or reduce the type size, or + (in extreme cases) reword the text or break each line by + hand. It is rare for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to need this: the example above + was deliberately chosen to be obtuse as an + illustration. + </p> + <p>Where the contents is more extensive or more + complicated, you can use the <span class="environment"><a name="e37">minipage</a></span> + environment. + </p> + <p>Within this you can use virtually everything + that occurs in normal text (e.g. lists, paragraphs, + tabulations, etc.) with the exception of floats like + tables and figures. The <span class="environment"><a name="e38">minipage</a></span> + environment has an argument just like + <code class="command"><a name="c145">\parbox</a></code> does, and it means the same: the + width you want the text set to. + </p> + <p>Note that in <span class="environment"><a name="e39">minipage</a></span>s and + <code class="command"><a name="c146">\parbox</a></code>es, the paragraph indentation + (<tt>\<a name="d26">parindent</a></tt>) is + reset to zero. If you need to change it, set it inside the + <span class="environment"><a name="e40">minipage</a></span> or <code class="command"><a name="c147">\parbox</a></code> + using the <code class="command"><a name="c148">\setlength</a></code> command (see <a href="#paragraphs">section 3.6</a>). + </p> + <blockquote class="example"><pre> +\begin{minipage}{3in} +Please make sure you send in your completed +forms by January 1st next year, or the +penalty clause 2(a) will apply. +\begin{itemize} +\item Incomplete forms will be returned to +you unprocessed. +\item Forms must be accompanied by the +correct fee. +\item There is no appeal. The adjudicators' +decision is final. +\end{itemize} +\end{minipage} + </pre><div align="center"> + <table> + <tr> + <td valign="top" width="432" align="left"> + <p>Please make sure you send in your + completed forms by January 1st next year, or the + penalty clause 2(a) will + apply. + </p> + <ul> + <li> + <p>Incomplete forms will be returned to you + unprocessed. + </p> + </li> + <li> + <p>Forms must be accompanied by the correct + fee. + </p> + </li> + <li> + <p>There is no appeal. The + adjudicators' decision is final. + </p> + </li> + </ul> + </td> + </tr> + </table> + </div> + </blockquote> + <p>There are two other ways of typesetting text to widths + other than the normal text width: you can use a one-row, + one-cell <span class="environment"><a name="e41">tabular</a></span> environment with the + <code>p</code> column type specification, or you + can use the <code class="command"><a name="c149">\vbox</a></code> command, which is raw + <span class="TEX">T<span class="E">E</span>X</span>, and outside the scope of this document. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.2 <a name="fbox">Framed boxes</a></h3> + <p>To put a frame round <img src="fbox.png" align="middle" height="10px" alt="\fbox{some text}" width="64">, use the + <code class="command"><a name="c150">\fbox</a></code> command: + <code class="literal">\fbox{some text}</code>. This works for a few + words in mid-line, but the framed box and its contents + won't break over the end of a line. To typeset + multiline text in a box, put it in a + <code class="command"><a name="c151">\parbox</a></code>, or use a + <span class="environment"><a name="e42">minipage</a></span> or + <span class="environment"><a name="e43">tabular</a></span> environment as described above, + and enclose the whole thing in a + <code class="command"><a name="c152">\fbox</a></code>. + </p> + <blockquote class="example"><pre> +\fbox{\begin{minipage}{3in} +This multiline text is more flexible than +a tabular setting: +\begin{itemize} +\item it can contain any type of normal +<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesetting; +\item it can be any specified width; +\item it can even have its own +footnotes\footnote{Like this}. +\end{itemize} +\end{minipage}} + </pre><p>This multiline text is more flexible than a + tabular setting: + </p> + <ul> + <li> + <p>it can contain any type of normal <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + typesetting; + </p> + </li> + <li> + <p>it can be any specified width;</p> + </li> + <li> + <p>it can even have its own footnotes.<sup><a href="#F38">6</a></sup></p> + </li> + </ul> + </blockquote> + <p>The spacing between text and box is controlled by the + value of <tt>\<a name="d27">fboxsep</a></tt>, and + the thickness of the line by <tt>\<a name="d28">fboxrule</a></tt>. The following values + were used above: + </p> + <blockquote><pre> +\setlength{\fboxsep}{1em} +\setlength{\fboxrule}{2pt} + </pre></blockquote> + <p>As we saw before, setting justified text in narrow + measures will produce poor spacing: either use the + <code class="command"><a name="c153">\raggedright</a></code> command, or change the font + size, or add explicit extra hyphenation points. + </p> + <p>Note the <code class="literal">\begin{tabular}</code> and + <code class="literal">\begin{minipage}</code> commands still need the + width specifying: in the case of the + <code class="literal">\begin{tabular}</code> by the use of the + <code class="literal">p</code> column type with its width + specification, and in the case of + <code class="literal">\begin{minipage}</code> by the second + argument. + </p> + <blockquote class="example"><pre> +\fbox{\begin{tabular}{p{1in}} +Multiline text in a box typeset using +\textsf{tabular} +\end{tabular}} + </pre><div align="center"> + <table border="1" cellpadding="6pt"> + <tr> + <td valign="top" width="144" align="left">Multiline text in a box typeset using + <span class="package"><a name="m55">tabular</a></span></td> + </tr> + </table> + </div> + </blockquote> + <ol class="footnotes" start="6"> + <li><a name="F38">Like this.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.3 <a name="fancybox">Sidebars and panels</a></h3> + <p>The <span class="package"><a name="m56">fancybox</a></span> package lets you + extend the principle of <code class="command"><a name="c154">\fbox</a></code> with + commands to surround text in square, oval (round-cornered), + and drop-shadow boxes (e.g. <code class="command"><a name="c155">\ovalbox</a></code>, + <code class="command"><a name="c156">\shadowbox</a></code>, etc.: see the documentation + for details). + </p> + <p>You can create panels of any size with these borders by + using the <span class="environment"><a name="e44">minipage</a></span> environment to + typeset the text inside a special <span class="environment"><a name="e45">Sbox</a></span> + environment which <span class="package"><a name="m57">fancybox</a></span> defines. + The <span class="environment"><a name="e46">minipage</a></span> formats the text but the + <span class="environment"><a name="e47">Sbox</a></span> ‘captures’ + it, allowing you to put the frame round it as it + prints. + </p> + <p>The printed version of this document uses this extensively and + there is a useful example shown in <a href="#macenv">section 9.5</a>. + </p> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="texttools">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">7</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Textual tools</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#quotations">Quotations</a></li> + <li><a href="#footnotes">Footnotes and end-notes</a></li> + <li><a href="#marginals">Marginal notes</a></li> + <li><a href="#xrefs">Cross-references</a></li> + <li><a href="#indexes">Indexes and glossaries</a></li> + <li><a href="#multicols">Multiple columns</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I110"></a><p>Every text-handling system needs to support a repertoire of + tools for doing things with text. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> implements many + dozens, of which a small selection of the most frequently used + is given here: + </p> + <ul> + <li> + <p>offset quotations (sometimes called ‘block + quotes’); + </p> + </li> + <li> + <p>footnotes and end-notes;</p> + </li> + <li> + <p>marginal notes;</p> + </li> + <li> + <p>cross-references, both normal ones and bibliographic + citations; + </p> + </li> + <li> + <p>indexes and glossaries;</p> + </li> + <li> + <p>typesetting in multiple columns.</p> + </li> + </ul> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.1 <a name="quotations">Quotations</a></h2> + <p>Direct speech and short quotes within a sentence + ‘like this’ are done with simple + quotation marks as described in <a href="#quotes">section 2.6</a>. Sometimes, however, you may want longer + quotations set as a separate paragraph. Typically these are + indented from the surrounding text. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has two + environments for doing this. + </p> + <p>Such quotations are often set in a smaller size of type, + although this is not the default, hence the use of the + <code class="command"><a name="c157">\small</a></code> command in the second example. The + inclusion of the bibliographic citation at the end is + optional: here it is done with a non-standard command + <code class="command"><a name="c158">\citequote</a></code> which I invented for this example + (there is more about how to do things like this in <a href="#macros">Chapter 9</a>). + </p> + <blockquote> + <dl> + <dt><b>The <span style="font-weight:normal; "><span class="package"><a name="m58">quote</a></span></span> + environment</b></dt> + <dd> + <p>is for up to a line of text each per (short) + quotation, with the whole thing indented from the + previous paragraph but with no additional indentation on + each quote; + </p> + <blockquote class="example"><pre> + +\begin{quote} +Do, Ronny, Do. \textit{Nancy Reagan} + +Da Do Ron Ron. \textit{The Crystals} +\end{quote} + </pre><p class="example">Do, Ronny, Do. <span style="font-style:italic; ">Nancy + Reagan</span></p> + <p class="example">Da Do Ron Ron. <span style="font-style:italic; ">The + Crystals</span></p> + </blockquote> + </dd> + <dt><b>The <span style="font-weight:normal; "><span class="package"><a name="m59">quotation</a></span></span> + environment</b></dt> + <dd> + <p>is for longer passages (a paragraph or more) of a + single quotation, where not only is the block of text + indented, but each paragraph of it also has its own + extra indentation on the first line. + </p> + <blockquote class="example"><pre> +\begin{quotation}\small +At the turn of the century William Davy, +a Devonshire parson, finding errors in +the first edition of his \titleof{davy}, +asked for a new edition to be printed. +His publisher refused and Davy purchased +a press, type, and paper. He harnessed +his gardener to the press and apprenticed +his housemaid to the typesetting. After +twelve years' work, a new edition +of fourteen sets of twenty-six volumes +was issued---which surely indicates that, +when typomania is coupled with religious +fervour, anything up to a miracle may be +achieved.\citequote[p.76]{ryder} +\end{quotation} + </pre><blockquote class="citation"><a name="K33"> </a><p>At the turn of the century William Davy, a + Devonshire parson, finding errors in the first + edition of his <cite><a href="#davy" name="C34">A System of Divinity</a></cite>, + asked for a new edition to be printed. His publisher + refused and Davy purchased a press, type, and paper. + He harnessed his gardener to the press and + apprenticed his housemaid to the typesetting. After + twelve years' work, a new edition of fourteen + sets of twenty-six volumes was issued---which surely + indicates that, when typomania is coupled with + religious fervour, anything up to a miracle may be + achieved. + </p> + <p class="citation">John Ryder (1976), <cite><a href="#ryder">Printing for Pleasure</a></cite>, p.76 + </p> + </blockquote> + </blockquote> + </dd> + </dl> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.2 <a name="footnotes">Footnotes and end-notes</a></h2><a name="I111"></a><p>The command <code class="command"><a name="c159">\footnote</a></code>, followed by the + text of the footnote in curly braces, will produce an + auto-numbered footnote with a raised small number where you + put the command, and the numbered text automatically printed + at the foot of the page.<sup><a href="#F39">1</a></sup> The number is reset to 1 at the start of each + chapter (but you can override that and make them run + continuously throughout the document, or even restart at 1 on + each page or section). + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> automatically creates room for the footnote, and + automatically reformats it if you change your document in such + a way that the point of attachment and the footnote would move + to the next (or preceding) page. + </p> + <p>Because of the way <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reads the whole footnote before + doing anything with it, you can't use + <code class="command"><a name="c160">\verb</a></code> (<a href="#inlineverb">section 6.6.1</a>) alone + in footnotes: either precede it with + <code class="command"><a name="c161">\protect</a></code> or use [abuse?] the + <code class="command"><a name="c162">\url</a></code> command instead, which you should be + using for Web and email addresses in any case). + </p> + <p>Footnotes inside minipages (see <a href="#boxes">section 6.7</a>) produce lettered notes instead of + numbered ones, and they get printed at the bottom of the + minipage, <em>not</em> the bottom of the physical + page (but this too can be changed). + </p> + <p>There is a package to hold over your footnotes and make + them print at the end of the chapter instead + (<span class="package"><a name="m60">endnote</a></span>) or at the end of the whole + document, and there is a package to print many short footnotes + in a single footnoted paragraph so they take up less space + (<span class="package"><a name="m61">fnpara</a></span>). It is also possible to have + several separate series of footnotes active simultaneously, + which is useful in critical editions or commentaries: a + numbered series may be used to refer to an original + author's notes; a lettered series can be used for notes + by a commentator or authority; and a third series is available + for your own notes. It is also possible to format footnotes + within footnotes. + </p> + <p>If your footnotes are few and far between, you may want to + use footnote symbols instead of numbers. You can do this by + redefining the output of the footnote counter to be the + <code class="command"><a name="c163">\fnsymbol</a></code> command: + </p> + <blockquote><pre> +\renewcommand{\thefootnote{\fnsymbol{footnote}} + </pre></blockquote> + <p>There are also ways to refer more than once to the + same footnote, and to defer the positioning of the footnote if + it occurs in a float like a Table or Figure, where it might + otherwise need to move to a different page. + </p> + <ol class="footnotes" start="1"> + <li><a name="F39">Like this.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.3 <a name="marginals">Marginal notes</a></h2><a name="I112"></a><table width="100%"> + <tr> + <td width="95%" valign="top">You can add marginal notes to your text<a href="#M6" title="See margin">↞</a> instead of + (or as well as) footnotes. You need to make sure that you have + a wide-enough margin, of course: use the + <span class="package"><a name="m62">geometry</a></span> package (see <a href="#colorpkg">section 5.1.1</a>) to allocate enough space, otherwise + the notes will be too cramped. There are several packages to + help with formatting marginal notes, but the simplest way is + to define it yourself. Add this new command to your + preamble: + </td> + <td width="5%" valign="top"><small><a name="M6">Like this.</a></small></td> + </tr> + </table> + <blockquote><pre> +\newcommand{\marginal}[1]{% + \leavevmode\marginpar{\tiny\raggedright#1\par}} + </pre></blockquote> + <table width="100%"> + <tr> + <td width="95%" valign="top">Then you can use <code class="literal">\marginal{Some + text}</code><a href="#M7" title="See margin">↞</a> Be careful, however, because marginal + notes are aligned with the line where the command starts, so a + very long one followed too closely by another will cause + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to try and + adjust the position so they don't overlap. + </td> + <td width="5%" valign="top"><small><a name="M7">Some text where you need + it.</a></small></td> + </tr> + </table> + <p>We're jumping ahead a bit here, as we haven't + covered how to define your own commands yet. I won't even + try to explain it here, although the attentive reader can + probably deduce some of it by inspection. See <a href="#macros">Chapter 9</a> for more information about making up your + own commands. + </p> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4 <a name="xrefs">Cross-references</a></h2><a name="I113"></a><p>This is one of the most powerful features of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. You + can label any point in a document with a name you make up, and + then refer to it by that name from anywhere else in the + document, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will always work out the cross-reference + number for you, no matter how much you edit the text or move + it around. + </p> + <p>A similar method is used to cite documents in a + bibliography or list of references, and there are packages to + sort and format these in the correct manner for different + journals. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.1 <a name="normalxref">Normal cross-references</a></h3> + <p>You label a place in your document by using the command + <code class="command"><a name="c164">\label</a></code> followed by a short name you make + up, in curly braces:<sup><a href="#F40">2</a></sup> we've already seen this done for labelling + Figures and Tables. + </p> + <blockquote><pre> +\section{New Research} +\label{newstuff} + </pre></blockquote> + <p>You can then refer to this point from anywhere in the + same document with the command <code class="command"><a name="c165">\ref</a></code> + followed by the name you used, e.g. + </p> + <blockquote class="example"><pre> +In \S~\ref{newstuff} there is a list of recent +projects. + </pre><p class="example">In <a href="#normalxref">§ 7.4.1</a> + there is a list of recent projects. + </p> + </blockquote> + <p>(The <code class="command"><a name="c166">\S</a></code> command produces a section + sign (§) and the + <code class="command"><a name="c167">\P</a></code> command produces a paragraph sign + (¶).) + </p> + <p>If the label is in normal text, the reference will + provide the current chapter or section number or both + (depending on the current document + class).<sup><a href="#F41">3</a></sup> If the label + was inside a Table or Figure, the reference provides the + Table number or Figure number prefixed by the chapter + number. A label in an enumerated list will provide a + reference to the item number. If there is no apparent + structure to this part of the document, the reference will + be null. Labels must be unique (that is, each value must + occur only <em>once</em> as a label within a + single document), but you can have as many references to + them as you like. + </p> + <p>Note the use of the unbreakable space + (<code class="literal">~</code>) between the <code class="command"><a name="c168">\ref</a></code> + and the word before it. This prints a space but prevents the + line ever breaking at that point, should it fall close to + the end of a line. + </p> + <p>The command <code class="command"><a name="c169">\pageref</a></code> followed by any + of your label values will provide the page number where the + label occurred, regardless of the document structure. This + makes it possible to refer to something by page number as + well as its <code class="command"><a name="c170">\ref</a></code> number, which is useful + to readers in very long documents. + </p> + <p>Unresolved references are printed as two question + marks, and also cause a warning message at the end of the + log file. There's never any harm in having + <code class="command"><a name="c171">\label</a></code>s you don't refer to, but using + <code class="command"><a name="c172">\ref</a></code> when you don't have a matching + <code class="command"><a name="c173">\label</a></code> is an error. + </p> + <ol class="footnotes" start="2"> + <li><a name="F40">This section is labelled + ‘<code>normalxref</code>’, + for example.</a></li> + <li><a name="F41">Thus I can + refer here to + <code class="literal">\ref{normalxref}</code> and get the + value <a href="#normalxref">section 7.4.1</a>.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2 <a name="bib">Bibliographic references</a></h3><a name="I114"></a><a name="I115"></a><p>The mechanism used for references to reading lists and + bibliographies is almost identical to that used for normal + cross-references. Although it is possible to type the + details of each citation manually, there is a companion + program to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> called <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, which manages + bibliographic references automatically. This reduces the time + needed to maintain and format them, and dramatically + improves accuracy. Using <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> means you only ever have + to type the bibliographic details of a work once. You can + then cite it in any document you write, and it will get + formatted automatically to the style you specify. + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.1 <a name="citation">Citing references</a></h4> + <p><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> works exactly the same way as other + bibliographic databases: you keep details of every + document you want to refer to in a separate file, using + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>'s own format (see example below). Many + writers make a habit of adding the details of every book + and article they read, so that when they write a document, + these entries are always available for reference. You give + each entry a short label, just like you do with normal + cross-references (see <a href="#normalxref">section 7.4.1</a>), and + it is this label you use to refer to in your own documents + when you cite the work using the <code class="command"><a name="c174">\cite</a></code> + command: + </p> + <blockquote><pre> +...as has clearly been shown by Fothergill~\cite{fg}. + </pre></blockquote> + <p>By default, this creates a cross-reference number in + square brackets [1] which is a common style in the + Natural Sciences (see <a href="#othercite">section 7.4.2.5</a> for + details of how to change this). There are dozens of + alternative citation formats in extra packages, including + the popular author/year format: + </p> + <blockquote class="example"><pre> +...as has clearly been shown +by~\citeauthoryear{fg}. + </pre><p class="example">...as has clearly been shown by <a href="#fg" name="K35">Fothergill</a> (1929). + </p> + </blockquote> + <p>Note that in this case you don't type the + author's name because it is automatically extracted + by <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>. There are lots of variants on this technique + in many packages, allowing you to phrase your sentences + with references in as natural a way as possible, and rely + on <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> to insert the right data. (If you examine the + source of this document you'll find I use some + homebrew commands like <code class="command"><a name="c175">\authorof</a></code> and + <code class="command"><a name="c176">\titleof</a></code> which I use for a similar + purpose.) + </p> + <p>To print the bibliographic listing (usually called + ‘References’ in articles and + ‘Bibliography’ in books and + reports), add these two lines towards the end of your + document, or wherever you want it printed, substituting + the name of your own <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file and the name of your + chosen bibliography style: + </p> + <blockquote><pre> +\bibliographystyle{ieeetr} +\bibliography{mybib} + </pre></blockquote> + <ul> + <li> + <p>The <code class="command"><a name="c177">\bibliography</a></code> command is + followed by the filename of your <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file + <em>without</em> the + <code>.bib</code> extension. + </p> + </li> + <li> + <p>The <code class="command"><a name="c178">\bibliographystyle</a></code> command + is followed by the name of any of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + supported bibliography styles, of which there are many + dozens available from <small><a href="#CTAN" class="acroref" name="A184" title="Comprehensive Archive Network">CTAN</a></small>.<sup><a href="#F42">4</a></sup></p> + </li> + </ul> + <p>The styles <span class="option"><a name="o13">plain</a></span> and + <span class="option"><a name="o14">alpha</a></span> are two common generic styles used + for drafts. The example above uses <a name="IEEETR" class="acroref">Transactions of the Institute of Electrical + and Electronics Engineers</a> (<small>IEEETR</small>). + </p> + <ol class="footnotes" start="4"> + <li><a name="F42">The style + shown in the example here provides formatting + according to the specifications for Transactions + of the IEEE (revised).</a></li> + </ol> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.2 <a name="bibtex">Running <i><a name="p180">bibtex</a></i></a></h4> + <p>When you run the <i><a name="p181">bibtex</a></i> + program, the details of every document you have cited will + be extracted from your database, formatted according to + the style you specify, and stored in a temporary + bibliographic (<code>.bbl</code>) file with a + label corresponding to the one you used in your citation, + ready for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to use. This is entirely automatic: all + you do is cite your references in your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document + using the labels you gave the entries in your <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> + file, and run the <i><a name="p182">bibtex</a></i> + program. + </p> + <p>After processing your file with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, run + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> on it by clicking on the + <span class="guiicon"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon (if your editor + has one), or use the + <span class="guimenu">TeX</span>→<span class="guimenuitem">BibTeX + File</span> menu entry, or type the command + <code class="literal">bibtex</code> followed by the name of your + document (without the <code>.tex</code> + extension). When you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> again it will use the + <code>.bbl</code> file which <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> created, + and subsequent runs of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will format the correct + citation numbers (or author/year, or whatever format you + are using). + </p> + <blockquote><pre> +$ latex mybook +$ bibtex mybook +$ latex mybook +$ latex mybook + </pre></blockquote> + <p>Because of this three-stage process, you always get a + warning message about an ‘unresolved + reference’ the first time you add a new + reference to a previously uncited work. This will + disappear after subsequent runs of + <i><a name="p183">bibtex</a></i> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>In practice, authors tend to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from time to + time during writing anyway, so they can preview the + document. Just run <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> after adding a new + <code class="command"><a name="c179">\cite</a></code> command, and subsequent runs of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will incrementally incorporate all references + without you having to worry about it. You only need to + follow the full formal sequence (<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>) when you have finished writing and + want to ensure that all references have been + resolved. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.3 <a name="bibspec"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> format</a></h4> + <p>The format for the <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file is specified in the + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> documentation (see <a href="#packagedoc">section 5.1.2</a> + for how to find and print it). You create a file with a + name ending in <code>.bib</code>, and add your + entries, for example: + </p> + <blockquote><pre> +@book{fg, + title = {{An Innkeeper's Diary}}, + author = {John Fothergill}, + edition = {3rd}, + publisher = {Penguin}, + year = 1929, + address = {London} +} + </pre></blockquote> + <p>There is a prescribed set of fields for each of a + dozen or so types of document: book, article (in a + journal), article (in a collection), chapter (in a book), + thesis, report, paper (in a Proceedings), etc. Each entry + identifies the document type after the + ‘<code class="literal">@</code>’ sign, + followed by the entry label that you make up, and then + each field (in any order), using the format: + </p> + <blockquote><pre> +keyword = {value}, + </pre></blockquote> + <p>Most <span class="TEX">T<span class="E">E</span>X</span>-sensitive editors have a <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> mode + which understands these entries. + <i><a name="p184">Emacs</a></i> automatically uses its + <code>bibtex-mode</code> whenever you open a + filename ending in <code>.bib</code>. When editing + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> databases, the rules are simple: + </p> + <ul> + <li> + <p>Omit the comma after the last field in the entry + (only — eg after <code class="literal">{London}</code> in + the example). + </p> + </li> + <li> + <p>Titles may have their case changed in some styles: + to prevent this, enclose the title in double curly + braces as in the example. + </p> + </li> + <li> + <p>Values which are purely numeric (e.g. years) + may omit the curly braces. + </p> + </li> + <li> + <p>Fields can occur in any order but the format must + otherwise be strictly observed. + </p> + </li> + <li> + <p>Fields which are not used do not have to be + included (so if your editor automatically inserts them + as blank or prefixed by <code class="literal">OPT</code> + [optional], you can safely delete them as unused + lines). + </p> + </li> + </ul> + <p>To help with this, there are several interfaces to + creating and maintaining <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> files, such as + <i><a name="p185">tkbibtex</a></i> (see <a href="#tkbibtex">Figure 7.1</a>), or + <i><a name="p186">pybliographic</a></i>. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 7.1</i>: <a name="tkbibtex">tk<span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, one of several graphical interfaces to + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> databases</a></caption> + <div align="center" style="margin:12px"><img src="tkbibtex.png" width="75%"></div> + <hr> + </div> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.4 <a name="bibstyle">Changing the layout</a></h4> + <p>To change the title printed over the reference + listing, just change the value of + <code class="command"><a name="c180">\refname</a></code> (articles) or + <code class="command"><a name="c181">\bibname</a></code> (books and reports) by adding a + line like this in your preamble: + </p> + <blockquote><pre> +\renewcommand{\bibname}{Reading List} + </pre></blockquote> + <p>The formatting specifications (<span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> styles) are + based on standard settings for journals and books from + dozens of publishers: you just pick the one you want by + name. The <code>texmf/bib/bst</code> subdirectory + of your installation contains the ones installed by + default, and you can search on <small><a href="#CTAN" class="acroref" name="A186" title="Comprehensive Archive Network">CTAN</a></small> + for others (look for <code>.bst</code> files). + Many of them are named after university press styles + (e.g. <i><a name="p187">harvard</a></i>, + <i><a name="p188">oxford</a></i>) or the publisher or + journal which specified them (e.g. + <i><a name="p189">elsevier</a></i>, + <i><a name="p190">kluwer</a></i>, etc.). + </p> + <p>Some of them have an accompanying package + (<code>.sty</code>) file which + you need to include with the normal + <code class="command"><a name="c182">\usepackage</a></code> command in your preamble. In + this case the format may be distributed as + <code>.dtx</code> and <code>.ins</code> + files and will need installing in the same way as any + other package (see <a href="#pkginst">section 5.2</a>). Always read + the documentation, because most of the formats are very + specific to the journal they were designed for, and may have + fairly absolute requirements. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are writing for a specific publisher, you + should remember that the rules or formats are laid down + by the typographic designer of that journal or + publisher: you cannot arbitrarily change the format just + because you don't happen to like it: it's not + your choice! + </p> + </blockquote> + <p>It is also possible to write your own <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> + (<code>.bst</code>) style files, although it uses + a language of its own which really needs a computer + science background to understand. However, this is + rendered unnecessary in most cases: there is an extensive + program (actually written in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>) called + <i><a name="p191">makebst</a></i>, which makes + <code>.bst</code> files by asking you a (long) + series of questions about exactly how you want your + citations formatted. Just type + <code class="literal">latex makebst</code> in a command window, but + give it a dummy run first, because some of the questions + are very detailed, so you need to have thought through how + you want your citations to appear before you start. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.5 <a name="othercite">Other modes of citation</a></h4> + <p>The method of citing a work by numeric reference is + common in the Natural Sciences but is not used in Law or + the Humanities. In these fields, citations are usually + done with short references (author/short-title/year) in a + numbered footnote. Sometimes they are actually called + ‘footnotes’ to the exclusion of + ordinary footnotes, although they are really citations + which happen by convention to be + <em>displayed</em> as footnotes: an important + distinction rarely appreciated by authors until they come + to need a normal footnote. + </p> + <p>For these fields, the bibliography at the back of the + document is printed <em>unnumbered</em> in + alphabetic order of author, or perhaps chronologically if + the time-frame is very large. This unnumbered format is + why it is conventionally called + ‘References’ rather than + ‘Bibliography’: a sufficient working + citation has already been provided in the footnote, and + the list at the back is for reference purposes only; + whereas in the Natural Sciences, the citation is just a + number, or possibly an author and year only, so the full + listing is called a Bibliography. + </p> + <p>The <span class="package"><a name="m63">jurabib</a></span> package + (originally intended for German law articles but now + extended to other fields in the Humanities, and to other + languages) has extensive features for doing this style of + citation and is strongly recommended. + </p> + </div> + <ol class="footnotes" start="4"> + <li><a name="F42">The style + shown in the example here provides formatting + according to the specifications for Transactions + of the IEEE (revised).</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.5 <a name="indexes">Indexes and glossaries</a></h2><a name="I116"></a><a name="I117"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a powerful, automated indexing facility which + uses the standard <i><a name="p192">makeindex</a></i> + program. To use indexing, use the package + <span class="package"><a name="m64">makeidx</a></span> and include the + <code class="command"><a name="c183">\makeindex</a></code> command in your preamble: + </p> + <blockquote><pre> +\usepackage{makeidx} +\makeindex + </pre></blockquote> + <p>When you want to index something, using the command + <code class="command"><a name="c184">\index</a></code> followed by the entry in curly + braces, as you want it to appear in the index, using one of + the following formats: + </p> + <blockquote> + <dl> + <dt><b>Plain entry</b></dt> + <dd> + <p>Typing <code class="literal">\index{beer}</code> will create + an entry for ‘beer’ with the + current page + number.<a name="I118"></a></p> + </dd> + <dt><b>Subindex entry</b></dt> + <dd> + <p>For an entry with a subentry use an exclamation mark + to separate them: + <code class="literal">\index{beer!lite}</code>.<a name="I119"></a> Subsubentries like + <code class="literal">\index{beer!lite!American}</code> work to + another level deep.<a name="I120"></a></p> + </dd> + <dt><b>Cross-references</b></dt> + <dd> + <p>‘See’ entries are done with + the vertical bar (one of the rare times it does + <em>not</em> get interpreted as a math + character): + <code class="literal">\index{Microbrew|see{beer}}</code></p> + </dd> + <dt><b><a name="indextypo">Font changes</a></b></dt> + <dd> + <p>To change the style of an entry, use the @-sign + followed by a font change command: + </p> + <blockquote><pre> +\index{beer!Rogue!Chocolate + Stout@\textit{Chocolate Stout}} + </pre></blockquote> + <p>This example<a name="I122"></a> indexes ‘<i><a name="p193">Chocolate + Stout</a></i>’ and italicises it + at the same time. Any of the standard + <code class="literal">\text...</code> font-change commands work + here: see <a href="#fontcmds">the table in section 8.2.3</a> for details. + </p> + <p>You can also change the font of the index number on + its own, as for first-usage references, by using the + vertical bar in a similar way to the + ‘see’ entries above, but + substituting a font-change command name + (<em>without</em> a backslash) such as + <code class="literal">textbf</code> for bold-face text (see the + index)<a name="I123"></a>: + </p> + <blockquote><pre> +\index{beer!Rogue!Chocolate Stout|textbf} + </pre></blockquote> + </dd> + <dt><b>Out of sequence</b></dt> + <dd> + <p>The same method can be used as for font changes, + but using the alternate index word instead of the font + command name, so + <code class="literal">\index{Oregon Brewing Company@Rogue}</code><a name="I124"></a> will add an entry for + ‘Rogue’ in the + ‘O’ section of the index, as if + it was spelled ‘Oregon Brewing + Company’. + </p> + </dd> + </dl> + </blockquote> + <p>When the document has been processed through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> it + will have created a <code>.idx</code> file, which you + run through the <i><a name="p194">makeindex</a></i> program + by typing (for example): + </p> + <blockquote><pre> +makeindex mythesis + </pre></blockquote> + <p>Some editors may have a button or menu entry for this. The + program will look for the <code>.idx</code> file and + output a <code>.ind</code> file. This gets used by the + command <code class="command"><a name="c185">\printindex</a></code> which you put at the end + of your document, where you want the index printed. The + default index format is two columns. + </p> + <p>Glossaries are done in a similar manner using the command + <code class="command"><a name="c186">\makeglossary</a></code> in the preamble and the + command <code class="command"><a name="c187">\glossary</a></code> in the same way as + <code class="command"><a name="c188">\index</a></code>. There are some subtle differences in + the way glossaries are handled: both the books by <a href="#latexbook" name="K36">Lamport</a> (1994) and by <a href="#companion" name="K37">Mittelbach <i>et al</i></a> (2004) duck the issue, but + there is some documentation on <code>glotex</code> on + <small><a href="#CTAN" class="acroref" name="A187" title="Comprehensive Archive Network">CTAN</a></small>. + </p> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.6 <a name="multicols">Multiple columns</a></h2><a name="I125"></a><p>Use the <span class="package"><a name="m65">multicol</a></span> package: the + environment is called <span class="environment"><a name="e48">multicols</a></span> (note the + plural form) and it takes the number of columns as a separate + argument in curly braces: + </p> + <blockquote><pre> +\usepackage{multicol} +... +\begin{multicols}{3} +... +\end{multicols} + </pre></blockquote> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built-in support for two-column typesetting + via the <code class="literal">twocolumn</code> option in the standard + Document Class Declarations, but it is relatively inflexible + in that you cannot change from full-width to double-column + and back again on the same page, and the final page does not + balance the column heights. However, it does feature special + <span class="environment"><a name="e49">figure*</a></span> and <span class="environment"><a name="e50">table*</a></span> + environments which typeset full-width figures and tables + across a double-column setting. + </p> + <p>The more extensive solution is the + <span class="package"><a name="m66">multicol</a></span> package, which will set up + to 10 columns, and allows the number of columns to be + changed or reset to one in mid-page, so that full-width + graphics can still be used. It also balances the height of + the final page so that all columns are the same + height — if possible: it's not always + achievable — and you can control the width of the gutter + by setting the <code class="command"><a name="c189">\columnsep</a></code> length to a new + dimension. + </p> + <p>Multi-column work needs some skill in typographic + layout, though: the narrowness of the columns makes + typesetting less likely to fit smoothly because it's hard to + hyphenate and justify well when there is little space to + manœuvre in. + </p> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="typo">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">8</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Fonts and layouts</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#layouts">Changing layout</a></li> + <li><a href="#fontuse">Using fonts</a></li> + <li><a href="#instfonts">Installing new fonts</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I126"></a><p>This is the chapter that most users want first, because they + come to structured documents from a wordprocessing environment + where the <em>only</em> way to convey different + types of information is to fiddle with the font and size + drop-down menus. + </p> + <p>As I hope you have seen, this is normally completely + unnecessary in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, which does most of the hard work for you + automatically. However, there are occasions when you need to + make manual typographic changes, and this chapter is about how + to do them. + </p> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1 <a name="layouts">Changing layout</a></h2> + <p>The design of the page can be a very subjective matter, + and also rather a subtle one. Many organisations large and + small pay considerable sums to designers to come up with page + layouts to suit their purposes. Styles in page layouts change + with the years, as do fashions in everything else, so what may + have looked attractive in 1991 may look rather dated in + 2011. + </p> + <p>As with most aspects of typography, making the document + readable involves making it consistent, so the reader is not + interrupted or distracted too much by apparently random + changes in margins, widths, or placement of objects. However, + there are a number of different occasions where the layout + usually <em>does</em> change, related to the + frequency with which the format appears. + </p> + <ul> + <li> + <p>The title page, the half-title, copyright page, + dedication, and other one-page preliminaries (if you use + them) are usually designed individually, as the information + on it only occurs once in that format anywhere in the + document. + </p> + </li> + <li> + <p>The table of contents and other related lists like + figures and tables all need to share one + design. + </p> + </li> + <li> + <p>The prelims like Foreword, Introduction, and Preface + should likewise follow the same format between + them. + </p> + </li> + <li> + <p>Chapter and Appendix start pages usually share a + layout. + </p> + </li> + <li> + <p>Other (normal) pages have a single layout, but it may + specify individual variations to handle tables, lists, + figures, sidebars, exercises, footnotes, etc. + </p> + </li> + </ul> + <p>If you are going to design a whole document, it's + probably a good idea to read a couple of books on layout + design first, to get a feel for the conventions which + contribute to making the reader comfortable reading. + </p> + <p>While unusual or radical layouts have an important role in + attention-grabbing, or in making a socio-political statement + (<cite><a href="#wired" name="C38">WIRED</a></cite> magazine is an obvious + recent example), they are usually out of place in business + reports, white papers, books, theses, and journals. In + ephemera, on the other hand, as in advertising, they are + probably critical. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1.1 <a name="spacing">Spacing</a></h3><a name="I127"></a><a name="I128"></a><p>We mentioned in <a href="#marginals">section 7.3</a> and + elsewhere the existence of the + <span class="package"><a name="m67">geometry</a></span> package which lets you + change margins. It also lets you set the text-area height + and width and a lot of other layout settings: read the + documentation for details (see <a href="#packagedoc">section 5.1.2</a> for how to read package + documentation). + </p> + <blockquote><pre> +\usepackage[left=2cm,top=1cm,bottom=2cm,right=3cm, + nohead,nofoot]{geometry} + </pre></blockquote> + <p>The spacing around the individual textual components + (headings, paragraphs, lists, footnotes, etc.) can + also be changed on a document-wide basis, as we saw with + paragraph spacing and indentation in <a href="#paraspace">the text in section 3.6</a>. + </p> + <p>Changing the spacing of section headings for the whole + document can be done with the + <span class="package"><a name="m68">sectsty</a></span> package, designed to let + you adjust section-head spacing without having to know about + the internal <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> coding, which is quite complex. + </p> + <p>The spacing for lists can be adjusted with the + <span class="package"><a name="m69">mdwlist</a></span> package. In both cases the + user with highly specific requirements such as a + publisher's Compositor's Specification should read + the relevant sections in the <cite><a href="#companion" name="C39">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> or ask for expert help, as + there are many internal settings which can also be changed + to fine-tune your design, but which need some knowledge of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals. + </p> + <p>All the above are for automating changes so that they + occur every time in a consistent manner. You can also make + manual changes whenever you need: + </p> + <blockquote> + <dl> + <dt><b>Flexible vertical space</b></dt> + <dd><a name="I130"></a><p>There are three commands + <code class="command"><a name="c190">\smallskip</a></code>, + <code class="command"><a name="c191">\medskip</a></code>, and + <code class="command"><a name="c192">\bigskip</a></code>. These output flexible + (dynamic, or ‘rubber’) space, + approximately 3pt, 6pt, and 12pt high respectively, + and they will automatically compress or expand a + little, depending on the demands of the rest of the + page (for example to allow one extra line to fit, or a + heading to be moved to the next page without anyone + except a typographer noticing the change). These + commands can only be used after a paragraph break (a + blank line or the command + <code class="command"><a name="c193">\par</a></code>). + </p> + </dd> + <dt><b>Fixed vertical space</b></dt> + <dd><a name="I131"></a><a name="I132"></a><p>For a fixed-height space which will + <em>not</em> stretch or shrink, use the + command <code class="command"><a name="c194">\vspace</a></code> followed by a length + in curly braces, e.g. <code class="literal">\vspace{18pt}</code> + (again, this has to be after a paragraph break). Bear + in mind that extra space which ends up at a page-break + when the document is formatted <em>will get + discarded entirely</em> to make the bottom and + top lines fall in the correct places. To force a + vertical space to remain and be taken into account + even after a page break (very rare), use the starred + variant <code class="command"><a name="c195">\vspace*</a></code>, e.g. + <code class="literal">\vspace*{19pt}</code>. + </p> + </dd> + <dt><b>Double spacing</b></dt> + <dd><a name="I133"></a><a name="I134"></a><p>Double-spacing normal lines of text is usually a + bad idea, as it looks very ugly. It is still + unfortunately a requirement in some universities for + thesis submission, a historical relic from the days of + typewriters. Nowadays, 1⅓ or 1½ line + spacing is considered acceptable, according to your + font size. If your institution still thinks they + should have double line spacing, they are probably + wrong, and just don't understand that the world has + moved on since the typewriter. Show them this + paragraph and explain that they need to enter the 21st + century and adapt to the features of computer + typesetting. If they still insist, use the + <span class="package"><a name="m70">setspace</a></span> package,which has + commands for double line-spacing and one-and-a-half + line spacing, but be prepared for some very ugly + output (so warn your supervisor and extern). + </p> + <p>The space between lines is defined by the value of + the length variable <tt>\<a name="d29">baselineskip</a></tt> multiplied + by the value of the <code class="command"><a name="c196">\baselinestretch</a></code> + command. In general, <em>don't meddle with + <tt>\<a name="d30">baselineskip</a></tt> at + all</em>, and with + <code class="command"><a name="c197">\baselinestretch</a></code> only if you know + what you are doing. (Both can, however, safely be used + as reference values in commands like + <code class="literal">\vspace{\baselineskip}</code> to leave a + whole line space.) + </p> + <p>The value of <tt>\<a name="d31">baselineskip</a></tt> changes with + the font size (see <a href="#fontsize">section 8.2.4</a>) but is conventionally set to + 1.2 times the current nominal font size. This is a + value derived from long experience: only change it if + you understand what it means and what effect it will + have. + </p> + <p>Quite separately, there are some perfectly genuine + and normal reasons for wanting wide line spacing, + for example when typesetting a proof of a + critical or variorum edition, where editors and + contributors are going to want to add notes manually + by writing between the lines, or where the text is + going to be overprinted by something else like + Braille, or in advertising or display text for special + effects. + </p> + </dd> + <dt><b>Horizontal space</b></dt> + <dd><a name="I137"></a><p>There is a horizontal equivalent to the + <code class="command"><a name="c198">\vspace</a></code> command: + <code class="command"><a name="c199">\hspace</a></code>, which works in the same + way, so I can force a 1″ space like + this<img src="whitespace.png" align="middle" height="10px" alt="\hspace*{1in}" width="72">in + mid-paragraph. There are also some predefined + (shorter) spaces available: + </p> + <ul> + <li> + <p><code class="command"><a name="c200">\thinspace</a></code> (1/6em), + which we saw between single and double quotes in + <a href="#thinspace">the last paragraph in section 2.6</a>. It's also + sometimes used between the full point after + abbreviations and a following number, as in page + references like p. 199, where a word space + would look too big, and setting it solid would + look too tight. + </p> + </li> + <li> + <p><code class="command"><a name="c201">\enspace</a></code> (½em). + There is no direct equivalent predefined in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for mid and thick spaces as used by metal + typesetters, although it would be possible to + define them. The en as a unit is often used as the + width of a single digit in some fonts, as a + convenience so that tables of figures are easy to + line up. + </p> + </li> + <li> + <p><code class="command"><a name="c202">\quad</a></code> (1em). + </p> + </li> + <li> + <p><code class="command"><a name="c203">\qquad</a></code> (2em). + </p> + </li> + </ul> + <p>Beyond this, all horizontal space within + paragraphs is automatically flexible, + <a name="I139"></a> as this is what + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses to achieve justification. Never be + tempted to try and change the spacing between letters + unless you have some professional training in + typography. Some systems use letterspacing + (incorrectly called ‘tracking’) as an aid + to justification and it is almost always wrong to do + so (and looks it). While it <em>is</em> + possible to change letterspacing (with the + <span class="package"><a name="m71">soul</a></span> package), it should only + be done by a typographer, and then only very rarely, + as the settings are very subtle and beyond the scope + of this book. + </p> + </dd> + </dl> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1.2 <a name="runningheads">Headers and footers</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built-in settings to control the page style + of its default page layouts. These are implemented with the + <code class="command"><a name="c204">\pagestyle</a></code> command, which can take one of + the following arguments. + </p> + <blockquote> + <dl> + <dt><b><span class="option"><a name="o15">plain</a></span></b></dt> + <dd> + <p>for a page number centered at the bottom;</p> + </dd> + <dt><b><span class="option"><a name="o16">empty</a></span></b></dt> + <dd> + <p>for nothing at all, not even a page number;</p> + </dd> + <dt><b><span class="option"><a name="o17">headings</a></span></b></dt> + <dd> + <p>for running heads based on the current chapter and + section; + </p> + </dd> + <dt><b><span class="option"><a name="o18">myheadings</a></span></b></dt> + <dd> + <p>which lets you use your own reprogrammed + definitions of how <code class="command"><a name="c205">\markright</a></code> and + <code class="command"><a name="c206">\markboth</a></code> commands, which control + how chapter and section titles get into page + headers. + </p> + </dd> + </dl> + </blockquote> + <p>The command <code class="command"><a name="c207">\thispagestyle</a></code> (taking the + same arguments) can be used to force a specific style for + the current page only. + </p> + <p>However, the easiest way is to use the + <span class="package"><a name="m72">fancyhdr</a></span> package, which lets you + redefine the left-hand, centre, and right-hand page headers + and footers for both odd and even pages (twelve objects in + all). These areas can contain a page number, fixed text, + variable text (like the current chapter or section title, or + the catch-words of a dictionary), or even a small image. + They can also be used to do page backgrounds and frames, by + making one of them the top corner of an invisible box which + ‘hangs’ text or images down over the whole + page. + </p> + <p>The settings for the downloadable version of this + document can be used as an example: for the whole story you + have to read the documentation. + </p> + <blockquote><pre> +\pagestyle{fancy}\fancyhead{} +\renewcommand\headrulewidth{.1pt} +\fancyhead[LO,RE]{\footnotesize\sffamily\lite\leftmark} +\fancyhead[LE,RO]{\footnotesize\sffamily\lite\itshape + \rightmark} +\fancyfoot[C]{} +\fancyfoot[LE,RO]{\setlength{\fboxsep}{2pt}\ovalbox% + {\footnotesize\sffamily\thepage}} +\fancyfoot[LO,RE]{\footnotesize\sffamily\lite\@title} +\fancypagestyle{plain}{\fancyhf{} + \fancyfoot[R]{\setlength{\fboxsep}{2pt}\ovalbox{% + \footnotesize\sffamily\thepage}} + \fancyfoot[L]{\footnotesize\sffamily\lite\@title} + \renewcommand{\headrulewidth}{0pt}} + </pre></blockquote> + <p>This is probably more complex than most documents, but + it illustrates some common requirements: + </p> + <ol type="1"> + <li> + <p>Settings are prefixed by making the + <code class="command"><a name="c208">\pagestyle</a></code> ‘fancy’ + and setting the <code class="command"><a name="c209">\fancyhead</a></code> to + null to zap any predefined values. + </p> + </li> + <li> + <p>The thickness of the rule at the top of the page can + be changed (or set to 0pt to make it disappear). + </p> + </li> + <li> + <p>The header and footer settings are specified with L, + C, and R for left, centre, and right; and with O and E + for Odd and Even numbered pages. In each setting, the + typeface style, size, and font can be specified along + with macros which implement various dynamic texts (here, + the current chapter and section titles, which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + stores in <code class="command"><a name="c210">\rightmark</a></code> and + <code class="command"><a name="c211">\leftmark</a></code>). + </p> + </li> + <li> + <p>The ‘plain’ variant is used for chapter + starts, and resets some of the parameters + accordingly. + </p> + </li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2 <a name="fontuse">Using fonts</a></h2><a name="I140"></a><p>The default typeface in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is <a name="CM" class="acroref">Computer Modern</a> (<small>CM</small>). This typeface was + designed by Knuth for use with <span class="TEX">T<span class="E">E</span>X</span> because it is a book + face, and he designed <span class="TEX">T<span class="E">E</span>X</span> originally for typesetting books. + Because it is one of the very few book typefaces with a + comprehensive set of fonts, including a full suite of + mathematics, it has remained the default, rather than the + Times you find in wordprocessors, because until recently the + mathematical symbols for Times were a commercial product often + unavailable to users of free software. + </p> + <p><a name="I141"></a><a name="I142"></a><span style="font-family:Times; font-size:12ptpt; "><img src="cmr.png" width="100%" class="invisible"></span></p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are reading this in a web browser, the above + paragraph is only a low-resolution copy because browsers + don't usually have the Computer Modern font available. + All the rest of this document is set in your current browser serif font, with + your current browser sans-serif font for some of the headings and your current browser monospace font for the + fixed-width type. + </p> + </blockquote> + <p>In addition to <small><a href="#CM" class="acroref" name="A189" title="Computer Modern">CM</a></small>, there are + many other METAFONT fonts which can be downloaded from + <small><a href="#CTAN" class="acroref" name="A190" title="Comprehensive Archive Network">CTAN</a></small>, including a large collection + of historical, symbol, initial, and non-Latin fonts. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + also comes with the ‘Adobe 35’ + typefaces which are built into laser printers and other + <small><a href="#DTP" class="acroref" name="A191" title="desktop publishing">DTP</a></small> systems, and some more fonts + donated by the X Consortium. Plus, of course, standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use any of the thousands of + Type 1 fonts available, and + <i><a name="p195">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> can use any of the + thousands of TrueType fonts as well. + </p> + <p>In the following lists, if there is a package available, + its name is given in parentheses after the name of the + typeface. The font-family name is shown on the right-hand + side. If a non-standard font-encoding is needed, its name is + shown before the font-family name. + </p><a name="I143"></a><a name="I144"></a><a name="I145"></a><a name="I146"></a><div align="center" class="sampler"><a name="fontable-mf"></a><h3 align="left" class="tablehead">Latin-alphabet typefaces (METAFONT)</h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Roman</small></th> + <td align="right"><small>cmr</small></td> + </tr> + </table><img src="p70-01.png" alt="Sample of cmr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Sans</small></th> + <td align="right"><small>cmss</small></td> + </tr> + </table><img src="p70-02.png" alt="Sample of cmss" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Typewriter</small></th> + <td align="right"><small>cmtt</small></td> + </tr> + </table><img src="p70-03.png" alt="Sample of cmtt" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora</small></th> + <td align="right"><small>panr</small></td> + </tr> + </table><img src="p70-04.png" alt="Sample of panr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora Sans</small></th> + <td align="right"><small>pss</small></td> + </tr> + </table><img src="p70-05.png" alt="Sample of pss" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora Typewriter</small></th> + <td align="right"><small>pntt</small></td> + </tr> + </table><img src="p70-05.png" alt="Sample of pntt" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Universal</small></th> + <td align="right"><small>uni</small></td> + </tr> + </table><img src="p70-06.png" alt="Sample of uni" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Concrete</small></th> + <td align="right"><small>ccr</small></td> + </tr> + </table><img src="p70-07.png" alt="Sample of ccr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Éıreannach</small></th> + <td align="right"><small>eiad</small></td> + </tr> + </table><img src="p70-10.png" alt="Sample of eiad" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Rustic</small></th> + <td align="right"><small>rust</small></td> + </tr> + </table><img src="p70-15.png" alt="Sample of rust" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Uncial</small></th> + <td align="right"><small>uncl</small></td> + </tr> + </table><img src="p70-17.png" alt="Sample of uncl" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Dürer</small></th> + <td align="right"><small>zdu</small></td> + </tr> + </table><img src="p70-18.png" alt="Sample of zdu" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Fraktur</small></th> + <td align="right"><small>yfrak</small></td> + </tr> + </table><img src="p70-19.png" alt="Sample of yfrak" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Gothic</small></th> + <td align="right"><small>ygoth</small></td> + </tr> + </table><img src="p70-20.png" alt="Sample of ygoth" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Schwäbische</small></th> + <td align="right"><small>yswab</small></td> + </tr> + </table><img src="p70-21.png" alt="Sample of yswab" width="100%"><hr> + </div> + <div align="center" class="sampler"><a name="fontable-adobe"></a><h3 align="left" class="tablehead">Latin-alphabet typefaces (PostScript Type 1) from + Adobe + </h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Avant Garde</small></th> + <td align="right"><small>pag</small></td> + </tr> + </table><img src="p70-26.png" alt="Sample of pag" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Bookman</small></th> + <td align="right"><small>pbk</small></td> + </tr> + </table><img src="p70-22.png" alt="Sample of pbk" width="100%">Uses Avant Garde as the sans-serif and Courier for + monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Courier</small></th> + <td align="right"><small>pcr</small></td> + </tr> + </table><img src="p70-29.png" alt="Sample of pcr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Helvetica</small></th> + <td align="right"><small>phv</small></td> + </tr> + </table><img src="p70-27.png" alt="Sample of phv" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>New Century Schoolbook</small></th> + <td align="right"><small>pnc</small></td> + </tr> + </table><img src="p70-23.png" alt="Sample of pnc" width="100%">Uses Helvetica as the sans-serif font and Courier + for monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Palatino</small></th> + <td align="right"><small>ppl</small></td> + </tr> + </table><img src="p70-24.png" alt="Sample of ppl" width="100%">Uses Avant Garde as the sans-serif and Courier for + monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Symbol</small></th> + <td align="right"><small>psy</small></td> + </tr> + </table><img src="p70-31.png" alt="Sample of psy" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Times New Roman</small></th> + <td align="right"><small>ptm</small></td> + </tr> + </table><img src="p70-25.png" alt="Sample of ptm" width="100%">Uses Helvetica as the sans-serif font and Courier + for monospace. Mathematical symbols for Times are + available both free and commercially. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Zapf Chancery</small></th> + <td align="right"><small>pzc</small></td> + </tr> + </table><img src="p70-28.png" alt="Sample of pzc" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Zapf Dingbats</small></th> + <td align="right"><small>pzd</small></td> + </tr> + </table><img src="p70-30.png" alt="Sample of pzd" width="100%"><hr> + </div> + <p>As mentioned in <a href="#print">section 4.4</a>, the + ‘Adobe 35’ fonts can be used with any + printer, not just a laser printer or typesetter. The + <i><a name="p196">Ghostscript</a></i> interpreter and the + <i><a name="p197">GSview</a></i> viewer come with a large set + of printer drivers, so you just create PostScript output and + print from <i><a name="p198">GSview</a></i>. + </p> + <p>Incidentally, the 35 refers to the total number of fonts + for the 10 typefaces, including their bold, italic, and + bold-italic variants. + </p> + <p>Postscript Type 1 fonts have been the mainstay of the + graphic arts industries for many years, as they allow much + better definition of variance + (‘hinting’) than most other formats. + However, the font format remains proprietary to Adobe, even + though they have released it for public use, which means they + could change it without warning. A new format called + ‘OpenType’ is designed to overcome + this, and some versions of <span class="TEX">T<span class="E">E</span>X</span> are + already able to use OpenType fonts. + </p> + <div align="center" class="sampler"><a name="fontable-x"></a><h3 align="left" class="tablehead">Latin-alphabet fonts (PostScript Type 1) from the X + Consortium + </h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Charter</small></th> + <td align="right"><small>bch</small></td> + </tr> + </table><img src="p70-32.png" alt="Sample of bch" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Nimbus Roman</small></th> + <td align="right"><small>unm</small></td> + </tr> + </table><img src="p70-33.png" alt="Sample of unm" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Nimbus Sans</small></th> + <td align="right"><small>unms</small></td> + </tr> + </table><img src="p70-34.png" alt="Sample of unms" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>URW Antiqua</small></th> + <td align="right"><small>uaq</small></td> + </tr> + </table><img src="p70-35.png" alt="Sample of uaq" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>URW Grotesk</small></th> + <td align="right"><small>ugq</small></td> + </tr> + </table><img src="p70-36.png" alt="Sample of ugq" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Utopia</small></th> + <td align="right"><small>put</small></td> + </tr> + </table><img src="p70-37.png" alt="Sample of put" width="100%">Removed from recent distributions as it is not + free. + <hr> + </div> + <div align="center" class="sampler"><a name="fontable-nonlat"></a><h3 align="left" class="tablehead">Non-Latin-alphabet typefaces (METAFONT)</h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>BB Dingbats</small></th> + <td align="right"><small>ding</small></td> + </tr> + </table><img src="p70-08.png" alt="Sample of ding" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Cypriot</small></th> + <td align="right"><small>cypr</small></td> + </tr> + </table><img src="p70-09.png" alt="Sample of cypr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Etruscan</small></th> + <td align="right"><small>etr</small></td> + </tr> + </table><img src="p70-11.png" alt="Sample of etr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Linear `B'</small></th> + <td align="right"><small>linb</small></td> + </tr> + </table><img src="p70-12.png" alt="Sample of linb" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Phoenician</small></th> + <td align="right"><small>phnc</small></td> + </tr> + </table><img src="p70-13.png" alt="Sample of phnc" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Runic</small></th> + <td align="right"><small>fut</small></td> + </tr> + </table><img src="p70-14.png" alt="Sample of fut" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Bard</small></th> + <td align="right"><small>zba</small></td> + </tr> + </table><img src="p70-16.png" alt="Sample of zba" width="100%"><hr> + </div> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Just to make it clear: standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses only + METAFONT and <a name="t32">PostScript</a> Type 1 + fonts. <i><a name="p199">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> can use TrueType + fonts as well. + </p> + </blockquote> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.1 Changing the default font family + </h3><a name="I147"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> expects to work with three font families as + defaults: + </p><a name="I148"></a><div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Font family</th> + <th valign="bottom" align="left">Code</th> + </tr> + <tr> + <td valign="top" align="left">Roman (serif, with tails on the uprights), the + default + </td> + <td valign="top" align="left" style="font-family:monospace;">rm</td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif, with no tails on + the uprights + </td> + <td valign="top" align="left" style="font-family:monospace;">sf</td> + </tr> + <tr> + <td valign="top" align="left">Monospace (fixed-width or + typewriter) + </td> + <td valign="top" align="left" style="font-family:monospace;">tt</td> + </tr> + </table> + </div> + <p>The start-up default for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> equates the + <code class="literal">rm</code> default with the + <i><a name="v32">cmr</a></i> font-family (Computer Modern Roman), + <code class="literal">sf</code> with <i><a name="v33">cmss</a></i>, and + <code class="literal">tt</code> with <i><a name="v34">cmtt</a></i>. If you + use one of the packages listed in <a href="#fontable-mf">the table in section 8.2</a>, it will + replace the defaults of the same type: for example, + <code class="literal">\usepackage{bookman}</code> makes the default + <code class="literal">rm</code> font-family Bookman + (<i><a name="v35">pbk</a></i>), but leaves the sans-serif + (<code class="literal">sf</code>) and monospace + (<code class="literal">tt</code>) families untouched. Equally, + <code class="literal">\usepackage{helvet}</code> changes the default + sans-serif family to Helvetica but leaves the serif (Roman) + and monospace families untouched. Using both commands will + change both defaults because they operate + independently. + </p> + <p><em>However</em>...as it is common to + want to change all three defaults at the same time, some of + the most common ‘suites’ of typefaces + are provided as packages: + </p> + <blockquote> + <dl> + <dt><b><span class="package"><a name="m73">times</a></span></b></dt> + <dd> + <p>changes to Times/Helvetica/Courier.</p> + </dd> + <dt><b><span class="package"><a name="m74">pslatex</a></span></b></dt> + <dd> + <p>same as <span class="package"><a name="m75">times</a></span> but uses a + specially narrowed Courier to save space (normal + Courier is rather inelegantly wide). This is the + preferred setting if you want Times.<sup><a href="#F43">1</a></sup></p> + </dd> + <dt><b><span class="package"><a name="m78">newcent</a></span></b></dt> + <dd> + <p>changes to New Century + Schoolbook/Helvetica/Courier. + </p> + </dd> + <dt><b><span class="package"><a name="m79">palatino</a></span></b></dt> + <dd> + <p>changes to Palatino/Avant Garde/Courier.</p> + </dd> + <dt><b><span class="package"><a name="m80">palatcm</a></span></b></dt> + <dd> + <p>changes the roman to Palatino only, but with + <small><a href="#CM" class="acroref" name="A192" title="Computer Modern">CM</a></small> mathematics + </p> + </dd> + </dl> + </blockquote> + <p>Where no package name is given in <a href="#fontable-mf">the table in section 8.2</a>, it means the + font is rarely used as a default by itself except in special + cases like users' own homebrew packages. To use such a + font you have to specify it manually, or make a little macro + for yourself if you use it more than once. + </p> + <ol class="footnotes" start="1"> + <li><a name="F43">The <span class="package"><a name="m76">pslatex</a></span> package + is also said to be outdated by some experts + because it implements rather long-windedly what + can now be done in three commands. However, until + these replace the current version, I recommend + continuing to use <span class="package"><a name="m77">pslatex</a></span> + when you want Times with Helvetica and narrow + Courier.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.2 <a name="fontfam">Changing the font-family temporarily</a></h3><a name="I149"></a><p>To shift to another font family on a temporary basis, + use the commands <code class="command"><a name="c212">\fontencoding</a></code> (if + needed), <code class="command"><a name="c213">\fontfamily</a></code>, and + <code class="command"><a name="c214">\selectfont</a></code>, and <em>enclose the + commands <span class="normal">and</span> the text in curly + braces</em>. Note that this is a + <em>different</em> way of using curly braces to + how we have used them before: it limits the effect of a + change to the material inside the braces. + </p> + <blockquote class="example"><pre> +{\fontfamily{phv}\selectfont +Helvetica looks like this}: +{\fontencoding{OT1}\fontfamily{bch}\selectfont +Charter looks like this}. + </pre><p class="example"><span style="font-family:Helvetica; ">Helvetica + looks like this</span>: <span style="font-family:; ">Charter looks like + this</span>. + </p> + </blockquote> + <p>In this example, the <code class="command"><a name="c215">\fontencoding</a></code> + command has been used to ensure that the typeface will work + even if the sentence is used in the middle of something + typeset in a different encoding (like this + document).<sup><a href="#F44">2</a></sup></p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="grouping">Grouping</a></h3><a name="I150"></a><p>Note carefully this use of curly braces to restrict + the scope of a change rather than delimit the argument to + a command. This is called + ‘grouping’ and it makes the effect + any changes made <em>inside</em> the braces + local, so that they do not interfere with the text + following. Any changes to fonts or other values made + within the curly braces cease when the closing curly brace + is processed. + </p> + </td> + </tr> + </table> + </div> + <p>In a normal document, of course, random typeface changes + like this are rather rare. You select your typeface[s] once + at the start of the document, and stick with them. + </p> + <p>Most cases where people want to do unusual typeface + changes involve things like special symbols on a repetitive + basis, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides much easier programmable ways + to make these changes into shorthand commands (called + macros: see <a href="#macros">Chapter 9</a>). You could, for + example, make a macro called <code class="command"><a name="c216">\product</a></code> + which would let you typeset product names in a distinct + typeface: + </p> + <blockquote><pre> +Andlinger, Inc., has replaced \product{Splosh} with +\product{SuperSplosh}. + </pre></blockquote> + <p>This is one of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s most powerful features. + It means that if you needed to change your + <code class="command"><a name="c217">\product</a></code> command at some later stage to + use a different font, you only have to change three + characters in the macro (the font-family name), and + you don't need to edit your document text at all! + What's more, a macro could do other things at the same time, + like add an entry to an index of products. + </p> + <p>However, vastly more common are changes to type + <em>style</em>, while staying with the same + font-family. + </p> + <ol class="footnotes" start="2"> + <li><a name="F44">Test for the observant reader: in what typeface will + the colon (:) in the example be set?</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.3 Changing font style + </h3><a name="I151"></a><p>Within each typeface or font family there are usually + several different ‘looks’ to the type + design. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> distinguishes between font <b><i><a name="family">family</a></i></b>, font <b><i><a name="shape">shape</a></i></b>, and font <b><i><a name="series">series</a></i></b>: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Type style</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example (using Computer Modern)</th> + </tr> + <tr> + <td valign="top" align="left">Upright</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c218">\upshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; "><img src="p71-01.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Italic</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c219">\itshape</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-style:italic; "><img src="p71-02.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Slanted</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c220">\slshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-style:italic; "><img src="p71-03.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Small Capitals</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c221">\scshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-style:smallcaps; "><small>THE QUICK BROWN FOX + JUMPS OVER THE</small></span></td> + </tr> + <tr> + <td valign="top" align="left">Bold</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c222">\bfseries</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-weight:bold; "><img src="p71-05.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Bold Extended</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c223">\bfseries</a></code>† + </td> + <td valign="top" align="left"><span style="font-family:Times; font-weight:bold; "><img src="p71-06.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c224">\sffamily</a></code></td> + <td valign="top" align="left"><span style="font-family:Helvetica; "><img src="p71-07.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Monospace</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c225">\ttfamily</a></code></td> + <td valign="top" align="left"><span style="font-family:Courier; "><img src="p71-08.png" width="100%" class="invisible"></span></td> + </tr> + </table> + <div align="left"> + <dl><small> + <dd><i>*</i>) Not all typefaces have all + variants! Some only have bold and italics. + </dd> + <dd><i>†</i>) Some typefaces do not have + both bold and bold extended: by default <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses + <code class="command"><a name="c226">\bfseries</a></code> for bold + extended. + </dd></small></dl> + </div> + </div> + <p>These ‘shape’, + ‘series’, and + ‘family’ commands are <b><i><a name="commutative">commutative</a></i></b>, so you can + combine a shape with a series and/or a family, without the + need to use <code class="command"><a name="c227">\selectfont</a></code>: + </p> + <blockquote><pre> +This gives you {\bfseries\itshape\sffamily bold +italic sans-serif type}, but beware + </pre></blockquote> + <p>This gives you <span style="font-family:sans-serif; font-weight:bold; font-style:italic; ">bold italic sans-serif type</span>, but + beware of pushing your fonts beyond their limits unless you + are a typographer. It is not normally meaningful to combine + one shape or series class with another of the same class, + such as trying to get slanted-italics. It's an + impossibility to combine one family with another (such as a + seriffed sans-serif typeface!). Slanted plus italics, for + example, doesn't make sense, as italics are already + slanted (although it is technically possible); and while + some typefaces may well possess italic small caps, they are + not in common use. Sans-serif and monospace (typewriter) are + different fonts, and often different typeface families + entirely.<sup><a href="#F45">3</a></sup></p> + <p>There is an alternative syntax for the most common type + shape and series commands which uses curly braces in the + normal ‘argument’ manner: + </p> + <div align="center"><a name="fontcmds"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="left">Type style</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example</th> + </tr> + <tr> + <td valign="top" align="left">Italic</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textit{text}</code></td> + <td valign="top" align="left">puts <span style="font-style:italic; ">text</span> + into italics + </td> + </tr> + <tr> + <td valign="top" align="left">Slanted</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsl{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:Times; font-style:italic; ">text</span> into + slanted type* + </td> + </tr> + <tr> + <td valign="top" align="left">Small Capitals</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsc{text}</code></td> + <td valign="top" align="left">puts <span style="font-style:smallcaps; "><small>TEXT</small></span> into + small caps + </td> + </tr> + <tr> + <td valign="top" align="left">Bold</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textbf{text}</code></td> + <td valign="top" align="left">puts <span style="font-weight:bold; ">text</span> into + bold type + </td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsf{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:sans-serif; ">text</span> + into sans-serif type + </td> + </tr> + <tr> + <td valign="top" align="left">Monospace</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\texttt{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:monospace; ">text</span> into + typewriter type + </td> + </tr> + </table> + <div align="left"> + <dl><small> + <dd><i>*</i>) If slanted is available separately + from italics. + </dd></small></dl> + </div> + </div> + <p>You can nest these inside one another too:</p> + <blockquote><pre> +...\textbf{\itshape\textsf{bold italic +sans-serif type}}... + </pre></blockquote> + <p><a name="uline"></a>Underlining isn't a font, and it is extremely + rare in typography except for special purposes. If you think + you need it, use the <span class="package"><a name="m81">ulem</a></span> package + with the <code class="literal">normalem</code> option, and the + <code class="command"><a name="c228">\uline</a></code> command. + </p> + <ol class="footnotes" start="3"> + <li><a name="F45">Although if you're a typographer wanting to + experiment with typewriter typefaces with and without + serifs, you can use METAFONT to do exactly this kind + of thing. But that's way outside the scope of this + document.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.4 <a name="fontsize">Font sizes</a></h3><a name="I152"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built into its defaults a set of predefined + font size steps corresponding more or less to the + traditional sizes available to metal typesetters. This is + deliberate, as these sizes have grown up over 500 years of + printing as those which go best together for book-work, + which is where <span class="TEX">T<span class="E">E</span>X</span> originated. + </p> + <p>These sizes are also reflected in the size steps at + which Computer Modern was designed. It often comes as a + surprise to new users that many typefaces are not designed + as a single font and just scaled up or down, but specially + drawn at different sizes to make them more legible. + </p> + <p>As an example, <img src="cmr12-12.png" align="middle" alt="here's 12pt Computer Modern" height="12pt">, and <img src="cmr5-12.png" align="middle" height="10px" alt="{\font\cmbig=cmr5 at12pt\cmbig here's 5pt Computer Modern scaled up to 12pt}">, and + <img src="cmr17-12.png" align="middle" height="10px" alt="{\font\cmsmall=cmr17 at12pt\cmsmall here's 17pt Computer Modern scaled down to 12pt}"> so you can see there really is a + significant difference. In general, you probably don't + want to go scaling fonts too much beyond their design size + because they will start to look very odd. + </p> + <p>The default sizes (and the commands that operate them) + are based on the use of a 10pt font, which is the normal + size for most texts. Using the larger defaults (11pt and + 12pt) for the body font will use 11pt and 12pt designs, with + other sizes (eg headings) resized to match. The exact sizes + used are listed in the macros in the Class Option files + <code>size10.clo</code>, + <code>size11.clo</code> and + <code>size12.clo</code>. <span class="TEX">T<span class="E">E</span>X</span>'s default fonts + above 10pt are in fact scaled by a factor of 1.2, as shown + in the fourth column of the table below. + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example</th> + <th valign="bottom" align="left">Nominal point + size + </th> + <th valign="bottom" align="left">Exact point + size + </th> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c229">\tiny</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:5pt; ">The quick brown fox + jumps over the lazy dog</span></td> + <td valign="top" align="right">5</td> + <td valign="top" align="right">5</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c230">\scriptsize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:7pt; ">The quick brown + fox jumps over the laz</span></td> + <td valign="top" align="right">7</td> + <td valign="top" align="right">7</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c231">\footnotesize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:8pt; ">The quick + brown fox jumps over the l</span></td> + <td valign="top" align="right">8</td> + <td valign="top" align="right">8</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c232">\small</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:9pt; ">The quick brown fox + jumps over th</span></td> + <td valign="top" align="right">9</td> + <td valign="top" align="right">9</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c233">\normalsize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:10pt; ">The quick + brown fox jumps over</span></td> + <td valign="top" align="right">10</td> + <td valign="top" align="right">10</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c234">\large</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:12pt; ">The quick brown fox + jumps</span></td> + <td valign="top" align="right">12</td> + <td valign="top" align="right">12</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c235">\Large</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:14pt; ">The quick brown fox + ju</span></td> + <td valign="top" align="right">14</td> + <td valign="top" align="right">14.40</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c236">\LARGE</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:18pt; ">The quick brown + fo</span></td> + <td valign="top" align="right">18</td> + <td valign="top" align="right">17.28</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c237">\huge</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:20pt; ">The quick + brown</span></td> + <td valign="top" align="right">20</td> + <td valign="top" align="right">20.74</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c238">\Huge</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:24pt; ">The quick + bro</span></td> + <td valign="top" align="right">24</td> + <td valign="top" align="right">24.88</td> + </tr> + </table> + </div> + <p>While these ‘shorthand’ commands + relieve the beginner of having to worry about the + ‘right’ size for a given task, when + you need a specific size there is the + <code class="command"><a name="c239">\fontsize</a></code> command: + </p> + <blockquote><pre> +\fontsize{22}{28}\selectfont This is 22pt +type 6pt leaded + </pre></blockquote> + <p>‘Leading’ comes from the old metal-type + practice of adding a lead strip between lines to increase the + spacing. + </p> + <p>The <code class="command"><a name="c240">\fontsize</a></code> command takes two + arguments: the point size and the baseline distance. The + above example gives you 22pt type on a 28pt baseline + (i.e. with 6pt extra space or + ‘leading’ between the lines). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Computer Modern fonts (the default) come fixed at the + named size steps shown in the table, and if you try to use + an odd size in between, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will pick the closest + step instead. If you really need to use <small><a href="#CM" class="acroref" name="A193" title="Computer Modern">CM</a></small> at arbitrary sizes there is a + package <span class="package"><a name="m82">type1cm</a></span> which lets you + override the default steps. If you use + <a name="t33">PostScript</a> (Type 1) fonts, the + step sizes do not apply and the font scaling is infinitely + variable. + </p> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.5 Logical markup + </h3> + <p>All this playing around with fonts is very pretty but + you normally only do it for a reason, even if that reason is + just to be decorative. Italics, for example, are used for + many things: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Cause</th> + <th valign="bottom" align="left">Effect</th> + </tr> + <tr> + <td valign="top" align="left">Foreign words</td> + <td valign="top" align="left" style="font-style:italic;">ex officio</td> + </tr> + <tr> + <td valign="top" align="left">Scientific names</td> + <td valign="top" align="left" style="font-style:italic;">Ranunculus ficaria</td> + </tr> + <tr> + <td valign="top" align="left">Emphasis</td> + <td valign="top" align="left" style="font-style:italic;">must not</td> + </tr> + <tr> + <td valign="top" align="left">Titles of documents</td> + <td valign="top" align="left" style="font-style:italic;">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion + </td> + </tr> + <tr> + <td valign="top" align="left">Product names</td> + <td valign="top" align="left" style="font-style:italic;">Corel's WordPerfect</td> + </tr> + <tr> + <td valign="top" align="left">Variables in maths</td> + <td valign="top" align="left" style="font-style:italic;"><span class="math"><i>E=mc</i><sup>2</sup></span></td> + </tr> + <tr> + <td valign="top" align="left">Subtitles or headings</td> + <td valign="top" align="left" style="font-style:italic;">How to get started</td> + </tr> + <tr> + <td valign="top" align="left">Decoration</td> + <td valign="top" align="left" style="font-style:italic;">FREE UPGRADE!!!</td> + </tr> + </table> + </div> + <p>Humans usually have no problem telling the difference + between these reasons, because they can read and understand + the meaning and context. Computers cannot (yet), so it has + become conventional to use descriptive names which make the + distinction explicit, even though the appearance may be the + same. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has some of these built in, like + <code class="command"><a name="c241">\emph</a></code>, which provides + <em>emphasis</em>. This has a special feature + because <span style="font-style:italic; ">when the surrounding text is + already italic, <span class="normal">emphasis</span> + automatically reverts to <span class="normal">upright + type</span></span>, which is the normal practice + for typesetting. + </p> + <blockquote><pre> +This has a special feature because {\itshape when the +surrounding text is already italic, \emph{emphasis} +automatically reverts to upright type, which is the + </pre></blockquote> + <p><a name="emph"></a>This sensitivity to logic is programmed into + the definition of <code class="command"><a name="c242">\emph</a></code> and it's not + hard to make up other commands of your own which could do + the same, such as <code class="command"><a name="c243">\foreign</a></code> or + <code class="command"><a name="c244">\product</a></code>. + </p> + <p>But why would you bother? In a short document it's + probably not important, but if you're writing a long + report, or a formal document like an article, a book, or a + thesis, it makes writing and editing hugely easier if you + can control whole groups of special effects with a single + command, such as italicising, indexing, or cross-referencing + to a glossary. If a format needs changing, you only have to + change the definition, and every occurrence automatically + follows suit. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Beware of this ‘vaine conceipt of simple men, + which judge things by ther effects, and not by ther + causes’. (Edmund Spenser, 1633) It's hugely + more efficient to have control of the cause than the + effect. + </p> + </blockquote> + <p>It also makes it possible to find and act on groups of + meanings — such as making an index of scientific names + or product names (as in this document) — if they are + identified with a special command. Otherwise you'd + spend weeks hunting manually through every + <code class="command"><a name="c245">\textit</a></code> command to find the ones you + wanted. This is the importance of automation: it can save + you time and money. + </p> + <p>In <a href="#macros">Chapter 9</a> we will see how to make your + own simple commands like this. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.6 Colour + </h3><a name="I153"></a><a name="I154"></a><p>You can typeset anything in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in any colour you + want using the <span class="package"><a name="m83">color</a></span> package. + First, you need to add the command + <code class="literal">\usepackage{color}</code> to your preamble (note + the US spelling of color!). This makes available a default + palette of primary colours: <span style="color:red; ">red</span>, <span style="color:green; ">green</span>, and <span style="color:blue; ">blue</span> for the <small><a href="#RGB" class="acroref" name="A194" title="Red-Green-Blue">RGB</a></small> colour model used for emitted light + (television screens), and <span style="color:cyan; ">cyan</span>, <span style="color:magenta; ">magenta</span>, <span style="color:yellow; ">yellow</span>, and black for the + <small><a href="#CMYK" class="acroref" name="A195" title="Cyan-Magenta-Yellow-Black">CMYK</a></small> colour model used for + reflected light (printing). + </p> + <p>For the occasional word or phrase in colour, use the + command <code class="command"><a name="c246">\textcolor</a></code> with two arguments, the + colour name and the text: <code class="literal">\textcolor{red}{like + this}</code>. There is a <code class="command"><a name="c247">\color</a></code> + command as well, for use within groups: + </p> + <blockquote><pre> +...{\color{blue}some text in blue}... + </pre></blockquote> + <p>If you have the <a name="t34">PostScript</a> + printer driver <i><a name="p200">dvips</a></i> installed, + you also get a separate 64-colour palette of predefined + <b><i><a name="colornames">color names</a></i></b>. These + represent approximately the colours in the big box of + <i><a name="p201">Crayola</a></i> colouring pencils much + favoured by artists and designers. This adds a new colour + model called ‘<code class="literal">named</code>’, so if + you want the <i><a name="p202">Crayola</a></i> colour + <span style="color:#FF00DD; ">RubineRed</span>, you can use the + <code class="command"><a name="c248">\color</a></code> or <code class="command"><a name="c249">\textcolor</a></code> + commands with a preceding optional argument + ‘<span class="option"><a name="o19">named</a></span>’: + </p> + <blockquote><pre> +\color[named]{RubineRed} +\textcolor[named]{RubineRed}{some red text} +</pre></blockquote> + <p>As some of the ‘<code class="literal">named</code>’ + colour names are quite long, you can create a short name of + your own for colours you use frequently, using the + <code class="command"><a name="c250">\definecolor</a></code> command: + </p> + <blockquote><pre> +\definecolor{mb}{named}{MidnightBlue} + </pre></blockquote> + <p>The <code class="command"><a name="c251">\definecolor</a></code> command needs three + arguments: your shorthand name, the name of the colour model, + and the colour specification. In the case of the + ‘<code class="literal">named</code>’ model, the last + argument is one of the 64 colour names. To + use these names with <i><a name="p203">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, + you need to use the <span class="option"><a name="o20">pdftex</a></span> option to the + <span class="package"><a name="m84">color</a></span> package. + </p> + <p>Using the <code class="command"><a name="c252">\definecolor</a></code> command, you + can define any colour you want by giving it a name, + specifying which colour model, and providing the <a name="RGB" class="acroref">Red-Green-Blue</a> (<small>RGB</small>) or <a name="CMYK" class="acroref">Cyan-Magenta-Yellow-Black</a> (<small>CMYK</small>) colour + values expressed as decimals, separated by commas. For + example, an <small><a href="#RGB" class="acroref" name="A198" title="Red-Green-Blue">RGB</a></small> shade given as + (37,125,224) in decimal (#250FE0 in hexadecimal as used + on the Web) can be given as + <blockquote><pre> +\definecolor{midblue}{rgb}{0.145,0.490,0.882} + </pre></blockquote> (divide each value by 255, the maximum for + each of the hues in the Red-Green-Blue colour model). You + can then use <code class="command"><a name="c253">\textcolor</a></code> with your new + colour name: <span style="color:midblue; ">the midblue looks like + this if you're reading in colour.</span></p> + <p>The <span class="package"><a name="m85">color</a></span> package also provides + a colour version of <code class="command"><a name="c254">\fbox</a></code> (see <a href="#fbox">section 6.7.2</a>) called + <code class="command"><a name="c255">\colorbox</a></code>: + </p> + <blockquote><pre> +\colorbox{midblue}{\color{magenta}Magenta on midblue} + </pre></blockquote> + <p><span style="background-color:#257DE2;color:magenta; ">Magenta on midblue</span>: you can + see how careful you need to be with colours! + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3 <a name="instfonts">Installing new fonts</a></h2><a name="I155"></a><p>Different fonts come in a variety of packagings: the three + most common used with <span class="TEX">T<span class="E">E</span>X</span> systems are + <a name="t35">PostScript</a> fonts, TrueType fonts, and + METAFONT fonts. How you install them and where they go + depends on how you installed <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: all I can deal with here + are the standard locations within the <small><a href="#TDS" class="acroref" name="A199" title="Directory Structure">TDS</a></small>. + </p> + <p>Typefaces come supplied as one or more font + ‘outline’ files and a number of + ancillary files: + </p> + <blockquote> + <dl> + <dt><b>METAFONT typefaces</b></dt> + <dd> + <p>have a number of <code>.mf</code> source + (outline) files, possibly also some + <code>.fd</code> (font definition) files and a + <code>.sty</code> (style) file. The + <code>.tfm</code> (<span class="TEX">T<span class="E">E</span>X</span> font metric) files are + not needed, as they can be generated from the + outlines. + </p> + </dd> + <dt><b>PostScript typefaces</b></dt> + <dd> + <p>come as a pair of files: a <code>.pfb</code> + (PostScript font binary) or <code>.pfa</code> + (PostScript font <small><a href="#ASCII" class="acroref" name="A200" title="American Standard Code for Information Interchange">ASCII</a></small>) + outline, and an <code>.afm</code> (Adobe font + metric) file. There may also be + <code>.inf</code> and other files but these are + not needed for use with <span class="TEX">T<span class="E">E</span>X</span> systems. + </p> + </dd> + <dt><b>TrueType typefaces</b></dt> + <dd> + <p>are a single <code>.ttf</code> file, which + combines outline and metrics in one. + </p> + </dd> + </dl> + </blockquote> + <p>The instructions here assume the use of the <a name="NFSS" class="acroref">New Font Selection Scheme</a> (<small>NFSS</small>) used in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>. If you are running the obsolete <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> 2.09, + upgrade it now. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1 <a name="mffonts">Installing METAFONT fonts</a></h3> + <p>This is the simplest installation. When you download + METAFONT fonts from <small><a href="#CTAN" class="acroref" name="A202" title="Comprehensive Archive Network">CTAN</a></small>, + you'll usually find a large number of outline files + (<code>.mf</code> files) and maybe some other types + as well (see below). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 8.1</i>: <a name="mkfontdir">Creating a new subdirectory for a font</a></caption> + <div align="center" style="margin:12px"><img src="public.png" width="75%"></div> + <hr> + </div> + <ol> + <li> + <p>Create a new subdirectory named after the typeface + you're installing in + <code>texmf-local/fonts/source/public/</code>: + </p> + </li> + <li> + <p>Copy all the <code>.mf</code> + files to this directory. + </p> + </li> + <li> + <p>Copy the <code>.fd</code> (Font Definition) + file[s] and the <code>.sty</code> (style) file + to your <code>texmf/tex/latex/mfnfss</code> + directory. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + <p>That's it. Unlike <a name="t36">PostScript</a> + fonts, METAFONT fonts can be used to generate the font + metric file (<code>.tfm</code> files) automatically + on-the-fly the first time the typeface is used, so there + should be nothing else to install. + </p> + <p>Now you can put a <code class="command"><a name="c256">\usepackage</a></code> command + in your preamble with whatever name the + <code class="literal">.sty</code> file was called, and read the + documentation to see what commands it gives to use the font + (refer to <a href="#packinst">the last paragraph in section 5.2.1</a> and <a href="#dtxdoc">step 2</a>). + </p> + <p>If the font came <em>without</em><code>.fd</code> or <code>.sty</code> files, + you'll need to find someone who can make them for you + (or follow the outline in <a href="#psfonts">section 8.3.2</a>, <a href="#fdfiles">step 11</a>). + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1.1 Pre-generated metrics (optional) + </h4> + <p>Some METAFONT fonts come with pre-generated + <code>.tfm</code> files which you can install if + your system is slow at generating them itself: + </p> + <ol> + <li> + <p>Create a new subdirectory within + <code>texmf-local/fonts/tfm/public/</code> + named the same as the one you created for the + <code>.mf</code> files above. + </p> + </li> + <li> + <p>Copy all the <code>.tfm</code> files into + this subdirectory. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1.2 Pre-generated bitmaps (optional) + </h4> + <p>In some rare cases, pre-generated packed bitmap fonts + (<code>.pk</code> files) are also available from + <small><a href="#CTAN" class="acroref" name="A203" title="Comprehensive Archive Network">CTAN</a></small> (normally your previewer + and print driver creates these automatically, but you can + use the pre-generated ones if you have a very slow + system). If you really want to install these, it's a + similar procedure to the <code>.tfm</code> + files: + </p> + <ol> + <li> + <p>Create a new subdirectory within + <code>texmf-local/fonts/pk/modeless/</code> + named the same as the one you created for the + <code>.mf</code> and <code>.tfm</code> + files above. + </p> + </li> + <li> + <p>Copy all the <code>.nnnpk</code> files + into this subdirectory (<i>nnn</i> is + a number reflecting the dot-density of the bitmap). On + Microsoft systems the files may just end in + <code>.pk</code> and be kept in subdirectories + named after the dot-density, e.g. + <code>dpi360</code>. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + </div> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.2 <a name="psfonts">Installing PostScript fonts</a></h3><a name="I156"></a><p>Lots of people will tell you that + <a name="t37">PostScript</a> fonts and PostScript + output are dead and that TrueType or OpenType fonts and PDF + output are the way to go. While this is true for many cases, + standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does not work with TrueType fonts and does + not produce <small><a href="#PDF" class="acroref" name="A204" title="Portable Document Format">PDF</a></small> directly. Only + <i><a name="p204">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> does that, and there are + still many printers whose typesetters and platemakers use + <a name="t38">PostScript</a> rather than <small><a href="#PDF" class="acroref" name="A205" title="Portable Document Format">PDF</a></small>. In addition, operating system + support for scalable fonts is still very poor on Unix + systems (including Linux), despite the advances in recent + years, so in many cases it still makes sense to use + <span class="TEX">T<span class="E">E</span>X</span>'s built-in support for PostScript. + </p> + <p>Two files are needed for each font: the + <code>.afm</code><a name="AFM" class="acroref">Adobe Font + Metric</a> (<small>AFM</small>) and the <code>.pfb</code><a name="PFB" class="acroref">PostScript Font Binary</a> (<small>PFB</small>) files. + <em>You must have both for each font before you + start.</em> If you only have the near-obsolete + <code>.pfa</code><a name="PFA" class="acroref">PostScript Font + ASCII</a> (<small>PFA</small>) files, it may be possible to generate the + <code>.pfb</code> files using the + <i><a name="p205">t1binary</a></i> program from the + <i><a name="p206">t1utils</a></i> suite (see <a href="http://gnuwin32.sourceforge.net/packages/t1utils.htm"><tt>http://gnuwin32.sourceforge.net/packages/t1utils.htm</tt></a>) + or the excellent <i><a name="p207">PFAedit</a></i> font + editor (from <a href="http://pfaedit.sourceforge.net"><tt>http://pfaedit.sourceforge.net</tt></a>). There are + unfortunately still some companies distributing Type 1 + fonts in <code>.pfa</code> format (Mathematica is + one reported recently). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">The installation method I described in earlier + editions has worked perfectly for me for years, but I have + updated it here to use the facilities of the + <i><a name="p208">updmap</a></i> program (which comes + with your <span class="TEX">T<span class="E">E</span>X</span> installation). This removes the need for + one of the steps I gave before, which required editing the + <code>psfonts.map</code> file, as this is now + recreated by <i><a name="p209">updmap</a></i>. The + procedure below is <em>not</em> the official + way (that's <i><a name="p210">fontinst</a></i>), but + it is the basis for a script I am working on called + <i><a name="p211">Gutta-Percha</a></i><sup><a href="#F46">4</a></sup>, which automates the whole process. + </p> + </blockquote> + <p>I'll repeat this: before you start, make sure you + have all the <code>.afm</code> and + <code>.pfb</code> files for the typeface you want. + In the example below, I'm going to use a single font + from an imaginary typeface called Foo, so I have + <code class="literal">foo.afm</code> and + <code class="literal">foo.pfb</code> files. + </p> + <ol> + <li><b>Put the files in your temporary directory</b><br><p>This is <code>/tmp</code> on Linux, and + should be <code>C:\tmp</code> or + <code>C:\temp</code> or even + <code>C:\Windows\temp</code> on Microsoft + Windows. + </p> + </li> + <li><b>Decide on the short font name to use + inside <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>.</b><br><p>This is <em>not</em> the full + descriptive name (e.g. Baskerville Italic Bold + Extended) but an encoded font name in the format + <code class="literal">fnnsseec</code>, devised by <a name="N18">Karl Berry</a>, which stores the same information in no + more than eight characters for compatibility with + systems which cannot handle long filenames. The letters + in the format above have the following meanings (see the + <i><a name="p212">fontname</a></i> documentation on + your computer for more details): + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Letter</th> + <th valign="bottom" align="left">Meaning</th> + <th valign="bottom" align="left">Examples</th> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">f</code></td> + <td valign="top" align="left">foundry</td> + <td valign="top" align="left"><code class="literal">b</code>=Bitstream, + <code class="literal">m</code>=Monotype, + <code class="literal">p</code>=Adobe + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">nn</code></td> + <td valign="top" align="left">typeface</td> + <td valign="top" align="left"><code class="literal">ba</code>=Baskerville, + <code class="literal">tm</code>=Times, + <code class="literal">pl</code>=Palatino + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ss</code></td> + <td valign="top" align="left">series/shape</td> + <td valign="top" align="left"><code class="literal">r</code>=roman, + <code class="literal">bi</code>=bold italic, etc. + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ee</code></td> + <td valign="top" align="left">encoding</td> + <td valign="top" align="left"><code class="literal">8a</code>=default 8-bit ANSI, + <code class="literal">ly</code>=Y&Y's + <span class="TEX">T<span class="E">E</span>X</span>'n'ANSI + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-weight:bold; "><code class="literal">c</code></span></td> + <td valign="top" align="left">[small]caps</td> + <td valign="top" align="left">(this is a literal + ‘c’ character, used only + if needed) + </td> + </tr> + </table> + </div> + <p>The <code>texmf/fontname</code> directory in + your installation of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has files for several + foundries giving fully-formed names like these for + common fonts (e.g. <code class="literal">ptmr8a</code> is [Adobe] + <u><b>P</b></u>ost­Script + <u><b>T</b></u>i<u><b>m</b></u>es + <u><b>R</b></u>oman in an + <u><b>8</b></u>–bit <u><b>A</b></u>NSI + encoding; + <code class="literal">bgslly</code> is <u><b>B</b></u>itstream + <u><b>G</b></u>ill <u><b>S</b></u>ans + <u><b>L</b></u>ight in Y&Y's + <span class="TEX">T<span class="E">E</span>X</span>'n'ANSI encoding + [<u><b>LY</b></u>1]).<sup><a href="#F47">5</a></sup> Read the documentation in <cite><a href="http://www.ctan.org/tex-archive/info/fontname/" name="C40">Fontname: Filenames for <span class="TEX">T<span class="E">E</span>X</span> fonts</a></cite> to find out how to make up + your own short names if the foundry and font you want is + not shown in the <code>fontname</code> + directory. + </p> + <p>In this example we'll call our mythical example + typeface ‘zork’ (standing for + <u><b>Z</b></u>fonts <u><b>Or</b></u>dinary + Boo<u><b>k</b></u>face, because + <code>k</code> is the letter used for Book + fonts, <code>b</code> being already the code + for bold) and we'll assume the font comes in the two + files <code>foo.afm</code> and + <code>foo.pfb</code> that I mentioned + above. + </p> + <p>While the <i><a name="p213">fontname</a></i> + directories have ready-made lists of these names for + popular collections of typefaces, making them up + requires some knowledge of typographic terms and a + careful reading of the + <i><a name="p214">fontname</a></i> + documentation. + </p> + </li> + <li><b>Decide on your encoding</b><br><p>This is what tripped me up the first few times until + someone pointed me at Y&Y's<sup><a href="#F48">6</a></sup><span class="TEX">T<span class="E">E</span>X</span>'n'ANSI encoding which (to me) seems to + be the only one that includes the glyphs I want where I + want them.<sup><a href="#F49">7</a></sup><a name="I157"></a> Your mileage may vary. This encoding is + referred to as <code class="literal">LY1</code> within <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and + the encoding file is in + <code>texmf/dvips/base/texnansi.enc</code>. + Encoding is needed because Adobe fonts store their + characters in different places to the <span class="TEX">T<span class="E">E</span>X</span> + standard. + </p> + <p>Copy this encoding file to the temporary directory + where you're doing all this stuff. If you're + using the 8a or 8r encoding (or some other encoding), + then copy that file instead + (<code>8a.enc</code>, + <code>8r.enc</code>). + </p> + </li> + <li><b><a name="idfile">Convert <code>.afm</code> files to + <code>.tfm</code></a></b><br><p>The <i><a name="p215">afm2tfm</a></i> program is a + standard utility in the <code>bin</code> + directory of your <span class="TEX">T<span class="E">E</span>X</span> installation. If it's not, + update your installation. + </p> + <p>In a command window, type:</p> + <blockquote><pre class="footnotesize"> +afm2tfm foo.afm -v zorkly.vpl -p texnansi.enc \ +rzorkly.tfm >zork.id + </pre></blockquote> + <p>(Here and elsewhere I have sometimes had to break + the line to fit it on the printed page. It's actually + all typed as one long line if you omit the + backslash.) + </p> + <p>This creates a special ‘raw’<span class="TEX">T<span class="E">E</span>X</span> Font Metric file (hence the special + <code class="literal">r</code> prefix) that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use, with + a list of all its properties encoded with LY1 (the + <code>.vpl</code> or Virtual Property List + file). Many people will tell you that virtual fonts are + dead and that this is the wrong way to do it, but no-one + has ever shown me an alternative that works, so I stick + with it. + </p> + </li> + <li><b><a name="sc">Small caps (optional)</a></b><br><p>If you want a small caps variant faked up (perhaps + because the typeface family doesn't have a special + small-caps font), repeat the medicine like this: + </p> + <blockquote><pre class="footnotesize"> +afm2tfm foo.afm -V zorklyc.vpl -p texnansi.enc \ +rzorkly.tfm >>zork.id + </pre></blockquote> + <p>Note the capital <code class="literal">V</code> option here. + Yes, it <em>does</em> overwrite the + <code>rzorkly.tfm</code> created in the first + command. Let it. And those are <em>two</em> + of the ‘greater-than’ signs + before the <code>zork.id</code> filename because + we want to append to it, not overwrite it. + </p> + </li> + <li><b>Create the virtual font</b><br><p>Turn the <code>.vpl</code> files into + <code>.vf</code> and <code>.tfm</code> + pairs. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses these to convert from Adobe's + encoding to its own. + </p> + <blockquote><pre> +vptovf zorkly.vpl zorkly.vf zorkly.tfm +vptovf zorklyc.vpl zorklyc.vf zorklyc.tfm + </pre></blockquote> + <p>Again, the <code>vptovf</code> program is a + standard part of your <span class="TEX">T<span class="E">E</span>X</span> distribution. + </p> + </li> + <li><b>Make directories to hold the files</b><br><div class="figure" align="center"> + <hr> + <caption><i>Figure 8.1</i>: <a name="mksubdir">Making subdirectories to hold the files</a></caption> + <div align="center" style="margin:12px"><img src="fonts.png" width="75%"></div> + <hr> + </div> + <p>Under your <code>texmf-local</code> + directory there should be a <code>fonts</code> + directory, and in there there should be + <code>afm</code>, <code>tfm</code>, + <code>type1</code>, and <code>vf</code> + directories. Create them if they do not already + exist. + </p> + <p>In each of these four, create a directory for the + foundry, and within them create a directory for the + typeface (using a human-readable typeface name, not the + short <a name="N19">Karl Berry</a> fontname). In our example, this + means: + </p> + <blockquote><pre> +cd /usr/TeX/texmf-local/fonts +mkdir -p afm/zfonts/ordinary +mkdir -p tfm/zfonts/ordinary +mkdir -p type1/zfonts/ordinary +mkdir -p vf/zfonts/ordinary +cd /tmp + </pre></blockquote> + <p>Or if you're lazy like me:</p> + <blockquote><pre> +(cd /usr/TeX/texmf-local/fonts;\ +for d in afm tfm type1 vf;\ +do mkdir -p $d/zfonts/ordinary;done) + </pre></blockquote> + <p>For Microsoft Windows users, the path before + <code>texmf-local</code> may look something like + <code class="literal">C:\Program Files\TeXLive\</code>, depending + on how and where you have installed your <span class="TEX">T<span class="E">E</span>X</span> + system. + </p> + <p>The <code class="literal">-p</code> is a Unix feature: it + automatically creates any missing intervening + subdirectories. If your directory-making command + doesn't do this, you'll have to make the + intervening directories by hand first. + </p> + </li> + <li><b>Copy the files to their rightful places</b><br><p>Copy the four groups of files to the four new + directories: + </p> + <blockquote><pre> +cp *.afm /usr/TeX/texmf/fonts/afm/zfonts/ordinary/ +cp *.tfm /usr/TeX/texmf/fonts/tfm/zfonts/ordinary/ +cp *.pfb /usr/TeX/texmf/fonts/type1/zfonts/ordinary/ +cp *.vf /usr/TeX/texmf/fonts/vf/zfonts/ordinary/ + </pre></blockquote> + <p>You can of course do all this with a directory + window and mouse if you find it easier. + </p> + </li> + <li><b>Create a font map</b><br><p>The font map is what tells + <i><a name="p216">dvips</a></i> which <small><a href="#PFB" class="acroref" name="A209" title="PostScript Font Binary">PFB</a></small> file to use for which font. The + configuration file for <i><a name="p217">dvips</a></i> + is <code>texmf/dvips/config/config.ps</code> and + it gets its entries from the program + <i><a name="p218">updmap</a></i> which reads map files + for each typeface. The configuration file for + <i><a name="p219">updmap</a></i> is + <code>texmf-var/web2c/updmap.cfg</code><sup><a href="#F50">8</a></sup>, so it needs an entry for our new font, + using the three-letter font family abbreviation (the + first three letters of the Berry fontname (here + ‘<code class="literal">zor</code>’): + </p> + <blockquote><pre> +Map zor.map + </pre></blockquote> + <p>We also have to create this map file + (<code>zor.map</code>) in a subdirectory of + <code>texmf-local/dvips/config/</code> named + after the foundry, so we need to create + <code>texmf-local/dvips/config/zfonts</code> as + well. + </p> + <ol> + <li> + <p>Open + <code>/usr/TeX/texmf-var/web2c/updmap.cfg</code> + in your editor. + </p> + </li> + <li> + <p>At the bottom, add the line: + <code class="literal">Map zor.map</code></p> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>The font entries in our + <code class="literal">zor.map</code> will be on a + <em>single</em> line each, with no + line-wrapping. Each entry gives the short name of the + font, the long (Adobe) name, the + <a name="t39">PostScript</a> encoding parameters + (in quotes), and then two filenames prefixed by input + redirects (less-than signs): the encoding file and the + <a name="t40">PostScript</a> outline file. + </p> + <ol> + <li> + <p>First create the directory if it doesn't already + exist: + </p> + <blockquote><pre> +mkdir -p /usr/TeX/texmf-local/dvips/config/zfonts + </pre></blockquote> + </li> + <li> + <p>Use your editor to open (create) the file + <code>/usr/TeX/texmf-local/dvips/config/zfonts/zor.map</code>. + </p> + </li> + <li> + <p>Insert the line:</p> + <blockquote><pre class="scriptsize"> +rzorkly Ordinary-Blackface "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <foo.pfb + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>You get the full font name (here, + ‘Ordinary-Blackface’) from the + <code class="literal">zork.id</code> which was created back in + <a href="#idfile">step 4</a> when we ran + <i><a name="p220">afm2tfm</a></i>. You must get this + exactly right, because it's the + ‘official’ full name of the font, + and <a name="t41">PostScript</a> files using this + font need to match it. + </p> + </li> + <li><b>Create a style file</b><br><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> needs a style file to implement the + interface to the font. Call it after the typeface or + something related; in this example we'll call it + <code>foozork.sty</code>. In it go some details + of the name and date we did this, what version of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> it needs, and any other command necessary to + operate the font, like the font encoding and whether it + is to supersede the current default Roman font. + </p> + <ol> + <li> + <p>Use your editor to open (create) + <code>foozork.sty</code> in your + <code>texmf-local/tex/latex/psnfss</code> + directory. + </p> + </li> + <li> + <p>Insert the following lines:</p> + <blockquote><pre> +% foozork - created from foo for Zork +\def\fileversion{1.0} +\def\filedate{2002/12/03} +\def\docdate{2002/12/03} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{foozork} + [\filedate\space\fileversion\space + Zfonts Ordinary PSNFSS2e package] +\RequirePackage[LY1]{fontenc} +\renewcommand{\rmdefault}{zor} +\endinput + </pre></blockquote> + <p>Note the following:</p> + <ul> + <li> + <p>The first argument to + <code class="command"><a name="c257">\ProvidesPackage</a></code> + <em>must</em> be the same as this + style file name; and that the font family is + referred to as <code class="literal">zor</code>, being the + foundry letter plus the fontname abbreviation. + This acts as a prefix for any/all font variants + (bold, italic, etc.). + </p> + </li> + <li> + <p>If you are not using Y&Y encoding, + omit the line referring to LY1 font + encoding. + </p> + </li> + <li> + <p>If this is a typewriter font, make the + renewed command <code class="command"><a name="c258">\rmdefault</a></code> + into <code class="command"><a name="c259">\ttdefault</a></code>. + </p> + </li> + <li> + <p>If it's a sans-serif font, make it + <code class="command"><a name="c260">\sfdefault</a></code> instead. + </p> + </li> + <li> + <p>Omit the command completely if you + don't want the style file to supersede the + current defaults but simply to make the font + available. If you do this, you probably want to + write a new command or two to use it, typically + one for grouped use and one for argument + use: + </p> + </li> + </ul> + <blockquote><pre class="footnotesize"> +\newcommand{\zorkfamily}{\fontencoding{LY1}% + \fontfamily{zor}\selectfont} +\newcommand{\textzork}[1]{{\zorkfamily#1}} + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + </li> + <li><b><a name="fdfiles">Create the Font Definition file</a></b><br><p>The last file to create is the <b><i><a name="fontdef">font definition</a></i></b> + (<code>.fd</code>) file. This is named + following the pattern <code class="literal">eeefnn.fd</code>, + using the same conventions as before, by prepending the + (lowercase) encoding abbreviation to the foundry letter + and fontname abbreviation, so our example would be + <code class="literal">ly1zor.fd</code> for the LY1 encoding and + the <code class="literal">zor</code> short font name. + </p> + <ol> + <li> + <p>Use your editor to open (create) + <code>texmf-local/tex/latex/psnfss/ly1zor.fd</code></p> + </li> + <li> + <p>Enter the following lines:</p> + <blockquote><pre> +\ProvidesFile{ly1zor.fd}[2002/03/03 v0.1 manual + font definitions for LY1/zor.] + +\DeclareFontFamily{LY1}{zor}{} + +\DeclareFontShape{LY1}{zor}{k}{n}{<-> zorkly}{} +\DeclareFontShape{LY1}{zor}{k}{sc}{<-> zorklyc}{} + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>FD files typically use one + <code class="command"><a name="c261">\DeclareFontFamily</a></code> command which + specifies the encoding and the short font name. Then as + many pairs of <code class="command"><a name="c262">\DeclareFontShape</a></code> + commands as you converted fonts (assuming you did both + normal and small caps for each font: see + <a href="#sc">step 5</a>; if you didn't, then only one + such command per font is needed here). The arguments to + the <code class="command"><a name="c263">\DeclareFontShape</a></code> command to watch + are the 3rd (weight/width), 4th (shape), and 5th (font + outline name): the rest are static for each + <code>.fd</code> file and simply identify the + encoding and the font family. + </p> + <p>The codes to use are given on + pages 414–15 of the <cite><a href="#companion" name="C41">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> and should also be in + your copies of + <code>texmf/fontnames/weight.map</code> and + <code>texmf/fontnames/width.map</code>. The + rules for combining weight and width need care: <small><a href="#RTFM" class="acroref" name="A210" title="Read The Fine Manual">RTFM</a></small> for + <span class="package"><a name="m86">fontname</a></span>. There is no + <code>shape.map</code> in + <span class="package"><a name="m87">fontname</a></span> because it's not + part of font file names, it's purely a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + creation, so here's what the same book says: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Character</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">n</code></td> + <td valign="top" align="left">normal (upright)</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">it</code></td> + <td valign="top" align="left">italic</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">sl</code></td> + <td valign="top" align="left">slanted</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">sc</code></td> + <td valign="top" align="left">small caps</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ui</code></td> + <td valign="top" align="left">upright italic</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ol</code></td> + <td valign="top" align="left">outline</td> + </tr> + </table> + </div> + <p>Add your own for other oddities, but be consistent: + I use <code class="literal">cu</code> for cursive (scripts), for + example, and <code class="literal">k</code> for blackletter faces + (not to be confused with <code class="literal">k</code> as a + <em>width</em> for + ‘book’). + </p> + <p>The default fontspec + <code class="literal"><-></code> in the 5th argument + in the <code class="command"><a name="c264">\DeclareFontShape</a></code> command means + that all sizes are to come from the same font outline + (remember if this was a METAFONT font with different + design sizes like <small><a href="#CM" class="acroref" name="A211" title="Computer Modern">CM</a></small> it would + be much more complex). + </p> + <p>If the face has only a few variants, you can create + any other entries for bold, italic, slanted, etc. with + the relevant weight and width and shape values pointing + at the relevant outline file. + </p> + <p>If you want one font to substitute for a missing one + (for example italics to substitute for slanted in a + typeface which has no slanted variant of its own) give + the + <code class="literal">ssub</code> (‘silent + substitution’) command in the fontspec: + for example to make all references to + <code class="literal">sl</code> (slanted) type use an existing + italic font, make the 5th argument like this: + </p> + <blockquote><pre> +{<-> ssub * zor/m/it} + </pre></blockquote> + <p>If you find the x-height of a font too big or too + small to sort well with another font you are using, you + can specify an <code class="literal">s</code> + (‘scale’) factor in this argument + instead: this example will shrink the result to + 80% of normal: + </p> + <blockquote><pre> +{<-> s * [0.8] zorkly} + </pre></blockquote> + </li> + <li><b>Update the index and the map files</b><br><p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="#texindex">step 4 in the procedure in section 5.2.2</a>) so that + <i><a name="p221">updmap</a></i> can find the files it + needs. + </p> + <p>Then run <i><a name="p222">updmap</a></i> (just + type <code>updmap</code>). This updates the + maps and runs the <span class="TEX">T<span class="E">E</span>X</span> indexer program again + automatically. + </p> + </li> + </ol> + <p>Now you can <code class="literal">\usepackage{foozork}</code> in + your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file to make it the default font. To use the + font incidentally instead of as the default, you can + say: + </p> + <blockquote><pre> +This is {\zorkfamily ZORK} or \textzork{ZORK} + </pre></blockquote> + <ol class="footnotes" start="4"> + <li><a name="F46">Yes, as in rubber.</a></li> + <li><a name="F47">Confusingly, Bitstream fonts (and others from + similar sources) mostly have different names from + the original fonts, so what they call Humanist 521 + is actually Gill Sans. Until recently, US law only + allowed the <em>names</em> of typefaces + to be copyrighted, not the font designs themselves, + leading to widespread piracy.</a></li> + <li><a name="F48">Sadly, Y&Y, Inc has ceased trading and + their <span class="TEX">T<span class="E">E</span>X</span> distribution is not longer available, + although there is email support at <a href="http://lists.ucc.ie/lists/archives/yandytex.html"><tt>http://lists.ucc.ie/lists/archives/yandytex.html</tt></a>, + and their encoding files continue to be used.</a></li> + <li><a name="F49">The only one I still have problems with is + ‘ø’, which for some weird + reason isn't catered for in this encoding.</a></li> + <li><a name="F50">There is another one of these at + <code>texmf/web2c/updmap.cfg</code>, but + that contains the map references for the fonts which + came with your distribution of <span class="TEX">T<span class="E">E</span>X</span>, so you should + not interfere with it.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.3 <a name="type1cm">Installing the Type 1 Computer Modern + fonts</a></h3> + <p>Most new distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> use the + <a name="t42">PostScript</a> Type 1 versions of + the Computer Modern fonts. If your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installation + uses the METAFONT (bitmap) versions of <small><a href="#CM" class="acroref" name="A212" title="Computer Modern">CM</a></small>, you may want to switch to the + Type 1 version, especially if you are going to be using + <i><a name="p223">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> instead of standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, because Acrobat Reader makes such a hames of + displaying Type3 fonts. <i><a name="p224">GSview</a></i> + and <i><a name="p225">pdfview</a></i> handle them + correctly. + </p> + <p>To do this, install one of the sets of <small><a href="#CM" class="acroref" name="A213" title="Computer Modern">CM</a></small> PostScript fonts. There are several + available: + </p> + <ul> + <li> + <p>The fonts from BlueSky Research at <a href="http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bluesky/"><tt>http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bluesky/</tt></a></p> + </li> + <li> + <p><a name="bkm">Basil K. Malyshev</a>'s ‘BaKoMa’ + fonts at <a href="http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/"><tt>http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/</tt></a></p> + </li> + <li> + <p><a name="vv">Vladimir Volovich</a>'s CM-Super at <a href="http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/"><tt>http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/</tt></a></p> + </li> + <li> + <p><a name="bj">Bogusław Jackowski</a>'s Latin Modern at <a href="ftp://cam.ctan.org/tex-archive/fonts/ps-type1/lm.tar.gz"><tt>ftp://cam.ctan.org/tex-archive/fonts/ps-type1/lm.tar.gz</tt></a></p> + </li> + </ul> + <p>The BaKoMa fonts include the <a name="AMS" class="acroref">American + Mathematical Society</a> (<small>AMS</small>) fonts for extended + mathematics, but are more complex to install because they + come with a special set of TFM files. + </p> + <p>The BlueSky fonts are just <small><a href="#PFB" class="acroref" name="A215" title="PostScript Font Binary">PFB</a></small> + and AFM files, and are a drop-in replacement requiring no + further changes, as they use the same TFM files as the + METAFONT version. Follow the <code>README</code> + file in the downloadable archive for installation + instructions. + </p> + <p>The Latin Modern and CM-Super fonts are new and I + haven't tested them but they are well spoken of. + Feedback on this is very welcome. + </p> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Live and <span class="TEX">T<span class="E">E</span>X</span> Collection distributions use + Type 1 versions of Computer Modern by default. There + are more details in the FAQ at <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts"><tt>http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts</tt></a> . + </p> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="macros">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">9</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Programmability (macros)</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#replacement">Simple replacement macros</a></li> + <li><a href="#macinf">Macros using information gathered previously</a></li> + <li><a href="#macargs">Macros with arguments</a></li> + <li><a href="#macnest">Nested macros</a></li> + <li><a href="#macenv">Macros and environments</a></li> + <li><a href="#reprog">Reprogramming <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I158"></a><p>We've touched several times on the ability of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + to be reprogrammed. This is one of its central features, and one + that still, after nearly a quarter of a century, puts it well + above many other typesetting systems, even those with macro + systems of their own. It's also the one that needs most + foreknowledge, which is why this chapter is in this + position. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is in fact itself just a collection of + macros — rather a big collection — written in + <span class="TEX">T<span class="E">E</span>X</span>'s internal typesetting language. These <b><i><a name="macs">macros</a></i></b> are little program-like sets of + instructions with a name which can be used as shorthand for an + operation you wish to perform more than once. + </p> + <p>Macros can be arbitrarily complex. Many of the ones used in + the standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages are several pages long, but as we + will see, even short ones can very simply automate otherwise + tedious chores and allow the author to concentrate on + <em>writing</em>. + </p> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.1 <a name="replacement">Simple replacement macros</a></h2> + <p>In its simplest form, a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> macro can just be a + straightforward text replacement of a phrase to avoid + misspelling something each time you need it, e.g. + </p> + <blockquote><pre> +\newcommand{\ef}{European Foundation for the + Improvement of Living and Working Conditions} + </pre></blockquote> + <p>Put this in your preamble, and you can then use + <code class="command"><a name="c265">\ef</a></code> in your document and it will typeset it + as the full text. Remember that after a command ending in a + letter you need to leave a space to avoid the next word + getting gobbled up as part of the command (see + <a href="#swallow">the first paragraph in section 2.4.1</a>). And when you want to force a space + to be printed, use a backslash followed by a space, + e.g. + </p> + <blockquote><pre> +The \ef\ is an institution of the Commission of the + European Union. + </pre></blockquote> + <p>As you can see from this example, the + <code class="command"><a name="c266">\newcommand</a></code> command takes two arguments: + <i>a</i>) the name you want to give the new command; and <i>b</i>) the expansion to be performed when you use it, so there are always two sets of curly braces + after <code class="command"><a name="c267">\newcommand</a></code>. + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.2 <a name="macinf">Macros using information gathered previously</a></h2> + <p>A more complex example is the macro + <code class="command"><a name="c268">\maketitle</a></code> which is used in almost every + formal document to format the title block. In the basic + document classes (book, report, and article) it performs small + variations on the layout of a centred block with the title + followed by the author followed by the date, as we saw in + <a href="#titling">section 3.3</a>. + </p> + <p>If you inspect one of these document class files, such as + <code>texmf/tex/latex/base/report.cls</code> you will + see <code class="command"><a name="c269">\maketitle</a></code> defined (and several variants + called <code class="command"><a name="c270">\@maketitle</a></code> for use in different + circumstances). It uses the values for the title, author, and + date which are assumed already to have been stored in the + internal macros <code class="command"><a name="c271">\@title</a></code>, + <code class="command"><a name="c272">\@author</a></code>, and <code class="command"><a name="c273">\@date</a></code> by + the author using the matching <code class="command"><a name="c274">\title</a></code>, + <code class="command"><a name="c275">\author</a></code>, and <code class="command"><a name="c276">\date</a></code> + commands in the document. + </p> + <p>This use of one command to store the information in + another is a common way of gathering the information from the + user. The use of macros containing the + <code class="literal">@</code> character prevents their accidental + misuse by the user: in fact to use them in your preamble we + have to allow the <code class="literal">@</code> sign to become a + ‘letter’ so it can be recognised in a + command name, and remember to turn it off again afterwards + (see <a href="#makeat">item 1</a> below). + </p> + <blockquote><pre> +\makeatletter +\renewcommand{\maketitle}{% + \begin{flushleft}% + \sffamily + {\Large\bfseries\color{red}\@title\par}% + \medskip + {\large\color{blue}\@author\par}% + \medskip + {\itshape\color{green}\@date\par}% + \bigskip\hrule\vspace*{2pc}% + \end{flushleft}% +} +\makeatother + </pre></blockquote> + <p>Insert this in the sample file on <a href="#oldtitle"></a> immediately before the + <code class="literal">\begin{document}</code> and remove the + <code class="literal">\color{...}</code> commands from the title, + author, and date. Re-run the file through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and you + should get something like this: + </p> + <div align="center" style="margin:1cm"><img src="newtitle.png" width="75%"></div> + <p>In this redefinition of <code class="command"><a name="c277">\maketitle</a></code>, + we've done the following: + </p> + <ol type="1"> + <li> + <p><a name="makeat"></a>Enclosed the changes in + <code class="command"><a name="c278">\makeatletter</a></code> and + <code class="command"><a name="c279">\makeatother</a></code> to allow us to use the + <code class="literal">@</code> sign in command names;<sup><a href="#F51">1</a></sup></p> + </li> + <li> + <p>Used <code class="command"><a name="c280">\renewcommand</a></code> and put + <code class="command"><a name="c281">\maketitle</a></code> in curly braces after + it; + </p> + </li> + <li> + <p>Opened a pair of curly braces to hold the new + definition. The closing curly brace is immediately before + the <code class="command"><a name="c282">\makeatother</a></code>; + </p> + </li> + <li> + <p>Inserted a <span class="environment"><a name="e51">flushleft</a></span> environment + so the whole title block is left-aligned; + </p> + </li> + <li> + <p>Used <code class="command"><a name="c283">\sffamily</a></code> so the whole title + block is in the defined sans-serif typeface; + </p> + </li> + <li> + <p>For each of <code class="command"><a name="c284">\@title</a></code>, + <code class="command"><a name="c285">\@author</a></code>, and <code class="command"><a name="c286">\@date</a></code>, + we have used some font variation and colour, and enclosed + each one in curly braces to restrict the changes just to + each command. The closing <code class="command"><a name="c287">\par</a></code> makes + sure that multiline title and authors and dates get + typeset with the relevant line-spacing; + </p> + </li> + <li> + <p>Added some flexible space between the lines, and + around the <code class="command"><a name="c288">\hrule</a></code> (horizontal rule) at + the end; + </p> + </li> + </ol> + <p>Note the <code class="literal">%</code> signs after any line ending + in a curly brace, to make sure no intrusive white-space find + its way into the output. These aren't needed after simple + commands where there is no curly brace because excess + white-space gets gobbled up there anyway. + </p> + <ol class="footnotes" start="1"> + <li><a name="F51">If you move all this preamble into a style file of + your own, you don't need these commands: the use + of <code class="literal">@</code> signs in command names is + allowed in style and class files.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.3 <a name="macargs">Macros with arguments</a></h2> + <p>But macros are not limited to text expansion. They can + take arguments of their own, so you can define a command to do + something with specific text you give it. This makes them much + more powerful and generic, as you can write a macro to do + something a certain way, and then use it hundreds of times + with a different value each time. + </p> + <p>We looked earlier (<a href="#emph">the text in section 8.2.5</a>) at making new + commands to put specific classes of words into certain fonts, + such as product names into italics, keywords into bold, and so + on. Here's an example for a command + <code class="command"><a name="c289">\product</a></code>, which also indexes the product + name and adds a trademark sign: + </p> + <blockquote><pre> +\newcommand{\product}[1]{% + \textit{#1}\texttrademark% + \index{#1@\textit{#1}}% +} + </pre></blockquote> + <p>If I now type <code class="literal">\tmproduct{Velcro}</code> then I + get <i><a name="p226">Velcro</a></i>™ typeset, and if + you look in the index, you'll find this page referenced + under ‘<span style="font-style:italic; ">Velcro</span>’. Let's + examine what this does: + </p> + <ol type="1"> + <li> + <p>The macro is specified as having one argument + (that's the <code class="literal">[1]</code> in the + definition). This will + be the product name you type in curly braces when you use + <code class="command"><a name="c290">\product</a></code>. Macros can have up to nine + arguments. + </p> + </li> + <li> + <p>The expansion of the macro is contained in the second + set of curly braces, spread over several lines (see <a href="#macrolines">item 5</a> for why). + </p> + </li> + <li> + <p>It prints the value of the first argument (that's + the <code class="literal">#1</code>) in italics, which is + conventional for product names, and adds the + <code class="command"><a name="c291">\texttrademark</a></code> command. + </p> + </li> + <li> + <p>Finally, it creates an index entry using the same + value (<code class="literal">#1</code>), making sure that it's + italicised in the index (see <a href="#indextypo">the item ‘Font changes’ in section 7.5</a> to remind yourself of how indexing + something in a different font works). + </p> + </li> + <li> + <p><a name="macrolines"></a>Typing this macro over several lines makes it easier + for humans to read. I could just as easily have + typed + </p> + <blockquote><pre class="footnotesize"> +\newcommand{\product}[1]{\textit{#1}\index{#1@\textit{#1}}} + </pre></blockquote> + <p><a name="macrolines"></a>but it wouldn't have been as clear what I was + doing. + </p> + <p><a name="macrolines"></a>One thing to notice is that to prevent unwanted spaces + creeping into the output when <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reads the macro, I + ended each line with a comment character + (<code>%</code>). <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> normally treats + newlines as spaces when formatting (remember <a href="#comment">the first paragraph in section 2.5.1</a>), so this stops the end of line + being turned into an unwanted space when the macro is + used. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> always ignores spaces at the + <em>start</em> of macro lines anyway, so + indenting lines for readability is fine. + </p> + </li> + </ol> + <p>In <a href="#hyph" title="sect2"></a> we mentioned the problem + of frequent use of unbreakable text leading to poor + justification or to hyphenation problems. A solution is to + make a macro which puts the argument into an + <code class="command"><a name="c292">\mbox</a></code> with the appropriate font change, but + precedes it all with a conditional + <code class="command"><a name="c293">\linebreak</a></code> which will make it more + attractive to <span class="TEX">T<span class="E">E</span>X</span> to start a new line. + </p> + <blockquote><pre> +\newcommand{\var}[1]{\linebreak[3]\mbox{\ttfamily#1}} + </pre></blockquote> + <p>This only works effectively if you have a reasonably wide + setting and paragraphs long enough for the differences in + spacing elsewhere to get hidden. If you have to do this in + narrow journal columns, you may have to adjust wording and + spacing by hand occasionally. + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.4 <a name="macnest">Nested macros</a></h2> + <p>Here's a slightly more complex example, where one + macro calls another. It's common in normal text to refer + to people by their forename and surname (in that order), for + example <a name="N23">Don Knuth</a>, but to have them indexed as <em>surname, + forename</em>. This pair of macros, + <code class="command"><a name="c294">\person</a></code> and <code class="command"><a name="c295">\reindex</a></code>, + automates that process to minimize typing and indexing. + </p> + <blockquote><pre> +\newcommand{\person}[1]{#1\reindex #1\sentinel} +\def\reindex #1 #2\sentinel{\index{#2, #1}} + </pre></blockquote> + <ol type="1"> + <li> + <p>The digit 1 in square brackets means that + <code class="command"><a name="c296">\person</a></code> has one argument, so you put the + whole name in a single set of curly braces, e.g. + <code class="literal">\person{Don Knuth}</code>. + </p> + </li> + <li> + <p>The first thing the macro does is output + <code class="literal">#1</code>, which is the value of what you typed, + just as it stands, so the whole name gets typeset exactly + as you typed it. + </p> + </li> + <li> + <p>But then it uses a special feature of Plain <span class="TEX">T<span class="E">E</span>X</span> + macros (which use <code class="command"><a name="c297">\def</a></code> instead of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s <code class="command"><a name="c298">\newcommand</a></code><sup><a href="#F52">2</a></sup>): they too can have multiple arguments but you + can separate them with other characters (here a space) to + form a pattern which <span class="TEX">T<span class="E">E</span>X</span> will recognise when reading the + arguments. + </p> + <p>In this example (<code class="command"><a name="c301">\reindex</a></code>) it's + expecting to see a string of characters + (<code class="literal">#1</code>) followed by a space, followed by + another string of characters (<code class="literal">#2</code>) + followed by a dummy command (<code class="command"><a name="c302">\sentinel</a></code>). + In effect this makes it a device for splitting a name into + two halves on the space between them, so the two halves + can be handled separately. The <code class="command"><a name="c303">\reindex</a></code> + command can now read the two halves of the name + separately. + </p> + </li> + <li> + <p>The <code class="command"><a name="c304">\person</a></code> command invokes + <code class="command"><a name="c305">\reindex</a></code> and follows it with the name + you typed plus the dummy command + <code class="command"><a name="c306">\sentinel</a></code> (which is just there to signal + the end of the name). Because <code class="command"><a name="c307">\reindex</a></code> + is expecting two arguments separated by a space and + terminated by a <code class="command"><a name="c308">\sentinel</a></code>, it sees + ‘<code class="literal">Don</code> and + <code class="literal">Knuth</code>’ as two separate + arguments. + </p> + <p>It can therefore output them using + <code class="command"><a name="c309">\index</a></code> in reverse order, which is + exactly what we want. + </p> + </li> + </ol> + <p>A book or report with a large number of personal names to + print and index could make significant use of this to allow + them to be typed as + <code class="literal">\person{Leslie Lamport}</code> and printed as + <a name="ll">Leslie Lamport</a>, but have them indexed as + ‘Lamport, Leslie’ with virtually no effort + on the author's part at all. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 20</i>. Other names + </h4> + <p>Try to work out how to make this + <code class="command"><a name="c310">\person</a></code> feature work with names + like: + </p> + <dl> + <dd>Blanca Maria Bartosova de Paul</dd> + <dd>Patricia Maria Soria de Miguel</dd> + <dd>Arnaud de la Villèsbrunne</dd> + <dd>Prince</dd> + <dd>Pope John Paul II</dd> + </dl> + <p>Hints: the command <code class="command"><a name="c311">\space</a></code> produces a + normal space, and one way around <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s requirements + on spaces after command names ending with a letter is to + follow such commands with an empty set of curly braces + <code class="literal">{}</code>. + </p> + <hr> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F52">Don't try this at home alone, children! This + one is safe enough, but you should strictly avoid + <code class="command"><a name="c299">\def</a></code> for a couple of years. Stick to + <code class="command"><a name="c300">\newcommand</a></code> for now.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.5 <a name="macenv">Macros and environments</a></h2> + <p>As mentioned in <a href="#fancybox">section 6.7.3</a>, it is possible + to define macros to capture text in an environment and reuse + it afterwards. This avoids any features of the subsequent use + affecting the formatting of the text. + </p> + <p>One example of this uses the facilities of the + <span class="package"><a name="m88">fancybox</a></span> package, which defines a + variety of framed boxes to highlight your text, and a special + environment <span class="environment"><a name="e52">Sbox</a></span> which + ‘captures’ your text for use in these + boxes. + </p> + <blockquote class="example"><pre> +\begin{Sbox} +\begin{minipage}{3in} +This text is formatted to the specifications +of the minipage environment in which it +occurs. + +Having been typeset, it is held in the Sbox +until it is needed, which is after the end +of the minipage, where you can (for example) +align it and put it in a special framed box. +\end{minipage} +\end{Sbox} +\begin{flushright} +\shadowbox{\theSbox} +\end{flushright} + </pre><div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <p>This text is formatted to the specifications of the + minipage environment in which it occurs. + </p> + <p>Having been typeset, it is held in the Sbox until it + is needed, which is after the end of the minipage, where + you can (for example) centre it and put it in a special + framed box. + </p> + </td> + </tr> + </table> + </div> + </blockquote> + <p>By putting the text (here in a + <span class="environment"><a name="e53">minipage</a></span> environment because we want to + change the width) inside the <span class="environment"><a name="e54">Sbox</a></span> + environment, it is typeset into memory and stored in the macro + <code class="command"><a name="c312">\theSbox</a></code>. It can then be used afterwards as + the argument of the <code class="command"><a name="c313">\shadowbox</a></code> command (and + in this example it has also been centred). + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.6 <a name="reprog">Reprogramming <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals</a></h2> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal macros can also be reprogrammed or + even rewritten entirely, although doing this can require a + considerable degree of expertise. Simple changes, however, are + easily done. + </p> + <p>Recall that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s default document structure for + the Report document class uses Chapters as the main unit of + text, whereas in reality most reports are divided into + Sections, not Chapters (<a href="#repchap">footnote 24 in section 3.5</a>). The result + of this is that if you start off your report with + <code class="literal">\section{Introduction}</code>, it will print + as + </p> + <p><span style="font-size:big; font-weight:bold; ">0.1 Introduction</span></p> + <p>which is not at all what you want. The zero is + caused by it not being part of any chapter. But this numbering + is controlled by macros, and you can redefine them. In this + case it's a macro called <code class="literal">\thesection</code> + which reproduces the current section number counter (see <a href="#thecounter">the last paragraph in section 6.2.6</a>). It's redefined afresh in each + document class file, using the command + <code class="command"><a name="c314">\renewcommand</a></code> (in this case in + <code>texmf/tex/latex/base/report.cls</code>): + </p> + <blockquote><pre> +\renewcommand \thesection + {\thechapter.\@arabic\c@section} + </pre></blockquote> + <p>You can see it invokes <code class="command"><a name="c315">\thechapter</a></code> + (which is defined elsewhere to reproduce the value of the + <tt><i><a name="l36">chapter</a></i></tt> counter), and it + then prints a dot, followed by the Arabic value of the counter + called <tt><i><a name="l37">section</a></i></tt> (that + <code class="literal">\c@</code> notation is <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal way + of referring to counters). You can redefine this in your + preamble to simply leave out the reference to chapters: + </p> + <blockquote><pre> +\renewcommand{\thesection}{\arabic{section}} + </pre></blockquote> + <p>I've used the more formal method of enclosing the + command being redefined in curly braces. For largely + irrelevant historical reasons these braces are often omitted + in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal code (as you may have noticed in + the example earlier). And I've also used the + ‘public’ macro + <code class="command"><a name="c316">\arabic</a></code> to output the value of <tt><i><a name="l38">section</a></i></tt> (<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals + use a ‘private’ set of control + sequences containing <code class="literal">@</code>-signs, designed to + protect + them against being changed accidentally). + </p> + <p>Now the introduction to your report will start + with: + </p> + <p><span style="font-size:big; font-weight:bold; ">1 Introduction</span></p> + <p>What's important is that you <em>don't + ever</em> need to alter the original document class + file <code>report.cls</code>: you just copy the + command you need to change into your own document preamble, + and modify that instead. It will then override the + default. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.6.1 <a name="bullets">Changing list item bullets</a></h3> + <p>As mentioned <a href="#labelitem" title="itemizedlist">earlier</a>, + here's how to redefine a bullet for an itemized list, + with a slight tweak: + </p> + <blockquote><pre> +\usepackage{bbding} +\renewcommand{\labelitemi}{% + \raisebox{-.25ex}{\PencilRight}} + </pre></blockquote> + <p>Here we use the <span class="package"><a name="m89">bbding</a></span> package + which has a large selection of + ‘dingbats’ or little icons, and we + make the label for top-level itemized lists print a + right-pointing pencil (the names for the icons are in the + package documentation: see <a href="#packagedoc">section 5.1.2</a> for + how to get it). + </p> + <p>In this case, we are using the + <code class="command"><a name="c317">\raisebox</a></code> command within the redefinition + because it turns out that the symbols in this font are + positioned slightly too high for the typeface we're + using. The <code class="command"><a name="c318">\raisebox</a></code> command takes two + arguments: the first is a dimension, how much to raise the + object by (and a negative value means + ‘lower’: there is no need for a + <code class="literal">\lowerbox</code> command); and the second is + the text you want to affect. Here, we are shifting the + symbol down by ¼ex (see <a href="#dimensions">section 2.8.1</a> + for a + list of dimensions <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use). + </p> + <p>There is a vast number of symbols available: see + <cite><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/" name="C42">A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></a></cite> for a + comprehensive list. + </p> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="compat">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">10</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Compatibility with other systems</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#tolatex">Converting into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li><a href="#latexto">Converting out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>As we saw in <a href="#plaintext">Chapter 2</a>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses + plain-text files, so they can be read and written by any + standard application that can open text files. This helps + preserve your information over time, as the plain-text format + cannot be obsoleted or hijacked by any manufacturer or sectoral + interest, and it will always be readable on any computer, from + your handheld (yes, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is available for some <small><a href="#PDA" class="acroref" name="A216" title="Personal Digital Assistant">PDA</a></small>s, see <a href="#zaurus">Figure 10.1</a>) to the + biggest supercomputer. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.1</i>: <a name="zaurus"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> editing and processing on the Sharp Zaurus 5500 + PDA</a></caption> + <div align="center" style="margin:12px"><img src="zedit.png" width="30%"> <img src="zlatex.png" width="30%"> <img src="qpdf.png" width="30%"></div> + <hr> + </div> + <p>However, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is intended as the last stage of the + editorial process: formatting for print or display. If you have + a requirement to re-use the text in some other + environment — a database perhaps, or on the Web or a + <small>CD-ROM</small> or <small><a href="#DVD" class="acroref" name="A218" title="Digital Versatile Disk">DVD</a></small>, or in Braille or voice output — then + it should probably be edited, stored, and maintained in + something neutral like the <a name="XML" class="acroref" href="http://www.ucc.ie/xml/">Extensible Markup + Language</a> (<small>XML</small>), and only converted to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> when a + typeset copy is needed. + </p> + <p>Although <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has many structured-document features in + common with <small><a href="#SGML" class="acroref" name="A220" title="Standard Generalized Markup Language">SGML</a></small> and <small><a href="#XML" class="acroref" name="A221" title="Extensible Markup Language">XML</a></small>, it can still only be processed by the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and <i><a name="p227">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> programs. + Because its macro features make it almost infinitely + redefinable, processing it requires a program which can unravel + arbitrarily complex macros, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and its siblings are + the only programs which can do that effectively. Like other + typesetters and formatters (Quark + <i><a name="p228">XPress</a></i>, + <i><a name="p229">PageMaker</a></i>, + <i><a name="p230">FrameMaker</a></i>, Microsoft + <i><a name="p231">Publisher</a></i>, <i><a name="p232">3B2</a></i> etc.), <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is largely a + one-way street leading to typeset printing or display + formatting. + </p> + <p>Converting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to some other format therefore means you + will unavoidably lose some formatting, as <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has features + that others systems simply don't possess, so they cannot be + translated — although there are several ways to minimise + this loss. Similarly, converting other formats into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + often means editing back the stuff the other formats omit + because they only store appearances, not structure. + </p> + <p>However, there are at least two excellent systems for + converting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> directly to <a name="HTML" class="acroref">HyperText + Markup Language</a> (<small>HTML</small>) so you can publish it on the web, as + we shall see in <a href="#latexto">section 10.2</a>. + </p> + <div class="sect1"> + <h2><a href="#compat"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.1 <a name="tolatex">Converting into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h2> + <p>There are several systems which will save their text in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> format. The best known is probably the <span class="LYX">L<span class="Y">Y</span>X</span> editor + (see <a href="#lyxwin">Figure 2.1</a>), which is a wordprocessor-like + interface to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for Windows and Unix. Both the + <i><a name="p233">AbiWord</a></i> and + <i><a name="p234">Kword</a></i> wordprocessors on Linux + systems have a very good <b>Save + As</b>...<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> output, so they can be used to + open Microsoft <i><a name="p235">Word</a></i> documents and + convert to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Several maths packages like the + <i><a name="p236">EuroMath</a></i> editor, and the + <i><a name="p237">Mathematica</a></i> and + <i><a name="p238">Maple</a></i> analysis packages, can also + save material in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> format. + </p> + <p>In general, most other wordprocessors and DTP systems + either don't have the level of internal markup + sophistication needed to create a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file, or they lack + a suitable filter to enable them to output what they do have. + Often they are incapable of outputting any kind of structured + document, because they only store what the text looks like, + not why it's there or what role it fulfills. There are + two ways out of this: + </p> + <ul> + <li> + <p>Use the <span class="guimenu">File</span>→<span class="guimenuitem">Save + As...</span> menu item to save the + wordprocessor file as <small><a href="#HTML" class="acroref" name="A223" title="HyperText Markup Language">HTML</a></small>, + rationalise the <small><a href="#HTML" class="acroref" name="A224" title="HyperText Markup Language">HTML</a></small> using + <a name="raggett">Dave Raggett</a>'s <a href="http://tidy.sourceforge.net/"><i><a name="p239">HTML + Tidy</a></i></a>, and convert the resulting + <a name="XHTML" class="acroref">Extensible HyperText Markup + Language</a> (<small>XHTML</small>) to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with any of the standard + <small><a href="#XML" class="acroref" name="A226" title="Extensible Markup Language">XML</a></small> tools (see below). + </p> + </li> + <li> + <p>Use a specialist conversion tool like EBT's + <i><a name="p240">DynaTag</a></i> (supposedly available + from Enigma, if you can persuade them they have a copy to + sell you; or you may still be able to get it from <a href="http://www.rbii.com/">Red Bridge + Interactive</a> in Providence, RI). It's + expensive and they don't advertise it, but for bulk + conversion of consistently-marked + <i><a name="p241">Word</a></i> files into XML it beats + everything else hands down. The + <i><a name="p242">Word</a></i> files + <em>must</em> be consistent, though, and must + use named styles from a stylesheet, otherwise no system on + earth is going to be able to guess what it means. + </p> + </li> + </ul> + <p>There is of course a third way, suitable for large volumes + only: send it off to the Pacific Rim to be retyped into XML or + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. There are hundreds of companies from India to + Polynesia who do this at high speed and low cost with very + high accuracy. It sounds crazy when the document is already in + electronic form, but it's a good example of the problem + of low quality of wordprocessor markup that this solution + exists at all. + </p> + <p>You will have noticed that most of the solutions lead to + one place: <small><a href="#SGML" class="acroref" name="A227" title="Standard Generalized Markup Language">SGML</a></small><sup><a href="#F53">1</a></sup> or <small><a href="#XML" class="acroref" name="A231" title="Extensible Markup Language">XML</a></small>. As explained + above and elsewhere, these formats are the only ones devised + so far capable of storing sufficient information in + machine-processable, publicly-accessible form to enable your + document to be recreated in multiple output formats. Once + your document is in <small><a href="#XML" class="acroref" name="A232" title="Extensible Markup Language">XML</a></small>, there is a + large range of software available to turn it into other + formats, including <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Processors in any of the common + <small><a href="#SGML" class="acroref" name="A233" title="Standard Generalized Markup Language">SGML</a></small>/<small><a href="#XML" class="acroref" name="A234" title="Extensible Markup Language">XML</a></small> + processing languages like the <a name="DSSSL" class="acroref">Document + Style Semantics and Specification Language</a> (<small>DSSSL</small>), the + <a name="XSLT" class="acroref">Extensible Stylesheet Language + [Transformations]</a> (<small>XSLT</small>), + <i><a name="p243">Omnimark</a></i>, + <i><a name="p244">Metamorphosis</a></i>, + <i><a name="p245">Balise</a></i>, etc. can easily be written + to output <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and this approach is extremely + common. + </p> + <p>Much of this will be simplified when wordprocessors + support native, arbitrary <small><a href="#XML" class="acroref" name="A237" title="Extensible Markup Language">XML</a></small>/<small><a href="#XSLT" class="acroref" name="A238" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> as a + standard feature, because <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> output will become much + simpler to produce. + </p> + <ul> + <li> + <p>Sun's <i><a name="p246">Star Office</a></i> and + its Open Source sister, + <i><a name="p247">OpenOffice</a></i>, have used XML as + their native file format for several years, and there is a + project at the <a name="OASIS" class="acroref">Organisation for the + Advancement of Structured Information Systems</a> (<small>OASIS</small>) + for developing a common <small><a href="#XML" class="acroref" name="A240" title="Extensible Markup Language">XML</a></small> + office file format based on those used by these two + packages, which has been proposed to the <a name="ISO" class="acroref">International Organization for + Standardization</a> (<small>ISO</small>) in Geneva as a candidate for + an International Standard. + </p> + </li> + <li> + <p><i><a name="p248">WordPerfect</a></i> has also had a + native <small><a href="#SGML" class="acroref" name="A242" title="Standard Generalized Markup Language">SGML</a></small> (and now <small><a href="#XML" class="acroref" name="A243" title="Extensible Markup Language">XML</a></small>) editor for many years, which will + work with any <a name="DTD" class="acroref">Document Type + Definition</a> (<small>DTD</small>) (but not a Schema; and at the time + of writing (2005) it still used a proprietary stylesheet + format). + </p> + </li> + <li> + <p>Microsoft has had a half-hearted ‘Save + As...XML’ for a while, using an + internal and formerly largely undocumented Schema + (recently published at last). The + ‘Professional’ versions of + <i><a name="p249">Word</a></i> and + <i><a name="p250">Excel</a></i> in + <i><a name="p251">Office 11</a></i> (Office 2003 for + XP) now have full support for arbitrary Schemas and a real + <small><a href="#XML" class="acroref" name="A245" title="Extensible Markup Language">XML</a></small> editor, albeit with a rather + primitive interface, but there is no conversion to or from + <i><a name="p252">Word</a></i>'s + <code>.doc</code> format.<sup><a href="#F54">2</a></sup></p> + <p>However, help comes in the shape of <a name="rd">Ruggero Dambra</a>'s + <i><a name="p256">WordML2<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, which is an + <small><a href="#XSLT" class="acroref" name="A250" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> stylesheet to transform an + <small><a href="#XML" class="acroref" name="A251" title="Extensible Markup Language">XML</a></small> document in this internal + Schema (WordML) into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> format. + Download it from any <small><a href="#CTAN" class="acroref" name="A252" title="Comprehensive Archive Network">CTAN</a></small> server + in <code>/support/WordML2LaTeX</code>. + </p> + </li> + <li> + <p><a name="rtf2latex2e"></a>Among the conversion programs on <small><a href="#CTAN" class="acroref" name="A253" title="Comprehensive Archive Network">CTAN</a></small> is <a name="us">Ujwal Sath­yam</a>'s + <i><a name="p257">rtf2latex2e</a></i>, which converts + <a name="RTF" class="acroref">Rich Text Format</a> (<small>RTF</small>) files (output + by many wordprocessors) to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>. The package + description says it has support + for figures and tables, equations are read as figures, and + it can the handle the latest <small><a href="#RTF" class="acroref" name="A255" title="Rich Text Format">RTF</a></small> + versions from Microsoft Word 97/98/2000, StarOffice, and + other wordprocessors. It runs on Macs, Linux, other Unix + systems, and Windows. + </p> + </li> + </ul> + <p>When these efforts coalesce into generalised support for + arbitrary <small><a href="#DTD" class="acroref" name="A256" title="Document Type Definition">DTD</a></small>s and Schemas, it will + mean a wider choice of editing interfaces, and when they + achieve the ability to run <small><a href="#XSLT" class="acroref" name="A257" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> + conversion into + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from within these editors, such as is done at the + moment with <i><a name="p258">Emacs</a></i> or + <i><a name="p259">XML Spy</a></i>, we will have full + convertability. + </p> + <ol class="footnotes" start="1"> + <li><a name="F53">The <a name="SGML" class="acroref">Standard Generalized Markup + Language</a> (<small>SGML</small>) itself is little used now for new + projects, as the software support for its daughter + <small><a href="#XML" class="acroref" name="A229" title="Extensible Markup Language">XML</a></small> is far greater, but there + are still hundreds of large document repositories in + <small><a href="#SGML" class="acroref" name="A230" title="Standard Generalized Markup Language">SGML</a></small> still growing their + collection by adding documents.</a></li> + </ol> + <ol class="footnotes" start="2"> + <li><a name="F54">Which is silly, given that Microsoft used to make + one of the best + <i><a name="p253">Word</a></i>-to-<small><a href="#SGML" class="acroref" name="A246" title="Standard Generalized Markup Language">SGML</a></small> converters ever, which was + bi-directional (yes, it could round-trip + <i><a name="p254">Word</a></i> to <small><a href="#SGML" class="acroref" name="A247" title="Standard Generalized Markup Language">SGML</a></small> and back to + <i><a name="p255">Word</a></i> and back into <small><a href="#SGML" class="acroref" name="A248" title="Standard Generalized Markup Language">SGML</a></small>). But they dropped it on the + floor when <small><a href="#XML" class="acroref" name="A249" title="Extensible Markup Language">XML</a></small> + arrived.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.1.1 Getting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> out of XML + </h3> + <p>Assuming you can get your document out of its + wordprocessor format into <small><a href="#XML" class="acroref" name="A258" title="Extensible Markup Language">XML</a></small> by + some method, here is a very brief example of how to turn it + into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>You can of course buy and install a fully-fledged + commercial <small><a href="#XML" class="acroref" name="A259" title="Extensible Markup Language">XML</a></small> editor with + <small><a href="#XSLT" class="acroref" name="A260" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> support, and run this + application within it. However, this is beyond the reach of + many users, so to do this unaided you just need to install + three pieces of software: <a href="http://java.sun.com/j2se/1.4.2/download.html"><i><a name="p260">Java</a></i></a>, + <a href="http://saxon.sourceforge.net/"><i><a name="p261">Saxon</a></i></a> + and the <a href="http://www.docbook.org/xml/4.2/index.html">DocBook + 4.2 DTD</a> (<small><a href="#URI" class="acroref" name="A261" title="Uniform Resource Indicator">URI</a></small>s are + correct at the time of writing). None of these has a visual + interface: they are run from the command-line in the same + way as is possible with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>As an example, let's take the above paragraph, as + typed or imported into <i><a name="p262">AbiWord</a></i> + (see + <a href="#abidoc">Figure 10.1</a>). This is stored as a single + paragraph with highlighting on the product names (italics), + and the names are also links to their Internet sources, just + as they are in this document. This is a convenient way to + store two pieces of information in the same place. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.1</i>: <a name="abidoc">Sample paragraph in + <i><a name="p263">AbiWord</a></i> converted to <small><a href="#XML" class="acroref" name="A262" title="Extensible Markup Language">XML</a></small></a></caption> + <div align="center" style="margin:12px"><img src="abiword.png" width="100%"></div> + <hr> + </div> + <p><i><a name="p264">AbiWord</a></i> can export in DocBook + format, which is an <small><a href="#XML" class="acroref" name="A263" title="Extensible Markup Language">XML</a></small> vocabulary + for describing technical (computer) + documents–it's what I use for this book. + <i><a name="p265">AbiWord</a></i> can also export <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + but we're going make our own + version, working from the <small><a href="#XML" class="acroref" name="A264" title="Extensible Markup Language">XML</a></small> + (Brownie points for the reader who can guess why I'm + not just accepting the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> conversion output). + </p> + <p>Although <i><a name="p266">AbiWord</a></i>'s + default is to output an <small><a href="#XML" class="acroref" name="A265" title="Extensible Markup Language">XML</a></small> book document + type, we'll convert it to a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> article document + class. Notice that <i><a name="p267">AbiWord</a></i> has + correctly output the expected section and title markup + empty, even though it's not used. Here's the + <small><a href="#XML" class="acroref" name="A266" title="Extensible Markup Language">XML</a></small> output (I've changed the + linebreaks to keep it within the bounds of this page + size): + </p> + <blockquote><pre class="tiny"> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book> +<!-- ===================================================================== --> +<!-- This DocBook file was created by AbiWord. --> +<!-- AbiWord is a free, Open Source word processor. --> +<!-- You may obtain more information about AbiWord at www.abisource.com --> +<!-- ===================================================================== --> + <chapter> + <title></title> + <section role="unnumbered"> + <title></title> + <para>You can of course buy and install a fully-fledged commercial XML +editor with XSLT support, and run this application within it. However, this +is beyond the reach of many users, so to do this unaided you just need to +install three pieces of software: <ulink +url="http://java.sun.com/j2se/1.4.2/download.html"><emphasis>Java</emphasis></ulink>, +<ulink +url="http://saxon.sourceforge.net"><emphasis>Saxon</emphasis></ulink>, and +the <ulink url="http://www.docbook.org/xml/4.2/index.html">DocBook 4.2 DTD</ulink> +(URIs are correct at the time of writing). None of these has a visual +interface: they are run from the command-line in the same way as is possible +with L<superscript>A</superscript>T<subscript>E</subscript>X.</para> + </section> + </chapter> +</book> + </pre></blockquote> + <p>The <small><a href="#XSLT" class="acroref" name="A267" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> language lets us + create templates for each type of element in an <small><a href="#XML" class="acroref" name="A268" title="Extensible Markup Language">XML</a></small> document. In our example, there are + only three which need handling, as we did not create chapter + or section titles (DocBook requires them to be present, but + they don't have to be used). + </p> + <ul> + <li> + <p>para, for the + paragraph[s]; + </p> + </li> + <li> + <p>ulink, for the URIs;</p> + </li> + <li> + <p>emphasis, for the + italicisation. + </p> + </li> + </ul> + <p>I'm going to cheat over the superscripting and + subscripting of the letters in the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> logo, and use my + editor to replace the whole thing with the + <code class="command"><a name="c319">\LaTeX</a></code> command. In the other three cases, + we already know how <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> deals with these, so we can + write our templates (see <a href="#xslcode">Figure 10.2</a>). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.2</i>: <a name="xslcode"><small><a href="#XSLT" class="acroref" name="A269" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> script to convert the + paragraph</a></caption> + <blockquote><pre class="footnotesize"> +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="text"/> + + <xsl:template match="/"> + <xsl:text>\documentclass{article} +\usepackage{url}</xsl:text> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="book"> + <xsl:text>\begin{document}</xsl:text> + <xsl:apply-templates/> + <xsl:text>\end{document}</xsl:text> + </xsl:template> + + <xsl:template match="para"> + <xsl:apply-templates/> + <xsl:text>&#x000A;</xsl:text> + </xsl:template> + + <xsl:template match="ulink"> + <xsl:apply-templates/> + <xsl:text>\footnote{\url{</xsl:text> + <xsl:value-of select="@url"/> + <xsl:text>}}</xsl:text> + </xsl:template> + + <xsl:template match="emphasis"> + <xsl:text>\emph{</xsl:text> + <xsl:apply-templates/> + <xsl:text>}</xsl:text> + </xsl:template> + +</xsl:stylesheet> + </pre></blockquote> + <hr> + </div> + <p>If you run this through + <i><a name="p268">Saxon</a></i>, which is an <small><a href="#XSLT" class="acroref" name="A270" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> processor, you can output a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + file which you can process and view (see <a href="#paraview">Figure 10.3</a>). + </p> + <blockquote><pre class="scriptsize"> +$ java -jar /usr/local/saxonb8-0/saxon8.jar -o para.ltx \ +para.dbk para.xsl +$ latex para.ltx +This is TeX, Version 3.14159 (Web2C 7.3.7x) +(./para.ltx +LaTeX2e <2001/06/01> +Loading CZ hyphenation patterns: Pavel Sevecek, v3, 1995 +Loading SK hyphenation patterns: Jana Chlebikova, 1992 +Babel <v3.7h> and hyphenation patterns for english, +dumylang, nohyphenation, czech, slovak, german, ngerman, +danish, spanish, catalan, finnish, french, ukenglish, greek, +croatian, hungarian, italian, latin, mongolian, dutch, +norwegian, polish, portuguese, russian, ukrainian, +serbocroat, swedish, loaded. +(/usr/TeX/texmf/tex/latex/base/article.cls +Document Class: article 2001/04/21 v1.4e Standard LaTeX +document class (/usr/TeX/texmf/tex/latex/base/size10.clo)) +(/usr/TeX/texmf/tex/latex/ltxmisc/url.sty) (./para.aux) +[1] (./para.aux) ) +Output written on para.dvi (1 page, 1252 bytes). +Transcript written on para.log. +$ xdvi para & + </pre></blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.3</i>: <a name="paraview">Displaying the typeset paragraph</a></caption> + <div align="center" style="margin:12px"><img src="para.png" width="60%"></div> + <blockquote><pre class="scriptsize"> +\documentclass{article}\usepackage{url}\begin{document} + + You can of course buy and install a fully-fledged commercial +XML editor with XSLT support, and run this application within it. +However, this is beyond the reach of many users, so to do this +unaided you just need to install three pieces of software: +\emph{Java}\footnote{\url{http://java.sun.com/j2se/1.4.2/download.html}}, +\emph{Saxon}\footnote{\url{http://saxon.sourceforge.net}}, and the +DocBook 4.2 DTD\footnote{\url{http://www.docbook.org/xml/4.2/index.html}} +(URIs are correct at the time of writing). None of these has a visual +interface: they are run from the command-line in the same way as is +possible with \LaTeX. + +\end{document} + </pre></blockquote> + <hr> + </div> + <p>Writing <small><a href="#XSLT" class="acroref" name="A271" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> is not hard, but + requires a little learning. The output method here is + <code class="literal">text</code>, which is <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s file + format (<small><a href="#XSLT" class="acroref" name="A272" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> can also output + <small><a href="#HTML" class="acroref" name="A273" title="HyperText Markup Language">HTML</a></small> and other formats of + XML). + </p> + <ol type="1"> + <li> + <p>The first template matches + ‘<code class="literal">/</code>’, which is + the document root (before the book + start-tag). At this stage we output the text + <code class="literal">\documentclass{article}</code> and + <code class="literal">\usepackage{url}</code>. The + ‘<code class="literal">apply-templates</code>’ + instructions tells the processor to carry on processing, + looking for more matches. <small><a href="#XML" class="acroref" name="A274" title="Extensible Markup Language">XML</a></small> + comments get ignored, and any elements which don't + match a template simply have their contents passed + through until the next match occurs. + </p> + </li> + <li> + <p>The book template outputs the + <code class="literal">\begin{document}</code> and the + <code class="literal">\end{document}</code> commands, and between + them to carry on processing. + </p> + </li> + <li> + <p>The para template just outputs + its content, but follows it with a linebreak (using the + hexadecimal character code <code class="literal">x000A</code> (see + the <small><a href="#ASCII" class="acroref" name="A275" title="American Standard Code for Information Interchange">ASCII</a></small> chart in <a href="#asciicodes">Table C.1</a>). + </p> + </li> + <li> + <p>The ulink template outputs its + content but follows it with a footnote using the + <code class="command"><a name="c320">\url</a></code> command to output the value of + the url attribute. + </p> + </li> + <li> + <p>The emphasis template surrounds + its content with <code class="literal">\emph{</code> and + <code class="literal">}</code>. + </p> + </li> + </ol> + <p>This is a relatively trivial example, but it serves to + show that it's not hard to output <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from + <small><a href="#XML" class="acroref" name="A276" title="Extensible Markup Language">XML</a></small>. In fact there is a set of + templates already written to produce <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from a DocBook + file at + <a href="http://www.dpawson.co.uk/docbook/tools.html#d4e2905"><tt>http://www.dpawson.co.uk/docbook/tools.html#d4e2905</tt></a></p> + </div> + </div> + <div class="sect1"> + <h2><a href="#compat"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2 <a name="latexto">Converting out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h2> + <p>This is much harder to do comprehensively. As noted + earlier, the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file format really requires the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + program itself in order to process all the packages and + macros, because there is no telling what complexities authors + have added themselves (what a lot of this book is + about!). + </p> + <p>Many authors and editors rely on custom-designed or + homebrew converters, often written in the standard shell + scripting languages (Unix shells, Perl, Python, Tcl, etc). + Although some of the packages presented here are also written + in the same languages, they have some advantages and + restrictions compared with private conversions: + </p> + <ul> + <li> + <p>Conversion done with the standard utilities (eg awk, + tr, sed, grep, detex, etc) can be faster for + <i>ad hoc</i> translations, but it + is easier to obtain consistency and a more sophisticated + final product using + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A277" title="HyperText Markup Language">HTML</a></small> or + <span class="TEX">T<span class="E">E</span>X</span>4ht — or one of the other systems + available. + </p> + </li> + <li> + <p>Embedding additional non-standard control sequences in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> source code may make it harder to edit and + maintain, and will definitely make it harder to port to + another system. + </p> + </li> + <li> + <p>Both the above methods (and others) provide a fast and + reasonable reliable way to get documents authored in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> onto the Web in an acceptable — if not + optimal — format. + </p> + </li> + <li> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A278" title="HyperText Markup Language">HTML</a></small> was written to + solve the problem of getting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-with-mathematics + onto the Web, in the days before MathML and math-capable + browsers. + <span class="TEX">T<span class="E">E</span>X</span>4ht was written to turn <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents into Web + hypertext — mathematics or not. + </p> + </li> + </ul> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.1 Conversion to <i><a name="p269">Word</a></i></h3> + <p>There are several programs on <small><a href="#CTAN" class="acroref" name="A279" title="Comprehensive Archive Network">CTAN</a></small> to do + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-to-<i><a name="p270">Word</a></i> and similar + conversions, but they do not all handles everything <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + can throw at them, and some only handle a subset of the + built-in commands of default + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Two in particular, however, have a good + reputation, although I haven't used either of them (I + stay as far away from <i><a name="p271">Word</a></i> as + possible): + </p> + <ul> + <li> + <p><i><a name="p272">latex2rtf</a></i> by <a name="wh">Wilfried Hennings</a>, <a name="fd">Fernando Dorner</a>, and <a name="ag">Andreas Granzer</a> translates + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> into <small><a href="#RTF" class="acroref" name="A280" title="Rich Text Format">RTF</a></small> — the + opposite of the <i><a name="p273">rtf2latex2e</a></i> + mentioned in <a href="#rtf2latex2e">the 4th item</a>. <small><a href="#RTF" class="acroref" name="A281" title="Rich Text Format">RTF</a></small> can be read by most + wordprocessors, and this program preserves layout and + formatting for most <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents using standard + built-in commands. + </p> + </li> + <li> + <p><a name="kac">KirillA Chikrii</a>'s <i><a name="p274"><span class="TEX">T<span class="E">E</span>X</span>2Word</a></i> for + Microsoft Windows is a converter plug-in for + <i><a name="p275">Word</a></i> to let it open <span class="TEX">T<span class="E">E</span>X</span> + and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents. The author's company claims + that ‘virtually any existing <span class="TEX">T<span class="E">E</span>X</span>/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + package can be supported by <i><a name="p276"><span class="TEX">T<span class="E">E</span>X</span>2Word</a></i>’ + because it is customisable. + </p> + </li> + </ul> + <p>One easy route into wordprocessing, however, is the + reverse of the procedures suggested in the preceding + section: convert <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to <small><a href="#HTML" class="acroref" name="A282" title="HyperText Markup Language">HTML</a></small>, + which many wordprocessors read easily. The following + sections cover two packages for this. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.2 <i><a name="p277"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2HTML</a></i></h3> + <p>As its name suggests, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A283" title="HyperText Markup Language">HTML</a></small> is a system to convert <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + structured documents to <small><a href="#HTML" class="acroref" name="A284" title="HyperText Markup Language">HTML</a></small>. Its + main task is to reproduce the document structure as a set of + interconnected <small><a href="#HTML" class="acroref" name="A285" title="HyperText Markup Language">HTML</a></small> files. Despite + using Perl, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A286" title="HyperText Markup Language">HTML</a></small> relies very heavily + on standard Unix facilities like the + <i><a name="p278">NetPBM</a></i> graphics package and the + pipe syntax. Microsoft Windows is not well suited to this + kind of composite processing, although all the required + facilities are available for download in various forms and + should in theory allow the package to run — but reports + of problems are common. + </p> + <ul> + <li> + <p>The sectional structure is preserved, and + navigational links are generated for the standard Next, + Previous, and Up directions. + </p> + </li> + <li> + <p>Links are also used for the cross-references, + citations, footnotes, ToC, and lists of figures and + tables. + </p> + </li> + <li> + <p>Conversion is direct for common elements like lists, + quotes, paragraph-breaks, type-styles, etc, where there + is an obvious <small><a href="#HTML" class="acroref" name="A287" title="HyperText Markup Language">HTML</a></small> + equivalent. + </p> + </li> + <li> + <p>Heavily formatted objects such as math and diagrams + are converted to images. + </p> + </li> + <li> + <p>There is no support for homebrew macros.</p> + </li> + </ul> + <p>There is, however, support for arbitrary hypertext + links, symbolic cross-references between ‘evolving + remote documents’, conditional text, and the + inclusion of raw <small><a href="#HTML" class="acroref" name="A288" title="HyperText Markup Language">HTML</a></small>. These are + extensions to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, implemented as new commands and + environments. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A289" title="HyperText Markup Language">HTML</a></small> outputs a + directory named after the input filename, and all the output + files are put in that directory, so the output is + self-contained and can be uploaded to a server as it + stands. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.3 <i><a name="p279"><span class="TEX">T<span class="E">E</span>X</span>4ht</a></i></h3> + <p><span class="TEX">T<span class="E">E</span>X</span>4ht operates differently from + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="#HTML" class="acroref" name="A290" title="HyperText Markup Language">HTML</a></small>: it uses the <span class="TEX">T<span class="E">E</span>X</span> + program to process the file, and handles conversion in a set + of postprocessors for the common <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages. It can + also output to <small><a href="#XML" class="acroref" name="A291" title="Extensible Markup Language">XML</a></small>, including + <a name="TEI" class="acroref">Text Encoding Initiative</a> (<small>TEI</small>) and + DocBook, and the OpenOffice and WordXML formats, and it can + create <span class="TEX">T<span class="E">E</span>X</span>info format + manuals. + </p> + <p>By default, documents retain the single-file structure + implied by the original, but there is again a set of + additional configuration directives to make use of the + features of hypertext and navigation, and to split files for + ease of use. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.4 Extraction from PS and PDF + </h3> + <p>If you have the full version of Adobe + <i><a name="p280">Acrobat</a></i>, you can open a <small><a href="#PDF" class="acroref" name="A293" title="Portable Document Format">PDF</a></small> file created by + <i><a name="p281">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, select and copy all + the text, and paste it into <i><a name="p282">Word</a></i> + and some other wordprocessors, and retain some common + formatting of headings, paragraphs, and lists. Both + solutions still require the wordprocessor text to be edited + into shape, but they preserve enough of the formatting to + make it worthwhile for short documents. Otherwise, use the + <i><a name="p283">pdftotext</a></i> program to extract + everything from the <small><a href="#PDF" class="acroref" name="A294" title="Portable Document Format">PDF</a></small> file as + plain (paragraph-formatted) text. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.5 Last resort: strip the markup + </h3> + <p>At worst, the <i><a name="p284">detex</a></i> program + on <small><a href="#CTAN" class="acroref" name="A295" title="Comprehensive Archive Network">CTAN</a></small> will strip a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file + of all markup and leave just the raw unformatted text, which + can then be re-edited. There are also programs to extract + the raw text from <small><a href="#DVI" class="acroref" name="A296" title="device-independent">DVI</a></small> and <a name="PS" class="acroref">PostScript</a> (<small>PS</small>) files. + </p> + </div> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="cnf">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">A</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths + </h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p><span class="TEX">T<span class="E">E</span>X</span> systems run on a huge variety of platforms, and are + typically made up of a large number of rather small files. Some + computer operating systems have problems with packages like + this, as their built-in methods for searching for a file when + needed are poor. + </p> + <p>To get around this, <span class="TEX">T<span class="E">E</span>X</span> uses a technique borrowed from the + Unix world, based on a simple hash index for each directory they + need to look in. This is known as the ls-R database, from the + Unix command (<code class="literal">ls -R</code>) which creates it. The + program which does this for <span class="TEX">T<span class="E">E</span>X</span> is actually called after this + command: <i><a name="p285">mktexlsr</a></i>, although it may be + renamed <i><a name="p286">texhash</a></i> or something else on + your system. This is the program referred to in <a href="#texindex">step 4</a>. + </p> + <p>However, to know where to make these indexes, and thus where + to search, <span class="TEX">T<span class="E">E</span>X</span> needs to be told about them. In a standard + <span class="TEX">T<span class="E">E</span>X</span> installation this information is in + <code>texmf/web2c/texmf.cnf</code>. The file is similar + to a Unix shell script, but the only lines of significance for + the search paths are the following (this is how they appear in + the default Unix installation, omitting the comments): + </p> + <blockquote><pre> +TEXMFMAIN = /usr/TeX/texmf +TEXMFLOCAL = /usr/TeX/texmf-local +HOMETEXMF = $HOME/texmf +TEXMF = {$HOMETEXMF,!!$TEXMFLOCAL,!!$TEXMFMAIN} +SYSTEXMF = $TEXMF +VARTEXFONTS = /var/lib/texmf +TEXMFDBS = $TEXMF;$VARTEXFONTS + </pre></blockquote> + <p>As you can see, this defines where the main <span class="TEX">T<span class="E">E</span>X</span>/METAFONT + directory is, where the local one is, and where the user's + personal (home) one is. It then defines the order in which they + are searched, and makes this the system-wide list. A temporary + directory for bitmap fonts is set up, and added to the list, + defining the places in which <i><a name="p287">texhash</a></i> + or <i><a name="p288">mktexlsr</a></i> creates its + databases. + </p> + <p>In some installations, the local directory is set up in + <code>/usr/local/share/texmf</code> or + <code>/usr/share/texmf.local</code> or similar + variations, so you would substitute this name for + <code>/usr/TeX/texmf-local</code>. Under Microsoft + Windows, the names will be full paths such as + <code>C:\Program Files\TeXLive\texmf</code>. On an Apple + Mac, it might be <code>Hard + Disk:TeX:texmf</code>. + </p> + <p>If you edit plain-text configuration files with anything + other than a plain-text editor (e.g. a wordprocessor), or + if you edit them with a plain-text editor which has been set to + word-wrap long lines, make sure you turn line-wrapping + <em>off</em> so that any long lines are preserved in + their correct format. + </p> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="tugform">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">B</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1><span class="TEX">T<span class="E">E</span>X</span> Users Group membership + </h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The <a name="TUG" class="acroref"><span class="TEX">T<span class="E">E</span>X</span> Users Group</a> (<small>TUG</small>) was + founded in 1980 for educational and scientific purposes: to + provide an organization for those who have an interest in + typography and font design, and are users of the <span class="TEX">T<span class="E">E</span>X</span> + typesetting system invented by Donald Knuth. + TUG is run by and for its members and represents the interests + of <span class="TEX">T<span class="E">E</span>X</span> users worldwide. + </p> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>TUG membership benefits + </h4> + <p>Members of TUG help to support and promote the use of + <span class="TEX">T<span class="E">E</span>X</span>, METAFONT, and related systems worldwide. All members + receive <cite><a href="#tugboat" name="C43">TUGboat</a></cite>, + the journal of the <span class="TEX">T<span class="E">E</span>X</span> Users Group, the <span class="TEX">T<span class="E">E</span>X</span> Live software + distribution (a runnable <span class="TEX">T<span class="E">E</span>X</span> system), and the <small><a href="#CTAN" class="acroref" name="A299" title="Comprehensive Archive Network">CTAN</a></small> software distribution (containing most + of the <small><a href="#CTAN" class="acroref" name="A300" title="Comprehensive Archive Network">CTAN</a></small> archive). + </p> + <p>In addition, TUG members vote in TUG elections, and + receive discounts on annual meeting fees, store purchases, and + TUG-sponsored courses. TUG membership (less benefits) is + tax-deductible, at least in the USA. See the TUG Web site for + details. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Becoming a TUG member + </h4> + <p>Please see the forms and information at <a href="http://www.tug.org/join.html"><tt>http://www.tug.org/join.html</tt></a>. You can join + online, or by filling out a paper form. The NTG (Dutch) and + UKTUG (United Kingdom) <span class="TEX">T<span class="E">E</span>X</span> user groups have joint membership + agreements with TUG whereby you can receive a discount for + joining both user groups. To do this, please join via <a href="http://www.ntg.nl/newmember.html"><tt>http://www.ntg.nl/newmember.html</tt></a> (the NTG + membership page) or <a href="http://uk.tug.org/Membership/"><tt>http://uk.tug.org/Membership/</tt></a> (the UKTUG + page), respectively, and select the option for joint + membership. + </p> + <p>Each year's membership entitles you to the software and + TUGboat produced for that year (even if it is produced in a + subsequent calendar year, as is currently the case with + TUGboat). You can order older issues of TUGboat and <span class="TEX">T<span class="E">E</span>X</span> + memorabilia through the TUG store (<a href="http://www.tug.org/store"><tt>http://www.tug.org/store</tt></a>). + </p> + <p>The current TUG membership fee is $65 (US) per year + for individuals and $35 for students and seniors. Add + $10 to the membership fee after May 31 to cover + additional shipping and processing costs. The current rate for + non-voting subscription memberships (for libraries, for + example) is $85. The current institutional rate is + $500, which includes up to seven individual + memberships. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Privacy + </h4> + <p>TUG uses your personal information only to mail you + products, publications, notices, and (for voting members) + official ballots. Also, if you give explicit agreement, we may + incorporate it into a membership directory which will be made + available only to TUG members. + </p> + <p>TUG neither sells its membership list nor provides it to + anyone outside of its own membership. + </p> + </div> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="asciicharset">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">C</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>The ASCII character set</h1> + </td> + <td class="toc"> + <p> </p> + <ol></ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The American Standard Code for Information Interchange was + invented in 1963, and after some redevelopment settled down in + 1984 as standard X3.4 of <a name="ANSI" class="acroref">American National + Standards Institute</a> (<small>ANSI</small>). It represents the 95 basic + codes for the unaccented printable characters and punctuation of + the Latin alphabet, plus 33 internal ‘control + characters’ originally intended for the control of + computers, programs, and external devices like printers and + screens. + </p> + <p>Many other character sets (strictly speaking, + ‘character repertoires’) have been standardised for + accented Latin characters and for all other non-Latin writing + systems, but these are intended for representing the symbols + people use when writing text on computers. Most programs and + computers use <small><a href="#ASCII" class="acroref" name="A302" title="American Standard Code for Information Interchange">ASCII</a></small> internally for all + their coding, the exceptions being <small><a href="#XML" class="acroref" name="A303" title="Extensible Markup Language">XML</a></small>-based languages like <small><a href="#XSLT" class="acroref" name="A304" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small>, which are inherently designed to be + usable with any writing system, and a few specialist systems + like APL. + </p> + <p>Although the <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file formats can easily be + used with many other encoding systems (see the discussion of the + <span class="package"><a name="m90">inputenc</a></span> in <a href="#accents">section 2.7</a>), they are based on <small><a href="#ASCII" class="acroref" name="A305" title="American Standard Code for Information Interchange">ASCII</a></small>. It is therefore important to know + where to find <em>all</em> 95 of the printable + characters, as some of them are not often used in other + text-formatting systems. The following table shows all 128 + characters, with their decimal, octal (base-8), and hexadecimal + (base-16) code numbers. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 1</i>. <a name="asciicodes">The ASCII characters</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="right">Oct</th> + <th valign="bottom" align="center" width="56">0</th> + <th valign="bottom" align="center" width="56">1</th> + <th valign="bottom" align="center" width="56">2</th> + <th valign="bottom" align="center" width="56">3</th> + <th valign="bottom" align="center" width="56">4</th> + <th valign="bottom" align="center" width="56">5</th> + <th valign="bottom" align="center" width="56">6</th> + <th valign="bottom" align="center" width="56">7</th> + <th valign="bottom" align="left">Hex</th> + </tr> + <tr> + <td valign="top" align="right" style="">'00↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">NUL</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SOH</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">STX</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ETX</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">EOT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ENQ</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ACK</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">BEL</td> + <td valign="top" align="left" style="">''0↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'01↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">BS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">HT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">LF</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">VT</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">FF</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">CR</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SO</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SI</td> + <td valign="top" align="left" style="">''0↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'02↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DLE</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC1</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC2</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC3</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DC4</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">NAK</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SYN</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ETB</td> + <td valign="top" align="left" style="">''1↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'03↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">CAN</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">EM</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">SUB</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">ESC</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">FS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">GS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">RS</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">US</td> + <td valign="top" align="left" style="">''1↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'04↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;"></td> + <td valign="top" width="56" align="center" style="font-family:monospace;">!</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">"</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">#</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">$</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">%</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">&</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">'</td> + <td valign="top" align="left" style="">''2↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'05↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">(</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">)</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">*</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">+</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">,</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">-</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">.</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">/</td> + <td valign="top" align="left" style="">''2↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'06↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">0</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">1</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">2</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">3</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">4</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">5</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">6</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">7</td> + <td valign="top" align="left" style="">''3↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'07↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">8</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">9</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">:</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">;</td> + <td valign="top" width="56" align="center" style="font-family:monospace;"><</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">=</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">></td> + <td valign="top" width="56" align="center" style="font-family:monospace;">?</td> + <td valign="top" align="left" style="">''3↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'10↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">@</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">A</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">B</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">C</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">D</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">E</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">F</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">G</td> + <td valign="top" align="left" style="">''4↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'11↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">H</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">I</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">J</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">K</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">L</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">M</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">N</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">O</td> + <td valign="top" align="left" style="">''4↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'12↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">P</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Q</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">R</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">S</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">T</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">U</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">V</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">W</td> + <td valign="top" align="left" style="">''5↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'13↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">X</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Y</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">Z</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">[</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">\</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">]</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">^</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">_</td> + <td valign="top" align="left" style="">''5↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'14↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">`</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">a</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">b</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">c</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">d</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">e</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">f</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">g</td> + <td valign="top" align="left" style="">''6↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'15↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">h</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">i</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">j</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">k</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">l</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">m</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">n</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">o</td> + <td valign="top" align="left" style="">''6↓</td> + </tr> + <tr> + <td valign="top" align="right" style="">'16↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">p</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">q</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">r</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">s</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">t</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">u</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">v</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">w</td> + <td valign="top" align="left" style="">''7↑</td> + </tr> + <tr> + <td valign="top" align="right" style="">'17↑</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">x</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">y</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">z</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">{</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">|</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">}</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">˜</td> + <td valign="top" width="56" align="center" style="font-family:monospace;">DEL</td> + <td valign="top" align="left" style="">''7↓</td> + </tr> + <tr class="headfoot"> + <th valign="top" align="right"></th> + <th valign="top" width="1cm" align="center">8</th> + <th valign="top" width="1cm" align="center">9</th> + <th valign="top" width="1cm" align="center">A</th> + <th valign="top" width="1cm" align="center">B</th> + <th valign="top" width="1cm" align="center">C</th> + <th valign="top" width="1cm" align="center">D</th> + <th valign="top" width="1cm" align="center">E</th> + <th valign="top" width="1cm" align="center">F</th> + <th valign="top" align="left"></th> + </tr> + </table> + </div> + <p>The index numbers in the first and last columns are for + finding the octal (base-8) and hexadecimal (base-16) values + respectively. Replace the arrow with the number or letter from + the top of the column (if the arrow points up) from the bottom + of the column(if the arrow points down). + </p> + <p>Example: The Escape character (ESC) is octal '033 (03 for + the row, 3 for the number at the top of the column because the + arrow points up) or hexadecimal "1B (1 for the row, B for the + letter at the bottom of the column because the arrow points + down). + </p> + <p>For the decimal value, multiply the Octal row number by + eight and add the column number from the top line (that makes + ESC 27). + </p> + </div> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="gfdl">APPENDIX</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">D</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>GNU Free Documentation License</h1> + <h2>Version 1.2, November 2002</h2> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#gfdl-0">PREAMBLE</a></li> + <li><a href="#gfdl-1">APPLICABILITY AND DEFINITIONS</a></li> + <li><a href="#gfdl-2">VERBATIM COPYING</a></li> + <li><a href="#gfdl-3">COPYING IN QUANTITY</a></li> + <li><a href="#gfdl-4">MODIFICATIONS</a></li> + <li><a href="#gfdl-5">COMBINING DOCUMENTS</a></li> + <li><a href="#gfdl-6">COLLECTIONS OF DOCUMENTS</a></li> + <li><a href="#gfdl-7">AGGREGATION WITH INDEPENDENT + WORKS</a></li> + <li><a href="#gfdl-8">TRANSLATION</a></li> + <li><a href="#gfdl-9">TERMINATION</a></li> + <li><a href="#gfdl-10">FUTURE REVISIONS OF THIS + LICENSE</a></li> + <li><a href="#gfdl-addendum">ADDENDUM: How to use this License + for your documents</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <blockquote class="citation"><a name="K43"> </a><p>Copyright (C) 2000,2001,2002 Free Software Foundation, + Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not + allowed. + </p> + </blockquote> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.1 <a name="gfdl-0">PREAMBLE</a></h2> + <p>The purpose of this License is to make a manual, textbook, + or other functional and useful document ‘free’ in + the sense of freedom: to assure everyone the effective freedom + to copy and redistribute it, with or without modifying it, + either commercially or noncommercially. Secondarily, this + License preserves for the author and publisher a way to get + credit for their work, while not being considered responsible + for modifications made by others. + </p> + <p>This License is a kind of ‘copyleft’, which + means that derivative works of the document must themselves be + free in the same sense. It complements the GNU General Public + License, which is a copyleft license designed for free + software. + </p> + <p>We have designed this License in order to use it for + manuals for free software, because free software needs free + documentation: a free program should come with manuals + providing the same freedoms that the software does. But this + License is not limited to software manuals; it can be used for + any textual work, regardless of subject matter or whether it + is published as a printed book. We recommend this License + principally for works whose purpose is instruction or + reference. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.2 <a name="gfdl-1">APPLICABILITY AND DEFINITIONS</a></h2> + <p><a name="gfdl-doc"></a>This License applies to any manual or other + work, in any medium, that contains a notice placed by the + copyright holder saying it can be distributed under the terms + of this License. Such a notice grants a world-wide, + royalty-free license, unlimited in duration, to use that work + under the conditions stated herein. The + ‘Document’, below, refers to any such manual or + work. Any member of the public is a licensee, and is + addressed as ‘you’. You accept the license if + you copy, modify or distribute the work in a way requiring + permission under copyright law. + </p> + <p><a name="gfdl-mod-ver"></a>A ‘Modified Version’ of the + Document means any work containing the Document or a portion + of it, either copied verbatim, or with modifications and/or + translated into another language. + </p> + <p><a name="gfdl-secnd-sect"></a>A ‘Secondary Section’ is + a named appendix or a front-matter section of the Document + that deals exclusively with the relationship of the publishers + or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that + could fall directly within that overall subject. (Thus, if + the Document is in part a textbook of mathematics, a Secondary + Section may not explain any mathematics.) The relationship + could be a matter of historical connection with the subject or + with related matters, or of legal, commercial, philosophical, + ethical or political position regarding them. + </p> + <p><a name="gfdl-inv-sect"></a>The ‘Invariant Sections’ + are certain Secondary Sections whose titles are designated, as + being those of Invariant Sections, in the notice that says + that the Document is released under this License. If a + section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document + may contain zero Invariant Sections. If the Document does not + identify any Invariant Sections then there are none. + </p> + <p><a name="gfdl-cov-text"></a>The ‘Cover Texts’ are + certain short passages of text that are listed, as Front-Cover + Texts or Back-Cover Texts, in the notice that says that the + Document is released under this License. A Front-Cover Text + may be at most 5 words, and a Back-Cover Text may be at most + 25 words. + </p> + <p><a name="gfdl-transparent"></a>A ‘Transparent’ copy of + the Document means a machine-readable copy, represented in a + format whose specification is available to the general public, + that is suitable for revising the document straightforwardly + with generic text editors or (for images composed of pixels) + generic paint programs or (for drawings) some widely available + drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in + an otherwise Transparent file format whose markup, or absence + of markup, has been arranged to thwart or discourage + subsequent modification by readers is not Transparent. An + image format is not Transparent if used for any substantial + amount of text. A copy that is not ‘Transparent’ + is called ‘Opaque’. + </p> + <p>Examples of suitable formats for Transparent copies + include plain ASCII without markup, Texinfo input format, + LaTeX input format, SGML or XML using a publicly available + DTD, and standard-conforming simple <small><a href="#HTML" class="acroref" name="A306" title="HyperText Markup Language">HTML</a></small>, + <a name="t43">PostScript</a> or PDF designed for human + modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats + that can be read and edited only by proprietary word + processors, SGML or XML for which the DTD and/or processing + tools are not generally available, and the machine-generated + <small><a href="#HTML" class="acroref" name="A307" title="HyperText Markup Language">HTML</a></small>, <a name="t44">PostScript</a> or PDF produced by + some word processors for output purposes only. + </p> + <p><a name="gfdl-title-page"></a>The ‘Title Page’ means, + for a printed book, the title page itself, plus such following + pages as are needed to hold, legibly, the material this + License requires to appear in the title page. For works in + formats which do not have any title page as such, ‘Title + Page’ means the text near the most prominent + appearance of the work's title, preceding the beginning + of the body of the text. + </p> + <p><a name="gfdl-entitled"></a>A section ‘Entitled XYZ’ + means a named subunit of the Document whose title either is + precisely XYZ or contains XYZ in parentheses following text + that translates XYZ in another language. (Here XYZ stands for + a specific section name mentioned below, such as + ‘Acknowledgements’, ‘Dedications’, + ‘Endorsements’, or ‘History’.) To + ‘Preserve the Title’ of such a section when you + modify the Document means that it remains a section + ‘Entitled XYZ’ according to this + definition. + </p> + <p>The Document may include Warranty Disclaimers next to the + notice which states that this License applies to the Document. + These Warranty Disclaimers are considered to be included by + reference in this License, but only as regards disclaiming + warranties: any other implication that these Warranty + Disclaimers may have is void and has no effect on the meaning + of this License. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.3 <a name="gfdl-2">VERBATIM COPYING</a></h2> + <p>You may copy and distribute the Document in any medium, + either commercially or noncommercially, provided that this + License, the copyright notices, and the license notice saying + this License applies to the Document are reproduced in all + copies, and that you add no other conditions whatsoever to + those of this License. You may not use technical measures to + obstruct or control the reading or further copying of the + copies you make or distribute. However, you may accept + compensation in exchange for copies. If you distribute a + large enough number of copies you must also follow the + conditions in section 3. + + </p> + <p>You may also lend copies, under the same conditions stated + above, and you may publicly display copies. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.4 <a name="gfdl-3">COPYING IN QUANTITY</a></h2> + <p>If you publish printed copies (or copies in media that + commonly have printed covers) of the Document, numbering more + than 100, and the Document's license notice requires + Cover Texts, you must enclose the copies in covers that carry, + clearly and legibly, all these Cover Texts: Front-Cover Texts + on the front cover, and Back-Cover Texts on the back cover. + Both covers must also clearly and legibly identify you as the + publisher of these copies. The front cover must present the + full title with all words of the title equally prominent and + visible. You may add other material on the covers in + addition. Copying with changes limited to the covers, as long + as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other + respects. + </p> + <p>If the required texts for either cover are too voluminous + to fit legibly, you should put the first ones listed (as many + as fit reasonably) on the actual cover, and continue the rest + onto adjacent pages. + </p> + <p>If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, + or state in or with each Opaque copy a computer-network + location from which the general network-using public has + access to download using public-standard network protocols a + complete Transparent copy of the Document, free of added + material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of + Opaque copies in quantity, to ensure that this Transparent + copy will remain thus accessible at the stated location until + at least one year after the last time you distribute an Opaque + copy (directly or through your agents or retailers) of that + edition to the public. + </p> + <p>It is requested, but not required, that you contact the + authors of the Document well before redistributing any large + number of copies, to give them a chance to provide you with an + updated version of the Document. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.5 <a name="gfdl-4">MODIFICATIONS</a></h2> + <p>You may copy and distribute a Modified Version of the + Document under the conditions of sections 2 and 3 above, + provided that you release the Modified Version under precisely + this License, with the Modified Version filling the role of + the Document, thus licensing distribution and modification of + the Modified Version to whoever possesses a copy of it. In + addition, you must do these things in the Modified + Version: + </p> + <ol type="1"> + <li>Use in the Title Page (and on the covers, + if any) a title distinct from that of the Document, and + from those of previous versions (which should, if there + were any, be listed in the History section of the + Document). You may use the same title as a previous + version if the original publisher of that version gives + permission. + + </li> + <li>List on the Title Page, as authors, one or + more persons or entities responsible for authorship of the + modifications in the Modified Version, together with at + least five of the principal authors of the Document (all + of its principal authors, if it has fewer than five), + unless they release you from this requirement. + + </li> + <li>State on the Title page the name of the + publisher of the Modified Version, as the + publisher. + </li> + <li>Preserve all the copyright notices of the + Document. + + </li> + <li>Add an appropriate copyright notice for + your modifications adjacent to the other copyright + notices. + + </li> + <li>Include, immediately after the copyright + notices, a license notice giving the public permission to + use the Modified Version under the terms of this License, + in the form shown in the <a href="#gfdl-addendum" title="sect1">Addendum</a> below. + + </li> + <li>Preserve in that license notice the full + lists of Invariant Sections and required Cover Texts given + in the Document's license + notice. + </li> + <li>Include an unaltered copy of this License. + + </li> + <li>Preserve the section Entitled + ‘History’, Preserve its Title, and add to it + an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title + Page. If there is no section Entitled + ‘History’ in the Document, create one stating + the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the + Modified Version as stated in the previous sentence. + + </li> + <li>Preserve the network location, if any, + given in the Document for public access to a Transparent + copy of the Document, and likewise the network locations + given in the Document for previous versions it was based + on. These may be placed in the ‘History’ + section. You may omit a network location for a work that + was published at least four years before the Document + itself, or if the original publisher of the version it + refers to gives permission. + + </li> + <li>For any section Entitled + ‘Acknowledgements’ or + ‘Dedications’, Preserve the Title of the + section, and preserve in the section all the substance and + tone of each of the contributor acknowledgements and/or + dedications given therein. + + </li> + <li>Preserve all the Invariant Sections of the + Document, unaltered in their text and in their titles. + Section numbers or the equivalent are not considered part + of the section titles. + + </li> + <li>Delete any section Entitled + ‘Endorsements’. Such a section may not be + included in the Modified Version. + + </li> + <li>Do not retitle any existing section to be + Entitled ‘Endorsements’ or to conflict in + title with any Invariant Section. + + </li> + <li>Preserve any Warranty Disclaimers. + + </li> + </ol> + <p>If the Modified Version includes new front-matter sections + or appendices that qualify as Secondary Sections and contain + no material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do + this, add their titles to the list of Invariant Sections in + the Modified Version's license notice. These titles must + be distinct from any other section titles. + </p> + <p>You may add a section Entitled + ‘Endorsements’, provided it contains nothing but + endorsements of your Modified Version by various parties--for + example, statements of peer review or that the text has been + approved by an organization as the authoritative definition of + a standard. + </p> + <p>You may add a passage of up to five words as a Front-Cover + Text, and a passage of up to 25 words as a Back-Cover Text, to + the end of the list of Cover Texts in the Modified Version. + Only one passage of Front-Cover Text and one of Back-Cover + Text may be added by (or through arrangements made by) any one + entity. If the Document already includes a cover text for the + same cover, previously added by you or by arrangement made by + the same entity you are acting on behalf of, you may not add + another; but you may replace the old one, on explicit + permission from the previous publisher that added the old + one. + </p> + <p>The author(s) and publisher(s) of the Document do not by + this License give permission to use their names for publicity + for or to assert or imply endorsement of any Modified + Version. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.6 <a name="gfdl-5">COMBINING DOCUMENTS</a></h2> + <p>You may combine the Document with other documents released + under this License, under the terms defined in <a href="#gfdl-4" title="sect1">section 4</a> above for modified + versions, provided that you include in the combination all of + the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + </p> + <p>The combined work need only contain one copy of this + License, and multiple identical Invariant Sections may be + replaced with a single copy. If there are multiple Invariant + Sections with the same name but different contents, make the + title of each such section unique by adding at the end of it, + in parentheses, the name of the original author or publisher + of that section if known, or else a unique number. Make the + same adjustment to the section titles in the list of Invariant + Sections in the license notice of the combined work. + </p> + <p>In the combination, you must combine any sections Entitled + ‘History’ in the various original documents, + forming one section Entitled ‘History’; likewise + combine any sections Entitled ‘Acknowledgements’, + and any sections Entitled ‘Dedications’. You + must delete all sections Entitled + ‘Endorsements’. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.7 <a name="gfdl-6">COLLECTIONS OF DOCUMENTS</a></h2> + <p>You may make a collection consisting of the Document and + other documents released under this License, and replace the + individual copies of this License in the various documents + with a single copy that is included in the collection, + provided that you follow the rules of this License for + verbatim copying of each of the documents in all other + respects. + </p> + <p>You may extract a single document from such a collection, + and distribute it individually under this License, provided + you insert a copy of this License into the extracted document, + and follow this License in all other respects regarding + verbatim copying of that document. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.8 <a name="gfdl-7">AGGREGATION WITH INDEPENDENT + WORKS</a></h2> + <p>A compilation of the Document or its derivatives with + other separate and independent documents or works, in or on a + volume of a storage or distribution medium, is called an + ‘aggregate’ if the copyright resulting from the + compilation is not used to limit the legal rights of the + compilation's users beyond what the individual works + permit. When the Document is included an aggregate, this + License does not apply to the other works in the aggregate + which are not themselves derivative works of the + Document. + </p> + <p>If the Cover Text requirement of section 3 is applicable + to these copies of the Document, then if the Document is less + than one half of the entire aggregate, the Document's + Cover Texts may be placed on covers that bracket the Document + within the aggregate, or the electronic equivalent of covers + if the Document is in electronic form. Otherwise they must + appear on printed covers that bracket the whole + aggregate. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.9 <a name="gfdl-8">TRANSLATION</a></h2> + <p>Translation is considered a kind of modification, so you + may distribute translations of the Document under the terms of + section 4. Replacing Invariant Sections with translations + requires special permission from their copyright holders, but + you may include translations of some or all Invariant Sections + in addition to the original versions of these Invariant + Sections. You may include a translation of this License, and + all the license notices in the Document, and any Warranty + Disclaimers, provided that you also include the original + English version of this License and the original versions of + those notices and disclaimers. In case of a disagreement + between the translation and the original version of this + License or a notice or disclaimer, the original version will + prevail. + </p> + <p>If a section in the Document is Entitled + ‘Acknowledgements’, ‘Dedications’, + or ‘History’, the requirement (section 4) to + Preserve its Title (section 1) will typically require changing + the actual title. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.10 <a name="gfdl-9">TERMINATION</a></h2> + <p>You may not copy, modify, sublicense, or distribute the + Document except as expressly provided for under this License. + Any other attempt to copy, modify, sublicense or distribute + the Document is void, and will automatically terminate your + rights under this License. However, parties who have received + copies, or rights, from you under this License will not have + their licenses terminated so long as such parties remain in + full compliance. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.11 <a name="gfdl-10">FUTURE REVISIONS OF THIS + LICENSE</a></h2> + <p>The Free Software Foundation may publish new, revised + versions of the GNU Free Documentation License from time to + time. Such new versions will be similar in spirit to the + present version, but may differ in detail to address new + problems or concerns. See + http://www.gnu.org/copyleft/. + </p> + <p>Each version of the License is given a distinguishing + version number. If the Document specifies that a particular + numbered version of this License ‘or any later + version’ applies to it, you have the option of + following the terms and conditions either of that specified + version or of any later version that has been published (not + as a draft) by the Free Software Foundation. If the Document + does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. + </p> + </div> + <div class="sect1"> + <h2><a href="#gfdl"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>D.12 <a name="gfdl-addendum">ADDENDUM: How to use this License + for your documents</a></h2> + <p>To use this License in a document you have written, + include a copy of the License in the document and put the + following copyright and license notices just after the title + page: + </p> + <blockquote class="citation"><a name="K43"> </a><p> + Copyright (c) YEAR YOUR NAME. Permission is granted to + copy, distribute and/or modify this document under the terms + of the GNU Free Documentation License, Version 1.2 or any + later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no + Back-Cover Texts. A copy of the license is included in the + section entitled ‘GNU Free Documentation + License’. + + </p> + </blockquote> + <p>If you have Invariant Sections, Front-Cover Texts and + Back-Cover Texts, replace the + ‘with...Texts.’ line with this: + </p> + <blockquote class="citation"><a name="K43"> </a><p> + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover + Texts being LIST. + + </p> + </blockquote> + <p>If you have Invariant Sections without Cover Texts, or + some other combination of the three, merge those two + alternatives to suit the situation. + </p> + <p>If your document contains nontrivial examples of program + code, we recommend releasing these examples in parallel under + your choice of free software license, such as the GNU General + Public License, to permit their use in free software. + </p> + </div> + </div> + <div class="bib"> + <h2><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="biblio">References</a></h2> + <p><b><a name="mathguide">American Mathematical Society</a>: </b><cite>Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></cite>. AMS, Providence, RI, <tt><a href="http://www.ams.org/tex/short-math-guide.html">http://www.ams.org/tex/short-math-guide.html</a></tt>, 2001. [<a href="#K13">(Introduction)</a>] [<a href="#K19">(Foreword)</a>] + </p> + <p><b><a name="">Anon</a>: </b>Táin bó Cúailnge55<cite>Leabhar na h-Uidhri: The Book of the Dun Cow</cite>. Royal Irish Academy, Dublin, 1100. [<a href="#K23">(2.1)</a>] + </p> + <p><b><a name="gnufdl">Free Software Foundation</a>: </b><cite>The GNU Free Documentation License</cite>. Free Software Foundation, Boston, MA, <tt><a href="http://www.fsf.org/copyleft/fdl.html">http://www.fsf.org/copyleft/fdl.html</a></tt>, 2003/02/10 + 23:42:49. [<a href="#K1">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="begin"><span class="TEX">T<span class="E">E</span>X</span> Users Group</a>: </b><cite>Getting Started with <span class="TEX">T<span class="E">E</span>X</span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and friends</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, <tt><a href="http://www.tug.org/begin.html">http://www.tug.org/begin.html</a></tt>, November 2003. [<a href="#K9">(Introduction)</a>] + </p> + <p><b><a name="wired">Anderson, Chris</a> (Ed.): </b><cite>WIRED</cite>. Condé Nast, San Francisco, CA, 1059-1028, 1993--. [<a href="#K38">(8.1)</a>] + </p> + <p><b><a name="tugboat">Beeton, Barbara</a> (Ed.): </b><cite>TUGboat</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, 0896-3207, Since 1980. [<a href="#K7">(Release Info)</a>] [<a href="#K8">(Revision Info)</a>] [<a href="#K43">(B)</a>] + </p> + <p><b><a name="fontname">Berry, Karl</a>: </b><cite>Fontname: Filenames for fonts</cite>. , <tt><a href="http://www.ctan.org/tex-archive/info/fontname/">http://www.ctan.org/tex-archive/info/fontname/</a></tt><span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, June 2001. [<a href="#K40">(8.3.2)</a>] + </p> + <p><b><a name="bull">Bull, RJ</a>: </b><cite>Accounting in Business</cite>. Butterworths, London, 1972, 0-406-70651-4. [<a href="#K31">(6.4)</a>] + </p> + <p><a name="teiguide"><b>Burnard, Lou</b><b> and Sperberg-McQueen, Michael</b>: </a><cite>Guidelines for the Text Encoding Initiative</cite>. OUP, Oxford, 1995. [<a href="#K30">(6.2.5)</a>] + </p> + <p><a name="practex"><b>Carnes, Lance</b><b> and Berry, Karl</b> (Eds.): </a><cite>The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, <tt><a href="http://www.tug.org/pracjourn/">http://www.tug.org/pracjourn/</a></tt>, 2004. [<a href="#K3">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="davy">Davy, William</a>: </b><cite>A System of Divinity</cite>. Published by the author, Lustleigh, Devon, 1806. [<a href="#K34">(7.1)</a>] + </p> + <p><b><a name="gentle">Doob, Michael <span class="affil">(University of Manitoba, Winnipeg, Manitoba, Canada)</span></a>: </b><cite>A Gentle Introduction to <span class="TEX">T<span class="E">E</span>X</span>: A Manual for Self-Study</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, 2002, <tt><a href="http://www.ctan.org/tex-archive/info/gentle/">http://www.ctan.org/tex-archive/info/gentle/</a></tt>. [<a href="#K11">(Introduction)</a>] + </p> + <p><b><a name="bovary">Flaubert, Gustave</a>: </b><cite>Madame Bovary</cite>. , Paris, 1857. [<a href="#K29">(6)</a>] + </p> + <p><b><a name="htmlbook">Flynn, Peter</a>: </b><cite>The HTML Handbook</cite>. International Thompson Computer + Press, London, 1-85032-205-8, 1995. [<a href="#K4">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="xmlfaq">Flynn, Peter</a>: </b><cite>The XML FAQ</cite>. University College Cork, Cork, Ireland, <tt><a href="http://www.ucc.ie/xml/">http://www.ucc.ie/xml/</a></tt>, January 2005. [<a href="#K6">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="sgmltools">Flynn, Peter</a>: </b><cite>Understanding SGML and XML Tools</cite>. Kluwer, Boston, 0-7923-8169-6, 1998. [<a href="#K5">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="fg">Fothergill, John</a>: </b><cite>An Innkeeper's Diary</cite>. Penguin, London3rd, 1929. [<a href="#K35">(7.4.2.1)</a>] + </p> + <p><a name="graphicscomp"><b>Goossens, Michel</b><b>; Rahtz, Sebastian</b><b>; and Mittelbach, Frank</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Graphics Companion</cite>. Addison-Wesley, Reading, MA, 0-201-85469-4, 1997. [<a href="#K17">(Foreword)</a>] + </p> + <p><a name="webcomp"><b>Goossens, Michel</b><b>; Rahtz, Sebastian</b><b>; Moore, Ross</b><b>; and Sutor, Bob</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Web Companion</cite>. Addison-Wesley, Reading, MA, 0-201-43311-7, 1999. [<a href="#K18">(Foreword)</a>] + </p> + <p><b><a name="">Goreham, Anthony</a>: </b>Re: Installing a new font: PFM, PFB‘<a href="newscomp.text.tex"><tt>comp.text.tex</tt></a>’. , <i>m3r8qj42o3.fsf@micawber.queens.ox.ac.uk</i>, (all pages), 28 November 2001. + </p> + <p><b><a name="">Heller, Robert</a>: </b>New To <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>...Unlearning Bad Habits‘<a href="newscomp.text.tex"><tt>comp.text.tex</tt></a>’. , <i>MPG.18d82140d65ddc5898968c@news.earthlink.net</i>, (all pages), 11 March 2003. [<a href="#K20">(Preface)</a>] + </p> + <p><a name="fontinst"><b>Jeffrey, Alan</b><b> and McDonnell, Rowland</b>: </a><cite>Font installation software for <span class="TEX">T<span class="E">E</span>X</span></cite>. , <tt><a href="http://www.tex.ac.uk/tex-archive/fonts/utilities/fontinst/">http://www.tex.ac.uk/tex-archive/fonts/utilities/fontinst/</a></tt><span class="TEX">T<span class="E">E</span>X</span> Users Group, 30 June 1998. + </p> + <p><a name="mathwrite"><b>Knuth, Donald E</b><b>; Larrabee, Tracey</b><b>; and Roberts, Paul M</b>: </a><cite>Mathematical Writing</cite>. Mathematical Association of America, Washington, DCMAA Notes 14, 0-88385-063-X, 1989. [<a href="#K22">(Preface)</a>] + </p> + <p><b><a name="aocs">Knuth, Donald Ervin</a>: </b><cite>The Art of Computer Programming</cite>. Addison-Wesley, Reading, MA2nd<b>1</b>, 0-201-89685-0, 1980. [<a href="#K21">(Preface)</a>] + </p> + <p><b><a name="latexbook">Lamport, Leslie</a>: </b><cite><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: A Document Preparation System</cite>. Addison-Wesley, Reading, MA, 0-201-52983-12nd, 1994. [<a href="#K15">(Foreword)</a>] [<a href="#K27">(3.6)</a>] [<a href="#K36">(7.5)</a>] + </p> + <p><b><a name="macnamara">Mac Namara, Matthew</a>: </b><cite>La Textualisation de Madame + Bovary</cite>. Rodopi, Amsterdam, 2003. [<a href="#K28">(6)</a>] + </p> + <p><a name="companion"><b>Mittelbach, Frank</b><b>; Goossens, Michel</b><b>; Braams, Johannes</b><b>; Carlisle, David</b><b>; and Rowley, Chris</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</cite>. Addison-Wesley/Pearson Education, Boston, MA2, 0-201-36299-6, 2004. [<a href="#K16">(Foreword)</a>] [<a href="#K26">(3.1)</a>] [<a href="#K32">(6.5)</a>] [<a href="#K37">(7.5)</a>] [<a href="#K39">(8.1.1)</a>] [<a href="#K41">(8.3.2)</a>] + </p> + <p><a name="lshort"><b>Oetiker, Tobias</b><b>; Partl, Hubert</b><b>; Hyna, Irene</b><b>; and Schlegl, Elisabeth</b>: </a><cite>The (Not So) Short Guide to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>: in 131 Minutes</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/lshort/">http://www.ctan.org/tex-archive/info/lshort/</a></tt>, 20013.2. [<a href="#K10">(Introduction)</a>] + </p> + <p><b><a name="symbol-list">Pakin, Scott <span class="affil">(University of Illinois, Urbana-Champaign)</span></a>: </b><cite>A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/">http://www.ctan.org/tex-archive/info/symbols/comprehensive/</a></tt>, 2002. [<a href="#K14">(Introduction)</a>] [<a href="#K42">(9.6.1)</a>] + </p> + <p><b><a name="">Rawlings, Marjorie Kinnan</a>: </b>Varmints‘Scribner's Magazine’. , 1936. [<a href="#K24">(2.1)</a>] + </p> + <p><b><a name="imported">Reckdahl, Keith</a>: </b><cite>Using imported graphics in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span></cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/epslatex.pdf/">http://www.ctan.org/tex-archive/info/epslatex.pdf/</a></tt>, 19972.0. [<a href="#K12">(Introduction)</a>] + </p> + <p><b><a name="ryder">Ryder, John</a>: </b><cite>Printing for Pleasure</cite>. Bodley Head, London, 0-370-10443-9, 1976. [<a href="#K33">(7.1)</a>] + </p> + </div> + <div class="ind"> + <h2><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="index">Index</a></h2> + <p>The same fonts are used here as in the text of the book + (see <a href="#symbols">section 8</a>) to distinguish between different + meanings: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Notation</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><small><a href="#CTAN" class="acroref" name="A308" title="Comprehensive Archive Network">CTAN</a></small></td> + <td valign="top" align="left">Acronyms (small caps in some typefaces)</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c321">\command</a></code></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> control sequences (monospace font) + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-weight:bold; font-style:italic; ">term</span></td> + <td valign="top" align="left">Defining instance of a specialist term (bold + italics) + </td> + </tr> + <tr> + <td valign="top" align="left"><i><a name="p289">product</a></i></td> + <td valign="top" align="left">program or product name (italics)</td> + </tr> + <tr> + <td valign="top" align="left"><span class="environment"><a name="e55">environment</a></span></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> environment (sans-serif bold) + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="package"><a name="m91">package</a></span></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> package (sans-serif; all available from + <small><a href="#CTAN" class="acroref" name="A309" title="Comprehensive Archive Network">CTAN</a></small>) + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="option"><a name="o21">options</a></span></td> + <td valign="top" align="left">Options to environments (sans-serif oblique)</td> + </tr> + <tr> + <td valign="top" align="left"><tt><i><a name="l39">variables</a></i></tt></td> + <td valign="top" align="left">Variables (monospace oblique)</td> + </tr> + </table> + </div> + <p>In the online version, the entries below are all hyperlinked + to their source, with subsequent multiple occurrences giving the + section number or name. Page or section numbers in <span style="font-weight:bold; ">bold type</span> indicate a defining + instance. + </p> + <hr> + <div align="center"> + <table> + <tr> + <td><a href="#A">A</a></td> + <td><a href="#B">B</a></td> + <td><a href="#C">C</a></td> + <td><a href="#D">D</a></td> + <td><a href="#E">E</a></td> + <td><a href="#F">F</a></td> + <td><a href="#G">G</a></td> + <td><a href="#H">H</a></td> + <td><a href="#I">I</a></td> + <td><a href="#J">J</a></td> + <td><a href="#K">K</a></td> + <td><a href="#L">L</a></td> + <td><a href="#M">M</a></td> + <td><a href="#N">N</a></td> + <td><a href="#O">O</a></td> + <td><a href="#P">P</a></td> + <td><a href="#Q">Q</a></td> + <td><a href="#R">R</a></td> + <td><a href="#S">S</a></td> + <td><a href="#T">T</a></td> + <td><a href="#U">U</a></td> + <td><a href="#V">V</a></td> + <td><a href="#W">W</a></td> + <td><a href="#X">X</a></td> + <td><a href="#Y">Y</a></td> + <td><a href="#Z">Z</a></td> + </tr> + </table> + </div> + <hr> + <h4><a name="A">A</a></h4> + <br><a class="option-first" href="#o1">a4paper</a> (3.1.1) + <br><a class="productname-first" href="#p233">AbiWord</a> (10.1), + <a class="productname-subseq" href="#p262">(10.1.1)</a> + <br><a class="modespec-first" href="#e8">abstract</a> (3.4) + <br><a class="command-first" href="#c60">\abstractname</a> (3.4) + <br><a class="soloindex" href="#I53">abstracts</a> + <br><a class="soloindex" href="#I22">accents</a> + <br><a class="productname-single" href="#p280">Acrobat</a> (10.2.4) + <br><a class="productname-first" href="#p28">Acrobat Reader</a> (1.1), + <a class="productname-subseq" href="#p123">(4.1)</a>, + <a class="productname-subseq" href="#p137">(4.3.3)</a> + <br><a class="command-single" href="#c92">\addcontentsline</a> (3.7) + <br><a class="command-single" href="#c52">\affiliation</a> (3.3) + <br><a href="#AFM" class="acroid">AFM</a> (Adobe Font + Metric) (8.3.2) + <br><a class="productname-first" href="#p215">afm2tfm</a> (8.3.2) + <br><a class="option-single" href="#o14">alpha</a> (7.4.2.1) + <br><a href="#AMS" class="acroid">AMS</a> (American + Mathematical Society) (8.3.3) + <br><a href="#ANSI" class="acroid">ANSI</a> (American National + Standards Institute) (C) + <br><a class="soloindex" href="#I13">Apple Mac</a> + <br><a class="productname-single" href="#p39">apt-get</a> (1.2) + <br><a class="command-single" href="#c316">\arabic</a> (9.6) + <br><a class="productname-single" href="#p171">ArcInfo</a> (6.5.1) + <br><b><i><a href="#arguments" class="firstterm">arguments</a></i></b> (2.4.2) + <br><a class="methodname-single" href="#m48">array</a> (6.3.3) + <br><a class="methodname-first" href="#m14">article</a> (3.1) + <br><a href="#ASCII" class="acroid">ASCII</a> (American Standard Code for Information + Interchange) (2), <a class="acrorefs" href="#A11">(Introduction)</a>, <a class="acrorefs" href="#A78">(2.7)</a>, <a class="acrorefs" href="#A79">(2.9)</a>, <a class="acrorefs" href="#A97">(4.3.2)</a>, <a class="acrorefs" href="#A154">(6.5)</a>, <a class="acrorefs" href="#A200">(8.3)</a>, <a class="acrorefs" href="#A275">(10.1.1)</a>, <a class="acrorefs" href="#A302">(C)</a> + <br><b><i><a href="#asynchronous" class="firstterm">asynchronous typographic + display</a></i></b> (Introduction) + <br><a class="productname-single" href="#p111">AUC<span class="TEX">T<span class="E">E</span>X</span></a> (2.3.6) + <br><a class="command-first" href="#c47">\author</a> (3.3), + <a class="command-subseq" href="#c275">(9.2)</a> + <br><a class="command-single" href="#c175">\authorof</a> (7.4.2.1) + <br><a class="productname-single" href="#p166">AutoCAD</a> (6.5.1) + <br><a class="productname-first" href="#p51">Autorun</a> (1.4) + <h4><a name="B">B</a></h4> + <br><a class="option-single" href="#o12">b</a> (6.7.1) + <br><a class="methodname-first" href="#m9">babel</a> (2.8.6), + <a class="methodname-subseq" href="#m27">(3.6)</a> + <br><b><i><a href="#backslash" class="firstterm">backslash</a></i></b> (2.4) + <br><b><i><a href="#backtick" class="firstterm">backtick</a></i></b> (6.6.1) + <br><b><i><a href="#badness" class="firstterm"></a></i></b> (4.2.3.4) + <br><a class="productname-single" href="#p245">Balise</a> (10.1) + <br><a class="varname-first" href="#v29">baselineskip</a> (8.1.1) + <br><a class="command-first" href="#c196">\baselinestretch</a> (8.1.1) + <br><a class="productname-single" href="#p45">bash</a> (1.3) + <br><a class="methodname-first" href="#m41">bbding</a> (6.2.1), + <a class="methodname-subseq" href="#m89">(9.6.1)</a> + <br><a class="headword" href="#I118">beer</a><br> <a class="secondary" href="#I119">lite</a> (7.5)<br> <a class="tertiary" href="#I120">American</a> (7.5) + <br><a class="command-single" href="#c44">\begin</a> (3.2) + <br><a href="#kb" class="personname">Berry, Karl</a> (1), <a class="personname" href="#kb">(8.3.2)</a> + <br><a href="#" class="personname">Berry, Karl</a> (8.3.2) + <br><a class="command-first" href="#c222">\bfseries</a> (8.2.3) + <br><a class="soloindex" href="#I114">bibliographies</a> + <br><a class="command-single" href="#c177">\bibliography</a> (7.4.2.1) + <br><a class="command-single" href="#c178">\bibliographystyle</a> (7.4.2.1) + <br><a class="command-single" href="#c181">\bibname</a> (7.4.2.4) + <br><a class="productname-first" href="#p180">bibtex</a> (7.4.2.2) + <br><a class="command-single" href="#c192">\bigskip</a> (8.1.1) + <br><a href="#BMP" class="acroid">BMP</a> (Microsoft Bitmap) (6.5), <a class="acrorefs" href="#A166">(6.5.1)</a> + <br><a class="methodname-first" href="#m15">book</a> (3.1), + <a class="methodname-subseq" href="#m23">(3.5)</a> + <br><a class="soloindex" href="#I107">boxes</a> + <br><a class="soloindex" href="#I33">bp (big points)</a> + <br>braces, see curly bracescurly braces + <h4><a name="C">C</a></h4> + <br><a class="varname-single" href="#v5">C</a> (1.2) + <br><a class="command-first" href="#c114">\caption</a> (6.3.2) + <br><a class="soloindex" href="#I36">cc (Ciceros)</a> + <br><a href="#CD-ROM" class="acroid">CD-ROM</a> (Compact Disc Read-Only Memory) (Revision Info), <a class="acrorefs" href="#A217">(10)</a> + <br><a class="modespec-first" href="#e23">center</a> (6.3.3), + <a class="modespec-subseq" href="#e26">(6.3.4)</a> + <br><a class="command-single" href="#c119">\centering</a> (6.3.3) + <br><a class="productname-single" href="#p165">cep</a> (6.5) + <br><a href="#CGI" class="acroid">CGI</a> (Common Gateway Interface) (Introduction) + <br><a class="command-first" href="#c69">\chapter</a> (3.5) + <br><a class="varname-single" href="#v36">chapter</a> (9.6) + <br><a class="productname-single" href="#p116">charmap</a> (2.7) + <br><a class="productname-single" href="#p167">ChemDraw</a> (6.5.1) + <br><a href="#kac" class="personname">Chikrii, Kirill</a> (10.2.1) + <br><a class="headword" href="#I122">Chocolate Stout</a>, + <a class="primary" href="#I123">(7.5)</a> + <br><a class="productname-single" href="#p193">Chocolate + Stout</a> (7.5) + <br><a class="command-first" href="#c174">\cite</a> (7.4.2.1), + <a class="command-subseq" href="#c179">(7.4.2.2)</a> + <br><a class="command-single" href="#c158">\citequote</a> (7.1) + <br><a href="#CLI" class="acroid">CLI</a> (Command-Line Interface) (Introduction), <a class="acrorefs" href="#A46">(Preface)</a> + <br><a class="command-single" href="#c121">\cline</a> (6.3.3) + <br><a href="#CM" class="acroid">CM</a> (Computer Modern) (8.2), <a class="acrorefs" href="#A4">(Revision Info)</a>, <a class="acrorefs" href="#A5">(Revision Info)</a>, <a class="acrorefs" href="#A189">(8.2)</a>, <a class="acrorefs" href="#A192">(8.2.1)</a>, <a class="acrorefs" href="#A193">(8.2.4)</a>, <a class="acrorefs" href="#A211">(8.3.2)</a>, <a class="acrorefs" href="#A212">(8.3.3)</a> + <br><a class="soloindex" href="#I40">cm (centimeters)</a> + <br><a class="varname-single" href="#v32">cmr</a> (8.2.1) + <br><a class="varname-single" href="#v33">cmss</a> (8.2.1) + <br><a class="varname-single" href="#v34">cmtt</a> (8.2.1) + <br><a href="#CMYK" class="acroid">CMYK</a> (Cyan-Magenta-Yellow-Black) (8.2.6), <a class="acrorefs" href="#A116">(5.1.1)</a>, <a class="acrorefs" href="#A195">(8.2.6)</a> + <br><a class="methodname-first" href="#m30">color</a> (5.1.1), + <a class="methodname-subseq" href="#m37">(5.2.1)</a>, + <a class="methodname-subseq" href="#m83">(8.2.6)</a> + <br><a class="command-first" href="#c247">\color</a> (8.2.6) + <br><a class="command-single" href="#c255">\colorbox</a> (8.2.6) + <br><b><i><a href="#colornames" class="firstterm">color names</a></i></b> (8.2.6) + <br><a class="soloindex" href="#I153">colour</a> + <br><a class="soloindex" href="#I125">columns</a> + <br><a class="command-single" href="#c189">\columnsep</a> (7.6) + <br><a class="command-first" href="#c1">\command</a> (Introduction), + <a class="command-subseq" href="#c321">(Index)</a> + <br><b><i><a href="#commentchar" class="firstterm">comment character</a></i></b> (2.5.1) + <br><a class="soloindex" href="#I4">commercial implementations</a> + <br><b><i><a href="#commutative" class="firstterm">commutative</a></i></b> (8.2.3) + <br><a class="productname-single" href="#p156">configure</a> (5.2.2) + <br><a class="varname-single" href="#v3">counter</a> (Introduction) + <br><a class="productname-first" href="#p24">Crayola</a> (Preface), + <a class="productname-subseq" href="#p201">(8.2.6)</a> + <br><a class="soloindex" href="#I113">cross-references</a> + <br><a href="#CTAN" class="acroid">CTAN</a> (Comprehensive Archive + Network) (5), <a class="acrorefs" href="#A15">(Introduction)</a>, <a class="acrorefs" href="#A47">(Preface)</a>, <a class="acrorefs" href="#A50">(1)</a>, <a class="acrorefs" href="#A57">(1.4.3)</a>, <a class="acrorefs" href="#A68">(2.3.2)</a>, <a class="acrorefs" href="#A71">(2.3.3)</a>, <a class="acrorefs" href="#A72">(2.3.4)</a>, <a class="acrorefs" href="#A108">(4.4)</a>, <a class="acrorefs" href="#A111">(5)</a>, <a class="acrorefs" href="#A115">(5.1)</a>, <a class="acrorefs" href="#A120">(5.1.2)</a>, <a class="acrorefs" href="#A121">(5.2)</a>, <a class="acrorefs" href="#A128">(5.3)</a>, <a class="acrorefs" href="#A155">(6.5)</a>, <a class="acrorefs" href="#A184">(7.4.2.1)</a>, <a class="acrorefs" href="#A186">(7.4.2.4)</a>, <a class="acrorefs" href="#A187">(7.5)</a>, <a class="acrorefs" href="#A190">(8.2)</a>, <a class="acrorefs" href="#A202">(8.3.1)</a>, <a class="acrorefs" href="#A203">(8.3.1.2)</a>, <a class="acrorefs" href="#A252">(10.1)</a>, <a class="acrorefs" href="#A279">(10.2.1)</a>, <a class="acrorefs" href="#A295">(10.2.5)</a>, <a class="acrorefs" href="#A299">(B)</a>, <a class="acrorefs" href="#A308">(Index)</a> + <br><b><i><a href="#curly" class="firstterm">curly + braces</a></i></b> (2.4.2) + <br><a class="productname-single" href="#p157">Cygwin</a> (5.2.3) + <h4><a name="D">D</a></h4> + <br><a href="#rd" class="personname">Dambra, Ruggero</a> (10.1) + <br><a class="command-first" href="#c48">\date</a> (3.3), + <a class="command-subseq" href="#c94">(4.2.3.1)</a>, + <a class="command-subseq" href="#c98">(4.2.3.3)</a>, + <a class="command-subseq" href="#c276">(9.2)</a> + <br><a class="soloindex" href="#I35">dd (Didot points)</a> + <br><a href="#DEC" class="acroid">DEC</a> (Digital Equipment + Corporation) (Preface) + <br><a class="command-single" href="#c261">\DeclareFontFamily</a> (8.3.2) + <br><a class="command-first" href="#c262">\DeclareFontShape</a> (8.3.2) + <br><a class="command-first" href="#c297">\def</a> (9.4) + <br><a class="command-first" href="#c250">\definecolor</a> (8.2.6) + <br><a class="modespec-single" href="#e17">description</a> (6.2.3) + <br><a class="productname-single" href="#p284">detex</a> (10.2.5) + <br><a class="soloindex" href="#I27">dimension</a> + <br><b><i><a href="#dimension" class="firstterm">dimension</a></i></b> (3.6) + <br><a class="soloindex" href="#I23">dimensions</a> + <br><a class="soloindex" href="#I84">DOC<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a class="productname-single" href="#p19">DocBook</a> (Introduction) + <br><a class="modespec-first" href="#e6">document</a> (3.2), + <a class="modespec-subseq" href="#e7">(3.3)</a>, + <a class="modespec-subseq" href="#e12">(3.4)</a> + <br><b><i><a href="#documentclass" class="firstterm">document + class</a></i></b> (3) + <br><a class="command-first" href="#c43">\documentclass</a> (3.1), + <a class="command-subseq" href="#c62">(3.4)</a> + <br><a class="soloindex" href="#I49">document class</a> + <br><a href="#fd" class="personname">Dorner, Fernando</a> (10.2.1) + <br><a class="soloindex" href="#I134">double-spacing</a> + <br><a class="option-single" href="#o8">draft</a> (3.1.1) + <br><a class="productname-single" href="#p175">Draw</a> (6.5.1) + <br><a href="#DSSSL" class="acroid">DSSSL</a> (Document + Style Semantics and Specification Language) (10.1) + <br><a href="#DTD" class="acroid">DTD</a> (Document Type + Definition) (10.1), <a class="acrorefs" href="#A26">(Introduction)</a>, <a class="acrorefs" href="#A256">(10.1)</a> + <br><a href="#DTP" class="acroid">DTP</a> (desktop publishing) (Preface), <a class="acrorefs" href="#A45">(Preface)</a>, <a class="acrorefs" href="#A135">(6.3)</a>, <a class="acrorefs" href="#A191">(8.2)</a> + <br><a href="#DVD" class="acroid">DVD</a> (Digital Versatile Disk) (Revision Info), <a class="acrorefs" href="#A218">(10)</a> + <br><a href="#DVI" class="acroid">DVI</a> (device-independent) (4.1), <a class="acrorefs" href="#A42">(Preface)</a>, <a class="acrorefs" href="#A51">(1.1)</a>, <a class="acrorefs" href="#A61">(2.2)</a>, <a class="acrorefs" href="#A66">(2.3.2)</a>, <a class="acrorefs" href="#A91">(4.1.3)</a>, <a class="acrorefs" href="#A92">(4.3)</a>, <a class="acrorefs" href="#A95">(4.3.1)</a>, <a class="acrorefs" href="#A98">(4.3.2)</a>, <a class="acrorefs" href="#A103">(4.3.3)</a>, <a class="acrorefs" href="#A118">(5.1.2)</a>, <a class="acrorefs" href="#A172">(6.5.1)</a>, <a class="acrorefs" href="#A182">(6.7)</a>, <a class="acrorefs" href="#A296">(10.2.5)</a> + <br><a class="productname-single" href="#p152">dvialw</a> (4.4) + <br><a class="productname-single" href="#p150">dvieps</a> (4.4) + <br><a class="productname-single" href="#p151">dvihp</a> (4.4) + <br><a class="productname-first" href="#p131">dvips</a> (4.3.2), + <a class="productname-subseq" href="#p142">(4.4)</a>, + <a class="productname-subseq" href="#p161">(6.5)</a>, + <a class="productname-subseq" href="#p200">(8.2.6)</a>, + <a class="productname-subseq" href="#p216">(8.3.2)</a> + <br><a class="productname-single" href="#p129">dviview</a> (4.3.1) + <br><a class="productname-single" href="#p240">DynaTag</a> (10.1) + <h4><a name="E">E</a></h4> + <br><a href="#ECDL" class="acroid">ECDL</a> (European Computer Driving + Licence) (Introduction), <a class="acrorefs" href="#A14">(Introduction)</a> + <br><a class="soloindex" href="#I15">editors</a> + <br><a class="command-single" href="#c265">\ef</a> (9.1) + <br><b><i><a href="#element" class="firstterm">element</a></i></b> (3) + <br><a class="productname-single" href="#p189">elsevier</a> (7.4.2.4) + <br><a class="soloindex" href="#I37">em (relative + measure)</a> + <br><a class="productname-first" href="#p10">Emacs</a> (Introduction), + <a class="productname-subseq" href="#p43">(1.2)</a>, + <a class="productname-subseq" href="#p77">(1.4.2)</a>, + <a class="productname-subseq" href="#p88">(2.1)</a>, + <a class="productname-subseq" href="#p95">(2.3)</a>, + <a class="productname-subseq" href="#p106">(2.3.6)</a>, + <a class="productname-subseq" href="#p114">(2.6)</a>, + <a class="productname-subseq" href="#p124">(4.1.3)</a>, + <a class="productname-subseq" href="#p126">(4.2.1)</a>, + <a class="productname-subseq" href="#p145">(4.4)</a>, + <a class="productname-subseq" href="#p159">(6.3.3)</a>, + <a class="productname-subseq" href="#p184">(7.4.2.3)</a>, + <a class="productname-subseq" href="#p258">(10.1)</a> + <br><a class="command-first" href="#c241">\emph</a> (8.2.5) + <br><a class="option-single" href="#o16">empty</a> (8.1.2) + <br><a class="command-single" href="#c45">\end</a> (3.2) + <br><a class="methodname-single" href="#m60">endnote</a> (7.2) + <br><a class="command-single" href="#c201">\enspace</a> (8.1.1) + <br><a class="modespec-single" href="#e14">enumerate</a> (6.2.2) + <br><a class="modespec-single" href="#e16">enumerate*</a> (6.2.2) + <br><a class="varname-single" href="#v21">enumi</a> (6.2.6) + <br><a class="varname-single" href="#v22">enumii</a> (6.2.6) + <br><a class="varname-single" href="#v23">enumiii</a> (6.2.6) + <br><a class="varname-single" href="#v24">enumiv</a> (6.2.6) + <br><a class="modespec-first" href="#e1">environment</a> (Introduction) + <br><b><i><a href="#environment" class="firstterm">environment</a></i></b> (3.2) + <br><a class="soloindex" href="#I89">environment</a>, + <a class="modespec-subseq" href="#e55">(Index)</a> + <br><a href="#EPS" class="acroid">EPS</a> (Encapsulated + PostScript) (6.5), <a class="acrorefs" href="#A140">(6.5)</a>, <a class="acrorefs" href="#A157">(6.5.1)</a> + <br><a class="methodname-single" href="#m50">epsf</a> (6.5) + <br><a class="modespec-single" href="#e5">equation</a> (2.9)<br> <a class="secondary" href="#I74">File not found</a> (4.2.3.6)<br> <a class="secondary" href="#I72">Overfull hbox</a> (4.2.3.5)<br> <a class="secondary" href="#I68">Runaway argument</a> (4.2.3.3) + <br><a class="headword" href="#I64">Error messages</a><a class="secondary" href="#I64">Too many }'s</a> (4.2.3.1)<br> <a class="secondary" href="#I66">Undefined control sequence</a> (4.2.3.2)<br> <a class="secondary" href="#I70">Underfull hbox</a> (4.2.3.4) + <br><a href="#esser" class="personname">Esser, Thomas</a> (1) + <br><a class="command-single" href="#c17">\EUR</a> (2.5.1) + <br><font color="red">sortas:euro</font> + <br><a class="productname-single" href="#p236">EuroMath</a> (10.1) + <br><a class="soloindex" href="#I38">ex (relative + measure)</a> + <br><a class="varname-first" href="#v19">example</a> (6.2.6) + <br><a class="productname-single" href="#p250">Excel</a> (10.1) + <h4><a name="F">F</a></h4> + <br><b><i><a href="#family" class="firstterm">family</a></i></b> (8.2.3) + <br><a class="methodname-first" href="#m54">fancybox</a> (6.6.2), + <a class="methodname-subseq" href="#m56">(6.7.3)</a>, + <a class="methodname-subseq" href="#m88">(9.5)</a> + <br><a class="methodname-single" href="#m72">fancyhdr</a> (8.1.2) + <br><a class="command-single" href="#c209">\fancyhead</a> (8.1.2) + <br><a class="methodname-single" href="#m53">fancyvrb</a> (6.6.2) + <br><a href="#FAQ" class="acroid">FAQ</a> (Frequently-Asked Questions) (5.3.1), <a class="acrorefs" href="#A32">(Foreword)</a>, <a class="acrorefs" href="#A114">(5)</a>, <a class="acrorefs" href="#A130">(5.3.1)</a>, <a class="acrorefs" href="#A131">(5.3.4)</a> + <br><a class="command-first" href="#c150">\fbox</a> (6.7.2), + <a class="command-subseq" href="#c154">(6.7.3)</a>, + <a class="command-subseq" href="#c254">(8.2.6)</a> + <br><a class="varname-single" href="#v28">fboxrule</a> (6.7.2) + <br><a class="varname-single" href="#v27">fboxsep</a> (6.7.2) + <br><a href="#tf" class="personname">Feuerstack, Thomas</a> (1) + <br><a class="modespec-single" href="#e29">figure</a> (6.4) + <br><a class="modespec-single" href="#e49">figure*</a> (7.6) + <br><a class="soloindex" href="#I99">figures</a> + <br><a class="soloindex" href="#I62">filenames</a> + <br><a class="soloindex" href="#I73">File not found</a> + <br><a href="#jf" class="personname">Fine, Jonathan</a> (Introduction) + <br><a class="modespec-single" href="#e20">float</a> (6.3.1) + <br><a class="headword" href="#I98">floats</a>, + <a class="primary" href="#I100">(6.4)</a> + <br><a class="modespec-first" href="#e28">flushleft</a> (6.3.4), + <a class="modespec-subseq" href="#e51">(9.2)</a> + <br><a class="modespec-single" href="#e27">flushright</a> (6.3.4) + <br><a class="methodname-single" href="#m61">fnpara</a> (7.2) + <br><a class="command-single" href="#c163">\fnsymbol</a> (7.2) + <br><b><i><a href="#fontdef" class="firstterm">font definition</a></i></b> (8.3.2) + <br><a class="command-first" href="#c212">\fontencoding</a> (8.2.2) + <br><a class="command-single" href="#c213">\fontfamily</a> (8.2.2) + <br><a class="productname-single" href="#p210">fontinst</a> (8.3.2) + <br><a class="productname-first" href="#p212">fontname</a> (8.3.2) + <br><a class="methodname-first" href="#m86">fontname</a> (8.3.2)<br> <a class="secondary" href="#I149">changing temporarily</a> (8.2.2)<br> <a class="secondary" href="#I147">changing the default</a> (8.2.1)<br> <a class="secondary" href="#I154">colour</a> (8.2.6)<br> <a class="secondary" href="#I142">Computer Modern</a> (8.2)<br> <a class="secondary" href="#I157">encoding</a> (8.3.2)<br> <a class="secondary" href="#I148">families</a> (8.2.1)<br> <a class="secondary" href="#I140">in general</a> (8.2), + <a class="primary" href="#I155">(8.3)</a> + <br><a class="command-first" href="#c239">\fontsize</a> (8.2.4)<br> <a class="secondary" href="#I141">METAFONT</a> (8.2), + <a class="primary" href="#I144">(8.2)</a><br> <a class="secondary" href="#I145">PostScript</a> (8.2), + <a class="primary" href="#I156">(8.3.2)</a> + <br><a class="headword" href="#I51">fonts</a><a class="secondary" href="#I51">sizes</a> (3.1.1), + <a class="primary" href="#I152">(8.2.4)</a><br> <a class="secondary" href="#I151">styles</a> (8.2.3)<br> <a class="secondary" href="#I143">TrueType</a> (8.2)<br> <a class="secondary" href="#I146">Type 1</a> (8.2) + <br><a class="command-single" href="#c159">\footnote</a> (7.2) + <br><a class="soloindex" href="#I111">footnotes</a> + <br><a class="command-single" href="#c231">\footnotesize</a> (8.2.4) + <br><a class="command-single" href="#c243">\foreign</a> (8.2.5) + <br><a class="productname-single" href="#p6">fp<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="soloindex" href="#I6">fp<span class="TEX">T<span class="E">E</span>X</span></a> + <br><font color="red">sortas:fptex</font> + <br><a class="productname-single" href="#p230">FrameMaker</a> (10) + <br><a href="#FTP" class="acroid">FTP</a> (File + Transfer Protocol) (Introduction), <a class="acrorefs" href="#A110">(5)</a><h4><a name="G">G</a></h4> + <br><a class="methodname-first" href="#m31">geometry</a> (5.1.1), + <a class="methodname-subseq" href="#m36">(5.1.2)</a>, + <a class="methodname-subseq" href="#m62">(7.3)</a>, + <a class="methodname-subseq" href="#m67">(8.1.1)</a> + <br><a class="productname-first" href="#p134">Ghostscript</a> (4.3.2), + <a class="productname-subseq" href="#p149">(4.4)</a>, + <a class="productname-subseq" href="#p196">(8.2)</a> + <br><a class="productname-first" href="#p56">GhostScript</a> (1.4.1) + <br><a class="productname-single" href="#p33">GhostView</a> (1.1) + <br><a href="#GIF" class="acroid">GIF</a> (Graphics Interchange + Format) (6.5.1) + <br><a class="productname-single" href="#p176">GIMP</a> (6.5.1) + <br><a class="soloindex" href="#I117">glossaries</a> + <br><a class="command-single" href="#c187">\glossary</a> (7.5) + <br><a href="#GNU" class="acroid">GNU</a> (GNU's Not + Unix) (2.3.6), <a class="acrorefs" href="#A30">(Introduction)</a>, <a class="acrorefs" href="#A74">(2.3.6)</a> + <br><a class="productname-single" href="#p178">GNUplot</a> (6.5.1) + <br><a href="#ag" class="personname">Granzer, Andreas</a> (10.2.1) + <br><a class="methodname-single" href="#m38">graphics</a> (5.2.1) + <br><a class="soloindex" href="#I102">graphics</a> + <br><a class="command-first" href="#c130">\graphicspath</a> (6.5.2) + <br><a class="methodname-first" href="#m49">graphicx</a> (6.5) + <br><b><i><a href="#grave" class="firstterm">grave accent</a></i></b> (6.6.1) + <br><a class="soloindex" href="#I150">grouping</a> + <br><a class="productname-first" href="#p26">GSview</a> (1.1), + <a class="productname-subseq" href="#p57">(1.4.1)</a>, + <a class="productname-subseq" href="#p119">(4.1)</a>, + <a class="productname-subseq" href="#p133">(4.3.2)</a>, + <a class="productname-subseq" href="#p140">(4.3.3)</a>, + <a class="productname-subseq" href="#p141">(4.4)</a>, + <a class="productname-subseq" href="#p197">(8.2)</a>, + <a class="productname-subseq" href="#p224">(8.3.3)</a> + <br><a class="productname-first" href="#p82">GSView</a> (1.4.2) + <br><a href="#GUI" class="acroid">GUI</a> (Graphical User Interface) (Introduction), <a class="acrorefs" href="#A23">(Introduction)</a>, <a class="acrorefs" href="#A35">(Preface)</a>, <a class="acrorefs" href="#A89">(4.1.2)</a> + <br><a class="productname-single" href="#p211">Gutta-Percha</a> (8.3.2) + <br><a class="productname-single" href="#p34">gv</a> (1.1) + <h4><a name="H">H</a></h4> + <br>H&J, see hyphenation, justificationhyphenation, justification + <br><a class="soloindex" href="#I44">hard space</a> + <br><a class="productname-single" href="#p187">harvard</a> (7.4.2.4) + <br><b><i><a href="#hash" class="firstterm">hash mark</a></i></b> (2.5.1) + <br><a class="option-single" href="#o17">headings</a> (8.1.2) + <br><a class="soloindex" href="#I87">help</a> + <br><a href="#wh" class="personname">Hennings, Wilfried</a> (10.2.1) + <br><font color="red">sortas:hj</font> + <br><a class="command-single" href="#c120">\hline</a> (6.3.3) + <br><a class="command-single" href="#c288">\hrule</a> (9.2) + <br><a class="command-single" href="#c199">\hspace</a> (8.1.1) + <br><a href="#HTML" class="acroid">HTML</a> (HyperText + Markup Language) (10), <a class="acrorefs" href="#A2">(Release Info)</a>, <a class="acrorefs" href="#A27">(Introduction)</a>, <a class="acrorefs" href="#A60">(2.1)</a>, <a class="acrorefs" href="#A82">(3.1)</a>, <a class="acrorefs" href="#A85">(3.6)</a>, <a class="acrorefs" href="#A133">(6.3)</a>, <a class="acrorefs" href="#A223">(10.1)</a>, <a class="acrorefs" href="#A273">(10.1.1)</a>, <a class="acrorefs" href="#A277">(10.2)</a>, <a class="acrorefs" href="#A282">(10.2.1)</a>, <a class="acrorefs" href="#A283">(10.2.2)</a>, <a class="acrorefs" href="#A290">(10.2.3)</a>, <a class="acrorefs" href="#A306">(D.2)</a> + <br><a class="productname-single" href="#p239">HTML + Tidy</a> (10.1) + <br><a class="command-single" href="#c237">\huge</a> (8.2.4) + <br><a class="command-single" href="#c238">\Huge</a> (8.2.4) + <br><a class="soloindex" href="#I24">hyphenation</a> + <br><a class="command-single" href="#c25">\hyphenation</a> (2.8.2)<br> <a class="secondary" href="#I43">discretionary</a> (2.8.2) + <br><a class="headword" href="#I42">hyphens</a><a class="secondary" href="#I42">soft</a> (2.8.2) + <h4><a name="I">I</a></h4> + <br><a class="command-single" href="#c22">\i</a> (2.7) + <br><a href="#IBM" class="acroid">IBM</a> (International Business Machines) (Revision Info), <a class="acrorefs" href="#A29">(Introduction)</a> + <br><a href="#IDE" class="acroid">IDE</a> (Integrated Development + Environment) (1.4.1) + <br><a href="#IEEETR" class="acroid">IEEETR</a> (Transactions of the Institute of Electrical + and Electronics Engineers) (7.4.2.1) + <br><a class="productname-single" href="#p174">Illustrator</a> (6.5.1) + <br><a class="productname-single" href="#p47">I<span class="TEX">T<span class="E">E</span>X</span>Mac</a> (1.3) + <br><a class="soloindex" href="#I101">images</a> + <br><a class="soloindex" href="#I41">in (inches)</a> + <br><a class="command-first" href="#c124">\includegraphics</a> (6.4), + <a class="command-subseq" href="#c125">(6.5)</a>, + <a class="command-subseq" href="#c129">(6.5.1)</a>, + <a class="command-subseq" href="#c131">(6.5.2)</a> + <br><a class="command-first" href="#c184">\index</a> (7.5), + <a class="command-subseq" href="#c309">(9.4)</a> + <br><a class="soloindex" href="#I116">indexes</a> + <br><b><i><a href="#inlines" class="firstterm">Inline lists</a></i></b> (6.2.4) + <br><a class="modespec-first" href="#e18">inparaenum</a> (6.2.4) + <br><a class="methodname-first" href="#m5">inputenc</a> (2.7), + <a class="methodname-subseq" href="#m12">(2.9)</a>, + <a class="methodname-subseq" href="#m90">(C)</a> + <br><a class="productname-single" href="#p18">Instant + Preview</a> (Introduction) + <br><a href="#ISO" class="acroid">ISO</a> (International Organization for + Standardization) (10.1) + <br><a class="productname-single" href="#p96">ispell</a> (2.3.2) + <br><a class="command-single" href="#c104">\item</a> (6.2) + <br><a class="modespec-single" href="#e13">itemize</a> (6.2.1) + <br><a class="modespec-single" href="#e15">itemize*</a> (6.2.2) + <br><a class="command-single" href="#c219">\itshape</a> (8.2.3) + <h4><a name="J">J</a></h4> + <br><a href="#bj" class="personname">Jackowski, Bogusław</a> (8.3.3) + <br><a class="productname-first" href="#p21">Java</a> (Introduction), + <a class="productname-subseq" href="#p260">(10.1.1)</a> + <br><a href="#JPG" class="acroid">JPG</a> (Joint Photographic + Experts Group) (6.5), <a class="acrorefs" href="#A150">(6.5)</a>, <a class="acrorefs" href="#A162">(6.5.1)</a> + <br><a class="methodname-single" href="#m63">jurabib</a> (7.4.2.5) + <br><a class="soloindex" href="#I25">justification</a><h4><a name="K">K</a></h4> + <br><a href="#dk" class="personname">Kastrup, David</a> (Introduction), <a class="personname" href="#dk">(9.4)</a> + <br><a href="#mk" class="personname">Kay, Michael</a> (Introduction) + <br><a href="#ul" class="personname">Kern, Uwe</a> (5.1.1) + <br><a href="#tk" class="personname">Kiffe, Tom</a> (1) + <br><a class="productname-single" href="#p190">kluwer</a> (7.4.2.4) + <br><a href="#knuth" class="personname">Knuth, Don</a> (Preface) + <br><a class="methodname-first" href="#m19">komascript</a> (3.1) + <br><a class="productname-single" href="#p234">Kword</a> (10.1) + <h4><a name="L">L</a></h4> + <br><a class="varname-single" href="#v6">L</a> (1.2) + <br><a class="command-first" href="#c108">\label</a> (6.2.5), + <a class="command-subseq" href="#c115">(6.3.2)</a>, + <a class="command-subseq" href="#c164">(7.4.1)</a> + <br><a href="#ll" class="personname">Lamport, Leslie</a> (9.4) + <br><a class="command-single" href="#c234">\large</a> (8.2.4) + <br><a class="command-single" href="#c235">\Large</a> (8.2.4) + <br><a class="command-single" href="#c236">\LARGE</a> (8.2.4) + <br><a class="command-single" href="#c319">\LaTeX</a> (10.1.1) + <br><a class="productname-single" href="#p272">latex2rtf</a> (10.2.1) + <br><a class="command-single" href="#c211">\leftmark</a> (8.1.2) + <br><a class="varname-single" href="#v1">length</a> (Introduction) + <br><b><i><a href="#length" class="firstterm">length</a></i></b> (3.6) + <br><a class="methodname-first" href="#m16">letter</a> (3.1) + <br><a class="option-first" href="#o2">letterpaper</a> (3.1.1) + <br><a class="soloindex" href="#I139">letterspacing</a> + <br><a class="command-single" href="#c293">\linebreak</a> (9.3) + <br><a class="soloindex" href="#I9">Linux</a> + <br><a class="command-single" href="#c87">\listoffigures</a> (3.7) + <br><a class="command-single" href="#c88">\listoftables</a> (3.7) + <br><a class="headword" href="#I88">lists</a><br> <a class="secondary" href="#I91">bulleted</a> (6.2.1)<br> <a class="secondary" href="#I94">description</a> (6.2.3)<br> <a class="secondary" href="#I95">discussion</a> (6.2.3)<br> <a class="secondary" href="#I93">enumerated</a> (6.2.2)<br> <a class="secondary" href="#I96">inline</a> (6.2.4)<br> <a class="secondary" href="#I90">itemized</a> (6.2.1)<br> <a class="secondary" href="#I92">numbered</a> (6.2.2) + <br><a href="#ml" class="personname">Lotz, Manfred</a> (1) + <h4><a name="M">M</a></h4> + <br><a class="soloindex" href="#I12">Mac OS X</a> + <br><a class="soloindex" href="#I158">macros</a> + <br><b><i><a href="#macs" class="firstterm">macros</a></i></b> (9) + <br><a class="command-single" href="#c278">\makeatletter</a> (9.2) + <br><a class="command-first" href="#c279">\makeatother</a> (9.2) + <br><a class="productname-single" href="#p191">makebst</a> (7.4.2.4) + <br><a class="command-single" href="#c186">\makeglossary</a> (7.5) + <br><a class="methodname-single" href="#m64">makeidx</a> (7.5) + <br><a class="productname-first" href="#p9">makeindex</a> (Introduction), + <a class="productname-subseq" href="#p192">(7.5)</a> + <br><a class="command-single" href="#c183">\makeindex</a> (7.5) + <br><a class="command-first" href="#c50">\maketitle</a> (3.3), + <a class="command-subseq" href="#c58">(3.4)</a>, + <a class="command-subseq" href="#c96">(4.2.3.3)</a>, + <a class="command-subseq" href="#c268">(9.2)</a> + <br><a href="#bkm" class="personname">Malyshev, Basil K.</a> (8.3.3) + <br><a class="productname-first" href="#p169">Maple</a> (6.5.1), + <a class="productname-subseq" href="#p238">(10.1)</a> + <br><a class="soloindex" href="#I112">marginal notes</a> + <br><a class="soloindex" href="#I128">margins</a> + <br><a class="command-single" href="#c206">\markboth</a> (8.1.2) + <br><a class="command-single" href="#c205">\markright</a> (8.1.2) + <br><b><i><a href="#markup" class="firstterm">markup</a></i></b> (2.1) + <br><a class="methodname-single" href="#m4">marvosym</a> (2.5.1) + <br><a class="productname-single" href="#p168">MathCAD</a> (6.5.1) + <br><a class="soloindex" href="#I47">math characters</a> + <br><a class="productname-first" href="#p170">Mathematica</a> (6.5.1), + <a class="productname-subseq" href="#p237">(10.1)</a> + <br><a class="headword" href="#I3">mathematics</a>, + <a class="primary" href="#I46">(2.9)</a> + <br><a href="#em" class="personname">Matthes, Eberhard</a> (1.4.2) + <br><a class="command-first" href="#c26">\mbox</a> (2.8.3), + <a class="command-subseq" href="#c292">(9.3)</a> + <br><a class="methodname-first" href="#m44">mdwlist</a> (6.2.2), + <a class="methodname-subseq" href="#m69">(8.1.1)</a> + <br><a class="command-single" href="#c191">\medskip</a> (8.1.1) + <br><a class="methodname-first" href="#m18">memoir</a> (3.1) + <br><b><i><a href="#metacharacters" class="firstterm">metacharacters</a></i></b> (2.5) + <br><b><i><a href="#metadata" class="firstterm"></a></i></b> (3.3) + <br><b><i><a href="#metainformation" class="firstterm"></a></i></b> (3.3) + <br><a class="productname-single" href="#p244">Metamorphosis</a> (10.1) + <br>Microbrew, see beerbeer + <br><a class="soloindex" href="#I11">Microsoft Windows</a> + <br><a class="soloindex" href="#I8">MiK<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a class="productname-first" href="#p53">MIK<span class="TEX">T<span class="E">E</span>X</span></a> (1.4.1) + <br><font color="red">sortas:miktex</font> + <br><a class="modespec-first" href="#e37">minipage</a> (6.7.1), + <a class="modespec-subseq" href="#e42">(6.7.2)</a>, + <a class="modespec-subseq" href="#e44">(6.7.3)</a>, + <a class="modespec-subseq" href="#e53">(9.5)</a> + <br><a class="soloindex" href="#I104">mirror</a> + <br><a class="productname-single" href="#p40">mkfs</a> (1.2) + <br><a class="productname-first" href="#p155">mktexlsr</a> (5.2.2), + <a class="productname-subseq" href="#p285">(A)</a> + <br><a class="soloindex" href="#I39">mm (millimeters)</a> + <br><a class="productname-single" href="#p158">Mozilla</a> (5.3.4) + <br><a class="methodname-first" href="#m65">multicol</a> (7.6) + <br><a class="modespec-single" href="#e48">multicols</a> (7.6) + <br><a class="command-single" href="#c122">\multicolumn</a> (6.3.3) + <br><a class="modespec-single" href="#e24">multirow</a> (6.3.3) + <br><a class="productname-single" href="#p50">My + Computer</a> (1.4) + <br><a class="option-single" href="#o18">myheadings</a> (8.1.2) + <h4><a name="N">N</a></h4> + <br><a class="option-single" href="#o19">named</a> (8.2.6) + <br><a class="productname-single" href="#p278">NetPBM</a> (10.2.2) + <br><a class="methodname-single" href="#m78">newcent</a> (8.2.1) + <br><a class="command-first" href="#c266">\newcommand</a> (9.1), + <a class="command-subseq" href="#c298">(9.4)</a> + <br><a class="command-single" href="#c2">\newpage</a> (Introduction) + <br><a href="#NFSS" class="acroid">NFSS</a> (New Font Selection Scheme) (8.3) + <br><a class="productname-first" href="#p12"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a> (Introduction) + <br><a class="soloindex" href="#I7"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a>, + <a class="productname-subseq" href="#p55">(1.4.1)</a>, + <a class="productname-subseq" href="#p85">(2.1)</a>, + <a class="productname-subseq" href="#p99">(2.3.4)</a> + <br><a class="productname-single" href="#p92"><span class="TEX">T<span class="E">E</span>X</span>nic + Center</a> (2.3) + <br><a class="command-single" href="#c233">\normalsize</a> (8.2.4) + <br><a class="productname-first" href="#p4">Notepad</a> (Introduction), + <a class="productname-subseq" href="#p105">(2.3.5)</a> + <br><a href="#NTS" class="acroid">NTS</a> (New Typesetting System) (Preface) + <h4><a name="O">O</a></h4> + <br><a class="varname-single" href="#v7">O</a> (1.2) + <br><a href="#OASIS" class="acroid">OASIS</a> (Organisation for the + Advancement of Structured Information Systems) (10.1) + <br><b><i><a href="#octothorpe" class="firstterm">octothorpe</a></i></b> (2.5.1) + <br><a class="productname-single" href="#p251">Office 11</a> (10.1) + <br><a class="productname-single" href="#p243">Omnimark</a> (10.1) + <br><a class="option-single" href="#o5">oneside</a> (3.1.1) + <br><a class="productname-first" href="#p1">OpenOffice</a> (Introduction), + <a class="productname-subseq" href="#p247">(10.1)</a> + <br><a class="productname-single" href="#p122">Opera</a> (4.1) + <br><a class="option-single" href="#o21">options</a> (Index) + <br><font color="red">sortas:Oregon Brewing Company</font> + <br><a class="soloindex" href="#I14">OS X</a> + <br><a href="#tak" class="personname">Ota, Takaaki</a> (6.3.3) + <br><a class="command-single" href="#c155">\ovalbox</a> (6.7.3) + <br><a class="soloindex" href="#I71">Overfull hbox</a> + <br><a class="productname-single" href="#p188">oxford</a> (7.4.2.4) + <h4><a name="P">P</a></h4> + <br><a class="command-single" href="#c167">\P</a> (7.4.1) + <br><b><i><a href="#pack" class="firstterm">packages</a></i></b> (5.1) + <br><a class="methodname-first" href="#m2">package</a> (Introduction), + <a class="methodname-subseq" href="#m91">(Index)</a><br> <a class="secondary" href="#I81">documentation</a> (5.1.2)<br> <a class="secondary" href="#I82">downloading</a> (5.2)<br> <a class="secondary" href="#I86">indexing</a> (5.2.2)<br> <a class="secondary" href="#I83">installing</a> (5.2), + <a class="primary" href="#I85">(5.2.2)</a> + <br><a class="headword" href="#I80">packages</a><a class="secondary" href="#I80">using</a> (5.1) + <br><a class="productname-single" href="#p229">PageMaker</a> (10) + <br><a class="command-single" href="#c169">\pageref</a> (7.4.1)<br> <a class="secondary" href="#I127">margins</a> (8.1.1) + <br><a class="headword" href="#I77">page size</a><a class="secondary" href="#I77">scaling</a> (4.4) + <br><a class="command-first" href="#c204">\pagestyle</a> (8.1.2) + <br><a class="productname-single" href="#p173">PaintShop + Pro</a> (6.5.1) + <br><a class="methodname-single" href="#m80">palatcm</a> (8.2.1) + <br><a class="methodname-single" href="#m79">palatino</a> (8.2.1) + <br><a class="soloindex" href="#I109">panels</a> + <br><a class="soloindex" href="#I50">paper sizes</a> + <br><a class="command-first" href="#c123">\par</a> (6.3.4), + <a class="command-subseq" href="#c193">(8.1.1)</a>, + <a class="command-subseq" href="#c287">(9.2)</a> + <br><a class="command-first" href="#c73">\paragraph</a> (3.5), + <a class="command-subseq" href="#c106">(6.2.5)</a> + <br><a class="methodname-first" href="#m29">paralist</a> (4.2.3.6), + <a class="methodname-subseq" href="#m39">(5.2.2)</a>, + <a class="methodname-subseq" href="#m45">(6.2.4)</a> + <br><a class="command-first" href="#c141">\parbox</a> (6.7.1), + <a class="command-subseq" href="#c151">(6.7.2)</a> + <br><a class="varname-first" href="#v16">parindent</a> (3.6), + <a class="varname-subseq" href="#v26">(6.7.1)</a> + <br><a class="varname-first" href="#v2">parskip</a> (Introduction), + <a class="varname-subseq" href="#v13">(3.6)</a> + <br><a class="methodname-single" href="#m28">parskip</a> (3.6) + <br><a class="command-single" href="#c68">\part</a> (3.5) + <br><a class="command-single" href="#c78">\part*</a> (3.5.1) + <br><a class="varname-single" href="#v35">pbk</a> (8.2.1) + <br><a class="soloindex" href="#I31">pc (picas)</a> + <br><a href="#PCL" class="acroid">PCL</a> (Printer Control + Language) (6.5) + <br><a href="#PDA" class="acroid">PDA</a> (Personal Digital Assistant) (Introduction), <a class="acrorefs" href="#A48">(Preface)</a>, <a class="acrorefs" href="#A216">(10)</a> + <br><a class="productname-first" href="#p89">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a> (2.2), + <a class="productname-subseq" href="#p98">(2.3.3)</a>, + <a class="productname-subseq" href="#p117">(3.1.1)</a>, + <a class="productname-subseq" href="#p118">(4.1)</a>, + <a class="productname-subseq" href="#p125">(4.1.3)</a>, + <a class="productname-subseq" href="#p127">(4.3)</a>, + <a class="productname-subseq" href="#p153">(5.2.2)</a>, + <a class="productname-subseq" href="#p162">(6.5)</a>, + <a class="productname-subseq" href="#p179">(6.5.1)</a>, + <a class="productname-subseq" href="#p195">(8.2)</a>, + <a class="productname-subseq" href="#p203">(8.2.6)</a>, + <a class="productname-subseq" href="#p204">(8.3.2)</a>, + <a class="productname-subseq" href="#p223">(8.3.3)</a>, + <a class="productname-subseq" href="#p227">(10)</a>, + <a class="productname-subseq" href="#p281">(10.2.4)</a> + <br><a href="#PDF" class="acroid">PDF</a> (Portable Document Format) (4.3.3), <a class="acrorefs" href="#A3">(Release Info)</a>, <a class="acrorefs" href="#A43">(Preface)</a>, <a class="acrorefs" href="#A52">(1.1)</a>, <a class="acrorefs" href="#A67">(2.3.2)</a>, <a class="acrorefs" href="#A70">(2.3.3)</a>, <a class="acrorefs" href="#A73">(2.3.5)</a>, <a class="acrorefs" href="#A77">(2.6)</a>, <a class="acrorefs" href="#A84">(3.1)</a>, <a class="acrorefs" href="#A88">(4.1)</a>, <a class="acrorefs" href="#A90">(4.1.3)</a>, <a class="acrorefs" href="#A93">(4.3)</a>, <a class="acrorefs" href="#A96">(4.3.2)</a>, <a class="acrorefs" href="#A101">(4.3.3)</a>, <a class="acrorefs" href="#A107">(4.4)</a>, <a class="acrorefs" href="#A122">(5.2.2)</a>, <a class="acrorefs" href="#A146">(6.5)</a>, <a class="acrorefs" href="#A158">(6.5.1)</a>, <a class="acrorefs" href="#A183">(6.7)</a>, <a class="acrorefs" href="#A204">(8.3.2)</a>, <a class="acrorefs" href="#A293">(10.2.4)</a> + <br><a class="option-single" href="#o20">pdftex</a> (8.2.6) + <br><a class="productname-single" href="#p283">pdftotext</a> (10.2.4) + <br><a class="productname-single" href="#p225">pdfview</a> (8.3.3) + <br><a class="productname-single" href="#p120">PDFview</a> (4.1) + <br><a class="command-first" href="#c294">\person</a> (9.4) + <br><a href="#PFA" class="acroid">PFA</a> (PostScript Font + ASCII) (8.3.2) + <br><a class="productname-single" href="#p207">PFAedit</a> (8.3.2) + <br><a href="#PFB" class="acroid">PFB</a> (PostScript Font Binary) (8.3.2), <a class="acrorefs" href="#A209">(8.3.2)</a>, <a class="acrorefs" href="#A215">(8.3.3)</a> + <br><a class="productname-single" href="#p172">PhotoShop</a> (6.5.1) + <br><a class="soloindex" href="#I32">picas</a> + <br><a class="modespec-single" href="#e31">picture</a> (6.4) + <br><a class="methodname-single" href="#m42">pifont</a> (6.2.1) + <br><a class="option-first" href="#o13">plain</a> (7.4.2.1), + <a class="option-subseq" href="#o15">(8.1.2)</a> + <br><b><i><a href="#plain-text" class="firstterm">plain-text</a></i></b> (2) + <br><a href="#PNG" class="acroid">PNG</a> (Portable Network + Graphic) (6.5), <a class="acrorefs" href="#A137">(6.5)</a>, <a class="acrorefs" href="#A163">(6.5.1)</a> + <br><a class="soloindex" href="#I30">points</a> + <br><a class="trademark-first" href="#t1">PostScript</a> (Release Info), + <a class="trademark-subseq" href="#t2">(Preface)</a>, + <a class="trademark-subseq" href="#t3">(1.1)</a>, + <a class="trademark-subseq" href="#t5">(2.3.3)</a>, + <a class="trademark-subseq" href="#t6">(2.3.5)</a>, + <a class="trademark-subseq" href="#t7">(4.3.2)</a>, + <a class="trademark-subseq" href="#t18">(4.3.3)</a>, + <a class="trademark-subseq" href="#t21">(4.4)</a>, + <a class="trademark-subseq" href="#t31">(6.5.1)</a>, + <a class="trademark-subseq" href="#t32">(8.2)</a>, + <a class="trademark-subseq" href="#t33">(8.2.4)</a>, + <a class="trademark-subseq" href="#t34">(8.2.6)</a>, + <a class="trademark-subseq" href="#t35">(8.3)</a>, + <a class="trademark-subseq" href="#t36">(8.3.1)</a>, + <a class="trademark-subseq" href="#t37">(8.3.2)</a>, + <a class="trademark-subseq" href="#t42">(8.3.3)</a>, + <a class="trademark-subseq" href="#t43">(D.2)</a> + <br><font color="red">sortas:pound</font> + <br><b><i><a href="#pre" class="firstterm">preamble</a></i></b> (3.4) + <br><a class="soloindex" href="#I75">preview</a> + <br><a class="methodname-single" href="#m1">preview-latex</a> (Introduction) + <br><a class="command-single" href="#c185">\printindex</a> (7.5) + <br><a class="headword" href="#I61">printing</a>, + <a class="primary" href="#I76">(4.4)</a><br> <a class="secondary" href="#I78">reverse order</a> (4.4)<br> <a class="secondary" href="#I79">selected pages</a> (4.4) + <br><a class="productname-first" href="#p23">product</a> (Introduction) + <br><a class="command-first" href="#c216">\product</a> (8.2.2), + <a class="command-subseq" href="#c244">(8.2.5)</a>, + <a class="command-subseq" href="#c289">(9.3)</a>, + <a class="productname-subseq" href="#p289">(Index)</a> + <br><a class="productname-first" href="#p7">pro<span class="TEX">T<span class="E">E</span>X</span>t</a> (Introduction), + <a class="productname-subseq" href="#p61">(1.4.1)</a>, + <a class="productname-subseq" href="#p102">(2.3.5)</a> + <br><a class="command-single" href="#c161">\protect</a> (7.2) + <br><a class="command-single" href="#c257">\ProvidesPackage</a> (8.3.2) + <br><a href="#PS" class="acroid">PS</a> (PostScript) (10.2.5) + <br><a class="methodname-first" href="#m74">pslatex</a> (8.2.1) + <br><a class="productname-single" href="#p148">psnup</a> (4.4) + <br><a class="productname-single" href="#p147">pstops</a> (4.4) + <br><a class="soloindex" href="#I29">pt (points)</a> + <br><a class="productname-single" href="#p231">Publisher</a> (10) + <br><a class="productname-single" href="#p186">pybliographic</a> (7.4.2.3) + <h4><a name="Q">Q</a></h4> + <br><a class="command-single" href="#c203">\qquad</a> (8.1.1) + <br><a class="command-first" href="#c23">\quad</a> (2.8.1), + <a class="command-subseq" href="#c202">(8.1.1)</a> + <br><a class="methodname-single" href="#m59">quotation</a> (7.1) + <br><a class="soloindex" href="#I21">quotation marks</a> + <br><a class="methodname-single" href="#m58">quote</a> (7.1) + <h4><a name="R">R</a></h4> + <br><a class="methodname-single" href="#m8">ragged2e</a> (2.8.5) + <br><a class="command-single" href="#c28">\raggedleft</a> (2.8.5) + <br><a class="modespec-single" href="#e3">raggedleft</a> (2.8.5) + <br><a class="command-first" href="#c27">\raggedright</a> (2.8.5) + <br><a class="modespec-single" href="#e2">raggedright</a> (2.8.5), + <a class="command-subseq" href="#c144">(6.7.1)</a>, + <a class="command-subseq" href="#c153">(6.7.2)</a> + <br><a href="#sr" class="personname">Rahtz, Sebastian</a> (1) + <br><a class="command-first" href="#c317">\raisebox</a> (9.6.1) + <br><a class="command-first" href="#c109">\ref</a> (6.2.5), + <a class="command-subseq" href="#c165">(7.4.1)</a> + <br><a class="soloindex" href="#I115">references</a> + <br><a class="command-single" href="#c180">\refname</a> (7.4.2.4) + <br><a class="command-first" href="#c295">\reindex</a> (9.4) + <br><a class="command-first" href="#c59">\renewcommand</a> (3.4), + <a class="command-subseq" href="#c280">(9.2)</a>, + <a class="command-subseq" href="#c314">(9.6)</a> + <br><a class="methodname-first" href="#m13">report</a> (3.1), + <a class="methodname-subseq" href="#m24">(3.5)</a> + <br><a href="#RGB" class="acroid">RGB</a> (Red-Green-Blue) (8.2.6), <a class="acrorefs" href="#A117">(5.1.1)</a>, <a class="acrorefs" href="#A194">(8.2.6)</a> + <br><a class="command-single" href="#c210">\rightmark</a> (8.1.2) + <br><a class="command-single" href="#c258">\rmdefault</a> (8.3.2) + <br><a class="soloindex" href="#I124">Rogue</a> + <br><a class="soloindex" href="#I103">rotate</a> + <br><a href="#RTF" class="acroid">RTF</a> (Rich Text Format) (10.1), <a class="acrorefs" href="#A255">(10.1)</a>, <a class="acrorefs" href="#A280">(10.2.1)</a> + <br><a class="productname-first" href="#p257">rtf2latex2e</a> (10.1), + <a class="productname-subseq" href="#p273">(10.2.1)</a> + <br><a href="#RTFM" class="acroid">RTFM</a> (Read The Fine + Manual) (1.2), <a class="acrorefs" href="#A210">(8.3.2)</a> + <br><a class="soloindex" href="#I67">Runaway argument</a><h4><a name="S">S</a></h4> + <br><a class="command-single" href="#c166">\S</a> (7.4.1) + <br><a href="#us" class="personname">Sath­yam, Ujwal</a> (10.1) + <br><a class="productname-first" href="#p20">Saxon</a> (Introduction), + <a class="productname-subseq" href="#p261">(10.1.1)</a> + <br><a class="modespec-first" href="#e45">Sbox</a> (6.7.3), + <a class="modespec-subseq" href="#e52">(9.5)</a> + <br><a class="soloindex" href="#I105">scale</a> + <br><a class="productname-single" href="#p49">ScanDisk</a> (1.4) + <br><a href="#cs" class="personname">Schenk, Christian</a> (1) + <br><a class="productname-single" href="#p16">Scientific Word</a> (Introduction) + <br><a class="command-single" href="#c230">\scriptsize</a> (8.2.4) + <br><a class="command-single" href="#c221">\scshape</a> (8.2.3) + <br><a class="varname-first" href="#v4">secnumdepth</a> (Introduction), + <a class="varname-subseq" href="#v9">(3.5.1)</a> + <br><a class="command-first" href="#c70">\section</a> (3.5), + <a class="command-subseq" href="#c83">(3.6)</a> + <br><a class="varname-first" href="#v37">section</a> (9.6) + <br><a class="soloindex" href="#I56">section numbering</a> + <br><a class="headword" href="#I48">sections</a>, + <a class="primary" href="#I55">(3.5)</a> + <br><a class="methodname-first" href="#m26">sectsty</a> (3.5), + <a class="methodname-subseq" href="#m68">(8.1.1)</a> + <br><a class="command-first" href="#c214">\selectfont</a> (8.2.2), + <a class="command-subseq" href="#c227">(8.2.3)</a> + <br><a class="command-first" href="#c302">\sentinel</a> (9.4) + <br><b><i><a href="#series" class="firstterm">series</a></i></b> (8.2.3) + <br><a class="command-single" href="#c77">\setcounter</a> (3.5.1) + <br><a class="command-first" href="#c80">\setlength</a> (3.6), + <a class="command-subseq" href="#c148">(6.7.1)</a> + <br><a class="methodname-single" href="#m70">setspace</a> (8.1.1) + <br><a class="command-single" href="#c260">\sfdefault</a> (8.3.2) + <br><a class="command-first" href="#c224">\sffamily</a> (8.2.3), + <a class="command-subseq" href="#c283">(9.2)</a> + <br><a href="#SGML" class="acroid">SGML</a> (Standard Generalized Markup + Language) (10.1), <a class="acrorefs" href="#A59">(2.1)</a>, <a class="acrorefs" href="#A81">(3.1)</a>, <a class="acrorefs" href="#A220">(10)</a>, <a class="acrorefs" href="#A227">(10.1)</a> + <br><a class="command-first" href="#c156">\shadowbox</a> (6.7.3), + <a class="command-subseq" href="#c313">(9.5)</a> + <br><b><i><a href="#shape" class="firstterm">shape</a></i></b> (8.2.3) + <br><a class="productname-first" href="#p11"><span class="TEX">T<span class="E">E</span>X</span>shell</a> (Introduction), + <a class="productname-subseq" href="#p84">(2.1)</a>, + <a class="productname-subseq" href="#p90">(2.3)</a> + <br><a class="productname-single" href="#p46"><span class="TEX">T<span class="E">E</span>X</span>Shop</a> (1.3) + <br><a class="soloindex" href="#I108">sidebars</a> + <br><a class="command-single" href="#c220">\slshape</a> (8.2.3) + <br><a class="command-first" href="#c157">\small</a> (7.1), + <a class="command-subseq" href="#c232">(8.2.4)</a> + <br><a class="command-single" href="#c190">\smallskip</a> (8.1.1) + <br><a class="methodname-single" href="#m7">so</a> (2.8.5) + <br><a class="methodname-single" href="#m71">soul</a> (8.1.1) + <br><a class="soloindex" href="#I34">sp (scaled points)</a> + <br><a class="command-single" href="#c311">\space</a> (9.4) + <br><a class="varname-single" href="#v8">spaceskip</a> (2.8.2) + <br>space, see white-spacewhite-space + <br>spacing, see double-spacingdouble-spacing + <br>spacing, see white-spacewhite-space + <br><a class="soloindex" href="#I18">special characters</a> + <br><a class="methodname-single" href="#m25">ssection</a> (3.5) + <br><a class="productname-single" href="#p246">Star Office</a> (10.1) + <br><a class="command-first" href="#c74">\subparagraph</a> (3.5), + <a class="command-subseq" href="#c107">(6.2.5)</a> + <br><a class="command-single" href="#c79">\subparagraph*</a> (3.5.1) + <br><a class="command-single" href="#c71">\subsection</a> (3.5) + <br><a class="command-single" href="#c72">\subsubsection</a> (3.5) + <br><a class="soloindex" href="#I54">summaries</a> + <br><b><i><a href="#synchronous" class="firstterm">synchronous + typographic interface</a></i></b> (Introduction) + <h4><a name="T">T</a></h4> + <br><a class="option-single" href="#o11">t</a> (6.7.1) + <br><a class="productname-single" href="#p205">t1binary</a> (8.3.2) + <br><a class="productname-single" href="#p206">t1utils</a> (8.3.2) + <br><a class="varname-single" href="#v25">tabcolsep</a> (6.3.3) + <br><a class="modespec-first" href="#e21">table</a> (6.3.2), + <a class="modespec-subseq" href="#e30">(6.4)</a> + <br><a class="modespec-single" href="#e50">table*</a> (7.6) + <br><a class="command-first" href="#c3">\tableofcontents</a> (2.4), + <a class="command-subseq" href="#c4">(2.4.1)</a>, + <a class="command-subseq" href="#c85">(3.7)</a>, + <a class="command-subseq" href="#c93">(4.2.1)</a><br> <a class="secondary" href="#I58">adding manual entry</a> (3.7) + <br><a class="headword" href="#I57">table of contents</a><a class="secondary" href="#I57">automated entries</a> (3.7) + <br><a class="soloindex" href="#I97">tables</a> + <br><a class="modespec-first" href="#e22">tabular</a> (6.3.3), + <a class="modespec-subseq" href="#e25">(6.3.4)</a>, + <a class="modespec-subseq" href="#e41">(6.7.1)</a>, + <a class="modespec-subseq" href="#e43">(6.7.2)</a> + <br><a class="methodname-single" href="#m55">tabular</a> (6.7.2) + <br><a class="methodname-single" href="#m47">tabularx</a> (6.3.3) + <br><a href="#TDS" class="acroid">TDS</a> ( Directory + Structure) (5.2.3), <a class="acrorefs" href="#A123">(5.2.2)</a>, <a class="acrorefs" href="#A199">(8.3)</a> + <br><a class="productname-single" href="#p5">te<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="soloindex" href="#I5">te<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a href="#TEI" class="acroid">TEI</a> (Text Encoding Initiative) (10.2.3) + <br><b><i><a href="#tempdir" class="firstterm">temporary directory</a></i></b> (5.2.1) + <br><b><i><a href="#term" class="firstterm">term</a></i></b> (Introduction) + <br><font color="red">sortas:tetex</font> + <br><font color="red">sortas:texcollection</font> + <br><a class="productname-first" href="#p41">texconfig</a> (1.2) + <br><a class="productname-first" href="#p154">texhash</a> (5.2.2), + <a class="productname-subseq" href="#p286">(A)</a> + <br><font color="red">sortas:texlive</font> + <br><font color="red">sortas:texniccenter</font> + <br><a class="command-single" href="#c5">\textbackslash</a> (2.5) + <br><a class="command-single" href="#c29">\textbrokenbar</a> (2.9) + <br><a class="command-single" href="#c105">\textbullet</a> (6.2.1) + <br><a class="command-first" href="#c246">\textcolor</a> (8.2.6) + <br><a class="methodname-first" href="#m3">textcomp</a> (2.5.1) + <br><a class="modespec-single" href="#e4">textcomp</a> (2.9), + <a class="methodname-subseq" href="#m43">(6.2.1)</a> + <br><a class="command-single" href="#c34">\textdegree</a> (2.9) + <br><a class="command-single" href="#c16">\texteuro</a> (2.5.1) + <br><a class="command-single" href="#c245">\textit</a> (8.2.5) + <br><a class="command-single" href="#c30">\textlangle</a> (2.9) + <br><a class="command-single" href="#c31">\textrangle</a> (2.9) + <br><a class="command-single" href="#c15">\textsterling</a> (2.5.1) + <br><a class="command-single" href="#c291">\texttrademark</a> (9.3) + <br><a class="productname-single" href="#p15">Textures</a> (Introduction) + <br><a class="command-single" href="#c315">\thechapter</a> (9.6) + <br><a class="command-single" href="#c110">\theenumi</a> (6.2.6) + <br><a class="command-single" href="#c111">\theenumii</a> (6.2.6) + <br><a class="command-single" href="#c112">\theenumiii</a> (6.2.6) + <br><a class="command-single" href="#c113">\theenumiv</a> (6.2.6) + <br><a class="command-single" href="#c312">\theSbox</a> (9.5) + <br><a class="command-first" href="#c18">\thinspace</a> (2.6), + <a class="command-subseq" href="#c200">(8.1.1)</a> + <br><a class="command-single" href="#c207">\thispagestyle</a> (8.1.2) + <br><a href="#TIFF" class="acroid">TIFF</a> (Tagged Image File Format) (6.5.1) + <br><a class="methodname-first" href="#m73">times</a> (8.2.1) + <br><a class="command-single" href="#c229">\tiny</a> (8.2.4) + <br><a class="command-first" href="#c46">\title</a> (3.3), + <a class="command-subseq" href="#c274">(9.2)</a> + <br><a class="command-single" href="#c176">\titleof</a> (7.4.2.1) + <br><a class="option-single" href="#o7">titlepage</a> (3.1.1) + <br><a class="soloindex" href="#I52">titles</a> + <br><a class="productname-single" href="#p185">tkbibtex</a> (7.4.2.3) + <br><a class="productname-single" href="#p177">tkPaint</a> (6.5.1) + <br><a class="varname-first" href="#v10">tocdepth</a> (3.5.1), + <a class="varname-subseq" href="#v18">(3.7)</a> + <br><a class="soloindex" href="#I110">tools</a> + <br><a class="soloindex" href="#I63">Too many }'s</a> + <br>tracking, see letterspacingletterspacing + <br><a class="productname-single" href="#p97">tsconfig</a> (2.3.2) + <br><a class="command-single" href="#c259">\ttdefault</a> (8.3.2) + <br><a class="command-single" href="#c225">\ttfamily</a> (8.2.3) + <br><a href="#TUG" class="acroid">TUG</a> ( Users Group) (B), <a class="acrorefs" href="#A33">(Foreword)</a>, <a class="acrorefs" href="#A36">(Preface)</a> + <br><a class="option-single" href="#o6">twoside</a> (3.1.1) + <br><a class="methodname-single" href="#m82">type1cm</a> (8.2.4) + <br><a class="soloindex" href="#I59">typesetting</a> + <br><a class="soloindex" href="#I126">typographics</a><h4><a name="U">U</a></h4> + <br><a class="methodname-single" href="#m81">ulem</a> (8.2.3) + <br><a class="command-single" href="#c228">\uline</a> (8.2.3) + <br><a class="soloindex" href="#I65">Undefined control sequence</a> + <br><a class="soloindex" href="#I69">Underfull hbox</a> + <br><a class="soloindex" href="#I28">units</a> + <br><a class="soloindex" href="#I10">Unix</a> + <br><a class="productname-single" href="#p38">up2date</a> (1.2) + <br><a class="productname-first" href="#p208">updmap</a> (8.3.2) + <br><a class="command-single" href="#c218">\upshape</a> (8.2.3) + <br><a href="#URI" class="acroid">URI</a> (Uniform Resource Indicator) (6.6.1), <a class="acrorefs" href="#A86">(4)</a>, <a class="acrorefs" href="#A132">(5.3.4)</a>, <a class="acrorefs" href="#A174">(6.6)</a>, <a class="acrorefs" href="#A175">(6.6.1)</a>, <a class="acrorefs" href="#A181">(6.6.2)</a>, <a class="acrorefs" href="#A261">(10.1.1)</a> + <br><a class="methodname-single" href="#m52">url</a> (6.6.1) + <br><a class="command-first" href="#c135">\url</a> (6.6.1), + <a class="command-subseq" href="#c140">(6.6.2)</a>, + <a class="command-subseq" href="#c162">(7.2)</a>, + <a class="command-subseq" href="#c320">(10.1.1)</a> + <br><a href="#URL" class="acroid">URL</a> (Uniform Resource + Locator) (6.6.1) + <br><a class="command-first" href="#c67">\usepackage</a> (3.4), + <a class="command-subseq" href="#c99">(4.2.3.6)</a>, + <a class="command-subseq" href="#c100">(5.1.1)</a>, + <a class="command-subseq" href="#c182">(7.4.2.4)</a>, + <a class="command-subseq" href="#c256">(8.3.1)</a><h4><a name="V">V</a></h4> + <br><a class="productname-single" href="#p17">V<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="varname-single" href="#v39">variables</a> (Index) + <br><a class="command-single" href="#c149">\vbox</a> (6.7.1) + <br><a class="productname-single" href="#p226">Velcro</a> (9.3) + <br><a class="command-first" href="#c133">\verb</a> (6.6.1), + <a class="command-subseq" href="#c138">(6.6.2)</a>, + <a class="command-subseq" href="#c160">(7.2)</a> + <br><a class="modespec-first" href="#e32">verbatim</a> (6.6.2) + <br><a class="modespec-first" href="#e33">Verbatim</a> (6.6.2) + <br><a class="soloindex" href="#I106">verbatim text</a> + <br><a class="productname-single" href="#p44">vi</a> (1.2) + <br><a class="soloindex" href="#I60">viewing</a> + <br><a href="#vv" class="personname">Volovich, Vladimir</a> (8.3.3) + <br><a class="command-first" href="#c194">\vspace</a> (8.1.1) + <br><a class="command-single" href="#c195">\vspace*</a> (8.1.1) + <h4><a name="W">W</a></h4> + <br><a href="#sw" class="personname">Wawrykiewicz, Staszek</a> (6.5) + <br><a class="headword" href="#I17">white-space</a><br> <a class="secondary" href="#I133">double-spacing</a> (8.1.1)<br> <a class="secondary" href="#I45">hard</a> (2.8.3)<br> <a class="secondary" href="#I137">horizontal</a> (8.1.1)<br> <a class="tertiary" href="#I132">disappearing</a> (8.1.1)<br> <a class="tertiary" href="#I131">fixed</a> (8.1.1)<br> <a class="tertiary" href="#I130">flexible</a> (8.1.1) + <br><a class="productname-single" href="#p48">Windows Update</a> (1.4) + <br><a class="productname-single" href="#p104">Winedt</a> (2.3.5) + <br><a class="productname-first" href="#p14">WinEdt</a> (Introduction), + <a class="productname-subseq" href="#p31">(1.1)</a>, + <a class="productname-subseq" href="#p54">(1.4.1)</a>, + <a class="productname-subseq" href="#p81">(1.4.2)</a>, + <a class="productname-subseq" href="#p87">(2.1)</a>, + <a class="productname-subseq" href="#p93">(2.3)</a>, + <a class="productname-subseq" href="#p100">(2.3.5)</a> + <br><a class="productname-first" href="#p13">WinShell</a> (Introduction), + <a class="productname-subseq" href="#p80">(1.4.2)</a>, + <a class="productname-subseq" href="#p86">(2.1)</a>, + <a class="productname-subseq" href="#p91">(2.3)</a> + <br><a class="productname-first" href="#p3">Word</a> (Introduction), + <a class="productname-subseq" href="#p235">(10.1)</a>, + <a class="productname-subseq" href="#p269">(10.2.1)</a>, + <a class="productname-subseq" href="#p282">(10.2.4)</a> + <br><a class="productname-single" href="#p256">WordML2<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a> (10.1) + <br><a class="productname-first" href="#p2">WordPerfect</a> (Introduction), + <a class="productname-subseq" href="#p248">(10.1)</a> + <br><b><i><a href="#wsp" class="firstterm">white-space</a></i></b> (2.4.1) + <br><a href="#WYSIWYG" class="acroid">WYSIWYG</a> (What You See Is + What You Get) (2.3.1), <a class="acrorefs" href="#A41">(Preface)</a>, <a class="acrorefs" href="#A62">(2.2)</a>, <a class="acrorefs" href="#A94">(4.3.1)</a> + <br><a href="#WYSIWYM" class="acroid">WYSIWYM</a> (What You See Is + What You Mean) (2.3.1) + <h4><a name="X">X</a></h4> + <br><a class="methodname-single" href="#m35">xcolor</a> (5.1.1) + <br><a class="productname-first" href="#p128">xdvi</a> (4.3.1), + <a class="productname-subseq" href="#p139">(4.3.3)</a> + <br><a class="productname-single" href="#p78">Xemacs</a> (1.4.2) + <br><a href="#XHTML" class="acroid">XHTML</a> (Extensible HyperText Markup + Language) (10.1) + <br><a class="productname-single" href="#p115">xkeycaps</a> (2.7) + <br><a href="#XML" class="acroid">XML</a> (Extensible Markup + Language) (10), <a class="acrorefs" href="#A17">(Introduction)</a>, <a class="acrorefs" href="#A34">(Foreword)</a>, <a class="acrorefs" href="#A49">(Preface)</a>, <a class="acrorefs" href="#A76">(2.3.6)</a>, <a class="acrorefs" href="#A83">(3.1)</a>, <a class="acrorefs" href="#A134">(6.3)</a>, <a class="acrorefs" href="#A178">(6.6.1)</a>, <a class="acrorefs" href="#A221">(10)</a>, <a class="acrorefs" href="#A226">(10.1)</a>, <a class="acrorefs" href="#A258">(10.1.1)</a>, <a class="acrorefs" href="#A291">(10.2.3)</a>, <a class="acrorefs" href="#A303">(C)</a> + <br><a class="productname-single" href="#p259">XML Spy</a> (10.1) + <br><a class="productname-single" href="#p27">xpdf</a> (1.1) + <br><a class="productname-single" href="#p121">Xpdf</a> (4.1) + <br><a class="productname-single" href="#p228">XPress</a> (10) + <br><a href="#XSLT" class="acroid">XSLT</a> (Extensible Stylesheet Language + [Transformations]) (10.1), <a class="acrorefs" href="#A1">(Release Info)</a>, <a class="acrorefs" href="#A9">(Revision Info)</a>, <a class="acrorefs" href="#A28">(Introduction)</a>, <a class="acrorefs" href="#A238">(10.1)</a>, <a class="acrorefs" href="#A260">(10.1.1)</a>, <a class="acrorefs" href="#A304">(C)</a><h4><a name="Y">Y</a></h4> + <br><a class="productname-single" href="#p37">yum</a> (1.2) + <h4><a name="Z">Z</a></h4> + <br><a class="productname-single" href="#p25">Zaurus</a> (Preface) + </div> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/bibliography.html b/info/beginlatex/html/bibliography.html new file mode 100644 index 0000000000..c3322b36e3 --- /dev/null +++ b/info/beginlatex/html/bibliography.html @@ -0,0 +1,206 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:03:15--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: References</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>References</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class="current"><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="bib"> + <h2><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="biblio">References</a></h2> + <p><b><a name="mathguide">American Mathematical Society</a>: </b><cite>Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></cite>. AMS, Providence, RI, <tt><a href="http://www.ams.org/tex/short-math-guide.html">http://www.ams.org/tex/short-math-guide.html</a></tt>, 2001. [<a href="intro.html#K13">(Introduction)</a>] [<a href="foreword.html#K19">(Foreword)</a>] + </p> + <p><b><a name="">Anon</a>: </b>Táin bó Cúailnge55<cite>Leabhar na h-Uidhri: The Book of the Dun Cow</cite>. Royal Irish Academy, Dublin, 1100. [<a href="chapter2.html#K23">(2.1)</a>] + </p> + <p><b><a name="gnufdl">Free Software Foundation</a>: </b><cite>The GNU Free Documentation License</cite>. Free Software Foundation, Boston, MA, <tt><a href="http://www.fsf.org/copyleft/fdl.html">http://www.fsf.org/copyleft/fdl.html</a></tt>, 2003/02/10 + 23:42:49. [<a href=".html#K1">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="begin"><span class="TEX">T<span class="E">E</span>X</span> Users Group</a>: </b><cite>Getting Started with <span class="TEX">T<span class="E">E</span>X</span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and friends</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, <tt><a href="http://www.tug.org/begin.html">http://www.tug.org/begin.html</a></tt>, November 2003. [<a href="intro.html#K9">(Introduction)</a>] + </p> + <p><b><a name="wired">Anderson, Chris</a> (Ed.): </b><cite>WIRED</cite>. Condé Nast, San Francisco, CA, 1059-1028, 1993--. [<a href="chapter8.html#K38">(8.1)</a>] + </p> + <p><b><a name="tugboat">Beeton, Barbara</a> (Ed.): </b><cite>TUGboat</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, 0896-3207, Since 1980. [<a href=".html#K7">(Release Info)</a>] [<a href=".html#K8">(Revision Info)</a>] [<a href="appendixB.html#K43">(B)</a>] + </p> + <p><b><a name="fontname">Berry, Karl</a>: </b><cite>Fontname: Filenames for fonts</cite>. , <tt><a href="http://www.ctan.org/tex-archive/info/fontname/">http://www.ctan.org/tex-archive/info/fontname/</a></tt><span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, June 2001. [<a href="chapter8.html#K40">(8.3.2)</a>] + </p> + <p><b><a name="bull">Bull, RJ</a>: </b><cite>Accounting in Business</cite>. Butterworths, London, 1972, 0-406-70651-4. [<a href="chapter6.html#K31">(6.4)</a>] + </p> + <p><a name="teiguide"><b>Burnard, Lou</b><b> and Sperberg-McQueen, Michael</b>: </a><cite>Guidelines for the Text Encoding Initiative</cite>. OUP, Oxford, 1995. [<a href="chapter6.html#K30">(6.2.5)</a>] + </p> + <p><a name="practex"><b>Carnes, Lance</b><b> and Berry, Karl</b> (Eds.): </a><cite>The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, <tt><a href="http://www.tug.org/pracjourn/">http://www.tug.org/pracjourn/</a></tt>, 2004. [<a href=".html#K3">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="davy">Davy, William</a>: </b><cite>A System of Divinity</cite>. Published by the author, Lustleigh, Devon, 1806. [<a href="chapter7.html#K34">(7.1)</a>] + </p> + <p><b><a name="gentle">Doob, Michael <span class="affil">(University of Manitoba, Winnipeg, Manitoba, Canada)</span></a>: </b><cite>A Gentle Introduction to <span class="TEX">T<span class="E">E</span>X</span>: A Manual for Self-Study</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, Portland, OR, 2002, <tt><a href="http://www.ctan.org/tex-archive/info/gentle/">http://www.ctan.org/tex-archive/info/gentle/</a></tt>. [<a href="intro.html#K11">(Introduction)</a>] + </p> + <p><b><a name="bovary">Flaubert, Gustave</a>: </b><cite>Madame Bovary</cite>. , Paris, 1857. [<a href="chapter6.html#K29">(6)</a>] + </p> + <p><b><a name="htmlbook">Flynn, Peter</a>: </b><cite>The HTML Handbook</cite>. International Thompson Computer + Press, London, 1-85032-205-8, 1995. [<a href=".html#K4">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="xmlfaq">Flynn, Peter</a>: </b><cite>The XML FAQ</cite>. University College Cork, Cork, Ireland, <tt><a href="http://www.ucc.ie/xml/">http://www.ucc.ie/xml/</a></tt>, January 2005. [<a href=".html#K6">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="sgmltools">Flynn, Peter</a>: </b><cite>Understanding SGML and XML Tools</cite>. Kluwer, Boston, 0-7923-8169-6, 1998. [<a href=".html#K5">(UNKNOWN DIV)</a>] + </p> + <p><b><a name="fg">Fothergill, John</a>: </b><cite>An Innkeeper's Diary</cite>. Penguin, London3rd, 1929. [<a href="chapter7.html#K35">(7.4.2.1)</a>] + </p> + <p><a name="graphicscomp"><b>Goossens, Michel</b><b>; Rahtz, Sebastian</b><b>; and Mittelbach, Frank</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Graphics Companion</cite>. Addison-Wesley, Reading, MA, 0-201-85469-4, 1997. [<a href="foreword.html#K17">(Foreword)</a>] + </p> + <p><a name="webcomp"><b>Goossens, Michel</b><b>; Rahtz, Sebastian</b><b>; Moore, Ross</b><b>; and Sutor, Bob</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Web Companion</cite>. Addison-Wesley, Reading, MA, 0-201-43311-7, 1999. [<a href="foreword.html#K18">(Foreword)</a>] + </p> + <p><b><a name="">Goreham, Anthony</a>: </b>Re: Installing a new font: PFM, PFB‘<a href="newscomp.text.tex"><tt>comp.text.tex</tt></a>’. , <i>m3r8qj42o3.fsf@micawber.queens.ox.ac.uk</i>, (all pages), 28 November 2001. + </p> + <p><b><a name="">Heller, Robert</a>: </b>New To <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>...Unlearning Bad Habits‘<a href="newscomp.text.tex"><tt>comp.text.tex</tt></a>’. , <i>MPG.18d82140d65ddc5898968c@news.earthlink.net</i>, (all pages), 11 March 2003. [<a href="preface.html#K20">(Preface)</a>] + </p> + <p><a name="fontinst"><b>Jeffrey, Alan</b><b> and McDonnell, Rowland</b>: </a><cite>Font installation software for <span class="TEX">T<span class="E">E</span>X</span></cite>. , <tt><a href="http://www.tex.ac.uk/tex-archive/fonts/utilities/fontinst/">http://www.tex.ac.uk/tex-archive/fonts/utilities/fontinst/</a></tt><span class="TEX">T<span class="E">E</span>X</span> Users Group, 30 June 1998. + </p> + <p><a name="mathwrite"><b>Knuth, Donald E</b><b>; Larrabee, Tracey</b><b>; and Roberts, Paul M</b>: </a><cite>Mathematical Writing</cite>. Mathematical Association of America, Washington, DCMAA Notes 14, 0-88385-063-X, 1989. [<a href="preface.html#K22">(Preface)</a>] + </p> + <p><b><a name="aocs">Knuth, Donald Ervin</a>: </b><cite>The Art of Computer Programming</cite>. Addison-Wesley, Reading, MA2nd<b>1</b>, 0-201-89685-0, 1980. [<a href="preface.html#K21">(Preface)</a>] + </p> + <p><b><a name="latexbook">Lamport, Leslie</a>: </b><cite><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: A Document Preparation System</cite>. Addison-Wesley, Reading, MA, 0-201-52983-12nd, 1994. [<a href="foreword.html#K15">(Foreword)</a>] [<a href="chapter3.html#K27">(3.6)</a>] [<a href="chapter7.html#K36">(7.5)</a>] + </p> + <p><b><a name="macnamara">Mac Namara, Matthew</a>: </b><cite>La Textualisation de Madame + Bovary</cite>. Rodopi, Amsterdam, 2003. [<a href="chapter6.html#K28">(6)</a>] + </p> + <p><a name="companion"><b>Mittelbach, Frank</b><b>; Goossens, Michel</b><b>; Braams, Johannes</b><b>; Carlisle, David</b><b>; and Rowley, Chris</b>: </a><cite>The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</cite>. Addison-Wesley/Pearson Education, Boston, MA2, 0-201-36299-6, 2004. [<a href="foreword.html#K16">(Foreword)</a>] [<a href="chapter3.html#K26">(3.1)</a>] [<a href="chapter6.html#K32">(6.5)</a>] [<a href="chapter7.html#K37">(7.5)</a>] [<a href="chapter8.html#K39">(8.1.1)</a>] [<a href="chapter8.html#K41">(8.3.2)</a>] + </p> + <p><a name="lshort"><b>Oetiker, Tobias</b><b>; Partl, Hubert</b><b>; Hyna, Irene</b><b>; and Schlegl, Elisabeth</b>: </a><cite>The (Not So) Short Guide to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>: in 131 Minutes</cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/lshort/">http://www.ctan.org/tex-archive/info/lshort/</a></tt>, 20013.2. [<a href="intro.html#K10">(Introduction)</a>] + </p> + <p><b><a name="symbol-list">Pakin, Scott <span class="affil">(University of Illinois, Urbana-Champaign)</span></a>: </b><cite>A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/">http://www.ctan.org/tex-archive/info/symbols/comprehensive/</a></tt>, 2002. [<a href="intro.html#K14">(Introduction)</a>] [<a href="chapter9.html#K42">(9.6.1)</a>] + </p> + <p><b><a name="">Rawlings, Marjorie Kinnan</a>: </b>Varmints‘Scribner's Magazine’. , 1936. [<a href="chapter2.html#K24">(2.1)</a>] + </p> + <p><b><a name="imported">Reckdahl, Keith</a>: </b><cite>Using imported graphics in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span></cite>. <span class="TEX">T<span class="E">E</span>X</span> Users Group, <tt><a href="http://www.ctan.org/tex-archive/info/epslatex.pdf/">http://www.ctan.org/tex-archive/info/epslatex.pdf/</a></tt>, 19972.0. [<a href="intro.html#K12">(Introduction)</a>] + </p> + <p><b><a name="ryder">Ryder, John</a>: </b><cite>Printing for Pleasure</cite>. Bodley Head, London, 0-370-10443-9, 1976. [<a href="chapter7.html#K33">(7.1)</a>] + </p> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="appendixD.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="index.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/bottom.png b/info/beginlatex/html/bottom.png Binary files differnew file mode 100644 index 0000000000..c8efd289e1 --- /dev/null +++ b/info/beginlatex/html/bottom.png diff --git a/info/beginlatex/html/chapter1.html b/info/beginlatex/html/chapter1.html new file mode 100644 index 0000000000..047026a787 --- /dev/null +++ b/info/beginlatex/html/chapter1.html @@ -0,0 +1,702 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:05--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 1 — Installing and </title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 1 — Installing and </h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class="current"><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="get">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">1</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#editdis">Editing and display</a></li> + <li><a href="#lininst">Installation for Linux and Unix</a></li> + <li><a href="#macinst">Installation for Apple Mac</a></li> + <li><a href="#wininst">Installation for Microsoft Windows</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I5"></a><a name="I6"></a><a name="I7"></a><a name="I8"></a><a name="I9"></a><a name="I10"></a><a name="I11"></a><a name="I12"></a><a name="I13"></a><a name="I14"></a><p>This course is based on using one of + the following distributions of <span class="TEX">T<span class="E">E</span>X</span> on the 2004 <span class="TEX">T<span class="E">E</span>X</span> + Collection DVD or the 2003 <span class="TEX">T<span class="E">E</span>X</span> Live CD: + </p> + <blockquote> + <dl> + <dt><b>te<span class="TEX">T<span class="E">E</span>X</span></b></dt> + <dd> + <p>for Linux and other Unix-like systems, including Mac + OS X (<a name="esser">Thomas Esser</a>); + </p> + </dd> + <dt><b>pro<span class="TEX">T<span class="E">E</span>X</span>t</b></dt> + <dd> + <p>for Microsoft Windows (<a name="tf">Thomas Feuerstack</a>), based on <a name="cs">Christian Schenk</a>'s + Mik<span class="TEX">T<span class="E">E</span>X</span>; + </p> + </dd> + <dt><b>fp<span class="TEX">T<span class="E">E</span>X</span></b></dt> + <dd> + <p>for Microsoft Windows (<a name="popineau">Fabrice Popineau</a>) from the 2003 <span class="TEX">T<span class="E">E</span>X</span> Live CD. + </p> + </dd> + </dl> + </blockquote> + <p>Many other implementations of <span class="TEX">T<span class="E">E</span>X</span>, + such as <a name="tk">Tom Kiffe</a>'s CMac<span class="TEX">T<span class="E">E</span>X</span> for the Apple Macintosh, can be + downloaded from <small><a href="chapter5.html#CTAN" class="acroref" name="A50" title="Comprehensive Archive Network">CTAN</a></small>. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is + included with all modern distributions of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Collection CD is issued + annually on behalf of most of the local <span class="TEX">T<span class="E">E</span>X</span> user groups + around the world (see <a href="http://www.tug.org/lugs.html"><tt>http://www.tug.org/lugs.html</tt></a> for addresses), + and edited by <a name="sr">Sebastian Rahtz</a>, <a name="kb">Karl Berry</a>, <a name="ml">Manfred Lotz</a>, and the authors of the software mentioned above. + These people give an enormous amount of their personal time and + energy to building and distributing these systems, and they + deserve the thanks and support of the user community for all + they do. + </p> + <p>There are many other distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> both free and + commercial, as described in <a href="intro.html#intro">this Introduction</a>: they all process <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> identically, but + there are some differences in size, speed, packaging, and (in + the case of commercial distributions) price, support, and extra + software provided. + </p> + <p>One final thing before we start: publicly-maintained + software like <span class="TEX">T<span class="E">E</span>X</span> is updated faster than commercial software, + so <em>always check to see if there is a more recent + version of the installation</em>. See <a href="chapter1.html#latest">the item ‘Use the latest versions’ in section 1.4.3</a> for more details. + </p> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.1 <a name="editdis">Editing and display</a></h2> + <p>When you install <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> you will + have the opportunity to decide <i>a</i>) which plain-text editor[s] you want to use to create + and maintain your documents; and <i>b</i>) which preview programs you want to use to see your + typesetting. This isn't much use to you if you're + unfamiliar with editors and previewers, so have a look at the + table below, and maybe flip ahead to <a href="chapter2.html#editors">section 2.3</a> for a moment, where there are + descriptions and screenshots. + </p> + <p>The best bet is probably to install more than one — if + you've got the disk space — or maybe all of them, because + you can always delete the ones you don't like. + </p> + <blockquote> + <dl> + <dt><b>Editors</b></dt> + <dd> + <p>There is a wide range of editors available: probably + no other piece of software causes more flame-wars in + Internet and other discussions than your choice of + editor. It's a highly personal choice, so feel free + to pick the one you like. My personal biases are + probably revealed below, so feel equally free to ignore + them. + </p> + </dd> + <dt><b>Previewers</b></dt> + <dd> + <p>For displaying your + typesetting before printing, you will need a previewer. + All systems come with a <small><a href="chapter4.html#DVI" class="acroref" name="A51" title="device-independent">DVI</a></small> + previewer for standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + but if you are intending to produce industry-standard + <a name="t3">PostScript</a> or <small><a href="chapter4.html#PDF" class="acroref" name="A52" title="Portable Document Format">PDF</a></small> (Adobe Acrobat) files you will + need a previewer for those formats. + <i><a name="p26">GSview</a></i> displays both + <a name="t4">PostScript</a> and <small><a href="chapter4.html#PDF" class="acroref" name="A53" title="Portable Document Format">PDF</a></small> files; + <i><a name="p27">xpdf</a></i> and Adobe's own + <i><a name="p28">Acrobat Reader</a></i> just display + <small><a href="chapter4.html#PDF" class="acroref" name="A54" title="Portable Document Format">PDF</a></small> files. + </p> + </dd> + </dl> + </blockquote> + <p>For brief details of some of the most popular editors used + for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, see <a href="chapter2.html#editors">section 2.3</a>. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="pdfurl">Additional downloads</a></h4> + <p>For licensing reasons, the + <i><a name="p29">GSview</a></i> PostScript/PDF previewer, + the <i><a name="p30">Acrobat Reader</a></i> PDF previewer, + and the <i><a name="p31">WinEdt</a></i> editor could not + be distributed on the 2003 CDs. In those cases you have to + download and install them separately. + </p> + <ul> + <li> + <p><i><a name="p32">GSview</a></i> is available for + all platforms from <a href="http://www.ghostscript.com/gsview/index.htm"><tt>http://www.ghostscript.com/gsview/index.htm</tt></a> + (on Unix and VMS systems it's also available as + <i><a name="p33">GhostView</a></i> and + <i><a name="p34">gv</a></i>: see <a href="http://www.cs.wisc.edu/~ghost/"><tt>http://www.cs.wisc.edu/~ghost/</tt></a>) + </p> + </li> + <li> + <p><i><a name="p35">Acrobat Reader</a></i> (all + platforms) can be downloaded from <a href="http://www.adobe.com/products/acrobat/readstep2.html"><tt>http://www.adobe.com/products/acrobat/readstep2.html</tt></a></p> + </li> + <li> + <p><i><a name="p36">WinEdt</a></i> (Microsoft Windows + only) comes from <a href="http://www.winedt.com"><tt>http://www.winedt.com</tt></a></p> + </li> + </ul> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.2 <a name="lininst">Installation for Linux and Unix</a></h2> + <p>Make sure your system libraries and utilities are up to + date. If you are using Red Hat Linux, use + <i><a name="p37">yum</a></i> or + <i><a name="p38">up2date</a></i> to download and install + updates. For Debian and other distributions, use + <i><a name="p39">apt-get</a></i> or similar. On Red Hat + systems, remove any RPM version of te<span class="TEX">T<span class="E">E</span>X</span> and associated + utilities which may have been + preinstalled, in order to avoid version conflicts. + </p> + <p>If you are installing <span class="TEX">T<span class="E">E</span>X</span> Live to a new partition, and + you have the opportunity to reformat the partition before use, + use <i><a name="p40">mkfs</a></i> with a granularity as + small as it will go (usually 1024 bytes). This avoids the + partition running out of inodes because <span class="TEX">T<span class="E">E</span>X</span> uses very large + numbers of very small files. + </p> + <p>Plan the installation carefully if you are installing for + multiple users (a shared machine): read <a href="chapter5.html#pkginst">section 5.2</a> for some comments on where to put additional + files downloaded later, and see the FAQ on the same topic at + <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles"><tt>http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wherefiles</tt></a></p> + <p>Above all, <a name="RTFM" class="acroref">Read The Fine + Manual</a> (<small>RTFM</small>). The documentation is in + <code>live.html</code> and + <code>live.pdf</code> on the disk in the directory + <code>texlive2004/texmf-doc/doc/english/texlive-en/</code></p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name=""><span class="TEX">T<span class="E">E</span>X</span> Live installation manual</a></caption> + <div align="center" style="margin:12px"><img src="tlcdoc.png" width="75%"></div> + <hr> + </div> + <blockquote><pre> +# cd /<code><u>mnt/cdrom</u></code>/texlive2004 +# sh install-tl.sh + </pre></blockquote> + <p>The installer runs in a shell window, so it can be done + even from headless systems (those with no X Window client), + but it does need to be installed as root if you want to stick + with the default directory locations or install it system-wide + for multiple users. To install, just type the commands shown + above. + </p> + <p>The options are mostly self-explanatory, and beginners + should pick the recommended scheme and leave all other + settings at their defaults. The character-driven interface + lets you browse around the settings changing things and + looking at options before you commit to installing + anything. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.2</i>: <a name="">The Unix installation program</a></caption> + <blockquote><pre class="scriptsize"> +==================> TeX Live installation procedure <================= + +===> Note: Letters/digits in <angle brackets> indicate menu items <=== +===> for commands or configurable options <=== + + Proposed platform: Intel x86 with GNU/Linux + <P> over-ride system detection and choose platform + <B> binary systems: 1 out of 10 + <S> Installation scheme (scheme_recommended) + [customizing installation scheme: + <C> standard collections <L> language collections] + 20 out of 75, disk space required: 246857 kB + <D> directories: + TEXDIR (The main TeX directory) : /usr/TeX + TEXMFLOCAL (Directory for local styles etc): /usr/TeX/texmf-local + VARTEXMF (Directory for local config) : /usr/TeX/texmf-var + <O> options: + [ ] alternate directory for generated fonts () + [ ] create symlinks in standard directories + [ ] do not install macro/font doc tree + [ ] do not install macro/font source tree + <R> do not install files, set up to run off CD or DVD + <I> start installation + <H> help, <Q> quit + +Enter command: + </pre></blockquote> + <hr> + </div> + <p>‘Collections’ (the <i><a name="v5">C</a></i> and + <i><a name="v6">L</a></i> options) are groups of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages + that you can include or exclude. It's best to leave this + alone unless you know you need something specific. The only + options I sometimes set are under <i><a name="v7">O</a></i>: the + ‘alternate directory for generated fonts’ may + need to be on a different partition for performance reasons on + a shared system; and I always select ‘create symlinks in + standard directories’ so that the system works + immediately after the post-installation configuration (after + installation, run <i><a name="p41">texconfig</a></i> to + adjust your local settings. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.3</i>: <a name="">Running the post-installation program + <i><a name="p42">texconfig</a></i></a></caption> + <div align="center" style="margin:12px"><img src="texconfig.png" width="75%"></div> + <hr> + </div> + <p>Note that the Linux/Unix installation does not install any + editors: it is assumed you can do this yourself from your + distribution's standard package system (most likely + you will already be using <i><a name="p43">Emacs</a></i> or + <i><a name="p44">vi</a></i> anyway). + </p> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.3 <a name="macinst">Installation for Apple Mac</a></h2> + <p>This is exactly the same interface as for the Linux/Unix + installation. You need the <i><a name="p45">bash</a></i> + shell (see the warning in the manual for users of older systems). + </p> + <p>There is a choice of graphical editors for the Mac: two + are included on the DVD, <i><a name="p46"><span class="TEX">T<span class="E">E</span>X</span>Shop</a></i> + and <i><a name="p47">I<span class="TEX">T<span class="E">E</span>X</span>Mac</a></i>, but they need to be + installed separately, after installing <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </div> + <div class="sect1"> + <h2><a href="#get"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4 <a name="wininst">Installation for Microsoft Windows</a></h2> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name=""><span class="TEX">T<span class="E">E</span>X</span> Collection 2004 DVD</a></caption> + <div align="center" style="margin:12px"><img src="tcdvddir.png" width="75%"></div> + <hr> + </div> + <p>Before you install <span class="TEX">T<span class="E">E</span>X</span>, make + sure you have enough disk space: the default installation + takes about 350Mb on a modern filesystem. The installation + assumes you have a fully updated version of Windows, so visit + the Microsoft Web site first (<a href="http://www.microsoft.com/"><tt>http://www.microsoft.com/</tt></a>) and click on + <i><a name="p48">Windows Update</a></i>. Select and install + all the relevant updates for your operating system (Windows + 95, 98, ME, 2000, NT, or XP). You should be doing this + regularly anyway, to keep your system healthy. You may want to + run <i><a name="p49">ScanDisk</a></i> and give your hard + disks a full surface check. <span class="TEX">T<span class="E">E</span>X</span> consists of a very large + number of quite small files, so it's important that your + disk is in good order. + </p> + <p>When you insert the distribution + DVD or CD, it should start the setup program automatically. If + you have auto-run turned off, open <i><a name="p50">My + Computer</a></i>, double-click on the DVD or CD drive, + and then double-click <i><a name="p51">Autorun</a></i> to + start the setup program.<sup><a href="#F7">1</a></sup></p> + <ol class="footnotes" start="1"> + <li><a name="F7">Some builds of Windows seem to have a bug that stops + <i><a name="p52">Autorun</a></i> starting the + installation. In that case (for the <span class="TEX">T<span class="E">E</span>X</span> Collection 2004 + DVD) double-click <code>Setup.exe</code> instead, + or (for the <span class="TEX">T<span class="E">E</span>X</span> + Collection 2003 CD) go to the <code>tpm</code> + folder and double-click on + <code>TeXSetup.exe</code>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.1 pro<span class="TEX">T<span class="E">E</span>X</span>t (<span class="TEX">T<span class="E">E</span>X</span> Collection 2004) + </h3> + <p>For pro<span class="TEX">T<span class="E">E</span>X</span>t from the <span class="TEX">T<span class="E">E</span>X</span> + Collection DVD, follow the instructions in the PDF + documentation which opens automatically when you start + the setup. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.1</i>: <a name="">pro<span class="TEX">T<span class="E">E</span>X</span>t comes with its own installation + guide</a></caption> + <div align="center" style="margin:12px"><img src="tcptpdf.png" width="50%"></div> + <hr> + </div> + <p>The documentation contains links (in large blue type) + that you click on in sequence to run the installation + process. (This is actually very good: everything worked + first time when I did it on XP.) Basically, you need to + install <i>a</i>) <i><a name="p53">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i>; <i>b</i>) <strong>either</strong> <i><a name="p54">WinEdt</a></i> + (with or without some of its add-ons) <strong>or</strong> <i><a name="p55"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>; and <i>c</i>) <i><a name="p56">GhostScript</a></i> and + <i><a name="p57">GSview</a></i>. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">You only need to install items <a href="chapter1.html#nldi">step 3</a> + to <a href="chapter1.html#td">step 5</a> if you install + <i><a name="p58">WinEdt</a></i>. + </p> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 1.2</i>: <a name="tcpt1">First document in + <i><a name="p59"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i></a></caption> + <div align="center" style="margin:12px"><img src="tcptfirstdoc.png" width="75%"></div> + <hr> + </div> + <ol> + <li><b>Install <i><a name="p60">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i></b><br><p><i><a name="p61">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> uses the + <i><a name="p62">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i> distribution as its + core, a long-established and popular distribution for + Windows. + </p> + </li> + <li><b>Install <i><a name="p63">WinEdt</a></i></b><br><p>This is optional: it's a good editor, + especially for the heavy user of a + <i><a name="p64">MIK<span class="TEX">T<span class="E">E</span>X</span></a></i>-based system. This is + a free month's trial — after that it reminds you to cough + up and register. + </p> + </li> + <li><b><a name="nldi">Install the <i><a name="p65">WinEdt</a></i> New <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Document Interface</a></b><br><p>Optional again, and only applicable if you installed + <i><a name="p66">WinEdt</a></i> anyway. It lets you + save commonly-used document settings for use in other + documents of the same type. + </p> + </li> + <li><b>Install the <i><a name="p67">WinEdt</a></i> + Graphics Interface</b><br><p>Another optional add-on for + <i><a name="p68">WinEdt</a></i> to provide drag-and-drop + graphics insertion. + </p> + </li> + <li><b><a name="td">Install the <i><a name="p69">WinEdt</a></i> Table + Designer</a></b><br><p>Last optional add-on for + <i><a name="p70">WinEdt</a></i>, providing a new table editor. + </p> + </li> + <li><b>Install <i><a name="p71"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i></b><br><p>This is a free equivalent to + <i><a name="p72">WinEdt</a></i>. The interface is + slightly different (see <a href="chapter1.html#tcpt1">Figure 1.2</a>) but it + is becoming very popular. + </p> + </li> + <li><b>Install <i><a name="p73">GhostScript</a></i> and + <i><a name="p74">GSview</a></i></b><br><p>These are essential for viewing the PostScript and + PDF output, especially if you don't have any other PDF + viewer installed. + </p> + </li> + </ol> + <p>You get a choice of editors, + but the one which features in + <i><a name="p75">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> is + <i><a name="p76"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>. This is an + <a name="IDE" class="acroref">Integrated Development + Environment</a> (<small>IDE</small>) which lets you manage all the files + related to each document. In many cases, of course, you'll + only have one (the text itself) but if you are working with + anything beyond simple articles, you'll probably have + illustrations (images or diagrams), and possibly separate + chapter files for larger documents, plus indexes, + glossaries, bibliographies, etc. I recommend that you create + a new project for each new document, even if it's a + single-file article, as I did for the example in <a href="chapter1.html#tcpt1">Figure 1.2</a>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.2 <span class="TEX">T<span class="E">E</span>X</span> Live (<span class="TEX">T<span class="E">E</span>X</span> Collection 2003) + </h3> + <ol> + <lh>Once the installation program is running:</lh> + <li><b><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></b><br><p>Install <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> itself from the + <span class="guimenu">TeXLive Software</span>→<span class="guimenuitem">Install on + Hard Disk</span> menu. If you're new to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, pick Quick Install on the following screen. This + gives you everything you need to get started, and + doesn't ask any questions, it just installs it all + straight away. + </p> + <p>If you're installing under Windows NT, 2000, or + XP, you may want to click on the option to install for + all users if you have other users on your system. + </p> + <p>If you want to use <i><a name="p77">Emacs</a></i> + as your editor, click the option for Xem<span class="TEX">T<span class="E">E</span>X</span> + Support.<sup><a href="#F8">2</a></sup></p> + </li> + <li><b>Emacs</b><br><p>After installation, right-click and drag + <code>Xemacs.exe</code> from the + <code>C:\Program Files\TeXLive\bin\win32</code> + folder out onto your desktop and let go, then pick + ‘Create Shortcut’. This places + <i><a name="p79">Emacs</a></i> on your desktop for + easy access. + </p> + </li> + <li><b>WinShell and WinEdt</b><br><p>If you want to install + <i><a name="p80">WinShell</a></i>, run the installer + program in the <code>support/winshell</code> + directory. For <i><a name="p81">WinEdt</a></i> you + must go to their Web site (<a href="http://www.winedt.com/"><tt>http://www.winedt.com/</tt></a>) for a + downloadable version. + </p> + <p>You don't have to install just one editor: if + you've got the space, install them all so you can + try them out. You can always uninstall the ones you + don't want afterwards. + </p> + </li> + <li><b>GSView</b><br><p>Ghostscript is installed automatically, but for + <i><a name="p82">GSView</a></i> you need to go to + <a href="http://www.cs.wisc.edu/~ghost/gsview/"><tt>http://www.cs.wisc.edu/~ghost/gsview/</tt></a>, + and download the most recent version. + </p> + <p>If you use <i><a name="p83">GSView</a></i>, please + register your copy with Ghostgum, Pty. (<a href="http://www.ghostgum.com.au/"><tt>http://www.ghostgum.com.au/</tt></a>). + </p> + </li> + </ol> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Please read the <span class="TEX">T<span class="E">E</span>X</span> Live update pages at <a href="http://www.tug.org/texlive/bugs.html"><tt>http://www.tug.org/texlive/bugs.html</tt></a> for + details of any changes since the disks were released, and + download and install any additional software + required. + </p> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F8">Note this unfortunate choice of name is nothing + to do with <a name="em">Eberhard Matthes</a>' MS-DOS implementation of <span class="TEX">T<span class="E">E</span>X</span> + called em<span class="TEX">T<span class="E">E</span>X</span> — the ‘Xem’ is + short for <i><a name="p78">Xemacs</a></i>.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>1.4.3 Installation problems + </h3> + <p>It's always annoying when a program that's supposed to + install painlessly causes trouble, and none the more so when + everyone else seems to have been able to install it without + problems. I've installed <span class="TEX">T<span class="E">E</span>X</span> hundreds of times and very + rarely had any difficulties, but these are a few of the + occasions when I did. + </p> + <blockquote> + <dl> + <dt><b>Bad hard disks</b></dt> + <dd> + <p>As recommended in <a href="chapter1.html#wininst">section 1.4</a>, run a + scan and defragmentation of your hard disk[s] before + you start. It should take under an hour on a modern + machine unless you have a very large disk, and it may + need overnight on an older machine. Clean your CD or DVD + drive if it's been in heavy use. <span class="TEX">T<span class="E">E</span>X</span> uses a very + large number of very small files, so there is a lot of + disk activity during an installation. As also + recommended in <a href="chapter1.html#lininst">section 1.2</a>, if you have + the chance to reformat the hard disk, pick the + smallest granularity (cluster size) possible. + </p> + </dd> + <dt><b>Registry errors</b></dt> + <dd> + <p>This only affects Microsoft Windows users. The + Registry is where Microsoft want software companies + automatically to store details of all the programs you + install. Unfortunately the Registry is grossly abused + by marketing departments to try and foist undesirable + links on you, the user. You will see this with many + commercial programs, where a particular type of file + you've been able to double-click on for years suddenly + runs a different program. Some programs install + obsolete or broken copies of program libraries (DLL + files), overwriting ones which were working perfectly. + Worse, the viruses, trojans, and worms which typically + infect unprotected Windows systems can leave unwanted + links to web pages, or change some of the ways in + which Windows operates. The overall effect can be that + the whole machine slows down, or that files which are + expected to do one thing do another. The best + solution is a thorough Registry clean-out, using one + of the many programs available for the purpose. + </p> + </dd> + <dt><b><a name="latest">Use the latest versions</a></b></dt> + <dd> + <p>Before installing, check the <small><a href="chapter5.html#CTAN" class="acroref" name="A57" title="Comprehensive Archive Network">CTAN</a></small> web site (<a href="http://www.ctan.org/"><tt>http://www.ctan.org/</tt></a> for any updated + copy of the installation program. This is called + <code>install-tl.sh</code> for Linux and Mac + systems, and <code>Setup.exe</code> for + Microsoft Windows (on the <span class="TEX">T<span class="E">E</span>X</span> Collection 2003 CD it + was called <code>TeXSetup.exe</code>). Just + occasionally a bug slips through onto the production + CD or DVD, and although it's always fixed and notified + on <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a>, + that's a high-volume newsgroup and even the sharpest + eyes may miss an announcement. + </p> + </dd> + <dt><b>Stick to the defaults</b></dt> + <dd> + <p>Unless you're a computer scientist or a software + engineer, I suggest you never change or fiddle with + the default directories for installation. I know some + of them look odd, but they're that way for a purpose, + especially when it comes to avoiding directories will + spaces in their names, like the notorious + <code class="literal">C:\Program Files</code>. Although most + modern systems cope happily with spaces in filenames + and directory names, they are usually A Bad Design + Idea, and should be avoided like the plague (spaces + are forbidden in web addresses for the same reason: + the people who designed them knew the pitfalls). It + may look snazzier to put the installation in + <code class="literal">My Cute Stuff</code>, but please + don't: you'll just make it harder to find, harder to + fix problems, and more embarrassing if you have to + explain it to someone else trying to help you. + </p> + </dd> + </dl> + </blockquote> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="preface.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter2.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter10.html b/info/beginlatex/html/chapter10.html new file mode 100644 index 0000000000..b1ffa32efe --- /dev/null +++ b/info/beginlatex/html/chapter10.html @@ -0,0 +1,863 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:52--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 10 — Compatibility with other systems</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 10 — Compatibility with other systems</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class="current"><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="compat">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">10</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Compatibility with other systems</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#tolatex">Converting into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li><a href="#latexto">Converting out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>As we saw in <a href="chapter2.html#plaintext">Chapter 2</a>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses + plain-text files, so they can be read and written by any + standard application that can open text files. This helps + preserve your information over time, as the plain-text format + cannot be obsoleted or hijacked by any manufacturer or sectoral + interest, and it will always be readable on any computer, from + your handheld (yes, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is available for some <small><a href="intro.html#PDA" class="acroref" name="A216" title="Personal Digital Assistant">PDA</a></small>s, see <a href="chapter10.html#zaurus">Figure 10.1</a>) to the + biggest supercomputer. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.1</i>: <a name="zaurus"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> editing and processing on the Sharp Zaurus 5500 + PDA</a></caption> + <div align="center" style="margin:12px"><img src="zedit.png" width="30%"> <img src="zlatex.png" width="30%"> <img src="qpdf.png" width="30%"></div> + <hr> + </div> + <p>However, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is intended as the last stage of the + editorial process: formatting for print or display. If you have + a requirement to re-use the text in some other + environment — a database perhaps, or on the Web or a + <small>CD-ROM</small> or <small><a href=".html#DVD" class="acroref" name="A218" title="Digital Versatile Disk">DVD</a></small>, or in Braille or voice output — then + it should probably be edited, stored, and maintained in + something neutral like the <a name="XML" class="acroref" href="http://www.ucc.ie/xml/">Extensible Markup + Language</a> (<small>XML</small>), and only converted to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> when a + typeset copy is needed. + </p> + <p>Although <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has many structured-document features in + common with <small><a href="chapter10.html#SGML" class="acroref" name="A220" title="Standard Generalized Markup Language">SGML</a></small> and <small><a href="chapter10.html#XML" class="acroref" name="A221" title="Extensible Markup Language">XML</a></small>, it can still only be processed by the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and <i><a name="p227">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> programs. + Because its macro features make it almost infinitely + redefinable, processing it requires a program which can unravel + arbitrarily complex macros, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and its siblings are + the only programs which can do that effectively. Like other + typesetters and formatters (Quark + <i><a name="p228">XPress</a></i>, + <i><a name="p229">PageMaker</a></i>, + <i><a name="p230">FrameMaker</a></i>, Microsoft + <i><a name="p231">Publisher</a></i>, <i><a name="p232">3B2</a></i> etc.), <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is largely a + one-way street leading to typeset printing or display + formatting. + </p> + <p>Converting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to some other format therefore means you + will unavoidably lose some formatting, as <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has features + that others systems simply don't possess, so they cannot be + translated — although there are several ways to minimise + this loss. Similarly, converting other formats into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + often means editing back the stuff the other formats omit + because they only store appearances, not structure. + </p> + <p>However, there are at least two excellent systems for + converting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> directly to <a name="HTML" class="acroref">HyperText + Markup Language</a> (<small>HTML</small>) so you can publish it on the web, as + we shall see in <a href="chapter10.html#latexto">section 10.2</a>. + </p> + <div class="sect1"> + <h2><a href="#compat"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.1 <a name="tolatex">Converting into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h2> + <p>There are several systems which will save their text in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> format. The best known is probably the <span class="LYX">L<span class="Y">Y</span>X</span> editor + (see <a href="chapter2.html#lyxwin">Figure 2.1</a>), which is a wordprocessor-like + interface to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for Windows and Unix. Both the + <i><a name="p233">AbiWord</a></i> and + <i><a name="p234">Kword</a></i> wordprocessors on Linux + systems have a very good <b>Save + As</b>...<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> output, so they can be used to + open Microsoft <i><a name="p235">Word</a></i> documents and + convert to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Several maths packages like the + <i><a name="p236">EuroMath</a></i> editor, and the + <i><a name="p237">Mathematica</a></i> and + <i><a name="p238">Maple</a></i> analysis packages, can also + save material in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> format. + </p> + <p>In general, most other wordprocessors and DTP systems + either don't have the level of internal markup + sophistication needed to create a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file, or they lack + a suitable filter to enable them to output what they do have. + Often they are incapable of outputting any kind of structured + document, because they only store what the text looks like, + not why it's there or what role it fulfills. There are + two ways out of this: + </p> + <ul> + <li> + <p>Use the <span class="guimenu">File</span>→<span class="guimenuitem">Save + As...</span> menu item to save the + wordprocessor file as <small><a href="chapter10.html#HTML" class="acroref" name="A223" title="HyperText Markup Language">HTML</a></small>, + rationalise the <small><a href="chapter10.html#HTML" class="acroref" name="A224" title="HyperText Markup Language">HTML</a></small> using + <a name="raggett">Dave Raggett</a>'s <a href="http://tidy.sourceforge.net/"><i><a name="p239">HTML + Tidy</a></i></a>, and convert the resulting + <a name="XHTML" class="acroref">Extensible HyperText Markup + Language</a> (<small>XHTML</small>) to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with any of the standard + <small><a href="chapter10.html#XML" class="acroref" name="A226" title="Extensible Markup Language">XML</a></small> tools (see below). + </p> + </li> + <li> + <p>Use a specialist conversion tool like EBT's + <i><a name="p240">DynaTag</a></i> (supposedly available + from Enigma, if you can persuade them they have a copy to + sell you; or you may still be able to get it from <a href="http://www.rbii.com/">Red Bridge + Interactive</a> in Providence, RI). It's + expensive and they don't advertise it, but for bulk + conversion of consistently-marked + <i><a name="p241">Word</a></i> files into XML it beats + everything else hands down. The + <i><a name="p242">Word</a></i> files + <em>must</em> be consistent, though, and must + use named styles from a stylesheet, otherwise no system on + earth is going to be able to guess what it means. + </p> + </li> + </ul> + <p>There is of course a third way, suitable for large volumes + only: send it off to the Pacific Rim to be retyped into XML or + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. There are hundreds of companies from India to + Polynesia who do this at high speed and low cost with very + high accuracy. It sounds crazy when the document is already in + electronic form, but it's a good example of the problem + of low quality of wordprocessor markup that this solution + exists at all. + </p> + <p>You will have noticed that most of the solutions lead to + one place: <small><a href="chapter10.html#SGML" class="acroref" name="A227" title="Standard Generalized Markup Language">SGML</a></small><sup><a href="#F53">1</a></sup> or <small><a href="chapter10.html#XML" class="acroref" name="A231" title="Extensible Markup Language">XML</a></small>. As explained + above and elsewhere, these formats are the only ones devised + so far capable of storing sufficient information in + machine-processable, publicly-accessible form to enable your + document to be recreated in multiple output formats. Once + your document is in <small><a href="chapter10.html#XML" class="acroref" name="A232" title="Extensible Markup Language">XML</a></small>, there is a + large range of software available to turn it into other + formats, including <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Processors in any of the common + <small><a href="chapter10.html#SGML" class="acroref" name="A233" title="Standard Generalized Markup Language">SGML</a></small>/<small><a href="chapter10.html#XML" class="acroref" name="A234" title="Extensible Markup Language">XML</a></small> + processing languages like the <a name="DSSSL" class="acroref">Document + Style Semantics and Specification Language</a> (<small>DSSSL</small>), the + <a name="XSLT" class="acroref">Extensible Stylesheet Language + [Transformations]</a> (<small>XSLT</small>), + <i><a name="p243">Omnimark</a></i>, + <i><a name="p244">Metamorphosis</a></i>, + <i><a name="p245">Balise</a></i>, etc. can easily be written + to output <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and this approach is extremely + common. + </p> + <p>Much of this will be simplified when wordprocessors + support native, arbitrary <small><a href="chapter10.html#XML" class="acroref" name="A237" title="Extensible Markup Language">XML</a></small>/<small><a href="chapter10.html#XSLT" class="acroref" name="A238" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> as a + standard feature, because <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> output will become much + simpler to produce. + </p> + <ul> + <li> + <p>Sun's <i><a name="p246">Star Office</a></i> and + its Open Source sister, + <i><a name="p247">OpenOffice</a></i>, have used XML as + their native file format for several years, and there is a + project at the <a name="OASIS" class="acroref">Organisation for the + Advancement of Structured Information Systems</a> (<small>OASIS</small>) + for developing a common <small><a href="chapter10.html#XML" class="acroref" name="A240" title="Extensible Markup Language">XML</a></small> + office file format based on those used by these two + packages, which has been proposed to the <a name="ISO" class="acroref">International Organization for + Standardization</a> (<small>ISO</small>) in Geneva as a candidate for + an International Standard. + </p> + </li> + <li> + <p><i><a name="p248">WordPerfect</a></i> has also had a + native <small><a href="chapter10.html#SGML" class="acroref" name="A242" title="Standard Generalized Markup Language">SGML</a></small> (and now <small><a href="chapter10.html#XML" class="acroref" name="A243" title="Extensible Markup Language">XML</a></small>) editor for many years, which will + work with any <a name="DTD" class="acroref">Document Type + Definition</a> (<small>DTD</small>) (but not a Schema; and at the time + of writing (2005) it still used a proprietary stylesheet + format). + </p> + </li> + <li> + <p>Microsoft has had a half-hearted ‘Save + As...XML’ for a while, using an + internal and formerly largely undocumented Schema + (recently published at last). The + ‘Professional’ versions of + <i><a name="p249">Word</a></i> and + <i><a name="p250">Excel</a></i> in + <i><a name="p251">Office 11</a></i> (Office 2003 for + XP) now have full support for arbitrary Schemas and a real + <small><a href="chapter10.html#XML" class="acroref" name="A245" title="Extensible Markup Language">XML</a></small> editor, albeit with a rather + primitive interface, but there is no conversion to or from + <i><a name="p252">Word</a></i>'s + <code>.doc</code> format.<sup><a href="#F54">2</a></sup></p> + <p>However, help comes in the shape of <a name="rd">Ruggero Dambra</a>'s + <i><a name="p256">WordML2<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, which is an + <small><a href="chapter10.html#XSLT" class="acroref" name="A250" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> stylesheet to transform an + <small><a href="chapter10.html#XML" class="acroref" name="A251" title="Extensible Markup Language">XML</a></small> document in this internal + Schema (WordML) into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> format. + Download it from any <small><a href="chapter5.html#CTAN" class="acroref" name="A252" title="Comprehensive Archive Network">CTAN</a></small> server + in <code>/support/WordML2LaTeX</code>. + </p> + </li> + <li> + <p><a name="rtf2latex2e"></a>Among the conversion programs on <small><a href="chapter5.html#CTAN" class="acroref" name="A253" title="Comprehensive Archive Network">CTAN</a></small> is <a name="us">Ujwal Sath­yam</a>'s + <i><a name="p257">rtf2latex2e</a></i>, which converts + <a name="RTF" class="acroref">Rich Text Format</a> (<small>RTF</small>) files (output + by many wordprocessors) to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>. The package + description says it has support + for figures and tables, equations are read as figures, and + it can the handle the latest <small><a href="chapter10.html#RTF" class="acroref" name="A255" title="Rich Text Format">RTF</a></small> + versions from Microsoft Word 97/98/2000, StarOffice, and + other wordprocessors. It runs on Macs, Linux, other Unix + systems, and Windows. + </p> + </li> + </ul> + <p>When these efforts coalesce into generalised support for + arbitrary <small><a href="chapter10.html#DTD" class="acroref" name="A256" title="Document Type Definition">DTD</a></small>s and Schemas, it will + mean a wider choice of editing interfaces, and when they + achieve the ability to run <small><a href="chapter10.html#XSLT" class="acroref" name="A257" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> + conversion into + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from within these editors, such as is done at the + moment with <i><a name="p258">Emacs</a></i> or + <i><a name="p259">XML Spy</a></i>, we will have full + convertability. + </p> + <ol class="footnotes" start="1"> + <li><a name="F53">The <a name="SGML" class="acroref">Standard Generalized Markup + Language</a> (<small>SGML</small>) itself is little used now for new + projects, as the software support for its daughter + <small><a href="chapter10.html#XML" class="acroref" name="A229" title="Extensible Markup Language">XML</a></small> is far greater, but there + are still hundreds of large document repositories in + <small><a href="chapter10.html#SGML" class="acroref" name="A230" title="Standard Generalized Markup Language">SGML</a></small> still growing their + collection by adding documents.</a></li> + </ol> + <ol class="footnotes" start="2"> + <li><a name="F54">Which is silly, given that Microsoft used to make + one of the best + <i><a name="p253">Word</a></i>-to-<small><a href="chapter10.html#SGML" class="acroref" name="A246" title="Standard Generalized Markup Language">SGML</a></small> converters ever, which was + bi-directional (yes, it could round-trip + <i><a name="p254">Word</a></i> to <small><a href="chapter10.html#SGML" class="acroref" name="A247" title="Standard Generalized Markup Language">SGML</a></small> and back to + <i><a name="p255">Word</a></i> and back into <small><a href="chapter10.html#SGML" class="acroref" name="A248" title="Standard Generalized Markup Language">SGML</a></small>). But they dropped it on the + floor when <small><a href="chapter10.html#XML" class="acroref" name="A249" title="Extensible Markup Language">XML</a></small> + arrived.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.1.1 Getting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> out of XML + </h3> + <p>Assuming you can get your document out of its + wordprocessor format into <small><a href="chapter10.html#XML" class="acroref" name="A258" title="Extensible Markup Language">XML</a></small> by + some method, here is a very brief example of how to turn it + into <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>You can of course buy and install a fully-fledged + commercial <small><a href="chapter10.html#XML" class="acroref" name="A259" title="Extensible Markup Language">XML</a></small> editor with + <small><a href="chapter10.html#XSLT" class="acroref" name="A260" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> support, and run this + application within it. However, this is beyond the reach of + many users, so to do this unaided you just need to install + three pieces of software: <a href="http://java.sun.com/j2se/1.4.2/download.html"><i><a name="p260">Java</a></i></a>, + <a href="http://saxon.sourceforge.net/"><i><a name="p261">Saxon</a></i></a> + and the <a href="http://www.docbook.org/xml/4.2/index.html">DocBook + 4.2 DTD</a> (<small><a href="chapter6.html#URI" class="acroref" name="A261" title="Uniform Resource Indicator">URI</a></small>s are + correct at the time of writing). None of these has a visual + interface: they are run from the command-line in the same + way as is possible with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>As an example, let's take the above paragraph, as + typed or imported into <i><a name="p262">AbiWord</a></i> + (see + <a href="chapter10.html#abidoc">Figure 10.1</a>). This is stored as a single + paragraph with highlighting on the product names (italics), + and the names are also links to their Internet sources, just + as they are in this document. This is a convenient way to + store two pieces of information in the same place. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.1</i>: <a name="abidoc">Sample paragraph in + <i><a name="p263">AbiWord</a></i> converted to <small><a href="chapter10.html#XML" class="acroref" name="A262" title="Extensible Markup Language">XML</a></small></a></caption> + <div align="center" style="margin:12px"><img src="abiword.png" width="100%"></div> + <hr> + </div> + <p><i><a name="p264">AbiWord</a></i> can export in DocBook + format, which is an <small><a href="chapter10.html#XML" class="acroref" name="A263" title="Extensible Markup Language">XML</a></small> vocabulary + for describing technical (computer) + documents–it's what I use for this book. + <i><a name="p265">AbiWord</a></i> can also export <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + but we're going make our own + version, working from the <small><a href="chapter10.html#XML" class="acroref" name="A264" title="Extensible Markup Language">XML</a></small> + (Brownie points for the reader who can guess why I'm + not just accepting the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> conversion output). + </p> + <p>Although <i><a name="p266">AbiWord</a></i>'s + default is to output an <small><a href="chapter10.html#XML" class="acroref" name="A265" title="Extensible Markup Language">XML</a></small> book document + type, we'll convert it to a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> article document + class. Notice that <i><a name="p267">AbiWord</a></i> has + correctly output the expected section and title markup + empty, even though it's not used. Here's the + <small><a href="chapter10.html#XML" class="acroref" name="A266" title="Extensible Markup Language">XML</a></small> output (I've changed the + linebreaks to keep it within the bounds of this page + size): + </p> + <blockquote><pre class="tiny"> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<book> +<!-- ===================================================================== --> +<!-- This DocBook file was created by AbiWord. --> +<!-- AbiWord is a free, Open Source word processor. --> +<!-- You may obtain more information about AbiWord at www.abisource.com --> +<!-- ===================================================================== --> + <chapter> + <title></title> + <section role="unnumbered"> + <title></title> + <para>You can of course buy and install a fully-fledged commercial XML +editor with XSLT support, and run this application within it. However, this +is beyond the reach of many users, so to do this unaided you just need to +install three pieces of software: <ulink +url="http://java.sun.com/j2se/1.4.2/download.html"><emphasis>Java</emphasis></ulink>, +<ulink +url="http://saxon.sourceforge.net"><emphasis>Saxon</emphasis></ulink>, and +the <ulink url="http://www.docbook.org/xml/4.2/index.html">DocBook 4.2 DTD</ulink> +(URIs are correct at the time of writing). None of these has a visual +interface: they are run from the command-line in the same way as is possible +with L<superscript>A</superscript>T<subscript>E</subscript>X.</para> + </section> + </chapter> +</book> + </pre></blockquote> + <p>The <small><a href="chapter10.html#XSLT" class="acroref" name="A267" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> language lets us + create templates for each type of element in an <small><a href="chapter10.html#XML" class="acroref" name="A268" title="Extensible Markup Language">XML</a></small> document. In our example, there are + only three which need handling, as we did not create chapter + or section titles (DocBook requires them to be present, but + they don't have to be used). + </p> + <ul> + <li> + <p>para, for the + paragraph[s]; + </p> + </li> + <li> + <p>ulink, for the URIs;</p> + </li> + <li> + <p>emphasis, for the + italicisation. + </p> + </li> + </ul> + <p>I'm going to cheat over the superscripting and + subscripting of the letters in the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> logo, and use my + editor to replace the whole thing with the + <code class="command"><a name="c319">\LaTeX</a></code> command. In the other three cases, + we already know how <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> deals with these, so we can + write our templates (see <a href="chapter10.html#xslcode">Figure 10.2</a>). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.2</i>: <a name="xslcode"><small><a href="chapter10.html#XSLT" class="acroref" name="A269" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> script to convert the + paragraph</a></caption> + <blockquote><pre class="footnotesize"> +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output method="text"/> + + <xsl:template match="/"> + <xsl:text>\documentclass{article} +\usepackage{url}</xsl:text> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="book"> + <xsl:text>\begin{document}</xsl:text> + <xsl:apply-templates/> + <xsl:text>\end{document}</xsl:text> + </xsl:template> + + <xsl:template match="para"> + <xsl:apply-templates/> + <xsl:text>&#x000A;</xsl:text> + </xsl:template> + + <xsl:template match="ulink"> + <xsl:apply-templates/> + <xsl:text>\footnote{\url{</xsl:text> + <xsl:value-of select="@url"/> + <xsl:text>}}</xsl:text> + </xsl:template> + + <xsl:template match="emphasis"> + <xsl:text>\emph{</xsl:text> + <xsl:apply-templates/> + <xsl:text>}</xsl:text> + </xsl:template> + +</xsl:stylesheet> + </pre></blockquote> + <hr> + </div> + <p>If you run this through + <i><a name="p268">Saxon</a></i>, which is an <small><a href="chapter10.html#XSLT" class="acroref" name="A270" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> processor, you can output a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + file which you can process and view (see <a href="chapter10.html#paraview">Figure 10.3</a>). + </p> + <blockquote><pre class="scriptsize"> +$ java -jar /usr/local/saxonb8-0/saxon8.jar -o para.ltx \ +para.dbk para.xsl +$ latex para.ltx +This is TeX, Version 3.14159 (Web2C 7.3.7x) +(./para.ltx +LaTeX2e <2001/06/01> +Loading CZ hyphenation patterns: Pavel Sevecek, v3, 1995 +Loading SK hyphenation patterns: Jana Chlebikova, 1992 +Babel <v3.7h> and hyphenation patterns for english, +dumylang, nohyphenation, czech, slovak, german, ngerman, +danish, spanish, catalan, finnish, french, ukenglish, greek, +croatian, hungarian, italian, latin, mongolian, dutch, +norwegian, polish, portuguese, russian, ukrainian, +serbocroat, swedish, loaded. +(/usr/TeX/texmf/tex/latex/base/article.cls +Document Class: article 2001/04/21 v1.4e Standard LaTeX +document class (/usr/TeX/texmf/tex/latex/base/size10.clo)) +(/usr/TeX/texmf/tex/latex/ltxmisc/url.sty) (./para.aux) +[1] (./para.aux) ) +Output written on para.dvi (1 page, 1252 bytes). +Transcript written on para.log. +$ xdvi para & + </pre></blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 10.3</i>: <a name="paraview">Displaying the typeset paragraph</a></caption> + <div align="center" style="margin:12px"><img src="para.png" width="60%"></div> + <blockquote><pre class="scriptsize"> +\documentclass{article}\usepackage{url}\begin{document} + + You can of course buy and install a fully-fledged commercial +XML editor with XSLT support, and run this application within it. +However, this is beyond the reach of many users, so to do this +unaided you just need to install three pieces of software: +\emph{Java}\footnote{\url{http://java.sun.com/j2se/1.4.2/download.html}}, +\emph{Saxon}\footnote{\url{http://saxon.sourceforge.net}}, and the +DocBook 4.2 DTD\footnote{\url{http://www.docbook.org/xml/4.2/index.html}} +(URIs are correct at the time of writing). None of these has a visual +interface: they are run from the command-line in the same way as is +possible with \LaTeX. + +\end{document} + </pre></blockquote> + <hr> + </div> + <p>Writing <small><a href="chapter10.html#XSLT" class="acroref" name="A271" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> is not hard, but + requires a little learning. The output method here is + <code class="literal">text</code>, which is <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s file + format (<small><a href="chapter10.html#XSLT" class="acroref" name="A272" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> can also output + <small><a href="chapter10.html#HTML" class="acroref" name="A273" title="HyperText Markup Language">HTML</a></small> and other formats of + XML). + </p> + <ol type="1"> + <li> + <p>The first template matches + ‘<code class="literal">/</code>’, which is + the document root (before the book + start-tag). At this stage we output the text + <code class="literal">\documentclass{article}</code> and + <code class="literal">\usepackage{url}</code>. The + ‘<code class="literal">apply-templates</code>’ + instructions tells the processor to carry on processing, + looking for more matches. <small><a href="chapter10.html#XML" class="acroref" name="A274" title="Extensible Markup Language">XML</a></small> + comments get ignored, and any elements which don't + match a template simply have their contents passed + through until the next match occurs. + </p> + </li> + <li> + <p>The book template outputs the + <code class="literal">\begin{document}</code> and the + <code class="literal">\end{document}</code> commands, and between + them to carry on processing. + </p> + </li> + <li> + <p>The para template just outputs + its content, but follows it with a linebreak (using the + hexadecimal character code <code class="literal">x000A</code> (see + the <small><a href="chapter2.html#ASCII" class="acroref" name="A275" title="American Standard Code for Information Interchange">ASCII</a></small> chart in <a href="appendixC.html#asciicodes">Table C.1</a>). + </p> + </li> + <li> + <p>The ulink template outputs its + content but follows it with a footnote using the + <code class="command"><a name="c320">\url</a></code> command to output the value of + the url attribute. + </p> + </li> + <li> + <p>The emphasis template surrounds + its content with <code class="literal">\emph{</code> and + <code class="literal">}</code>. + </p> + </li> + </ol> + <p>This is a relatively trivial example, but it serves to + show that it's not hard to output <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from + <small><a href="chapter10.html#XML" class="acroref" name="A276" title="Extensible Markup Language">XML</a></small>. In fact there is a set of + templates already written to produce <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from a DocBook + file at + <a href="http://www.dpawson.co.uk/docbook/tools.html#d4e2905"><tt>http://www.dpawson.co.uk/docbook/tools.html#d4e2905</tt></a></p> + </div> + </div> + <div class="sect1"> + <h2><a href="#compat"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2 <a name="latexto">Converting out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h2> + <p>This is much harder to do comprehensively. As noted + earlier, the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file format really requires the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + program itself in order to process all the packages and + macros, because there is no telling what complexities authors + have added themselves (what a lot of this book is + about!). + </p> + <p>Many authors and editors rely on custom-designed or + homebrew converters, often written in the standard shell + scripting languages (Unix shells, Perl, Python, Tcl, etc). + Although some of the packages presented here are also written + in the same languages, they have some advantages and + restrictions compared with private conversions: + </p> + <ul> + <li> + <p>Conversion done with the standard utilities (eg awk, + tr, sed, grep, detex, etc) can be faster for + <i>ad hoc</i> translations, but it + is easier to obtain consistency and a more sophisticated + final product using + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A277" title="HyperText Markup Language">HTML</a></small> or + <span class="TEX">T<span class="E">E</span>X</span>4ht — or one of the other systems + available. + </p> + </li> + <li> + <p>Embedding additional non-standard control sequences in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> source code may make it harder to edit and + maintain, and will definitely make it harder to port to + another system. + </p> + </li> + <li> + <p>Both the above methods (and others) provide a fast and + reasonable reliable way to get documents authored in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> onto the Web in an acceptable — if not + optimal — format. + </p> + </li> + <li> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A278" title="HyperText Markup Language">HTML</a></small> was written to + solve the problem of getting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-with-mathematics + onto the Web, in the days before MathML and math-capable + browsers. + <span class="TEX">T<span class="E">E</span>X</span>4ht was written to turn <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents into Web + hypertext — mathematics or not. + </p> + </li> + </ul> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.1 Conversion to <i><a name="p269">Word</a></i></h3> + <p>There are several programs on <small><a href="chapter5.html#CTAN" class="acroref" name="A279" title="Comprehensive Archive Network">CTAN</a></small> to do + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-to-<i><a name="p270">Word</a></i> and similar + conversions, but they do not all handles everything <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + can throw at them, and some only handle a subset of the + built-in commands of default + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Two in particular, however, have a good + reputation, although I haven't used either of them (I + stay as far away from <i><a name="p271">Word</a></i> as + possible): + </p> + <ul> + <li> + <p><i><a name="p272">latex2rtf</a></i> by <a name="wh">Wilfried Hennings</a>, <a name="fd">Fernando Dorner</a>, and <a name="ag">Andreas Granzer</a> translates + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> into <small><a href="chapter10.html#RTF" class="acroref" name="A280" title="Rich Text Format">RTF</a></small> — the + opposite of the <i><a name="p273">rtf2latex2e</a></i> + mentioned in <a href="chapter10.html#rtf2latex2e">the 4th item</a>. <small><a href="chapter10.html#RTF" class="acroref" name="A281" title="Rich Text Format">RTF</a></small> can be read by most + wordprocessors, and this program preserves layout and + formatting for most <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents using standard + built-in commands. + </p> + </li> + <li> + <p><a name="kac">KirillA Chikrii</a>'s <i><a name="p274"><span class="TEX">T<span class="E">E</span>X</span>2Word</a></i> for + Microsoft Windows is a converter plug-in for + <i><a name="p275">Word</a></i> to let it open <span class="TEX">T<span class="E">E</span>X</span> + and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents. The author's company claims + that ‘virtually any existing <span class="TEX">T<span class="E">E</span>X</span>/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + package can be supported by <i><a name="p276"><span class="TEX">T<span class="E">E</span>X</span>2Word</a></i>’ + because it is customisable. + </p> + </li> + </ul> + <p>One easy route into wordprocessing, however, is the + reverse of the procedures suggested in the preceding + section: convert <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to <small><a href="chapter10.html#HTML" class="acroref" name="A282" title="HyperText Markup Language">HTML</a></small>, + which many wordprocessors read easily. The following + sections cover two packages for this. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.2 <i><a name="p277"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2HTML</a></i></h3> + <p>As its name suggests, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A283" title="HyperText Markup Language">HTML</a></small> is a system to convert <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + structured documents to <small><a href="chapter10.html#HTML" class="acroref" name="A284" title="HyperText Markup Language">HTML</a></small>. Its + main task is to reproduce the document structure as a set of + interconnected <small><a href="chapter10.html#HTML" class="acroref" name="A285" title="HyperText Markup Language">HTML</a></small> files. Despite + using Perl, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A286" title="HyperText Markup Language">HTML</a></small> relies very heavily + on standard Unix facilities like the + <i><a name="p278">NetPBM</a></i> graphics package and the + pipe syntax. Microsoft Windows is not well suited to this + kind of composite processing, although all the required + facilities are available for download in various forms and + should in theory allow the package to run — but reports + of problems are common. + </p> + <ul> + <li> + <p>The sectional structure is preserved, and + navigational links are generated for the standard Next, + Previous, and Up directions. + </p> + </li> + <li> + <p>Links are also used for the cross-references, + citations, footnotes, ToC, and lists of figures and + tables. + </p> + </li> + <li> + <p>Conversion is direct for common elements like lists, + quotes, paragraph-breaks, type-styles, etc, where there + is an obvious <small><a href="chapter10.html#HTML" class="acroref" name="A287" title="HyperText Markup Language">HTML</a></small> + equivalent. + </p> + </li> + <li> + <p>Heavily formatted objects such as math and diagrams + are converted to images. + </p> + </li> + <li> + <p>There is no support for homebrew macros.</p> + </li> + </ul> + <p>There is, however, support for arbitrary hypertext + links, symbolic cross-references between ‘evolving + remote documents’, conditional text, and the + inclusion of raw <small><a href="chapter10.html#HTML" class="acroref" name="A288" title="HyperText Markup Language">HTML</a></small>. These are + extensions to + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, implemented as new commands and + environments. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A289" title="HyperText Markup Language">HTML</a></small> outputs a + directory named after the input filename, and all the output + files are put in that directory, so the output is + self-contained and can be uploaded to a server as it + stands. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.3 <i><a name="p279"><span class="TEX">T<span class="E">E</span>X</span>4ht</a></i></h3> + <p><span class="TEX">T<span class="E">E</span>X</span>4ht operates differently from + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>2<small><a href="chapter10.html#HTML" class="acroref" name="A290" title="HyperText Markup Language">HTML</a></small>: it uses the <span class="TEX">T<span class="E">E</span>X</span> + program to process the file, and handles conversion in a set + of postprocessors for the common <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages. It can + also output to <small><a href="chapter10.html#XML" class="acroref" name="A291" title="Extensible Markup Language">XML</a></small>, including + <a name="TEI" class="acroref">Text Encoding Initiative</a> (<small>TEI</small>) and + DocBook, and the OpenOffice and WordXML formats, and it can + create <span class="TEX">T<span class="E">E</span>X</span>info format + manuals. + </p> + <p>By default, documents retain the single-file structure + implied by the original, but there is again a set of + additional configuration directives to make use of the + features of hypertext and navigation, and to split files for + ease of use. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.4 Extraction from PS and PDF + </h3> + <p>If you have the full version of Adobe + <i><a name="p280">Acrobat</a></i>, you can open a <small><a href="chapter4.html#PDF" class="acroref" name="A293" title="Portable Document Format">PDF</a></small> file created by + <i><a name="p281">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, select and copy all + the text, and paste it into <i><a name="p282">Word</a></i> + and some other wordprocessors, and retain some common + formatting of headings, paragraphs, and lists. Both + solutions still require the wordprocessor text to be edited + into shape, but they preserve enough of the formatting to + make it worthwhile for short documents. Otherwise, use the + <i><a name="p283">pdftotext</a></i> program to extract + everything from the <small><a href="chapter4.html#PDF" class="acroref" name="A294" title="Portable Document Format">PDF</a></small> file as + plain (paragraph-formatted) text. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>10.2.5 Last resort: strip the markup + </h3> + <p>At worst, the <i><a name="p284">detex</a></i> program + on <small><a href="chapter5.html#CTAN" class="acroref" name="A295" title="Comprehensive Archive Network">CTAN</a></small> will strip a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file + of all markup and leave just the raw unformatted text, which + can then be re-edited. There are also programs to extract + the raw text from <small><a href="chapter4.html#DVI" class="acroref" name="A296" title="device-independent">DVI</a></small> and <a name="PS" class="acroref">PostScript</a> (<small>PS</small>) files. + </p> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter9.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="appendixA.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter2.html b/info/beginlatex/html/chapter2.html new file mode 100644 index 0000000000..09fbd05f5a --- /dev/null +++ b/info/beginlatex/html/chapter2.html @@ -0,0 +1,1627 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:09--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 2 — Using your editor to create documents</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 2 — Using your editor to create documents</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class="current"><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="plaintext">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">2</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Using your editor to create documents</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#mark-up">Markup</a></li> + <li><a href="#quickstart">Quick start for the impatient</a></li> + <li><a href="#editors">Editors</a></li> + <li><a href="#commands"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands</a></li> + <li><a href="#specials">Special characters</a></li> + <li><a href="#quotes">Quotation marks</a></li> + <li><a href="#accents">Accents</a></li> + <li><a href="#handj">Dimensions, hyphenation, justification, and breaking</a></li> + <li><a href="#math">Mathematics</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents are all <b><i><a name="plain-text">plain-text</a></i></b> files.<sup><a href="#F9">1</a></sup> You can edit them with any editor, and transfer + them to any other computer system running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and they will + format exactly the same. Because they are plain text they cannot + corrupt your system, as they cannot be used for hiding or + transporting virus infections as binary wordprocessor files can. + Everything you can see is in the file and everything in the file + is there for you to see: there is nothing hidden or secret and + there are no manufacturers' proprietary + ‘gotchas’ like suddenly going out of date + with a new version. + </p> + <ol class="footnotes" start="1"> + <li><a name="F9">‘Plain-text’ + originally meant just the 95 printable characters of the + <a name="ASCII" class="acroref">American Standard Code for Information + Interchange</a> (<small>ASCII</small>) — see <a href="appendixC.html#asciicodes">Table C.1</a> — but now more commonly includes + both these <em>and</em> the relevant 8-bit + characters from <em>one</em> (only) character + set such as ISO-8859-1 (Western Latin–1) or + ISO-8859-15 (Western Latin plus the Euro sign). These are + international standards which work everywhere: you should + avoid using manufacturers' proprietary character sets + like Microsoft Windows–1252 or Apple Macintosh + Roman–8, because they may make your documents unusable + on some other systems.</a></li> + </ol> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.1 <a name="mark-up">Markup</a></h2> + <p>In a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document, you type your text along with + <b><i><a name="markup">markup</a></i></b> which identifies the + important parts of your document by name, for example + ‘title’, ‘section’, + ‘figure’, etc. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does all the formatting + for you automatically, using the markup to guide its internal + rules and external stylesheets for typesetting. + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="">Markup</a></h3> + <p>This is a term from printing, and originally meant the + notes on how to lay the document out, or the instructions + which a proofreader might add during correction. It now also + means instructions or descriptions added to a computer + document to act as guidelines for identification or + formatting. Markup has been around for + <em>ages</em>. + </p> + <div align="center"> + <table> + <tr> + <td valign="top" align="left"> + <div align="center" style="margin:12px"><img src="55-1L-part.png" width="288"></div> + </td> + <td valign="top" width="108" align="left" class="" colspan="2"><cite><a href="bibliography.html#tain" name="C23">Leabhar na h-Uidhri: The Book of the Dun Cow</a></cite></td> + </tr> + <tr> + <td valign="top" align="left"> + <div align="center" style="margin:12px"><img src="23-part.png" width="288"></div> + </td> + <td valign="top" width="108" align="left" class="" colspan="2"><cite><a href="bibliography.html#varmints" name="C24">Scribner's Magazine</a></cite></td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">.h1 Interest Rates</code></td> + <td valign="top" width="108" align="left" class="">Runoff</td> + <td valign="top" align="right"><i>c.</i>1970 + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">\section{Interest + Rates}</code></td> + <td valign="top" width="108" align="left" class=""><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></td> + <td valign="top" align="right">1984</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal"><sec><ttl>Interest + Rates</ttl>...</code></td> + <td valign="top" width="108" align="left" class=""><small><a href="chapter10.html#SGML" class="acroref" name="A59" title="Standard Generalized Markup Language">SGML</a></small></td> + <td valign="top" align="right">1985</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal"><H1>Interest + Rates</H1></code></td> + <td valign="top" width="108" align="left" class=""><small><a href="chapter10.html#HTML" class="acroref" name="A60" title="HyperText Markup Language">HTML</a></small></td> + <td valign="top" align="right">1991</td> + </tr> + </table> + </div> + </td> + </tr> + </table> + </div> + <p>You do not need to format any of your text <em>in + your editor</em>, because <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does it + all by itself when it typesets. You can of course regularise + or neaten its appearance <em>in your editor</em> + for ease of editing (for example, keeping each item in a list + on a separate line), but this is not required. + </p> + <p>You will often hear <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> markup referred to as + ‘commands’ or sometimes ‘control + sequences’ (the proper <span class="TEX">T<span class="E">E</span>X</span>nical term for them). + For + all practical purposes these terms all mean the same + thing. + </p> + <p>This course assumes that users have one of + <i><a name="p84"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i>, + <i><a name="p85"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>, + <i><a name="p86">WinShell</a></i>, or + <i><a name="p87">WinEdt</a></i> (Windows only), or + <i><a name="p88">Emacs</a></i> or <span class="LYX">L<span class="Y">Y</span>X</span> (any platform) + installed. These are discussed briefly in <a href="chapter2.html#editors">section 2.3</a>, and the menus and toolbars for running + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are explained in <a href="chapter4.html#process">Chapter 4</a>. + </p> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.2 <a name="quickstart">Quick start for the impatient</a></h2> + <p>If you already know all this stuff about editors and + plain-text files and running programs, and you know your system + is already correctly installed (including your editor), + you'd probably like to type something in and see <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + do its job. If you don't, then skip forward to <a href="chapter2.html#commands">section 2.4</a> and read a bit more about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + first. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="sampledoc">Sample document</a></caption> + <blockquote><pre class="footnotesize"> +\documentclass[12pt]{article} +\usepackage{palatino,url} +\begin{document} +\section*{My first document} + +This is a short example of a \LaTeX\ document I wrote +on \today. It shows a few simple features of automated +typesetting, including + +\begin{itemize} +\item setting the default font size to 12pt; +\item specifying `article' type for formatting; +\item using the Palatino typeface; +\item adding special formatting for URIs; +\item formatting a heading in `section' style; +\item using the \LaTeX\ logo; +\item generating today's date; +\item formatting a list of items; +\item centering and italicizing; +\item autonumbering the pages. +\end{itemize} + +\subsection*{More information} + +This example was taken from `Formatting Information', +which you can download from +\url{http://www.ctan.org/tex-archive/info/beginlatex/} +and use as a teach-yourself guide. + +\begin{center} +\textit{Have a nice day!} +\end{center} + +\end{document} + </pre></blockquote> + <hr> + </div> + <ol> + <lh>Up and running in a few minutes</lh> + <li><b>Install the software</b><br><p>Make sure you have a + properly-installed <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> system and a copy of a + suitable editor. + </p> + </li> + <li><b><a name="demodoc">Create a sample document</a></b><br><p>Open your editor and type in + the text <em>exactly</em> as shown in <a href="chapter2.html#sampledoc">Figure 2.1</a>. Do <em>not</em> make any + changes or miss anything out or add anything different at + this stage. + </p> + </li> + <li><b>Save the document</b><br><p>Save the document as + <code>demo.tex</code></p> + </li> + <li><b>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> or <i><a name="p89">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i></b><br><p>Click on the <span class="guiicon"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> or + <span class="guiicon">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + File</span> menu item; or type <code class="literal">latex + demo</code> or <code class="literal">pdflatex demo</code> in a + command window. + </p> + </li> + <li><b>Preview the typesetting</b><br><p>Click on the <span class="guiicon">DVI</span> or + <span class="guiicon">PDFview</span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + View</span> menu item; or type your previewer + command in a terminal shell. + </p> + <p>(Note that there may be a pause the first time you use + your <small><a href="chapter4.html#DVI" class="acroref" name="A61" title="device-independent">DVI</a></small> viewer, while <small><a href="chapter2.html#WYSIWYG" class="acroref" name="A62" title="What You See Is What You Get">WYSIWYG</a></small> font files are + created.<sup><a href="#F10">2</a></sup>) + </p> + </li> + <li><b>Print it</b><br><p>Click on the <span class="guiicon">Print</span> toolbar icon + within the viewer, or use the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> Print</span> + menu item, or type + <code class="literal">dvips -f demo | lpr</code> + (Unix/Linux). + </p> + </li> + </ol> + <p>If you encounter any errors, it means you + <em>do</em> need to study this chapter after + all! + </p> + <ol class="footnotes" start="2"> + <li><a name="F10"><small><a href="chapter4.html#DVI" class="acroref" name="A63" title="device-independent">DVI</a></small> previewers use their + own font files specially created from the font + outlines (TrueType, OpenType, PostScript, METAFONT, + etc). The first time you use a font at a size not used + before, there will be a second or two's pause + while it gets created. The more you use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, the + less this + happens.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3 <a name="editors">Editors</a></h2><a name="I15"></a><p>All the text of your documents can be typed into your + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document from a standard keyboard using any decent + plain-text editor. However, it is more convenient to use an + editor with special features to make using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> easier. + Some of the most popular are + <i><a name="p90"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i><i><a name="p91">WinShell</a></i>, <i><a name="p92"><span class="TEX">T<span class="E">E</span>X</span>nic + Center</a></i>, and <i><a name="p93">WinEdt</a></i> + (Windows only); and <i><a name="p94"><span class="LYX">L<span class="Y">Y</span>X</span></a></i> and + <i><a name="p95">Emacs</a></i> (all platforms). + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.1 <span class="LYX">L<span class="Y">Y</span>X</span></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="lyxwin">The <span class="LYX">L<span class="Y">Y</span>X</span> document editor</a></caption> + <div align="center" style="margin:12px"><img src="lyx.png" width="75%"></div> + <hr> + </div> + <p>The <span class="LYX">L<span class="Y">Y</span>X</span> document editor (all platforms) is a special + case, as it uses the <a name="WYSIWYM" class="acroref">What You See Is + What You Mean</a> (<small>WYSIWYM</small>) model of synchronous typographic + editing as opposed to <a name="WYSIWYG" class="acroref">What You See Is + What You Get</a> (<small>WYSIWYG</small>), and many users prefer this + interface (but see the reservations in <a href="intro.html#sync">the item ‘Synchronous typographic displays’ in section 3</a>). + </p> + <p><span class="LYX">L<span class="Y">Y</span>X</span> makes a strong case for using synchronous + typographical editing: it is possible to create even quite + large and complex documents without seeing a backslash very + often, although with math or complex macros there is + probably no way to avoid having to do some manual insertion + of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> code. + </p> + <p>The free availability on multiple platforms makes this a + clear answer to the myth of ‘having to edit like a + programmer’, and as it is an Open Source project, + there is constant improvement, both to the facilities and to + the interface. + </p> + <p>Probably the only real reservation is that it does not + save native <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> files by default. It uses its own + internal format, and it can export <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for use in other + editors, but the exported files are not designed for human + legibility, only for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> processing. In a co-operative + environment this would be a serious drawback, but for the + individual user this interface is an excellent tool. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.2 <a name="texshell"><span class="TEX">T<span class="E">E</span>X</span>shell</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="texshellwin">The <span class="TEX">T<span class="E">E</span>X</span>shell editor</a></caption> + <div align="center" style="margin:12px"><img src="texshell.png" width="75%"></div> + <hr> + </div> + <p>This is one of the simplest of all the plaintext Windows + editors, but it has most of the tools needed to begin with. + Sectioning, lists, and graphics can be inserted from the + menus, and there are buttons for running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the + open document and for previewing the typeset + document. + </p> + <p>The syntactic highlighting distinguishes between + commands and your text, and it comes with options for + spellchecking (you need to install + <i><a name="p96">ispell</a></i>), and for adding math, + Greek (math), and some symbol characters from a pickchart. + The typeset display is done using your installed <small><a href="chapter4.html#DVI" class="acroref" name="A66" title="device-independent">DVI</a></small> viewer (there is no provision for + <small><a href="chapter4.html#PDF" class="acroref" name="A67" title="Portable Document Format">PDF</a></small>, although as it is + configurable, that could probably be edited into the + menus). + </p> + <p>Download the <code>.tar.gz</code> file from <small><a href="chapter5.html#CTAN" class="acroref" name="A68" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>support/TeXshell/</code> directory and unwrap + it into somewhere like <code>C:\Program + Files\TeXshell\</code>.<sup><a href="#F11">3</a></sup> There is a <i><a name="p97">tsconfig</a></i> + program in the same directory on <small><a href="chapter5.html#CTAN" class="acroref" name="A69" title="Comprehensive Archive Network">CTAN</a></small>, which is designed to help with + reconfiguring <span class="TEX">T<span class="E">E</span>X</span>shell. + </p> + <ol class="footnotes" start="3"> + <li><a name="F11">Yes, I know I said don't use directory names with + spaces in them — and so you shouldn't, for your + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents — but Windows programs are usually safe + enough in them.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.3 <a name="winshell">WinShell</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="winshellwin">The WinShell editor</a></caption> + <div align="center" style="margin:12px"><img src="winshell.png" width="75%"></div> + <hr> + </div> + <p>This is another free Windows editor for beginners with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Despite its simplicity, it is capable of a + considerable amount of document management and assistance + with editing. As well as handling stand-alone <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + files, you can create a ‘Project’ for larger + documents, which helps you keep track of additional files + like separate chapters, illustrations, diagrams, indexes, + etc. + </p> + <p>You run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> direct from the toolbar icons or with + F-key shortcuts. Both standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and + <i><a name="p98">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> are supported, as well + as creation and previewing of + <a name="t5">PostScript</a> and <small><a href="chapter4.html#PDF" class="acroref" name="A70" title="Portable Document Format">PDF</a></small> output. There are additional toolbars + for math characters, and there is a ‘Table + Wizard’ for handling tables. The syntax + highlighting distinguishes between commands (in blue) and + delimiters (in red), leaving your text in black. + </p> + <p>Download the + <code>WinShell<code><u>nn</u></code>.exe</code> + program (self-contained setup: the + <code><u>nn</u></code> changes with the version) from + <small><a href="chapter5.html#CTAN" class="acroref" name="A71" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>systems/win32/winshell/</code> directory and + double-click it to start the setup. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.4 <a name="texniccenter"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="texniccenterwin">The <span class="TEX">T<span class="E">E</span>X</span>nicCenter editor</a></caption> + <div align="center" style="margin:12px"><img src="texniccenter.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p99"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i> is a powerful + Windows editor suitable both for the beginner and the more advanced + user. Its ‘Project’ environment keeps track of + multiple files, and the processing function (the bit which + actually runs <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, here called + ‘Build’) tries to ensure that all the files you + need for a large or complex document are in place before you + start typesetting, to avoid errors like missing + illustrations. + </p> + <p>It's a much more wordprocessor-like control + interface, with configurable toolbars and button-controls + for lists, math, tables, and previewing options. + </p> + <p>Download the + <code>TXCSetup<code><u>xxx</u></code>.exe</code> + program (self-contained setup: the + <code><u>xxx</u></code> bit changes with the version) + from <small><a href="chapter5.html#CTAN" class="acroref" name="A72" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>systems/win32/TeXnicCenter/</code> directory + and double-click it to start the setup. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.5 <a name="winedt">WinEdt</a></h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="winedtpic">The <i><a name="p100">WinEdt</a></i> editor</a></caption> + <div align="center" style="margin:12px"><img src="winedt.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p101">WinEdt</a></i> is a highly + configurable plain-text editor for Windows. It comes with a + host of special functions and shortcuts for + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, based on the Mik<span class="TEX">T<span class="E">E</span>X</span> distribution. It + is supplied on the <span class="TEX">T<span class="E">E</span>X</span> Collection 2004 DVD and the + <i><a name="p102">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> CD. You can also + download it from <a href="http://www.winedt.com"><tt>http://www.winedt.com</tt></a> — in either case + there's a 1-month free trial, then it reminds you to + buy it. + </p> + <p><i><a name="p103">WinEdt</a></i> uses a built-in + toolbar of configurable buttons, preset for use with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and it provides syntactic coloring of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands. Both the positioning and effect of the + buttons can be changed, using an editable file of icons and + a configuration panel. This flexibility lets you bind a + program and arguments (equivalent to a typed command) to a + particular icon. + </p> + <p>There are default buttons on the toolbar for one-click + typesetting, previewing, and + <a name="t6">PostScript</a> or <small><a href="chapter4.html#PDF" class="acroref" name="A73" title="Portable Document Format">PDF</a></small> generation from <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, + and it manages multi-file document projects like most of the + other editors. <i><a name="p104">Winedt</a></i> is also + used by many people for normal plaintext file-editing tasks, + in preference to more limited programs like + <i><a name="p105">Notepad</a></i>. If you're using the + fp<span class="TEX">T<span class="E">E</span>X</span> which came with the 2003 <span class="TEX">T<span class="E">E</span>X</span> + Collection, some editing of the menus is required (explained + in the local installation document) because the default + setup is for + Mik<span class="TEX">T<span class="E">E</span>X</span>/pro<span class="TEX">T<span class="E">E</span>X</span>t. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.6 GNU Emacs + </h3> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 2.1</i>: <a name="">Emacs editing <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></caption> + <div align="center" style="margin:12px"><img src="emacs.png" width="75%"></div> + <hr> + </div> + <p><i><a name="p106">Emacs</a></i> is a product of the + <small><a href="chapter2.html#GNU" class="acroref" name="A74" title="GNU's Not Unix">GNU</a></small> Project.<sup><a href="#F12">4</a></sup> Versions are available for all makes and models + of computer, and it has a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-mode which provides + syntactic colouring (‘fontification’ + in <i><a name="p107">Emacs</a></i>-speak) and mouseclick + processing from a menu or toolbar. + </p> + <p><i><a name="p108">Emacs</a></i> + is a very large and powerful editor, with + ‘modes’ (plug-ins) to handle almost + everything you do on a computer. Many users run + <i><a name="p109">Emacs</a></i> once on logging in, and + never leave it for the rest of the day — or month. As + well as edit, you can use it to read your mail, browse the + Web, read Usenet news, do wordprocessing and spreadsheets, + compile programs, help you write in any computer + language — including <small><a href="chapter10.html#XML" class="acroref" name="A76" title="Extensible Markup Language">XML</a></small> and + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> — and it provides a few games as well. + </p> + <p><i><a name="p110">Emacs</a></i> + knows about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and how to process it, so it comes with + a menu full of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> operations to click on. If you are + editing complex documents with mathematics, there is a mode + (<i><a name="p111">AUC<span class="TEX">T<span class="E">E</span>X</span></a></i>) which has even more + functionality. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> support is well-developed, and there + is a hierarchy of newsgroups for + <i><a name="p112">Emacs</a></i> support. + </p> + <p>Because <i><a name="p113">Emacs</a></i> runs on + Microsoft Windows, Macs, Linux, and most other platforms, + many <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users who have multiple machines (and those + who have multiple users to support) prefer it to other + editors because it provides the same environment regardless + of which platform they are using. + </p> + <p>It's sometimes criticised for a steep learning + curve, but in fact it's no worse in this respect than + any other editor, given the power that it provides, and it + is significantly better than most which lack many of the + authorial tools available in Emacs. + </p> + <ol class="footnotes" start="4"> + <li><a name="F12">‘<a name="GNU" class="acroref">GNU's Not + Unix</a> (<small>GNU</small>)’ is a project to make a + computing environment completely free of + restrictions.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.3.7 Mac editors + </h3> + <p>Mac users will be disappointed that I haven't included + any of the Mac interfaces here. It's simple: I don't have a + Mac right now to try them out on. I hope to remedy this for a + future edition. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4 <a name="commands"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands</a></h2> + <p><a name="bsol"></a><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands all begin with a + <b><i><a name="backslash">backslash</a></i></b> + (<code class="literal">\</code>)<sup><a href="#F13">5</a></sup> and are usually made up of lowercase + letters only, for example: + </p> + <blockquote><pre> +\tableofcontents + </pre></blockquote> + <p>The + <code class="command"><a name="c3">\tableofcontents</a></code> command is an instruction + to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to insert the Table of Contents at this point. You + would usually use this in a book or report (or perhaps a very + long article) somewhere close to the beginning. You don't have + to do anything else. Provided that you have used the + sectioning commands described in <a href="chapter3.html#sections">section 3.5</a>, + all the formatting and numbering for the Table of Contents is + completely automated. + </p> + <ol class="footnotes" start="5"> + <li><a name="F13">Do not confuse the backslash + with the forward slash (<code class="literal">/</code>). They are + two different characters. The forward slash is used on the + Web and on Unix systems to separate directory names and + filenames. The backslash is used in Microsoft Windows + (only) for the same purpose, and in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to begin a + command.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.1 <a name="simplecmd">Simple commands</a></h3> + <p><a name="swallow"></a>Simple one-word commands like + <code class="command"><a name="c4">\tableofcontents</a></code> must be separated from + any following text with <b><i><a name="wsp">white-space</a></i></b>. This means a + normal space, or a newline [linebreak] or a TAB character. + For example either of these two forms will work: + </p> + <blockquote><pre> +\tableofcontents Thanks to Aunt Mabel for all her help +with this book. + </pre></blockquote> + <blockquote><pre> +\tableofcontents +Thanks to Aunt Mabel for all her help with this book. + </pre></blockquote> + <p>If you forget the white-space, as in the following + example, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will try to read it as a command + called <code class="literal">\tableofcontentsThanks</code>. There's no + such command, of course, so <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will complain at you by + displaying an error message (see <a href="chapter4.html#undefcs">section 4.2.3.2</a>). + </p> + <blockquote><pre> +\tableofcontentsThanks to Aunt Mabel for all her help +with this book. + </pre></blockquote> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> swallows any white-space which follows a command + ending in a letter. It does this automatically, so you + don't get unwanted extra space in your typeset output, + but it does mean that any simple command which ends in a + letter and has no arguments (see below) must be followed by + white-space before normal text starts again, simply to keep + it separate from the text. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.2 <a name="cmdargs">Commands with arguments</a></h3> + <p>Many <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands are followed by one or more + <b><i><a name="arguments">arguments</a></i></b>, a term from + the field of Computer Science, meaning information to be acted + upon. Here are two examples: + </p> + <blockquote><pre> +\chapter{Poetic Form} +\label{pform} + </pre></blockquote> + <p>Such arguments always go in + <code class="literal">{</code><b><i><a name="curly">curly + braces</a></i></b><code class="literal">}</code> like + those shown above. Be careful not to confuse the + curly braces on your keyboard with round parentheses + <code class="literal">( )</code>, square brackets + <code class="literal">[ ]</code>, or angle brackets + <code class="literal">< ></code>. They are all + different and they do different things. + </p> + <p>With commands that take arguments you do + <em>not</em> need to use extra white-space after + the command, because there is an argument following it + which will keep it separate from any normal text with + follows after that. The following is therefore perfectly + correct (although unusual because it's harder to edit: + normally you'd leave a blank line between the chapter title or + label and the start of the first paragraph). + </p> + <blockquote><pre> +\chapter{Poetic Form}\label{pform}The shape of poetry +when written or printed distinguishes it from prose. + </pre></blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.4.3 <a name="white-space">White-space in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></h3><a name="I17"></a><p>In <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, all <em>multiple</em> + spaces, newlines (linebreaks), and TAB characters are + treated as if they were a <em>single</em> space + or newline during typesetting. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does its own spacing + and alignment using the instructions you give it, so you + have extremely precise control. You are therefore free to + use extra white-space in your editor for optical ease and + convenience when editing. + </p> + <p> + The following is therefore exactly equivalent to the example + in the preceding section: + </p> + <blockquote><pre> +\chapter {Poetic + Form}\label + {pform} + +The shape of poetry when written or printed +distinguishes it from prose. + </pre></blockquote> + <p>That is, it will get typeset exactly the same. In + general, just leave a blank line between paragraphs and a + single space between words and sentences. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will take + care of the formatting. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.5 <a name="specials">Special characters</a></h2><a name="I18"></a><p>There are ten keyboard characters which have special + meaning to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and cannot be used on their own except for + the following purposes: + </p> + <div align="center"> + <table cellpadding="1mm"> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left">Meaning</th> + <th valign="bottom" align="center"><em>If you need<br> the actual character<br> itself, + type:</em></th> + <th valign="bottom" align="center">Character</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">\</tt></td> + <td valign="top" align="left">The command character</td> + <td valign="top" align="center"><code class="command"><a name="c5">\textbackslash</a></code></td> + <td valign="top" align="center">\</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">$</tt></td> + <td valign="top" align="left">Math typesetting delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c6">\$</a></code></td> + <td valign="top" align="center">$</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">%</tt></td> + <td valign="top" align="left">The comment character</td> + <td valign="top" align="center"><code class="command"><a name="c7">\%</a></code></td> + <td valign="top" align="center">%</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">^</tt></td> + <td valign="top" align="left">Math superscript character</td> + <td valign="top" align="center"><code class="command"><a name="c8">\^</a></code></td> + <td valign="top" align="center">^</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">&</tt></td> + <td valign="top" align="left">Tabular column separator</td> + <td valign="top" align="center"><code class="command"><a name="c9">\&</a></code></td> + <td valign="top" align="center">&</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">_</tt></td> + <td valign="top" align="left">Math subscript character</td> + <td valign="top" align="center"><code class="command"><a name="c10">\_</a></code></td> + <td valign="top" align="center">_</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">˜</tt></td> + <td valign="top" align="left">Non-breaking space</td> + <td valign="top" align="center"><code class="command"><a name="c11">\˜</a></code></td> + <td valign="top" align="center">˜</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">#</tt></td> + <td valign="top" align="left">Macro parameter symbol</td> + <td valign="top" align="center"><code class="command"><a name="c12">\#</a></code></td> + <td valign="top" align="center">#</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">{</tt></td> + <td valign="top" align="left">Argument start delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c13">$\{$</a></code></td> + <td valign="top" align="center">{</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">}</tt></td> + <td valign="top" align="left">Argument end delimiter</td> + <td valign="top" align="center"><code class="command"><a name="c14">$\}$</a></code></td> + <td valign="top" align="center">}</td> + </tr> + </table> + </div> + <p>These characters were deliberately chosen, either because + they are rare in normal text, or (in the case of $, + #, &, and %) they already had an + established special meaning on computers as <b><i><a name="metacharacters">metacharacters</a></i></b> (characters + standing as symbols for something else) by the time <span class="TEX">T<span class="E">E</span>X</span> was + written, and it would have been misleading to choose + others. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.5.1 Using the special characters + </h3> + <p>We have already seen (<a href="chapter2.html#bsol">the first paragraph in section 2.4</a>) how + to use the backslash to start a command, and curly braces to + delimit an argument. The remaining special + characters are: + </p> + <blockquote> + <dl> + <dt><b><tt class="keycap">$</tt></b></dt> + <dd> + <p>Because of the special mathematical meaning + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses for the dollar-sign on its own, if you + want to print $35.99 you type + <code class="literal">\$35.99</code></p> + </dd> + <dt><b><tt class="keycap">%</tt></b></dt> + <dd> + <p><a name="comment"></a>The <b><i><a name="commentchar">comment character</a></i></b> makes + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> ignore the remainder of the line in your + document, so you can see it in your editor, but it + will never get typeset. For example <br><code class="literal">Today's price per kilo is £22.70 % get Mike to update this</code><br>If you want to print 45% you need + to type <code class="literal">45\%</code></p> + </dd> + <dt><b><tt class="keycap">^</tt></b></dt> + <dd> + <p>The caret sign lets you type + <code class="literal">\(E=mc^2\)</code> to get <span class="math"><i>E=mc</i><sup>2</sup></span>. If you need the circumflex accent + on a letter like ê, just type the letter or use the + symbolic notation <code class="literal">\^e</code>. + </p> + </dd> + <dt><b><tt class="keycap">&</tt></b></dt> + <dd> + <p>The ampersand is used in tables to separate + columns (see <a href="chapter6.html#tables">section 6.3</a>). If you want to + print AT&T you need to type + <code class="literal">AT\&T</code>. + </p> + </dd> + <dt><b><tt class="keycap">_</tt></b></dt> + <dd> + <p>The underscore lets you type + <code class="literal">\(r_2\)</code> for <span class="math"><i>r</i><i>2</i></span>. If you want to underline text + (extremely rare in typesetting) see <a href="chapter8.html#uline">the last paragraph in section 8.2.3</a>. + </p> + </dd> + <dt><b><a name="tilde"><tt class="keycap">˜</tt></a></b></dt> + <dd> + <p>The tilde prints as a space, but prevents a + linebreak ever occurring at that point. It's often + used between a person's initials and their surname, eg + <code class="literal">Prof D.E.~Knuth</code></p> + </dd> + <dt><b><tt class="keycap">#</tt></b></dt> + <dd> + <p>If you want a + <b><i><a name="hash">hash mark</a></i></b> (the + <b><i><a name="octothorpe">octothorpe</a></i></b> or + American number or ‘pound’ [weight] sign) + you type <code class="literal">\#</code>. For a pound + (sterling)<a name="I19"></a> + sign £, now nearly obsolete except in the UK and + some of its former dependencies, use your + <tt class="keycap">£</tt> key or type + <code class="command"><a name="c15">\textsterling</a></code>. + </p> + </dd> + </dl> + </blockquote> + <p>While we're on the subject of money, an unusual but + interesting serif-font Euro<a name="I20"></a> sign <span style="font-family:serif; ">€</span> + is got with the <code class="command"><a name="c16">\texteuro</a></code> command from the + <span class="package"><a name="m3">textcomp</a></span> package. The standard + sans-serif <span style="font-family:sans-serif; ">€</span> needs the + <span class="package"><a name="m4">marvosym</a></span> package and is done with + the <code class="command"><a name="c17">\EUR</a></code> command.<sup><a href="#F14">6</a></sup></p> + <ol class="footnotes" start="6"> + <li><a name="F14">The European Commission has specified that everyone + use the sans-serif design, even in serif text, but this + is amazingly ugly and most designers rightly ignore + it.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.6 <a name="quotes">Quotation marks</a></h2><a name="I21"></a><p>Do <em>not</em> use the unidirectional + typewriter keyboard <tt class="keycap">"</tt> key for quotation + marks. Correct typographic quotes are got with the <tt class="keycap">`</tt> key and the <tt class="keycap">'</tt> key, doubled if you want double + quotes: + </p> + <blockquote class="example"><pre> +He said, ``I'm just going out.'' + </pre><p class="example"><span style="font-family:Times; ">He said, + ‘‘I'm just going out.’’</span></p> + </blockquote> + <p>This ensures you get real left-hand + and right-hand (opening and closing) quotes (usually shaped + like tiny + 66 and 99 + or as symmetrically-balanced strokes). If you are using + <i><a name="p114">Emacs</a></i> as your editor, the + <tt class="keycap">"</tt> key is specially programmed in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>-mode to think for itself and produce correct <span style="font-family:monospace; ">``</span> and + <code class="literal">''</code> characters (so this is one occasion when + you <em>can</em> use the <tt class="keycap">"</tt> + key). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are reading this in a + browser, or if you have reprocessed the file using different + fonts, it may not show you real quotes (some old browser + fonts are defective) and the <code class="command"><a name="c18">\thinspace</a></code> + below may be too wide. Download the typeset (<small><a href="chapter4.html#PDF" class="acroref" name="A77" title="Portable Document Format">PDF</a></small>) version of this document to see the + real effect. + </p> + </blockquote> + <p><a name="thinspace"></a>When typing one quotation inside another, + there is a special command <code class="command"><a name="c19">\thinspace</a></code> which + provides just enough separation between double and single + quotes (a normal space is too much and could allow an unwanted + linebreak): + </p> + <blockquote class="example"><pre> +He said, `Her answer was ``never''\thinspace'. + </pre><p class="example">He said, ‘Her answer was + ‘‘never’’ ’. + </p> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.7 <a name="accents">Accents</a></h2><a name="I22"></a><p>For accented letters in western + European languages<sup><a href="#F15">7</a></sup> or other Latin-alphabet character sets just use + the accented keys on your keyboard — if you have the right + ones. You must also tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> what character repertoire + (‘input encoding’) you are using. You + specify this by using the <span class="package"><a name="m5">inputenc</a></span> + package<sup><a href="#F16">8</a></sup> in your preamble + with the relevant option. For example, to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> you + will be typing ISO Latin–1 accented characters, + use: + </p> + <blockquote><pre> +\usepackage[latin1]{inputenc} + </pre></blockquote> + <p>If you have a real Unicode editor, which lets you insert + any letter or symbol from any language on the planet (for + example, mixed European, Asian, and other languages), use + <code class="literal">utf8</code> instead of <code class="literal">latin1</code>. + The encoding definitions that are available on your system are + in <code>/texmf/tex/latex/base</code> (all files + ending in <code>.def</code>). + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="keystrokes">If you don't have accented letters</a></h3> + <p>This is for users whose keyboards do not have native + accent characters on them. See your Operating System manual + for full details. Here are two common examples: + </p> + <ul> + <li> + <p>Under Linux systems the letter + é is usually got with + <tt class="keycap">AltGr</tt>–<tt class="keycap">;</tt> <tt class="keycap">e</tt>. Refer to the + <i><a name="p115">xkeycaps</a></i> utility for a table + of key codes and combinations (get it from <a href="http://www.jwz.org/xkeycaps/"><tt>http://www.jwz.org/xkeycaps/</tt></a>). + </p> + </li> + <li> + <p>Under Microsoft Windows the letter é is got with + <tt class="keycap">Ctrl</tt>–<tt class="keycap">'</tt> <tt class="keycap">e</tt> or by holding down the + <tt class="keycap">Alt</tt> key and typing + <tt class="keycap">0</tt> <tt class="keycap">1</tt> <tt class="keycap">3</tt> <tt class="keycap">0</tt> + on the numeric keypad (<em>not</em> the top + row of shifted numerals). Refer to the + <i><a name="p116">charmap</a></i> utility for a table + of key codes and combinations (find it in the + <code>C:\Windows</code> folder). + </p> + </li> + </ul> + </td> + </tr> + </table> + </div> + <p>If you don't have accented letter keys on your + keyboard, you'll need to use your operating system's + standard keyboard <tt class="keycap">Ctrl</tt> or + <tt class="keycap">Alt</tt> key combinations to generate the + characters (see <a href="chapter2.html#keystrokes">the panel ‘If you don't have accented letters’ in this section</a>). + </p> + <p>If you cannot generate accented characters from your + keyboard at all, or if you need additional accents or symbols + which are not in any of the keyboard tables, you can use the + symbolic notation in <a href="chapter2.html#accentcodes">Table 2.1</a>. In fact, + this can be used to put any accent over any letter: if you + particularly want a g˜ you can have one with the command + <code class="command"><a name="c20">\˜</a></code><code class="literal">g</code> (and Welsh + users can get ŵ with + <code class="command"><a name="c21">\^</a></code><code class="literal">w</code>). + </p> + <p>If you use this symbolic method only, you do not need to + use the <span class="package"><a name="m6">inputenc</a></span> package. Before the + days of keyboards and screens with their own real accented + characters, the symbolic notation was the + <em>only</em> way to get accents, so you may come + across a lot of older documents (and users!) using this method + all the time: it does have the advantage in portability that + the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file remains plain <small><a href="chapter2.html#ASCII" class="acroref" name="A78" title="American Standard Code for Information Interchange">ASCII</a></small>, which will work on all machines + everywhere, regardless of their internal encoding, and even + with very old <span class="TEX">T<span class="E">E</span>X</span> installations.<sup><a href="#F17">9</a></sup></p> + <div align="center" class="table"> + <table> + <caption><i>Table 2.1</i>. <a name="accentcodes">Built-in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> accents</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Accent</th> + <th valign="bottom" align="center">Example</th> + <th valign="bottom" align="center">Characters to type</th> + </tr> + <tr> + <td valign="top" align="left">Acute (fada)</td> + <td valign="top" align="center">é</td> + <td valign="top" align="center"><code class="literal">\'e</code></td> + </tr> + <tr> + <td valign="top" align="left">Grave</td> + <td valign="top" align="center">è</td> + <td valign="top" align="center"><code class="literal">\`e</code></td> + </tr> + <tr> + <td valign="top" align="left">Circumflex</td> + <td valign="top" align="center">ê</td> + <td valign="top" align="center"><code class="literal">\^e</code></td> + </tr> + <tr> + <td valign="top" align="left">Umlaut or diæresis</td> + <td valign="top" align="center">ë</td> + <td valign="top" align="center"><code class="literal">\"e</code></td> + </tr> + <tr> + <td valign="top" align="left">Tilde</td> + <td valign="top" align="center">ñ</td> + <td valign="top" align="center"><code class="literal">\~n</code></td> + </tr> + <tr> + <td valign="top" align="left">Macron</td> + <td valign="top" align="center">ō</td> + <td valign="top" align="center"><code class="literal">\=o</code></td> + </tr> + <tr> + <td valign="top" align="left">Bar-under</td> + <td valign="top" align="center"><span style=""><u>o</u></span></td> + <td valign="top" align="center"><code class="literal">\b o</code></td> + </tr> + <tr> + <td valign="top" align="left">Dot-over (séımhıú)</td> + <td valign="top" align="center"><span style=""><img src="mdot.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\.m</code></td> + </tr> + <tr> + <td valign="top" align="left">Dot-under</td> + <td valign="top" align="center"><span style=""><img src="sdot.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\d s</code></td> + </tr> + <tr> + <td valign="top" align="left">Breve</td> + <td valign="top" align="center">ŭ</td> + <td valign="top" align="center"><code class="literal">\u u</code></td> + </tr> + <tr> + <td valign="top" align="left">Háček (caron)</td> + <td valign="top" align="center">ŭ</td> + <td valign="top" align="center"><code class="literal">\v u</code></td> + </tr> + <tr> + <td valign="top" align="left">Long umlaut</td> + <td valign="top" align="center">ő</td> + <td valign="top" align="center"><code class="literal">\H o</code></td> + </tr> + <tr> + <td valign="top" align="left">Tie-after</td> + <td valign="top" align="center"><span style=""><img src="ootie.png" width="100%" class="invisible"></span></td> + <td valign="top" align="center"><code class="literal">\t oo</code></td> + </tr> + <tr> + <td valign="top" align="left">Cedilla</td> + <td valign="top" align="center">ç</td> + <td valign="top" align="center"><code class="literal">\c c</code></td> + </tr> + <tr> + <td valign="top" align="left">O-E ligature</td> + <td valign="top" align="center">œ, Œ</td> + <td valign="top" align="center"><code class="literal">\oe</code>, + <code class="literal">\OE</code></td> + </tr> + <tr> + <td valign="top" align="left">A-E ligature</td> + <td valign="top" align="center">æ, Æ</td> + <td valign="top" align="center"><code class="literal">\ae</code>, + <code class="literal">\AE</code></td> + </tr> + <tr> + <td valign="top" align="left">A-ring</td> + <td valign="top" align="center">å, Å</td> + <td valign="top" align="center"><code class="literal">\aa</code>, + <code class="literal">\AA</code></td> + </tr> + <tr> + <td valign="top" align="left">O-slash</td> + <td valign="top" align="center">ø, Ø</td> + <td valign="top" align="center"><code class="literal">\o</code>, + <code class="literal">\O</code></td> + </tr> + <tr> + <td valign="top" align="left">Soft-l</td> + <td valign="top" align="center"><span style="font-family:Times; ">ł, Ł</span></td> + <td valign="top" align="center"><code class="literal">\l</code>, + <code class="literal">\L</code></td> + </tr> + <tr> + <td valign="top" align="left">Ess-zet (scharfes-S)</td> + <td valign="top" align="center">ß</td> + <td valign="top" align="center"><code class="literal">\ss</code></td> + </tr> + </table> + </div> + <p>Irish and Turkish dotless-ı is done with the + special command <code class="command"><a name="c22">\i</a></code>, so an í-fada + (which is normally typed with <tt class="keycap">í</tt>) + requires <code class="literal">\'\i</code> if you need to type it in + the long format, followed by a backslash-space or dummy pair of + curly braces if it comes at the end of a word and there is no + punctuation, because of the rule that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> control + sequences which end in a letter (see <a href="chapter2.html#swallow">the first paragraph in section 2.4.1</a>) always absorb any following space. So + what you might see as <cite>Rí + Teamhraċ</cite> has to be <code class="literal">R\'\i\ + Tea\.mra\.c</code> when typed in full (there are not + usually any keyboard keys for the dotless-ı or the + lenited characters). A similar rule applies to dotless-<span style="font-family:Times; ">j</span> and to uppercase + Í. + </p> + <ol class="footnotes" start="7"> + <li><a name="F15">ISO 8859-1 (Latin–1, Western European) to + 8859-15 (includes the Euro).</a></li> + <li><a name="F16">We haven't covered the use of + packages yet. Don't worry, see <a href="chapter5.html#packages">section 5.1</a> + if you're curious.</a></li> + <li><a name="F17">Remember not everyone is lucky enough to be able to + install new software: many users on corporate and academic + networks still have to use old versions of <span class="TEX">T<span class="E">E</span>X</span> because + their system administrators are too busy to + install new ones.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8 <a name="handj">Dimensions, hyphenation, justification, and breaking</a></h2><a name="I23"></a><a name="I24"></a><a name="I25"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal measurement system is + extraordinarily accurate. The underlying <span class="TEX">T<span class="E">E</span>X</span> engine + conducts all its business in units smaller than the wavelength + of visible light, so if you ask for 15mm space, that's + what you'll get — within the limitations of your + screen or printer, of course. Most screens cannot show + dimensions of less than + <span class="math">1/96</span>″ without resorting to magnification + or scaling; and on printers, even at 600dpi, fine oblique + lines or curves can still sometimes be seen to stagger the + dots. + </p> + <p>At the same time, many dimensions in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + preprogrammed formatting are specially set up to be flexible: + so much space, plus or minus certain limits to allow the + system to make its own adjustments to accommodate variations + like overlong lines, unevenly-sized images, and non-uniform + spacing around headings. + </p> + <p><span class="TEX">T<span class="E">E</span>X</span> uses a very sophisticated + justification algorithm to achieve a smooth, even texture to + normal paragraph text. The programming for this has been + borrowed by a large number of other DTP systems, and users of + these are often quite unaware that they are in fact using a + significant part of <span class="TEX">T<span class="E">E</span>X</span> in their work. + Occasionally, however, you will need to hand-correct an + unusual word-break or line-break, and there are facilities for + doing this on individual occasions as well as throughout a + document. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.1 <a name="dimensions">Specifying size units</a></h3><a name="I27"></a><a name="I28"></a><p>Most people in printing and publishing habitually use + points and picas and ems. Some designers use cm and mm. Many + English-language speakers still use inches. You can specify + lengths in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in any of these units, plus some others + (see <a href="chapter2.html#units">Table 2.1</a>). + </p><a name="I29"></a><a name="I30"></a><a name="I31"></a><a name="I32"></a><a name="I33"></a><a name="I34"></a><a name="I35"></a><a name="I36"></a><a name="I37"></a><a name="I38"></a><a name="I39"></a><a name="I40"></a><a name="I41"></a><div align="center" class="table"> + <table> + <caption><i>Table 2.1</i>. <a name="units">Units in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Unit</th> + <th valign="bottom" align="left" width="576">Size</th> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Printers' fixed measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">pt</td> + <td valign="top" width="576" align="left" style="">Anglo-American standard points (72.27 to the + inch) + </td> + </tr> + <tr> + <td valign="top" align="left">pc</td> + <td valign="top" width="576" align="left" style="">pica ems (12pt)</td> + </tr> + <tr> + <td valign="top" align="left">bp</td> + <td valign="top" width="576" align="left" style="">Adobe ‘big’ points (72 + to the inch) + </td> + </tr> + <tr> + <td valign="top" align="left">sp</td> + <td valign="top" width="576" align="left" style=""><span class="TEX">T<span class="E">E</span>X</span> ‘scaled’ points + (65,536 to the pt) + </td> + </tr> + <tr> + <td valign="top" align="left">dd</td> + <td valign="top" width="576" align="left" style="">Didot (European standard) points (67.54 to the + inch) + </td> + </tr> + <tr> + <td valign="top" align="left">cc</td> + <td valign="top" width="576" align="left" style="">Ciceros (European pica ems, 12dd)</td> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Printers' relative measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">em</td> + <td valign="top" width="576" align="left" style="">ems of the current point size (historically the + width of a letter ‘M’ but see + below) + </td> + </tr> + <tr> + <td valign="top" align="left">ex</td> + <td valign="top" width="576" align="left" style="">x-height of the current font (height of letter + ‘x’) + </td> + </tr> + <tr> + <td valign="top" align="left"><b><i></i></b></td> + <td valign="top" width="576" align="left" style=""><b><i>Other measures</i></b></td> + </tr> + <tr> + <td valign="top" align="left">cm</td> + <td valign="top" width="576" align="left" style="">centimeters (2.54 to the inch)</td> + </tr> + <tr> + <td valign="top" align="left">mm</td> + <td valign="top" width="576" align="left" style="">millimeters (25.4 to the inch)</td> + </tr> + <tr> + <td valign="top" align="left">in</td> + <td valign="top" width="576" align="left" style="">inches</td> + </tr> + </table> + </div> + <p>The em can cause beginners some puzzlement because + it's based on the ‘point size’ + of the type, which is itself misleading. The point size + refers to the depth of the metal body on which foundry type + was cast in the days of metal typesetting, + <em>not</em> the printed height of the letters + themselves. Thus the letter-size of 10pt type in one face + can be radically different from 10pt type in another (look + at <a href="chapter8.html#fontable-adobe">the table in section 8.2</a>, where all the examples are + 10pt). An em is the height of the type-body in a specific size, + so 1em of 10pt type is 10pt and 1em of 24pt type is + 24pt. + </p> + <p>Another name for a 1em space is a + ‘quad’, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a command + <code class="command"><a name="c23">\quad</a></code> for leaving exactly that much + horizontal space. A special name is given to the 12pt em, a + ‘pica’ em, as it has become a fixed + measure in its own right. + </p> + <p>If you are working with other DTP users, watch out for + those who think that Adobe points (bp) are the only ones. + The difference is only .27pt per inch, but in 10″ of + text (a full page of A4) that's 2.7pt, which is nearly + 1mm, enough to be clearly visible if you're trying to + align one sample with another. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.2 <a name="hyph">Hyphenation</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> hyphenates automatically according to the + language you use (see <a href="chapter2.html#langs">section 2.8.6</a>). To specify + different breakpoints for an individual word, you can insert + soft-hyphens<a name="I42"></a> (discretionary hyphens, done with + <code class="command"><a name="c24">\-</a></code>) wherever you need them, for + example: + </p> + <blockquote><pre> +When in Mexico, we visited Popoca\-tépetl by helicopter. + </pre></blockquote> + <p>To specify hyphenation points for all occurrences of a + word, use the <code class="command"><a name="c25">\hyphenation</a></code> command in your + preamble (see <a href="chapter3.html#preamble">the panel ‘The Preamble’ in section 3.4</a>) with one or more + words in its argument, separated by spaces. This will even + let you break ‘helico-<br>pter’ correctly. In this command + you use normal hyphens, not soft-hyphens.<a name="I43"></a></p> + <blockquote><pre> +\hyphenation{helico-pter Popoca-tépetl +im-mer-sion} + </pre></blockquote> + <p>If you have frequent hyphenation problems with long, + unusual, or technical words, ask an expert about changing + the value of <tt>\<a name="d8">spaceskip</a></tt>, + which controls the flexibility of the space between words. + This is not something you would normally want to do, as it + can change the appearance of your document quite + significantly. + </p> + <p>If you are using a lot of unbreakable text (see next + section and also <a href="chapter6.html#inlineverb">section 6.6.1</a>) it may also + cause justification problems. One possible solution to this + is shown in <a href="chapter9.html#macargs">section 9.3</a>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.3 Unbreakable text + </h3> + <p>To force <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to treat a word as unbreakable, use + the <code class="command"><a name="c26">\mbox</a></code> command: + <code class="literal">\mbox{pneumonoultramicroscopicsilicovolcanoconiosis}</code>. + <br>This may have undesirable results, however, if + you change margins or the width of the text: + + <nobr>pneumonoultramicroscopicsilicovolcanoconiosis</nobr>... + </p> + <p>To tie two words together with an unbreakable + space<a name="I44"></a><a name="I45"></a> (hard space), use a tilde (<code class="literal">~</code>) + instead of the space (see <a href="chapter2.html#tilde">the item ‘˜’ in section 2.5.1</a>). This + will print as a normal space but + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never break the line at that point. You should + make this standard typing practice for things like + people's initials followed by their surname, as in + Prof. D. E. Knuth: + <code class="literal">Prof.\ D.~E.~Knuth</code>. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Note that a full point after a lowercase letter is + treated as the end of a sentence, and creates more space + before the next word. Here, after + ‘Prof.’, it's + <em>not</em> the end of a sentence, and the + backslash-space forces <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to insert just an ordinary + word-space because it's OK to break the line after + ‘Prof.’, whereas it would look + wrong to have initials separated with Prof. D.<br>E. Knuth broken over a line-end. + </p> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.4 Dashes + </h3> + <p>For a long dash — what printers call an + ‘em rule’ like this — use three + hyphens typed together, <code class="literal">like~--- this</code>, + and bind them to the preceding word with a tilde to avoid + the line being broken before the dash. It's also common + to see the dash printed without spaces—like that: the + difference is purely æsthetic. <em>Never</em> + use a single hyphen for this purpose. + </p> + <p>Between digits like page ranges (35–47), it is + normal to use the short dash (what printers call an en-rule) + which you get by typing two hyphens together, as in + <code class="literal">35--47</code>. If you want a minus sign, use math + mode (<a href="chapter2.html#math">section 2.9</a>). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.5 Justification + </h3> + <p>The default mode for typesetting is justified (two + parallel margins, with word-spacing adjusted automatically + for the best optical fit). In justifying, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never + add space between letters, only between words. There is a + special package called <span class="package"><a name="m7">so</a></span> + (‘space-out’) if you need special + effects like letter-spacing, but these are best left to the + expert. + </p> + <p>There are two commands + <code class="command"><a name="c27">\raggedright</a></code> and + <code class="command"><a name="c28">\raggedleft</a></code> which set ragged-right (ranged + left) and ragged-left (ranged right). Use them inside a + group (see <a href="chapter8.html#grouping">the panel ‘Grouping’ in section 8.2.2</a>) to confine their + action to a part of your text. + </p> + <p align="right">These modes also exist as + ‘environments’ (see <a href="chapter3.html#environments">the last paragraph in section 3.2</a>) called + <span class="environment"><a name="e2">raggedright</a></span> and + <span class="environment"><a name="e3">raggedleft</a></span> which are more convenient + when applying this formatting to a whole paragraph or more, + like this one. + </p> + <blockquote><pre> +\begin{raggedleft} +These modes also exist as environments called raggedright +and raggedleft which is more convenient when applying this +formatting to a whole paragraph or more, like this one. +\end{raggedleft} + </pre></blockquote> + <p>Ragged setting turns off hyphenation. There is a package + <span class="package"><a name="m8">ragged2e</a></span> which retains hyphenation + in ragged setting, useful when you have a lot of long + words. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.8.6 <a name="langs">Languages</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can typeset in the native manner for several + dozen languages. This affects hyphenation, word-spacing, + indentation, and the names of the parts of documents used as + headings (e.g. Table of Contents). + </p> + <p>Most distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> come with US English and + one or more other languages installed by default, but it is + easy to add the <span class="package"><a name="m9">babel</a></span> package and + specify any of the supported languages or variants, for + example: + </p> + <blockquote><pre> +\usepackage[frenchb]{babel} +... +\selectlanguage{frenchb} + </pre></blockquote> + <p>Changing the language with + <span class="package"><a name="m10">babel</a></span> automatically changes the + names of the structural units and identifiers like + ‘Abstract’, + ‘Index’, etc. to their + translated version. For example, using French as above, + chapters will start with + ‘<i>Chapitre</i>’.<sup><a href="#F18">10</a></sup></p> + <ol class="footnotes" start="10"> + <li><a name="F18">Note that the <span class="package"><a name="m11">babel</a></span> package + also sets the hyphenation patterns <em>provided + your version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has them + precompiled</em> (see the start of your log + files for a list). For other languages you need to set + the hyphenation separately (outside the scope of this + book).</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#plaintext"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>2.9 <a name="math">Mathematics</a></h2><a name="I46"></a><p>As explained in <a href="preface.html#mathtex">the text in the Preface</a>, <span class="TEX">T<span class="E">E</span>X</span> was + originally written to automate the typesetting of books + containing mathematics. The careful reader will already have + noticed that mathematics is handled differently from normal + text, which is why it has to be typeset specially. This + document does not cover mathematical typesetting, which is + explained in detail in many other books and Web pages, so all + we will cover here is the existence of the math mode commands, + and some characters which have special meaning, so they + don't trip you up elsewhere. + </p> + <p>In addition to the 10 special characters listed in <a href="chapter2.html#specials">section 2.5</a>, there are three more characters which + only have any meaning inside mathematics mode:<a name="I47"></a></p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">|</tt></td> + <td valign="top" align="left">Vertical bar</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap"><</tt></td> + <td valign="top" align="left">Less-than</td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">></tt></td> + <td valign="top" align="left">Greater-than</td> + </tr> + </table> + </div> + <p>If you type any of these in normal text (ie outside math + mode), you will get very weird things happening and lots of + error messages. If you need to print these characters, you + <em>must</em> type them using math mode, or use + their symbolic names from the <span class="environment"><a name="e4">textcomp</a></span> + package (<code class="command"><a name="c29">\textbrokenbar</a></code>, + <code class="command"><a name="c30">\textlangle</a></code>, and + <code class="command"><a name="c31">\textrangle</a></code>). + </p> + <p>The hyphen also has an extra meaning in math mode: it + typesets as a minus sign, so if you want to write about + negative numbers you need to type the number in math mode so + the minus sign and the spacing come out right. + </p> + <p>To use math mode within a paragraph, enclose your math + expression in <code class="command"><a name="c32">\(</a></code> and <code class="command"><a name="c33">\)</a></code> + commands. You can get the much-quoted equation + <span class="math"><i>E=mc</i><sup>2</sup></span> by typing + <code class="literal">\(E=mc^2\)</code>, and to get a temperature like + −30° you need to type + <code class="literal">\(-30\)°</code>.<sup><a href="#F19">11</a></sup></p> + <p>To typeset a math expression as ‘displayed + math’ (centered between paragraphs), enclose it + in the commands <code class="command"><a name="c35">\[</a></code> and + <code class="command"><a name="c36">\]</a></code>.<sup><a href="#F20">12</a></sup></p> + <blockquote class="example"><pre> +\[\bar n^*_j(s)=\frac{\left\{s\sum_{i=1}^k +n_i(0)p^*{i,k+1}(s)+M^*(s)\right\}\sum_{i=1}^k +p_{0i}p^*{ij}(s)}{1-s\sum_{i=1}^kp_{0i}p^*_{i, +k+1}(s)}+\sum_{i=1}^kn_i(0)p^*_{ij}(s)[j= +1,2,\dots,k].\] + </pre><p class="example"><img src="math.png" width="75%"></p> + </blockquote> + <p>Displayed equations can be auto-numbered with the + <span class="environment"><a name="e5">equation</a></span> environment instead of the + <code class="command"><a name="c41">\[</a></code> and <code class="command"><a name="c42">\]</a></code> commands. + </p> + <ol class="footnotes" start="11"> + <li><a name="F19">Bear in mind that the degree symbol is a non-<small><a href="chapter2.html#ASCII" class="acroref" name="A79" title="American Standard Code for Information Interchange">ASCII</a></small> character, so you must specify + what input encoding you are using if you want to type it: + see the example of the <span class="package"><a name="m12">inputenc</a></span> + package in <a href="chapter2.html#accents">section 2.7</a>. If you don't + want to use non-<small><a href="chapter2.html#ASCII" class="acroref" name="A80" title="American Standard Code for Information Interchange">ASCII</a></small> characters + (or if you are using a system which cannot generate them), + you can use the command <code class="command"><a name="c34">\textdegree</a></code> to + get the degree sign.</a></li> + <li><a name="F20">You will also see dollar signs used for math mode. + This is quite common but deprecated: it's what plain + <span class="TEX">T<span class="E">E</span>X</span> used in the days before <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and the habit got + ingrained in many mathematicians. It still works as a + convenient shorthand like <code class="literal">$x=y$</code>, as do + double-dollars for display-mode math like + <code class="literal">$$E=mc^2$$</code>, but they are only mentioned + here to warn readers seeing them in other authors' + work that <code class="command"><a name="c37">\(</a></code>...<code class="command"><a name="c38">\)</a></code> + and <code class="command"><a name="c39">\[</a></code>...<code class="command"><a name="c40">\]</a></code> are + the proper <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands.</a></li> + </ol> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter1.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter3.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter3.html b/info/beginlatex/html/chapter3.html new file mode 100644 index 0000000000..a6d8032a41 --- /dev/null +++ b/info/beginlatex/html/chapter3.html @@ -0,0 +1,1072 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:15--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 3 — Basic document structures</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 3 — Basic document structures</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class="current"><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="basic">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">3</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Basic document structures</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#docdecl">The Document Class Declaration</a></li> + <li><a href="#docenv">The document environment</a></li> + <li><a href="#titling">Titling</a></li> + <li><a href="#abstracts">Abstracts and summaries</a></li> + <li><a href="#sections">Sections</a></li> + <li><a href="#paragraphs">Ordinary paragraphs</a></li> + <li><a href="#toc">Table of contents</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I48"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s approach to formatting is to aim for + consistency. This means that as long as you identify each + <b><i><a name="element">element</a></i></b> of your document + correctly, it will be typeset in the same way as all the other + elements like it, so that you achieve a consistent finish with + minimum effort. Consistency helps make documents easier to read + and understand. + </p> + <p>Elements are the component parts of a document, all the + pieces which make up the whole. Almost everyone who reads books, + newspapers, magazines, reports, articles, and other classes of + documents will be familiar with the popular structure of + chapters, sections, subsections, subsubsections, paragraphs, + lists, tables, figures, and so on, even if they don't + consciously think about it. + </p> + <p>Consistency is also what publishers look for. They have a + house style, and often a reputation to keep, so they rightly + insist that if you do something a certain way once, you should + do it the same way each time. + </p> + <p>To help achieve this consistency, every <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document + starts by declaring what <b><i><a name="documentclass">document + class</a></i></b> it belongs to. + </p> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1 <a name="docdecl">The Document Class Declaration</a></h2><a name="I49"></a><p>To tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> what class of document you are going to + create, you type a special first line into your file which + identifies it.<sup><a href="#F21">1</a></sup> To start a report, for + example, you would type the <code class="command"><a name="c43">\documentclass</a></code> + command like this as your first line: + </p> + <blockquote><pre> +\documentclass{report} + </pre></blockquote> + <p>There are four built-in classes provided, and many others + that you can download (some may already be installed for + you): + </p> + <blockquote> + <dl> + <dt><b><span class="package"><a name="m13">report</a></span></b></dt> + <dd> + <p>for business, technical, legal, academic, or + scientific reports; + </p> + </dd> + <dt><b><span class="package"><a name="m14">article</a></span></b></dt> + <dd> + <p>for white papers, magazine or journal articles, + reviews, conference papers, or research notes; + </p> + </dd> + <dt><b><span class="package"><a name="m15">book</a></span></b></dt> + <dd> + <p>for books and theses;</p> + </dd> + <dt><b><span class="package"><a name="m16">letter</a></span></b></dt> + <dd> + <p>for letters.<sup><a href="#F22">2</a></sup></p> + </dd> + </dl> + </blockquote> + <p>The <span class="package"><a name="m20">article</a></span> class in particular + can be used (some would say ‘abused’) for almost + any short piece of typesetting by simply omitting the titling + and layout (see below). + </p> + <p>The built-in classes are intended as starting-points, + especially for drafts and for compatibility when exchanging + documents with other <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users, as they come with every + copy of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and are therefore guaranteed to format + identically everywhere. <em>They are <strong>not</strong> intended as final-format + publication-quality layouts.</em> For most other + purposes, especially for publication, you use + add-in <a href="chapter5.html#packages" title="sect1">packages</a> to extend + these classes to do what you need: + </p> + <ul> + <li> + <p>The <span class="package"><a name="m21">memoir</a></span> and + <span class="package"><a name="m22">komascript</a></span> packages contain + more sophisticated replacements for all the built-in + classes; + </p> + </li> + <li> + <p>Many academic and scientific publishers provide their + own special class files for articles and books (often on + their Web sites for download); + </p> + </li> + <li> + <p>Conference organisers may also provide class files for + authors to write papers for presentation; + </p> + </li> + <li> + <p>Many universities provide their own thesis document + class files in order to ensure exact fulfillment of their + formatting requirements; + </p> + </li> + <li> + <p>Businesses and other organizations can provide their + users with corporate classes on a central server and + configure <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installations to look there first for + packages, fonts, etc. + </p> + </li> + </ul> + <p>Books and journals are not usually printed on office-size + paper. Although <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s layouts are designed to fit on + standard A4 or Letter stationery for draft purposes, it makes + them look odd: the margins are too wide, or the positioning is + unusual, or the font size is too small, because the finished + job will normally be trimmed to a different size + entirely — try trimming the margins of the <small><a href="chapter4.html#PDF" class="acroref" name="A84" title="Portable Document Format">PDF</a></small> version of this book to 185mm by 235mm + (the same as <cite><a href="bibliography.html#companion" name="C26">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> series) + and you'll be amazed at how it changes the appearance! + + </p> + <ol class="footnotes" start="1"> + <li><a name="F21">Readers familiar with <small><a href="chapter10.html#SGML" class="acroref" name="A81" title="Standard Generalized Markup Language">SGML</a></small>, + <small><a href="chapter10.html#HTML" class="acroref" name="A82" title="HyperText Markup Language">HTML</a></small>, or <small><a href="chapter10.html#XML" class="acroref" name="A83" title="Extensible Markup Language">XML</a></small> will recognize the concept as + similar to the Document Type + Declaration.</a></li> + </ol> + <ol class="footnotes" start="2"> + <li><a name="F22">The built-in <span class="package"><a name="m17">letter</a></span> + class is rather idiosyncratic: there are much better + ones you can download, such as + the <span class="package"><a name="m18">memoir</a></span> and + <span class="package"><a name="m19">komascript</a></span> packages.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1.1 <a name="doclayout">Document class options</a></h3><a name="I50"></a><p>The default layouts are designed to fit as drafts on US + Letter size paper.<sup><a href="#F23">3</a></sup> To create documents with the correct proportions + for standard A4 paper, you need to specify the paper size in + an optional argument in square brackets before the document + class name, e.g. + </p> + <blockquote><pre> +\documentclass[a4paper]{report} + </pre></blockquote> + <p>The two most common options are <span class="option"><a name="o1">a4paper</a></span> + and <span class="option"><a name="o2">letterpaper</a></span>. However, many European + distributions of <span class="TEX">T<span class="E">E</span>X</span> now come preset for A4, not Letter, and + this is also true of all distributions of + <i><a name="p117">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>. + </p> + <p>The other default settings are for: <i>a</i>) 10pt type (all document classes); <i>b</i>) two-sided printing (books and reports) or + one-sided (articles and letters); and <i>c</i>) separate title page (books and reports + only). These can be modified with the following + document class options which you can add in the same set of + square brackets, separated by commas: + </p><a name="I51"></a><blockquote> + <dl> + <dt><b><span class="option"><a name="o3">11pt</a></span></b></dt> + <dd> + <p>to specify 11pt type (headings, footnotes, + etc. get scaled up or down in + proportion); + </p> + </dd> + <dt><b><span class="option"><a name="o4">12pt</a></span></b></dt> + <dd> + <p>to specify 12pt type (again, headings + scale); + </p> + </dd> + <dt><b><span class="option"><a name="o5">oneside</a></span></b></dt> + <dd> + <p>to format one-sided printing for books and + reports; + </p> + </dd> + <dt><b><span class="option"><a name="o6">twoside</a></span></b></dt> + <dd> + <p>to format articles for two-sided printing;</p> + </dd> + <dt><b><span class="option"><a name="o7">titlepage</a></span></b></dt> + <dd> + <p>to force articles to have a separate title + page; + </p> + </dd> + <dt><b><span class="option"><a name="o8">draft</a></span></b></dt> + <dd> + <p>makes <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> indicate hyphenation and + justification problems with a small square in the + right-hand margin of the problem line so they can be + located quickly by a human. + </p> + </dd> + </dl> + </blockquote> + <p>If you were using pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for a report to be in 12pt + type on Letter paper, but printed one-sided in draft mode, you + would use: + </p> + <blockquote><pre> +\documentclass[12pt,letterpaper,oneside,draft]{report} + </pre></blockquote> + <p>There are extra preset options for other type sizes + which can be downloaded separately, but 10pt, 11pt, and 12pt + between them cover probably 99% of all document + typesetting. In addition there are the hundreds of add-in + packages which can automate other layout and formatting + variants without you having to program anything by hand or + even change your text. + </p> + <blockquote class="exercise"><a name="firstline"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 1</i>. Create a new document + </h4> + <ol type="1"> + <li> + <p>Use your editor to create a new document.</p> + </li> + <li> + <p>Type in a Document Class Declaration as shown + above. + </p> + </li> + <li> + <p>Add a font size option if you wish.</p> + </li> + <li> + <p>In North America, omit the + <span class="option"><a name="o9">a4paper</a></span> option or change it to + <span class="option"><a name="o10">letterpaper</a></span>. + </p> + </li> + <li> + <p>Save the file (make up a name) ensuring the name + ends with <code>.tex</code></p> + </li> + </ol> + <hr> + </blockquote> + <ol class="footnotes" start="3"> + <li><a name="F23">Letter size is 8½″×11″, which is the + trimmed size of the old Demi Quarto, still in use in + North America. The other common US office size is + ‘Legal’, which is + 8½″×14″, a bastard cutting close to + the old Foolscap (8¼″×13¼″). ISO + standard ‘A’, + ‘B’, and + ‘C’ paper sizes are still + virtually unknown in many parts of North America.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.2 <a name="docenv">The document environment</a></h2> + <p>After the Document Class Declaration, the text of your + document is enclosed between two commands which identify the + beginning and end of the actual document: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} + +\begin{document} +... +\end{document} + </pre></blockquote> + <p>(You would put your text where the dots are.) The reason + for marking off the beginning of your text is that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + allows you to insert extra setup specifications before it + (where the blank line is in the example above: we'll be + using this soon). The reason for marking off the end of your + text is to provide a place for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to be programmed to do + extra stuff automatically at the end of the document, like + making an index. + </p> + <p>A useful side-effect of marking the end of the document + text is that you can store comments or temporary text + underneath the <code class="literal">\end{document}</code> in the + knowledge that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never try to typeset them. + </p> + <blockquote><pre> +... +\end{document} +Don't forget to get the extra chapter from Jim! + </pre></blockquote> + <p><a name="environments"></a>This + <code class="command"><a name="c44">\begin</a></code> ...<code class="command"><a name="c45">\end</a></code> + pair of commands is an example of a common <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> structure called an + <b><i><a name="environment">environment</a></i></b>. + Environments enclose text which is to be handled in a particular + way. All environments start with + <code class="literal">\begin{...}</code> and end with + <code class="literal">\end{...}</code> (putting the name of the + environment in the curly braces). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 2</i>. Adding the document environment + </h4> + <ol type="1"> + <li> + <p>Add the <span class="environment"><a name="e6">document</a></span> environment to + your file. + </p> + </li> + <li> + <p>Leave a blank line between the Document Class + Declaration and the <code class="literal">\begin{document}</code> + (you'll see why later). + </p> + </li> + <li> + <p>Save the file.</p> + </li> + </ol> + <hr> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.3 <a name="titling">Titling</a></h2><a name="I52"></a><p>The first thing you put in the + <span class="environment"><a name="e7">document</a></span> environment is almost always the + document title, the author's name, and the date (except + in letters, which have a special set of commands for + addressing which we'll look at later). The title, author, + and date are all examples of <b><i><a name="metadata">metadata</a></i></b> or <b><i><a name="metainformation">metainformation</a></i></b> (information + <em>about</em> information). + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} + +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\end{document} + </pre></blockquote> + <p>The <code class="command"><a name="c46">\title</a></code>, <code class="command"><a name="c47">\author</a></code>, + and <code class="command"><a name="c48">\date</a></code> commands are + self-explanatory. You put the title, author name, and date in + curly braces after the relevant command. The title and author + are usually compulsory; if you omit the + <code class="command"><a name="c49">\date</a></code> command, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses today's + date by default. + </p> + <p>You always finish the metadata with the + <code class="command"><a name="c50">\maketitle</a></code> command, which tells + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> that it's complete and it can typeset the titling + information at this point. If you omit + <code class="command"><a name="c51">\maketitle</a></code>, the titling will never be + typeset. This command is reprogrammable so you can alter the + appearance of titles (like I did for the printed version of + this document). + </p> + <p>The double backslash (<code class="literal">\\</code>) is the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> command for forced linebreak. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> normally decides by + itself where to break lines, and it's usually right, but + sometimes you need to cut a line short, like here, and start a + new one. I could have left it out and just used a comma, so my + name and my company would all appear on the one line, but I + just decided that I wanted my company name on a separate line. + In some publishers' document classes, they provide a special + <code class="command"><a name="c52">\affiliation</a></code> command to put your company + or institution name in instead. + </p> + <p>When this file is typeset, you get something like this + (I've cheated and <a href="chapter5.html#colorpkg" title="sect2">done it in + colour</a> for fun — yours will be in black and white + for the moment): + </p> + <div align="center" style="margin:12px"><img src="title.png" style="border:thin solid black;" width="80%"></div> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 3</i>. Adding the metadata + </h4> + <ol type="1"> + <li> + <p>Add the <code class="command"><a name="c53">\title</a></code>, + <code class="command"><a name="c54">\author</a></code>, <code class="command"><a name="c55">\date</a></code>, and + <code class="command"><a name="c56">\maketitle</a></code> commands to your + file. + </p> + </li> + <li> + <p>Use your own name, make up a title, and give a + date. + </p> + </li> + </ol> + <p>The order of the first three commands is not important, + but the <code class="command"><a name="c57">\maketitle</a></code> command must come + last. + </p> + <hr> + </blockquote> + <p>The document isn't really ready for printing like this, + but if you're really impatient, look at <a href="chapter4.html#process">Chapter 4</a> to see how to typeset and display + it. + </p> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.4 <a name="abstracts">Abstracts and summaries</a></h2><a name="I53"></a><a name="I54"></a><p>In reports and articles it is normal for the author + to provide an Summary or Abstract, in which you describe + briefly what you have written about and explain its + importance. Abstracts in articles are usually only a few + paragraphs long. Summaries in reports can run to several + pages, depending on the length and complexity of the report + and the readership it's aimed at. + </p> + <p>In both cases (reports and articles) the Abstract or + Summary is optional (that is, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> doesn't force you + to have one), but it's rare to omit it because readers want + and expect it. In practice, of course, you go back and type + the Abstract or Summary <em>after</em> having + written the rest of the document, but for the sake of the + example we'll jump the gun and type it now. + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage[latin1]{inputenc} +\renewcommand{\abstractname}{Summary} +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\begin{abstract} +This document presents the basic concepts of +typesetting in a form usable by non-specialists. It +is aimed at those who find themselves (willingly or +unwillingly) asked to undertake work previously sent +out to a professional printer, and who are concerned +that the quality of work (and thus their corporate +æsthetic) does not suffer unduly. +\end{abstract} + +\end{document} + </pre></blockquote> + <p>After the <code class="command"><a name="c58">\maketitle</a></code> you use the + <span class="environment"><a name="e8">abstract</a></span> environment, in which you simply + type your Abstract or Summary, leaving a blank line between + paragraphs if there's more than one (see <a href="chapter3.html#paragraphs">section 3.6</a> for this convention). + </p> + <p>In business and technical documents, the Abstract is often + called a Management Summary, or Executive Summary, or Business + Preview, or some similar phrase. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> lets you change the + name associated with the <span class="environment"><a name="e9">abstract</a></span> + environment to any kind of title you want, using the + <code class="command"><a name="c59">\renewcommand</a></code> command to give the command + <code class="command"><a name="c60">\abstractname</a></code> a new value: + </p> + <blockquote><pre> +\renewcommand{\abstractname}{Executive Summary} + </pre></blockquote> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 4</i>. Using an Abstract or Summary + </h4> + <ol type="1"> + <li> + <p>Add the <code class="command"><a name="c61">\renewcommand</a></code> as shown + above to your Preamble. + </p> + <p>The Preamble is at the start of the document, in + that gap <em>after</em> the + <code class="command"><a name="c62">\documentclass</a></code> line but + <em>before</em> the + <code class="literal">\begin{document}</code> (remember I said + we'd see what we left it blank for: see <a href="chapter3.html#preamble">the panel ‘The Preamble’ in section 3.4</a>). + </p> + </li> + <li> + <p>Add an <span class="environment"><a name="e10">abstract</a></span> environment + after the <code class="command"><a name="c63">\maketitle</a></code> and type in a + paragraph or two of text. + </p> + </li> + <li> + <p>Save the file (no, I'm not paranoid, just + careful). + </p> + </li> + </ol> + <hr> + </blockquote> + <p>Notice how the name of the command you are renewing (here, + <code class="command"><a name="c64">\abstractname</a></code>) goes in the first set of + curly braces, and the new value you want it to have goes in + the second set of curly braces (this is an example of a + command with two arguments). The environment you use is still + called <span class="environment"><a name="e11">abstract</a></span> (that is, you still type + <code class="literal">\begin{abstract}</code>...<code class="literal">\end{abstract}</code>). + What the <code class="command"><a name="c65">\abstractname</a></code> does is change the + name that gets displayed and printed, not the name of the + environment you store the text in. + </p> + <p>If you look carefully at the example document, you'll + see I sneakily added an extra command to the Preamble. + We'll see later what this means (Brownie points for + guessing it, though, if you read <a href="chapter2.html#accents">section 2.7</a>). + </p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="preamble">The Preamble</a></h3> + <p>Modifications which you want to affect a whole document + go at the start of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file, immediately + after the <code class="command"><a name="c66">\documentclass</a></code> line and before + the <code class="literal">\begin{document}</code> line: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\renewcommand{\abstractname}{Sneak Preview} +\begin{document} +... +\end{document} + </pre></blockquote> + <p>This position, between the Document Class Declaration + and the beginning of the <span class="environment"><a name="e12">document</a></span> + environment, is called the <b><i><a name="pre">preamble</a></i></b>, and it is used for small or + temporary modifications to the style and behaviour of the + document. Major or permanent modifications should go in a + <code>.sty</code> file and be invoked with a + <code class="command"><a name="c67">\usepackage</a></code> command. + </p> + </td> + </tr> + </table> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5 <a name="sections">Sections</a></h2><a name="I55"></a><p>In the body of your document, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides seven + levels of division or sectioning for you to use in structuring + your text. They are all optional: it is perfectly possible to + write a document consisting solely of paragraphs of + unstructured text. But even novels are normally divided into + chapters, although short stories are often made up solely of + paragraphs. + </p> + <p>Chapters are only + available in the <span class="package"><a name="m23">book</a></span> and + <span class="package"><a name="m24">report</a></span> document classes, because they + don't have any meaning in articles and letters. Parts are + also undefined in letters.<sup><a href="#repchap">4</a></sup></p> + <div align="center"><a name="secdepths"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="center">Depth</th> + <th valign="bottom" align="left">Division</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Notes</th> + </tr> + <tr> + <td valign="top" align="center"><span class="math">−1</span></td> + <td valign="top" align="left">Part</td> + <td valign="top" align="left"><code class="command"><a name="c68">\part</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">0</td> + <td valign="top" align="left">Chapter</td> + <td valign="top" align="left"><code class="command"><a name="c69">\chapter</a></code></td> + <td valign="top" align="left">Books and reports</td> + </tr> + <tr> + <td valign="top" align="center">1</td> + <td valign="top" align="left">Section</td> + <td valign="top" align="left"><code class="command"><a name="c70">\section</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">2</td> + <td valign="top" align="left">Subsection</td> + <td valign="top" align="left"><code class="command"><a name="c71">\subsection</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">3</td> + <td valign="top" align="left">Subsubsection</td> + <td valign="top" align="left"><code class="command"><a name="c72">\subsubsection</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">4</td> + <td valign="top" align="left">Titled paragraph</td> + <td valign="top" align="left"><code class="command"><a name="c73">\paragraph</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + <tr> + <td valign="top" align="center">5</td> + <td valign="top" align="left">Titled subparagraph</td> + <td valign="top" align="left"><code class="command"><a name="c74">\subparagraph</a></code></td> + <td valign="top" align="left">Not in letters</td> + </tr> + </table> + </div> + <p>In each case the title of the part, chapter, section, + etc. goes in curly braces after the command. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + automatically calculates the correct numbering and prints the + title in bold. You can turn section numbering off at a + specific depth: details in <a href="chapter3.html#secnum">section 3.5.1</a>. + </p> + <blockquote><pre> +\section{New recruitment policies} +... +\subsection{Effect on staff turnover} +... +\chapter{Business plan 2005--2007} + </pre></blockquote> + <p>There are packages<sup><a href="#F25">5</a></sup> to let you control the typeface, style, spacing, + and appearance of section headings: it's much easier to + use them than to try and reprogram the headings manually. Two + of the most popular are the <span class="package"><a name="m25">ssection</a></span> + and <span class="package"><a name="m26">sectsty</a></span> packages. + </p> + <p>Headings also get put automatically into the Table of + Contents, if you specify one (it's optional). But if you + make manual styling changes to your heading, for example a + very long title, or some special line-breaks or unusual + font-play, this would appear in the Table of Contents as well, + which you almost certainly <em>don't</em> + want. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> allows you to give an optional extra version of + the heading text which only gets used in the Table of Contents + and any running heads, if they are in effect <a href="chapter8.html#runningheads" title="sect2"></a>. This optional alternative + heading goes in [square brackets] before the curly + braces: + </p> + <blockquote><pre> +\section[Effect on staff turnover]{An analysis of the +effect of the revised recruitment policies on staff +turnover at divisional headquarters} + </pre></blockquote> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 5</i>. Start your document text + </h4> + <ol type="1"> + <li> + <p>Add a <code class="command"><a name="c75">\chapter</a></code> command after your + Abstract or Summary, giving the title of your first + chapter. + </p> + </li> + <li> + <p>If you're planning ahead, add a few more + <code class="command"><a name="c76">\chapter</a></code> commands for + subsequent chapters. Leave a few blank lines between + them to make it easier to add paragraphs of text + later. + </p> + </li> + <li> + <p>By now I shouldn't need to tell you what to do + after making significant changes to your document + file. + </p> + </li> + </ol> + <hr> + </blockquote> + <ol class="footnotes" start="4"> + <li><a name="F24">It is arguable that chapters also have no place in + reports, either, as these are conventionally divided into + sections as the top-level division. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, however, + assumes your reports have chapters, but this is only the + default, and can be changed very simply (see + <a href="chapter9.html#reprog">section 9.6</a>).</a></li> + </ol> + <ol class="footnotes" start="5"> + <li><a name="F25">Details of how to use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages are in <a href="chapter5.html#packages">section 5.1</a>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5.1 <a name="secnum">Section numbering</a></h3><a name="I56"></a><p>All document divisions get numbered automatically. Parts + get Roman numerals (Part I, Part II, etc.); + chapters and sections get decimal numbering like this + document, and Appendixes (which are just a special case of + chapters, and share the same structure) are lettered (A, B, + C, etc.). + </p> + <p>You can change the depth to which section numbering + occurs, so you can turn it off selectively. In this document + it is set + to 3. + If you only want parts, chapters, and sections numbered, not + subsections or subsubsections etc., you can change the + value of the <tt><i><a name="l9">secnumdepth</a></i></tt> + counter using the the <code class="command"><a name="c77">\setcounter</a></code> command, + giving the depth value from <a href="chapter3.html#secdepths">the table in section 3.5</a>: + </p> + <blockquote><pre> +\setcounter{secnumdepth}{1} + </pre></blockquote> + <p>A related counter is <tt><i><a name="l10">tocdepth</a></i></tt>, which specifies what + depth to take the Table of Contents to. It can be reset in + exactly the same way as <tt><i><a name="l11">secnumdepth</a></i></tt>. The current setting + for this document is 2. + </p> + <blockquote><pre> +\setcounter{tocdepth}{3} + </pre></blockquote> + <p>To get an <em>unnumbered</em> section + heading which does <em>not</em> go into the + Table of Contents, follow the command name with an asterisk + before the opening curly brace: + </p> + <blockquote><pre> +\subsection*{Shopping List} + </pre></blockquote> + <p>All the divisional commands from + <code class="command"><a name="c78">\part*</a></code> to <code class="command"><a name="c79">\subparagraph*</a></code> + have this ‘starred’ version which can + be used on special occasions for an unnumbered heading when + the setting of <tt><i><a name="l12">secnumdepth</a></i></tt> + would normally mean it would be numbered. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.6 <a name="paragraphs">Ordinary paragraphs</a></h2> + <p>After section headings comes your text. Just type it and + leave a blank line between paragraphs. That's all + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> needs. + </p> + <p>The blank line means ‘start a new paragraph + here’: it does <em>not</em> (repeat: + <strong>not</strong>) mean you get a blank + line in the typeset output. Now read this paragraph + again and again until that sinks in. + </p> + <p>The spacing between paragraphs is a separately definable + quantity, a <b><i><a name="dimension">dimension</a></i></b> or + <b><i><a name="length">length</a></i></b> called <tt>\<a name="d13">parskip</a></tt>. This is normally zero + (no space between paragraphs, because that's how books + are normally typeset), but you can easily set it to any size + you want with the <code class="command"><a name="c80">\setlength</a></code> command in the + Preamble: + </p> + <blockquote><pre> +\setlength{\parskip}{1cm} + </pre></blockquote> + <p><a name="paraspace"></a>This will set the space between paragraphs + to 1cm. See <a href="chapter2.html#dimensions">section 2.8.1</a> for details of the + various size units <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use. <em>Leaving + multiple blank lines between paragraphs in your source + document achieves nothing</em>: all extra blank lines + get ignored by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> because the space between paragraphs + is + controlled only by the value of <tt>\<a name="d14">parskip</a></tt>. + </p> + <p>White-space in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can also be made flexible (what + Lamport calls + ‘rubber’ lengths). This means that + values such as <tt>\<a name="d15">parskip</a></tt> can + have a default dimension plus an amount of expansion minus an + amount of contraction. This is useful on pages in complex + documents where not every page may be an exact number of + fixed-height lines long, so some give-and-take in vertical + space is useful. You specify this in a + <code class="command"><a name="c81">\setlength</a></code> command like this: + </p> + <blockquote><pre> +\setlength{\parskip}{1cm plus4mm minus3mm} + </pre></blockquote> + <p>Paragraph indentation can also be set with the + <code class="command"><a name="c82">\setlength</a></code> command, although you would + always make it a fixed size, never a flexible one, otherwise + you would have very ragged-looking paragraphs. + </p> + <blockquote><pre> +\setlength{\parindent}{6mm} + </pre></blockquote> + <p>By default, the first paragraph after a heading follows + the standard Anglo-American publishers' practice of + <em>no</em> indentation. Subsequent paragraphs are + indented by the value of <tt>\<a name="d16">parindent</a></tt> (default + 18pt).<sup><a href="#F26">6</a></sup> You can change this in the same way as any other + length. + </p> + <p>In the printed copy of this document, the paragraph + indentation is set to 12pt and the space + between paragraphs is set to 0pt. These values do not + apply in the Web (<small><a href="chapter10.html#HTML" class="acroref" name="A85" title="HyperText Markup Language">HTML</a></small>) version because not all browsers are + capable of that fine a level of control, and because users can + apply their own stylesheets regardless of what this document + proposes. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 6</i>. Start typing! + </h4> + <ol type="1"> + <li> + <p>Type some paragraphs of text. Leave a blank line + between each. Don't bother about line-wrapping or + formatting — <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will take care of all + that. + </p> + </li> + <li> + <p>If you're feeling adventurous, add a + <code class="command"><a name="c83">\section</a></code> command with the title of a + section within your first chapter, and continue typing + paragraphs of text below that. + </p> + </li> + <li> + <p>Add one or more <code class="command"><a name="c84">\setlength</a></code> + commands to your Preamble if you want to experiment with + changing paragraph spacing and indentation. + </p> + </li> + </ol> + <hr> + </blockquote> + <p>To turn off indentation completely, set it to zero (but + you still have to provide units: it's still a + measure!). + </p> + <blockquote><pre> +\setlength{\parindent}{0in} + </pre></blockquote> + <p>If you do this, though, and leave <tt>\<a name="d17">parskip</a></tt> set to zero, your readers + won't be able to tell easily where each paragraph begins! + If you want to use the style of having no indentation with a + space between paragraphs, use the + <span class="package"><a name="m28">parskip</a></span> package, which does it for + you (and makes adjustments to the spacing of lists and other + structures which use paragraph spacing, so they don't get + too far apart). + </p> + <ol class="footnotes" start="6"> + <li><a name="F26">Paragraph spacing and indentation are cultural + settings. If you are typesetting in a language other than + English, you should use the <span class="package"><a name="m27">babel</a></span> + package, which alters many things, including the spacing + and the naming of sections, to conform with the standards + of different countries and languages.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.7 <a name="toc">Table of contents</a></h2><a name="I57"></a><p>All auto-numbered headings get entered in the Table of + Contents (ToC) automatically. You don't have to print a + ToC, but if you want to, just add the command + <code class="command"><a name="c85">\tableofcontents</a></code> at the point where you want + it printed (usually after the Abstract or Summary). + </p> + <p>Entries for the ToC are recorded each time you process + your document, and reproduced the <em>next</em> + time you process it, so you need to re-run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> one extra + time to ensure that all ToC page-number references + are correctly calculated. + </p> + <p>We've already seen in <a href="chapter3.html#sections">section 3.5</a> how + to use the optional argument to the sectioning commands to add + text to the ToC which is slightly different from the one + printed in the body of the document. It is also possible to + add extra lines to the ToC, to force extra or unnumbered + section headings to be included. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 7</i>. Inserting the table of contents + </h4> + <ol type="1"> + <li> + <p>Go back and add a <code class="command"><a name="c86">\tableofcontents</a></code> + command after the <code class="literal">\end{abstract}</code> command + in your document. + </p> + </li> + <li> + <p>You guessed.</p> + </li> + </ol> + <hr> + </blockquote> + <p><a name="loflot"></a>The commands <code class="command"><a name="c87">\listoffigures</a></code> + and <code class="command"><a name="c88">\listoftables</a></code> work in exactly the same + way as <code class="command"><a name="c89">\tableofcontents</a></code> to automatically + list all your tables and figures. If you use them, they + normally go after the <code class="command"><a name="c90">\tableofcontents</a></code> + command. + </p> + <p>The <code class="command"><a name="c91">\tableofcontents</a></code> command normally + shows only numbered section headings, and only down to the + level defined by the <tt><i><a name="l18">tocdepth</a></i></tt> counter (see <a href="chapter3.html#secnum">section 3.5.1</a>), but you can add extra entries with the + <code class="command"><a name="c92">\addcontentsline</a></code> command. For example if you + use an unnumbered section heading command to start a + preliminary piece of text like a Foreword or Preface, you can + write:<a name="I58"></a></p> + <blockquote><pre> +\subsection*{Preface} +\addcontentsline{toc}{subsection}{Preface} + </pre></blockquote> + <p>This will format an unnumbered ToC entry for + ‘Preface’ in the + ‘subsection’ style. You can use + the same mechanism to add lines to the List of Figures or List + of Tables by substituting <code>lof</code> or + <code>lot</code> for <code>toc</code>. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter2.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter4.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter4.html b/info/beginlatex/html/chapter4.html new file mode 100644 index 0000000000..85100cca74 --- /dev/null +++ b/info/beginlatex/html/chapter4.html @@ -0,0 +1,878 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:20--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 4 — Typesetting, viewing and printing</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 4 — Typesetting, viewing and printing</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class="current"><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="process">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">4</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Typesetting, viewing and printing</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#setting">Typesetting</a></li> + <li><a href="#errmsg">Errors and warnings</a></li> + <li><a href="#dvi">Screen preview</a></li> + <li><a href="#print">Printer output</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I59"></a><a name="I60"></a><a name="I61"></a><p>We've now got far enough to typeset what you've + entered. I'm assuming at this stage that you have typed + some sample text in the format specified in the previous + chapter, and you've saved it in a plain-text file with a + filetype of + <code class="literal">.tex</code> and a name of your own choosing. + </p><a name="I62"></a><blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 8</i>. Saving your file + </h4> + <p>If you haven't already saved your file, do so now + (some editors and interfaces let you typeset the document + without saving it!). + </p> + <p>Pick a sensible filename in a sensible directory. Names + should be short enough to display and search for, but + descriptive enough to make sense. See <a href="chapter4.html#filenames">the panel ‘Picking suitable filenames’ in this chapter</a> for more details. + </p> + <hr> + </blockquote> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="filenames">Picking suitable filenames</a></h3> + <p>Never, ever use directories (folders) or file names + which contain spaces. Although your operating system + probably supports them, some don't, and they will + only cause grief and tears with <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <p>Make filenames as short or as long as you wish, but + strictly avoid spaces. Stick to upper- and lower-case + letters without accents (A–Z and a–z), the + digits 0–9, the hyphen (<code class="literal">-</code>), and + the full point or period (<code class="literal">.</code>), (similar + to the conventions for a Web <small><a href="chapter6.html#URI" class="acroref" name="A86" title="Uniform Resource Indicator">URI</a></small>): it will let you refer to <span class="TEX">T<span class="E">E</span>X</span> + files over the Web more + easily and make your files more portable. + </p> + </td> + </tr> + </table> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1 <a name="setting">Typesetting</a></h2> + <p>Typesetting your document is usually done by clicking + on a button in a toolbar or an entry in a menu. Which one you + click on depends on what output you want — there are two + formats available: + </p> + <ul> + <li> + <p>The standard (default) <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> program produces a + <a name="DVI" class="acroref">device-independent</a> (<small>DVI</small>) file which + can be used with any <span class="TEX">T<span class="E">E</span>X</span> previewer or printer driver on any + make or model of computer. There are dozens of these + available: at least one of each (previewer and printer + driver) should have been installed with your distribution + of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </li> + <li> + <p>The <i><a name="p118">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> program + produces an Adobe Acrobat <small><a href="chapter4.html#PDF" class="acroref" name="A88" title="Portable Document Format">PDF</a></small> + file which can be used with any suitable previewer, such + as <i><a name="p119">GSview</a></i>, + <i><a name="p120">PDFview</a></i>, + <i><a name="p121">Xpdf</a></i>, the + <i><a name="p122">Opera</a></i> browser, or Adobe's + own <i><a name="p123">Acrobat Reader</a></i>. + </p> + </li> + </ul> + <p>Depending on which one you choose, you may have to + [re]configure your editor so that it runs the right program. + They can all do all of them, but they don't always come + pre-set with buttons or menus for every possible option, + because they can't guess which one you want. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.1 Standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h3> + <p>There are also two ways of running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: from the + toolbar or menu, or from the command line. Toolbars and + menus are most common in graphical systems, and are the + normal way to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Command lines are used in + non-graphical systems and in automated processes where + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is run + unattended (so-called ‘batch’ or + ‘scripted’ processing). + </p> + <p>Whichever way you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, it will process your + file and display a log or record of what it's doing + (see <a href="chapter4.html#terminal">the example ‘Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window’ in section 4.1.2</a>: it looks the + same no matter what system you use). This is to let you see + where (if!) there are any errors or problems. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 9</i>. Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from the toolbar or menu + </h4> + <p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on your file. According to which system + you're using this will either be the + <span class="guiicon"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + File</span> menu item. + </p> + <p>Your editor may suggest you save your file if you + haven't already done so. Do it. + </p> + <hr> + </blockquote> + <p>If <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reports any errors — easily identifiable + as lines in the log beginning with an exclamation mark + (!) — <em>don't panic!</em> Turn to <a href="chapter4.html#errmsg">section 4.2</a>, identify what went wrong, and fix it in + your input file. Then re-run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. If there were no + errors, your file is ready for displaying or + printing. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.2 <a name="cmdwin">Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from a command window</a></h3> + <p>This is worth practising even if you normally use a + <small><a href="intro.html#GUI" class="acroref" name="A89" title="Graphical User Interface">GUI</a></small>, so that you understand what it + does. See <a href="chapter4.html#cliex">Figure 4.1</a> for an example. + </p> + <blockquote class="exercise"><a name="terminal"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 10</i>. Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window + </h4> + <ul> + <li> + <p>Under graphical Unix-based systems (Linux and Mac) + you open a command (shell) window by clicking on the + shell or screen icon in the control panel at the + bottom of your screen. + </p> + </li> + <li> + <p>Under Microsoft Windows you open a command window + by clicking on the + <span class="guimenu">Start</span>→<span class="guisubmenu">Programs</span>→<span class="guimenuitem">MS-DOS</span> + or + <span class="guimenu">Start</span>→<span class="guisubmenu">Command + Prompt</span> menu item. + </p> + </li> + </ul> + <p>When the command window appears, type</p> + <blockquote><pre> +cd <code><u>documents</u></code> +latex <code><u>mybook</u></code> + </pre></blockquote> + <p>Substitute the relevant directory and file name. + Remember to press the <tt class="keycap">Enter</tt> key at the + end of each line. + </p> + <hr> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 4.1</i>: <a name="cliex">Command-line usage</a></caption> + <div align="center" style="margin:12px"><img src="terminal.png" width="75%"></div> + <hr> + </div> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.1.3 pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h3> + <p>If your editor is set up to generate <small><a href="chapter4.html#PDF" class="acroref" name="A90" title="Portable Document Format">PDF</a></small> files direct instead of <small><a href="chapter4.html#DVI" class="acroref" name="A91" title="device-independent">DVI</a></small> files, then you can click the + <span class="guiicon">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon or type the + command <code class="literal">pdflatex + <code><u>filename</u></code></code> in a terminal + (console) window. <i><a name="p124">Emacs</a></i> does not + have a default menu configured for + <i><a name="p125">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> but if you have + already run standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the file, you can type ther + <code class="literal">pdflatex</code> command in the + <code class="literal">*TeX-Shell*</code> pane. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2 <a name="errmsg">Errors and warnings</a></h2> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> describes what it's typesetting while it does it, + and if it encounters something it doesn't understand or can't + do, it will display a message saying what's wrong. It may + also display warnings for less serious conditions. + </p> + <p><em>Don't panic if you see error + messages</em>: it's very common for beginners to + mistype or mis-spell commands, forget curly braces, type a + forward slash instead of a backslash, or use a special + character by mistake. Errors are easily spotted and easily + corrected in your editor, and you can then run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> again + to check you have fixed everything. Some of the most common + errors are described in <a href="chapter4.html#errmsg">section 4.2</a> with an + explanation of how to fix them. + </p> + <div align="center" style="margin:12px"><img src="dontpanic.png" width="50%"></div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.1 <a name="errs">Error messages</a></h3> + <p>The format of an error message is always the same. Error + messages begin with an exclamation mark at the start of the + line, and give a description of the error, followed by another + line starting with the number, which refers to the line-number + in your document file which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> was processing when the + error was spotted. Here's an example, showing that the user + mistyped the <code class="command"><a name="c93">\tableofcontents</a></code> + command: + </p> + <blockquote><pre> +! Undefined control sequence. +l.6 \tableofcotnetns + </pre></blockquote> + <p>When <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> finds an error like this, it displays the + error message and pauses. You must type one of the following + letters to continue: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="center">Key</th> + <th valign="bottom" align="left" width="576">Meaning</th> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">x</tt></td> + <td valign="top" width="576" align="left">Stop immediately and e<strong>x</strong>it the program. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">q</tt></td> + <td valign="top" width="576" align="left">Carry on <strong>q</strong>uietly as best you can and + don't bother me with any more error + messages. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">e</tt></td> + <td valign="top" width="576" align="left">Stop the program but re-position the text in my + <strong>e</strong>ditor at the point + where you found the error.<sup><a href="#F1a"><i>a</i></a></sup></td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">h</tt></td> + <td valign="top" width="576" align="left">Try to give me more <strong>h</strong>elp. + </td> + </tr> + <tr> + <td valign="top" align="center"><tt class="keycap">i</tt></td> + <td valign="top" width="576" align="left">(followed by a correction) means <strong>i</strong>nput the correction in + place of the error and carry on.<sup><a href="#F1b"><i>b</i></a></sup></td> + </tr> + </table> + <div align="left"> + <ol class="footnotes" type="a"> + <li><a name="F1a">This only works if you're using an editor + which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can communicate with.</a></li> + <li><a name="F1b">This is only a temporary fix to get the file + processed. You still have to make that + correction in the editor.</a></li> + </ol> + </div> + </div> + <p>Some systems (<i><a name="p126">Emacs</a></i> is one + example) run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with a + ‘non-stop’ switch turned on, so it + will always process through to the end of the file, + regardless of errors, or until a limit is reached. + </p> + <ol class="footnotes" start="0"></ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.2 <a name="warn">Warnings</a></h3> + <p>Warnings don't begin with an exclamation mark: they are + just comments by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> about things you might want to look + into, such as + overlong or underrun lines (often caused by unusual hyphenations, for + example), pages running short or long, and other typographical + niceties (most of which you can ignore until later). + </p> + <p>Unlike other systems, which try to hide unevennesses in + the text — usually unsuccessfully — by interfering + with the letter-spacing, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> takes the view that the + author or editor should be able to contribute. While it is + certainly possible to set <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s parameters so that + the spacing is sufficiently sloppy that you will almost never + get a warning about badly-fitting lines or pages, you will + almost certainly just be delaying matters until you start to + get complaints from your readers or publishers. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3 Examples + </h3> + <p>Only a few common error messages are given here: those + most likely to be encountered by beginners. If you find + another error message not shown here, and it's not + clear what you should do, ask for help. + </p> + <p>Most error messages are self-explanatory, but be aware + that the place where + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> spots and reports an error may be later in the file + than the place where it actually occurred. For example if + you forget to close a curly brace which encloses, say, + italics, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> won't report this until something else + occurs which can't happen until the curly brace is + encountered (eg the end of the document!) Some errors can + only be righted by humans who can read and understand what + the document is supposed to mean or look like. + </p> + <p>Newcomers should remember to check the list of special + characters in <a href="chapter2.html#specials" title="sect1"></a>: a very large + number of errors when you are learning <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are due to + accidentally typing a special character when you didn't + mean to. This disappears after a few days as you get used to + them. + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.1 <a name="toomany">Too many }'s</a></h4><a name="I63"></a><a name="I64"></a><blockquote><pre> +! Too many }'s. +l.6 \date December 2004} + </pre></blockquote> + <p>The reason <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> thinks there are too many + <code class="literal">}</code>'s here is that the opening curly + brace is missing after the <code class="command"><a name="c94">\date</a></code> control + sequence and before the word <code class="literal">December</code>, + so the closing curly brace is seen as one too many (which + it is!). + </p> + <p>In fact, there are other things which can follow the + <code class="command"><a name="c95">\date</a></code> command apart from a date in curly + braces, so <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> cannot possibly guess that + you've missed out the opening curly brace — until + it finds a closing one! + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.2 <a name="undefcs">Undefined control sequence</a></h4><a name="I65"></a><a name="I66"></a><blockquote><pre> +! Undefined control sequence. +l.6 \dtae + {December 2004} + </pre></blockquote> + <p>In this example, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is complaining that it has + no such command (‘control + sequence’) as <code class="literal">\dtae</code>. + Obviously it's been mistyped, but only a human can + detect that fact: all <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> knows is + that <code class="literal">\dtae</code> is not a command it knows + about — it's undefined. + </p> + <p>Mistypings are the commonest source of error. If your + editor has drop-down menus to insert common commands and + environments, use them! + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.3 <a name="runaway">Runaway argument</a></h4><a name="I67"></a><a name="I68"></a><blockquote><pre> +Runaway argument? +{December 2004 \maketitle +! Paragraph ended before \date was complete. +<to be read again> + \par +l.8 + </pre></blockquote> + <p>In this error, the closing curly brace has been + omitted from the date. It's the opposite of the error in + <a href="chapter4.html#toomany">section 4.2.3.1</a>, and it results in + <code class="command"><a name="c96">\maketitle</a></code> trying to format the title + page while <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is still expecting more text for the + date! As + <code class="command"><a name="c97">\maketitle</a></code> creates new paragraphs on the + title page, this is detected and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> complains that + the + previous paragraph has ended but <code class="command"><a name="c98">\date</a></code> + is not yet finished. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.4 <a name="underfull">Underfull hbox</a></h4><a name="I69"></a><a name="I70"></a><blockquote><pre> +Underfull \hbox (badness 1394) in paragraph +at lines 28--30 +[][]\LY1/brm/b/n/10 Bull, RJ: \LY1/brm/m/n/10 +Ac-count-ing in Busi- +[94] + </pre></blockquote> + <p>This is a warning that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> cannot stretch the + line wide enough to fit, without making the spacing bigger + than its currently permitted maximum. The + <b><i><a name="badness">badness</a></i></b> (0–10,000) indicates + how severe this is (here you can probably ignore a badness + of 1394). It says what lines of your file it was + typesetting when it found this, and the number in square + brackets is the number of the page onto which the + offending line was printed. + </p> + <p>The codes separated by slashes are the typeface and + font style and size used in the line. Ignore them for the + moment: details are in <a href="chapter8.html#fdfiles">step 11</a> if you're + curious. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.5 <a name="overfull">Overfull hbox</a></h4><a name="I71"></a><a name="I72"></a><blockquote><pre> +[101] +Overfull \hbox (9.11617pt too wide) in paragraph +at lines 860--861 +[]\LY1/brm/m/n/10 Windows, \LY1/brm/m/it/10 see +\LY1/brm/m/n/10 X Win- + </pre></blockquote> + <p>And the opposite warning: this line is too + long by a shade over 9pt. The chosen hyphenation point + which minimises the error is shown at the end of the line + (<em>Win-</em>). Line numbers and page numbers + are given as before. In this case, 9pt is too much to + ignore (over 3mm or more than <span class="math">1/8</span>″), and a manual correction needs + making (such as a change to the hyphenation), or the + flexibility settings need changing (outside the scope of + this book). + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.2.3.6 <a name="nopkg">Missing package</a></h4><a name="I73"></a><a name="I74"></a><blockquote><pre> +! LaTeX Error: File `paralisy.sty' not found. + +Type X to quit or <RETURN> to proceed, +or enter new name. (Default extension: sty) + +Enter file name: + </pre></blockquote> + <p>When you use the <code class="command"><a name="c99">\usepackage</a></code> command + to request <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to use a certain package, it will look + for a file with the specified name and the filetype + <code>.sty</code>. In this case the user has + mistyped the name of the <span class="package"><a name="m29">paralist</a></span> + package, so it's easy to fix. However, if you get the name + right, but the package is not installed on your machine, + you will need to download and install it before continuing + (see <a href="chapter5.html#ctan">Chapter 5</a>). + </p> + </div> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3 <a name="dvi">Screen preview</a></h2><a name="I75"></a><p>Once the file has been processed without errors (or even + if there are still errors, but you want to see what it's + doing with them), standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will have created a + <small><a href="chapter4.html#DVI" class="acroref" name="A92" title="device-independent">DVI</a></small> file with the same name as your + document but the filetype + <code class="literal">.dvi</code>. If you're using + <i><a name="p127">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, a <small><a href="chapter4.html#PDF" class="acroref" name="A93" title="Portable Document Format">PDF</a></small> file will have been created, and you + can skip to + <a href="chapter4.html#pdfview">section 4.3.3</a>. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.1 <a name="dvipreview">Previewing DVI output</a></h3> + <p>To see the typeset output, click on the + <span class="guiicon">dvi</span> Preview toolbar icon or use the + <span class="guimenu">TeX</span>→<span class="guimenuitem">TeX View</span> + menu item. A <small><a href="chapter2.html#WYSIWYG" class="acroref" name="A94" title="What You See Is What You Get">WYSIWYG</a></small> preview window will appear with + your typeset display (see <a href="chapter4.html#dviview">Figure 4.1</a>). + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="bitmappreview">Bitmap preview fonts in DVI viewers</a></h4> + <p>The first time you display your <small><a href="chapter4.html#DVI" class="acroref" name="A95" title="device-independent">DVI</a></small> output with a new installation of + <span class="TEX">T<span class="E">E</span>X</span>, there may be a short pause if the previewer needs + to create the special bitmaps used for screen previews of + some fonts. These give greater accuracy on low-resolution + devices like screens. As you continue to work with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and your system accumulates these font files, the + pause for generating them will disappear. Recent versions + of <span class="TEX">T<span class="E">E</span>X</span> work directly with Type 1 fonts, however, + and don't have this delay. + </p> + </blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 4.1</i>: <a name="dviview">DVI preview</a></caption> + <div align="center" style="margin:12px"><img src="xdvi.png" width="75%"></div> + <hr> + </div> + <p>Most previewers have a wide range of scaling, zooming, + and measuring functions, but remember this is a + <em>picture</em> of your output: you cannot edit + the image. To change it, you always edit your source text + and reprocess the file. + </p> + <p>With <i><a name="p128">xdvi</a></i> and its derivatives + like <i><a name="p129">dviview</a></i>, you can leave the + display window open, and after you've reprocessed your + document through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, moving your mouse back into the + window will make the display update automatically (click + your mouse if your windowing system needs a + click to focus). + </p> + <p><a href="chapter4.html#dviview">Figure 4.1</a> shows + <i><a name="p130">xdvi</a></i> displaying a page. With a + standard three-button mouse you get three levels of + micro-zoom to let you inspect fine details. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.2 <a name="makeps">Previewing with PostScript</a></h3> + <p><a name="t7">PostScript</a> is a page description + language invented by Adobe and used in laser printers and + high-end typesetters. It's been the universal standard + for electronically-formatted print files for nearly two + decades, and all printers and publishers are accustomed to + using it. <small><a href="chapter4.html#PDF" class="acroref" name="A96" title="Portable Document Format">PDF</a></small> is a descendant of + PostScript, and is rapidly taking over, but + <a name="t8">PostScript</a> itself is still extremely + common, largely because it is very robust, and is usually an + <small><a href="chapter2.html#ASCII" class="acroref" name="A97" title="American Standard Code for Information Interchange">ASCII</a></small> file, which makes it very + portable and easy to generate (it is actually a programming + language in its own right). The drawback is the large size + of <a name="t9">PostScript</a> files, especially if + they contain bitmapped graphics. + </p> + <p>The <i><a name="p131">dvips</a></i> program which comes + with all <span class="TEX">T<span class="E">E</span>X</span> systems is used to generate + <a name="t10">PostScript</a> files directly from your + <small><a href="chapter4.html#DVI" class="acroref" name="A98" title="device-independent">DVI</a></small> output. These + <code>.ps</code> files can be viewed, printed, sent + to a platemaker or filmsetter, or put online for + downloading. + </p> + <p><small><a href="chapter4.html#DVI" class="acroref" name="A99" title="device-independent">DVI</a></small> viewers cannot render some + <a name="t11">PostScript</a> graphical manipulations + like rotating and deforming, so an alternative to viewing + the DVI file direct is to generate a + <a name="t12">PostScript</a> file and use a + <a name="t13">PostScript</a> viewer. You may have to to + do this for your publisher anyway, and many editors can be + configured to do this by default. Look for a + <span class="guiicon">dvips</span> toolbar icon or menu entry and + click on it. + </p> + <p>It's also very simple to do manually: let's + assume your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file was called + <code>mydoc.tex</code>, so processing it has created + <code>mydoc.dvi</code>. Just type: + </p> + <blockquote><pre> +dvips -o mydoc.ps mydoc + </pre></blockquote> + <p>in a command window (see <a href="chapter4.html#terminal">the example ‘Running <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in a terminal or console + window’ in section 4.1.2</a> for how to use one) + and <i><a name="p132">dvips</a></i> will create + <code>mydoc.ps</code> which can be used both for + previewing and printing. + </p> + <p>To view a <a name="t14">PostScript</a> file, you + need a <a name="t15">PostScript</a> previewer like + <i><a name="p133">GSview</a></i>, which works with the + <a name="t16">PostScript</a> interpreter + <i><a name="p134">Ghostscript</a></i>, which should have + been installed automatically along with your <span class="TEX">T<span class="E">E</span>X</span> system + (if not, install both now: <i><a name="p135">GSview</a></i> + is separately licensed and cannot legally be included in + some older <span class="TEX">T<span class="E">E</span>X</span> distributions, so you may have to download + it yourself). + </p> + <p><i><a name="p136">GSview</a></i> can be set to watch + the <a name="t17">PostScript</a> file and automatically + update the display any time the file is changed, without you + even having to click on the window. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.3.3 <a name="pdfview">Previewing with PDF</a></h3> + <p>The <a name="PDF" class="acroref">Portable Document Format</a> (<small>PDF</small>) + is a derivative of <a name="t18">PostScript</a>. + Whereas <a name="t19">PostScript</a> is a programming + language in itself, <small><a href="chapter4.html#PDF" class="acroref" name="A101" title="Portable Document Format">PDF</a></small> is in effect + the <em>result</em> of processing a document + through <a name="t20">PostScript</a>: it's a binary + file format, extremely compact, and well-supported on all + platforms. + </p> + <p>If your system is configured to generate <small><a href="chapter4.html#PDF" class="acroref" name="A102" title="Portable Document Format">PDF</a></small> files direct instead of <small><a href="chapter4.html#DVI" class="acroref" name="A103" title="device-independent">DVI</a></small> files, just open the + <code>.pdf</code> file using any <small><a href="chapter4.html#PDF" class="acroref" name="A104" title="Portable Document Format">PDF</a></small> previewer or browser. + </p> + <p>Most editors are configured to display a toolbar icon + which will pop up <i><a name="p137">Acrobat Reader</a></i> + or some other viewer with the current <small><a href="chapter4.html#PDF" class="acroref" name="A105" title="Portable Document Format">PDF</a></small> output file. + </p> + <p>Adobe's <i><a name="p138">Acrobat Reader</a></i> + cannot automatically update the view if you reprocess your + document, in the way that <i><a name="p139">xdvi</a></i> + and <i><a name="p140">GSview</a></i> can. You + have to close the display with <tt class="keycap">Ctrl</tt>–<tt class="keycap">W</tt> and reload the file with <tt class="keycap">Alt</tt>–<tt class="keycap">F</tt> <tt class="keycap">1</tt>. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Bitmap preview fonts in Acrobat Reader</a></h4> + <p>Acrobat Reader is extremely poor at rendering + Type 3 (bitmap) fonts. If you are using these (either + in an old <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installation which has not been + upgraded to Type 1, or with files using specialist + fonts only available in Type 3 format), you will see + a very fuzzy display at low magnifications. It will print + perfectly, but Acrobat Reader's display is + disappointing. The solution is to use a better previewer + or to upgrade to the Type 1 versions of the fonts + if possible, or both. If you need to + use Type 3 fonts in <small><a href="chapter4.html#PDF" class="acroref" name="A106" title="Portable Document Format">PDF</a></small>s, + you probably need to warn your readers to expect a fuzzy + display from Acrobat Reader (but good printout), and to + change to a better reader if they can. + </p> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#process"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>4.4 <a name="print">Printer output</a></h2><a name="I76"></a><p><span class="TEX">T<span class="E">E</span>X</span> systems print on almost anything from the simplest + dot-matrix printers to the biggest phototypesetters, including + all the laser printers and a host of other devices in between. + <em>How</em> you do it varies slightly according + to how you do your typesetting and previewing: + </p> + <blockquote> + <dl> + <dt><b>If you are using DVI</b></dt> + <dd> + <p>and you have a previewer which has a + <b>print</b> function configured for your + printer, you can use that. If not, create a + <a name="t21">PostScript</a> file and use + <i><a name="p141">GSview</a></i> instead. + </p> + </dd> + <dt><b>If you are using PDF</b></dt> + <dd> + <p>you can print directly from your <small><a href="chapter4.html#PDF" class="acroref" name="A107" title="Portable Document Format">PDF</a></small> viewer. Be careful about using + the ‘Fit to page’ options, as they will + change the size of your document so all your + measurements will be different. + </p> + </dd> + <dt><b>Non-<a name="t22">PostScript</a> printers</b></dt> + <dd> + <p>You can create a <a name="t23">PostScript</a> + file with <i><a name="p142">dvips</a></i> (see <a href="chapter4.html#makeps">section 4.3.2</a>) and use + <i><a name="p143">GSview</a></i> to print it + (<i><a name="p144">GSview</a></i> can print + <a name="t24">PostScript</a> files to almost any + make or model of non-<a name="t25">PostScript</a> + printer). + </p> + <p></p> + </dd> + <dt><b>If you have a real <a name="t26">PostScript</a> + printer</b></dt> + <dd> + <p>or you are using a system with built-in + <a name="t27">PostScript</a> printing support (such + as Linux or Mac), you can create and send + <a name="t28">PostScript</a> output directly from + your editor to the printer without the need to open it + in a previewer first. In + <i><a name="p145">Emacs</a></i>, for example, this is + what happens when you use the + <span class="guimenu"><span class="TEX">T<span class="E">E</span>X</span></span>→<span class="guimenuitem"><span class="TEX">T<span class="E">E</span>X</span> + Print</span> menu item. + </p> + </dd> + </dl> + </blockquote> + <p>Both the <i><a name="p146">dvips</a></i> program and all + the previewers that print tend to have facilities for printing + selected pages, printing in reverse, scaling the page size, + <a name="I77"></a><a name="I78"></a><a name="I79"></a> and printing only odd or even pages for two-sided + work. If you are using <a name="t29">PostScript</a> there + are programs for manipulating the output + (<i><a name="p147">pstops</a></i>), for example to perform + page imposition to get 4, 8, or 16 pages to a sheet for making + booklets (<i><a name="p148">psnup</a></i>). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 11</i>. Print it! + </h4> + <p>Show that you have understood the process of + typesetting, previewing, and printing, by displaying your + document and printing it. + </p> + <hr> + </blockquote> + <p>If you need a + non-<a name="t30">PostScript</a>/<i><a name="p149">Ghostscript</a></i> + solution, install a separate <span class="TEX">T<span class="E">E</span>X</span> print driver for your + printer. Some + may be supplied with your <span class="TEX">T<span class="E">E</span>X</span> installation, and there are + dozens more on <small><a href="chapter5.html#CTAN" class="acroref" name="A108" title="Comprehensive Archive Network">CTAN</a></small>. Their names all + start with <code>dvi</code> and are followed by an + abbreviation for the printer make or model like + <i><a name="p150">dvieps</a></i> for Epson, + <i><a name="p151">dvihp</a></i> for Hewlett-Packard, + <i><a name="p152">dvialw</a></i> for Apple LaserWriters, + etc.. Configure the driver to print directly to the print + queue, or pipe it to the print queue manually. On Linux with + an HP printer, for example, this would be + </p> + <blockquote><pre> +dvihp mydoc | lpr + </pre></blockquote> + <p>Microsoft Windows has no easy way to bypass the print + spool, but you can do it from an MS-DOS command window + with (using a HP printer as an example): + </p> + <blockquote><pre> +dvihp mydoc -o mydoc.hp +copy /b mydoc.hp LPT1: + </pre></blockquote> + <p>Read the documentation for the driver, as the options and + defaults vary. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter3.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter5.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter5.html b/info/beginlatex/html/chapter5.html new file mode 100644 index 0000000000..4e57992c95 --- /dev/null +++ b/info/beginlatex/html/chapter5.html @@ -0,0 +1,736 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:25--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 5 — CTAN, packages, and online help</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 5 — CTAN, packages, and online help</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class="current"><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="ctan">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">5</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>CTAN, packages, and online help</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#packages">Packages</a></li> + <li><a href="#pkginst">Downloading and installing packages</a></li> + <li><a href="#help">Online help</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>The <a name="CTAN" class="acroref">Comprehensive <span class="TEX">T<span class="E">E</span>X</span> Archive + Network</a> (<small>CTAN</small>) is a repository of Web and <small><a href="intro.html#FTP" class="acroref" name="A110" title="File Transfer Protocol">FTP</a></small> servers worldwide which contain copies of + almost every piece of free software related to <span class="TEX">T<span class="E">E</span>X</span> and + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p><small><a href="chapter5.html#CTAN" class="acroref" name="A111" title="Comprehensive Archive Network">CTAN</a></small> is based on three main + servers, and there are several online indexes available. There + are complete <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems for all platforms, + utilities for text and graphics processing, conversion programs + into and out of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, printer drivers, extra typefaces, and + (possibly the most important) the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages. The three + main servers are: + </p> + <ul> + <li> + <p><span class="TEX">T<span class="E">E</span>X</span> Users Group: <a href="http://www.ctan.org/"><tt>http://www.ctan.org/</tt></a></p> + </li> + <li> + <p>UK <span class="TEX">T<span class="E">E</span>X</span> Users Group: <a href="http://www.tex.ac.uk/"><tt>http://www.tex.ac.uk/</tt></a></p> + </li> + <li> + <p>Deutschsprachige Anwendervereinigung <span class="TEX">T<span class="E">E</span>X</span> e.V. (DANTE, + the German-speaking <span class="TEX">T<span class="E">E</span>X</span> Users Group); <a href="http://dante.ctan.org/"><tt>http://dante.ctan.org/</tt></a></p> + </li> + </ul> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <p><small><a href="chapter5.html#CTAN" class="acroref" name="A112" title="Comprehensive Archive Network">CTAN</a></small> should + <em>always</em> be your first port of call when + looking for a software update or a feature you want to use. + Please don't ask the <a href="chapter5.html#help" title="sect1">network help + resources</a> until you have checked <small><a href="chapter5.html#CTAN" class="acroref" name="A113" title="Comprehensive Archive Network">CTAN</a></small> and the <small><a href="chapter5.html#FAQ" class="acroref" name="A114" title="Frequently-Asked Questions">FAQ</a></small> (<a href="chapter5.html#faq">section 5.3.1</a>). + </p> + </td> + </tr> + </table> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1 <a name="packages">Packages</a></h2><a name="I80"></a><p>Add-on features for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are known as <b><i><a name="pack">packages</a></i></b>. Dozens of these are + pre-installed with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and can be used in your documents + immediately. They should all be stored in subdirectories of + <code>texmf/tex/latex</code> named after each package. + To find out what other packages are available and what they + do, you should use the <a href="http://www.ctan.org/search"><small><a href="chapter5.html#CTAN" class="acroref" name="A115" title="Comprehensive Archive Network">CTAN</a></small> search page</a> which includes a + link to Graham Williams' comprehensive package + catalogue. + </p> + <p>A package is a file or collection of files containing + extra <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands and programming which add new styling + features or modify those already existing. Installed package + files all end with <code>.sty</code> (there may be + ancillary files as well). + </p> + <p>When you try to typeset a document which requires a + package which is not installed on your system, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will + warn you with an error message that it is missing (see <a href="chapter4.html#nopkg">section 4.2.3.6</a>), and you can + then download the package and install it using the + instructions in <a href="chapter5.html#pkginst">section 5.2</a>. You can also + download updates to packages you already have (both the ones + that were installed along with your version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> as + well as ones you added). + </p> + <p>There is no limit to the number of packages you can have + installed on your computer (apart from disk space!), but there + is probably a physical limit to the number that can be used + inside any one <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document at the same time, although it + depends on how big each package is. In practice there is no + problem in having even a couple of dozen packages active (the + style file for this document uses over 30). + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1.1 <a name="colorpkg">Using an existing package</a></h3> + <p>To use a package already installed on your system, + insert a <code class="command"><a name="c100">\usepackage</a></code> command in your + document preamble with the package name in curly braces, as + we have already seen in earlier chapters. For example, to + use the <span class="package"><a name="m30">color</a></span> package, which lets + you typeset in colours (I warned you this was + coming!), you would type: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage{color} +\begin{document} +... +\end{document} + </pre></blockquote> + <p>You can include several package names in one + <code class="command"><a name="c101">\usepackage</a></code> command by separating the + names with commas, and you can have more than one + <code class="command"><a name="c102">\usepackage</a></code> command. + </p> + <p>Some packages allow optional settings in square + brackets. If you use these, you must give the package its + own separate <code class="command"><a name="c103">\usepackage</a></code> command, like + <span class="package"><a name="m31">geometry</a></span> shown below: + </p> + <blockquote><pre> +\documentclass[11pt,a4paper,oneside]{report} +\usepackage{pslatex,palatino,avant,graphicx,color} +\usepackage[margin=2cm]{geometry} +\begin{document} + +\title{\color{red}Practical Typesetting} +\author{\color{blue}Peter Flynn\\Silmaril Consultants} +\date{\color{green}December 2005} +\maketitle + +\end{document} + </pre></blockquote> + <p>(Incidentally, this is a rather crude way to do colours in + titling on a once-off basis: if it's for a repeatable + style we'll see in <a href="chapter9.html#macros">Chapter 9</a> how it can + be automated and kept out of the author's way.) + </p> + <p>Many packages can have additional formatting + specifications in optional arguments in square brackets, in + the same way as <span class="package"><a name="m32">geometry</a></span> + does. Read the documentation for the package concerned to + find out what can be done. + </p> + <blockquote class="exercise"><a name="geoex"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 12</i>. Add colour + </h4> + <p>Use the <span class="package"><a name="m33">color</a></span> package to add + some colour to your document. Stick with primary colours + for the moment. + </p> + <p>Use the <span class="package"><a name="m34">geometry</a></span> + package to change the margins. + </p> + <p>Reprocess and print your document if you have a colour + printer (monochrome printers should print it in shades of + grey). + </p> + <hr> + </blockquote> + <p><small><a href="chapter8.html#CMYK" class="acroref" name="A116" title="Cyan-Magenta-Yellow-Black">CMYK</a></small> and <small><a href="chapter8.html#RGB" class="acroref" name="A117" title="Red-Green-Blue">RGB</a></small> are not the only colour + models. <a name="ul">Uwe Kern</a>'s + <span class="package"><a name="m35">xcolor</a></span> package defines half a + dozen, and includes facilities for converting colour + values from one model to another. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.1.2 <a name="packagedoc">Package documentation</a></h3><a name="I81"></a><p>To find out what commands a package provides (and thus + how to use it), you need to read the documentation. In the + <code>texmf/doc</code> subdirectory of your + installation there should be directories full of + <code>.dvi</code> files, one for every package + installed. These can be previewed or printed like any other + <small><a href="chapter4.html#DVI" class="acroref" name="A118" title="device-independent">DVI</a></small> file (see + <a href="chapter4.html#dvipreview">section 4.3.1</a>). If your installation + procedure has not installed the documentation, the <small><a href="chapter4.html#DVI" class="acroref" name="A119" title="device-independent">DVI</a></small> files can all be downloaded from + <small><a href="chapter5.html#CTAN" class="acroref" name="A120" title="Comprehensive Archive Network">CTAN</a></small>. + </p> + <p>Before using a package, you should read the + documentation carefully, especially the subsection usually + called ‘User Interface’, which + describes the commands the package makes available. You + cannot just guess and hope it will work: you have to read it + and find out. + </p> + <p>See the next section for details of how to create the + documentation <code>.dvi</code> file for additional + packages you install yourself. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 13</i>. Read all about it + </h4> + <p>Find and view (or print) the documentation on the + <span class="package"><a name="m36">geometry</a></span> package you used in + <a href="chapter5.html#geoex">the example ‘Add colour’ in section 5.1.1</a>. + </p> + <p>Investigate some of the other package documentation + files in the directory. + </p> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2 <a name="pkginst">Downloading and installing packages</a></h2><a name="I82"></a><a name="I83"></a><p>Once you have identified a package you need and + haven't already got (or you have got it and need to + update it), use the indexes on any <small><a href="chapter5.html#CTAN" class="acroref" name="A121" title="Comprehensive Archive Network">CTAN</a></small> server to find the package you need + and the directory where it can be downloaded from. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.1 <a name="downloadpkg">Downloading packages</a></h3> + <p>What you need to look for is always <em>two + files</em>, one ending in <code>.dtx</code> + and the other in <code>.ins</code>. The first is a + DOC<span class="TEX">T<span class="E">E</span>X</span><a name="I84"></a> file, which combines the package program and its + documentation in a single file. The second is the + installation routine (much smaller). You <em>must + always</em> download <em>both</em> + files. + </p> + <p>If the two files are not there, it means one of two + things: + </p> + <ul> + <li> + <p><em>Either</em> the package is part of a + much larger bundle which you shouldn't normally update + unless you change version of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>;<sup><a href="#F29">1</a></sup></p> + </li> + <li> + <p><em>or</em> it's one of a few rare or + unusual packages still supplied as a single + <code>.sty</code> file intended for the now + obsolete <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> 2.09.<sup><a href="#F30">2</a></sup></p> + </li> + </ul> + <p><a name="packinst"></a>Download both files to a <b><i><a name="tempdir">temporary directory</a></i></b>. If you use + Windows, keep a folder like <code>C:\tmp</code> or + <code>C:\temp</code> for this; Mac and Linux systems + already have a <code>/tmp</code> directory. + </p> + <ol class="footnotes" start="1"> + <li><a name="F29">For example, there is no + <code>color.dtx</code> and + <code>color.ins</code> for the + <span class="package"><a name="m37">color</a></span> package because it + forms part of the <span class="package"><a name="m38">graphics</a></span> + bundle, which is installed on all <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems + anyway. Such packages change very rarely, as they + + form part of the core of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and are very + stable. In + general you should never try to update these + packages in isolation.</a></li> + <li><a name="F30">You can try to use these if you wish but they + are not guaranteed to work, and have now almost all + been replaced by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> versions. Always look for + the + <code>.dtx</code> and + <code>.ins</code> pair of files + first.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.2 <a name="installpkg">Installing a package</a></h3> + <p>There are four steps to installing a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + package: + </p><a name="I85"></a><ol> + <li><b><a name="extract">Extract the files</a></b><br><p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the <code>.ins</code> file. + That is, open the file in your editor and process it as + if it were a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document (which is it), or if you + prefer, type <code class="literal">latex</code> followed by the + <code>.ins</code> filename in a command window + in your temporary directory. + </p> + <p>This will extract all the files needed from the + <code>.dtx</code> file (which is why you must + have both of them present in the temporary directory). + Note down or print the names of the files created if + there are a lot of them (read the log file if you want + to see their names again). + </p> + </li> + <li><b><a name="dtxdoc">Create the documentation</a></b><br><p>Run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> on the <code>.dtx</code> file + twice. This will create a <code>.dvi</code> file + of documentation explaining what the package is for and + how to use it. Two passes through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> are needed in + order to resolve any internal crossreferences in the + text (a feature we'll come onto later). If you + prefer to create <small><a href="chapter4.html#PDF" class="acroref" name="A122" title="Portable Document Format">PDF</a></small> then run + <i><a name="p153">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> instead. View or + print this file in the usual manner (see <a href="chapter4.html#dvi">section 4.3</a>). + </p> + </li> + <li><b>Install the files</b><br><p>While the documentation is printing, move or copy + the files created in <a href="chapter5.html#extract">step 1</a> + from your temporary directory to the right place[s] in + your <span class="TEX">T<span class="E">E</span>X</span> <em>local</em> installation + directory tree — always your ‘local’ + directory tree, <i>a</i>) to prevent your new package accidentally + overwriting files in the main <span class="TEX">T<span class="E">E</span>X</span> + directories; and <i>b</i>) to avoid your newly-installed files being + overwritten when you next update your version of + <span class="TEX">T<span class="E">E</span>X</span>. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 5.1</i>. <a name="where">Where to put files from packages</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left">Type</th> + <th valign="bottom" align="left">Directory (under + <code>texmf-local/</code>) + </th> + <th valign="bottom" align="left" width="216">Description</th> + </tr> + <tr> + <td valign="top" align="left"><code>.cls</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/base</td> + <td valign="top" width="216" align="left" style="font-size:small;">Document class file</td> + </tr> + <tr> + <td valign="top" align="left"><code>.sty</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">Style file: the normal package + content + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.bst</code></td> + <td valign="top" align="left" style="font-family:monospace;">bibtex/bst/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> style + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.mf</code></td> + <td valign="top" align="left" style="font-family:monospace;">fonts/source/public/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">METAFONT outline</td> + </tr> + <tr> + <td valign="top" align="left"><code>.fd</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/mfnfss</td> + <td valign="top" width="216" align="left" style="font-size:small;">Font Definition files for METAFONT fonts</td> + </tr> + <tr> + <td valign="top" align="left"><code>.fd</code></td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/psnfss</td> + <td valign="top" width="216" align="left" style="font-size:small;">Font Definition files for PostScript + Type 1 fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.pfb</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/type1/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">PostScript Type 1 outline</td> + </tr> + <tr> + <td valign="top" align="left"><code>.afm</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/afm/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">Adobe Font Metrics for Type 1 + fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.tfm</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/tfm/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="TEX">T<span class="E">E</span>X</span> Font Metrics for METAFONT and + Type 1 fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.vf</code></td> + <td valign="top" align="left" style="font-family:monospace;">/fonts/vf/<code><u>foundry</u></code>/<code><u>typeface</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;"><span class="TEX">T<span class="E">E</span>X</span> virtual fonts + </td> + </tr> + <tr> + <td valign="top" align="left"><code>.dvi</code></td> + <td valign="top" align="left" style="font-family:monospace;">/doc</td> + <td valign="top" width="216" align="left" style="font-size:small;">package documentation</td> + </tr> + <tr> + <td valign="top" align="left"><code>.pdf</code></td> + <td valign="top" align="left" style="font-family:monospace;">/doc</td> + <td valign="top" width="216" align="left" style="font-size:small;">package documentation</td> + </tr> + <tr> + <td valign="top" align="left">others</td> + <td valign="top" align="left" style="font-family:monospace;">tex/latex/<code><u>packagename</u></code></td> + <td valign="top" width="216" align="left" style="font-size:small;">other types of file unless instructed + otherwise + </td> + </tr> + </table> + </div> + <p>‘The right place’ sometimes causes + confusion, especially if your <span class="TEX">T<span class="E">E</span>X</span> installation is old + or does not conform to the <span class="TEX">T<span class="E">E</span>X</span> + Directory Structure (UNDEFINED ACRONYM). For a <small><a href="chapter5.html#TDS" class="acroref" name="A124" title="Directory Structure">TDS</a></small>-conformant system, this is either + <i>a</i>) for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages, a suitably-named + subdirectory of + <code>texmf-local/tex/latex/</code><sup><a href="#F31">3</a></sup>; or <i>b</i>) a suitably-named subdirectory of + <code>texmf-local/</code> for files like + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> styles which are not just for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> but can + be used in other <span class="TEX">T<span class="E">E</span>X</span> systems. + </p> + <p>‘Suitably-named’ means sensible and + meaningful (and probably short). For a package like + <span class="package"><a name="m39">paralist</a></span>, for example, I'd call + the directory <code>paralist</code>. + </p> + <p>Often there is just a <code>.sty</code> file + to move but in the case of complex packages there may be + more, and they may belong in different locations. For + example, new <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> packages or font packages will + typically have several files to install. This is why it + is a good idea to create a subdirectory for the package + rather than dump the files into + <code>misc</code> along with other unrelated + stuff. + </p> + <p>If there are configuration or other files, read the + documentation to find out if there is a special or + preferred location to move them to. + </p> + </li> + <li><b><a name="texindex">Update your index</a></b><br><a name="I86"></a><p>Finally, run your <span class="TEX">T<span class="E">E</span>X</span> indexer program to update + the package database. This program comes with every + modern version of <span class="TEX">T<span class="E">E</span>X</span> and is variously called + <i><a name="p154">texhash</a></i>, + <i><a name="p155">mktexlsr</a></i>, or even + <i><a name="p156">configure</a></i>, or it might just + be a mouse click on a button or menu in your editor. + Read the documentation that came with your installation + to find out which it is. + </p> + </li> + </ol> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">This last step is <em>utterly + essential</em>, otherwise nothing will + work. + </p> + </blockquote> + <blockquote class="exercise"><a name="insttest"></a><hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 14</i>. Install a package + </h4> + <p>Download and install the + <span class="package"><a name="m40">paralist</a></span> package (which + implements inline lists). + </p> + <hr> + </blockquote> + <p>The reason this process has not been automated widely is + that there are still thousands of installations which do not + conform to the <small><a href="chapter5.html#TDS" class="acroref" name="A125" title="Directory Structure">TDS</a></small>, such as old + shared Unix systems and some Microsoft Windows systems, so + there is no way for an installation program to guess where + to put the files: <em>you</em> have to know + this. There are also systems where the owner, user, or + installer has chosen <em>not</em> to follow the + recommended <small><a href="chapter5.html#TDS" class="acroref" name="A126" title="Directory Structure">TDS</a></small> directory + structure, or is unable to do so for political or security + reasons (such as a shared system where she cannot write to a + protected directory). + </p> + <p>The reason for having the + <code>texmf-local</code> directory (called + <code>texmf.local</code> on some systems) is to + provide a place for local modifications or personal updates, + especially if you are a user on a shared or managed system + (Unix, Linux, VMS, Windows NT/2000/XP, etc.) where you may + not have write-access to the main <span class="TEX">T<span class="E">E</span>X</span> + installation directory tree. You can also have a personal + <code>texmf</code> subdirectory in your own login + directory. Your installation must be configured to look in + these directories first, however, so that any updates to + standard packages will be found there + <em>before</em> the superseded copies in the + main <code>texmf</code> tree. All modern <span class="TEX">T<span class="E">E</span>X</span> + installations should do this anyway, but if not, you can + edit <code>texmf/web2c/texmf.cnf</code> yourself. + There is an example in <a href="appendixA.html#cnf">this appendix</a>. + </p> + <ol class="footnotes" start="3"> + <li><a name="F31">See <a href="chapter5.html#rightplace">section 5.2.3</a> for how + to create a parallel structure in your local + directory if your installation didn't create + one for you.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.2.3 <a name="rightplace">Replicating the TDS</a></h3> + <p>The <a name="TDS" class="acroref"><span class="TEX">T<span class="E">E</span>X</span> Directory + Structure</a> (<small>TDS</small>) is documented at <a href="http://www.tug.org/tds/"><tt>http://www.tug.org/tds/</tt></a>. I find it useful to + make the directory structure of + <code>texmf-local</code> the same as that of + <code>texmf</code>. Examine the subdirectories of + <code>texmf/tex/latex/</code> for examples. For + updates of packages which came with your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + distribution (as distinct from new ones you are adding + yourself), you can then use the same subdirectory name and + position in <code>texmf-local/...</code> as the + original used in <code>texmf/...</code>. + </p> + <p>If you want to create the entire subdirectory structure + ready for use, you can do it under Unix with the following + commands: + </p> + <blockquote><pre> +cd /usr/TeX/texmf +find . -type d -exec mkdir -p /usr/TeX/texmf-local/{} \; + </pre></blockquote> + <p>If you are using Microsoft Windows, you can download + <i><a name="p157">Cygwin</a></i>, which provides you with + the standard Unix tools in a shell window. The above command + should also work on a Mac running OS X. In all cases, + if your installation directory is not + <code>/usr/TeX</code>, you need to substitute the + actual paths to your <code>texmf</code> and + <code>texmf-local</code> directories. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#ctan"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3 <a name="help">Online help</a></h2><a name="I87"></a><p>The indexes and documentation files on <small><a href="chapter5.html#CTAN" class="acroref" name="A128" title="Comprehensive Archive Network">CTAN</a></small> are the primary online resource for + self-help on specific packages, and you should read these + carefully before asking questions about packages. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.1 <a name="faq">The FAQ</a></h3> + <p>For general queries you should read the <a name="FAQ" class="acroref">Frequently-Asked Questions</a> (<small>FAQ</small>) document so + that you avoid wasting online time asking about things for + which there is already an easily-accessible answer. + </p> + <p>The <small><a href="chapter5.html#FAQ" class="acroref" name="A130" title="Frequently-Asked Questions">FAQ</a></small> is managed by the UK + <span class="TEX">T<span class="E">E</span>X</span> Users Group and can be found at <a href="http://www.tex.ac.uk/faq/"><tt>http://www.tex.ac.uk/faq/</tt></a> . + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.2 The <span class="TEX">T<span class="E">E</span>X</span>hax mailing list + </h3> + <p>Another support resource is the mailing list <a href="texhax@tug.org"><tt>texhax@tug.org</tt></a>. Again, feel free to ask + questions, but again, try to answer the question yourself + first (and say what you've tried in your + message). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.3 Web sites + </h3> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Users Group, as well as most local user + groups, maintains a web site (<a href="http://www.tug.org"><tt>http://www.tug.org</tt></a>) with lots of information + about various aspects of the <span class="TEX">T<span class="E">E</span>X</span> + system. See <a href="appendixB.html#tugform">this appendix</a> for information on + joining TUG. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.4 News + </h3> + <p>The Usenet newsgroup <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> is the principal forum for other + questions and answers about <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. Feel free to ask + questions, but + please do not ask frequently-asked questions: read the + <small><a href="chapter5.html#FAQ" class="acroref" name="A131" title="Frequently-Asked Questions">FAQ</a></small> instead. The people who answer + the questions do so voluntarily, unpaid, and in their own + time, so please don't treat this as a commercial + support service. + </p> + <p>To access Usenet news, type the following <small><a href="chapter6.html#URI" class="acroref" name="A132" title="Uniform Resource Indicator">URI</a></small> into your browser's + ‘Location’ or + ‘Address’ window: + <code>news:comp.text.tex</code> (if your browser + doesn't support Usenet news properly, change it for one + that does, like <a href="http://www.mozilla.org/"><i><a name="p158">Mozilla</a></i></a>), or download one of the many free newsreaders.<sup><a href="#F32">4</a></sup></p> + <ol class="footnotes" start="4"> + <li><a name="F32">Note that this means newsreaders for the Usenet News + (NNTP) service. It does <em>not</em> mean + syndication readers for RSS, which are a different thing + entirely — these are unfortunately also sometimes + referred to as ‘newsreaders’.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>5.3.5 Commercial support + </h3> + <p>If you need commercial levels of support, such as + 24-hour phone contact, or macro-writing services, you can + buy one of the several excellent commercial versions of + <span class="TEX">T<span class="E">E</span>X</span>, or contact a consultancy which deals with <span class="TEX">T<span class="E">E</span>X</span> + (details on the TUG Web site). + </p> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter4.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter6.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter6.html b/info/beginlatex/html/chapter6.html new file mode 100644 index 0000000000..a33a40227b --- /dev/null +++ b/info/beginlatex/html/chapter6.html @@ -0,0 +1,1674 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:30--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 6 — Other document structures</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 6 — Other document structures</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class="current"><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="otherdoc">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">6</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Other document structures</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#briefstruct">A little think about structure</a></li> + <li><a href="#lists">Lists</a></li> + <li><a href="#tables">Tables</a></li> + <li><a href="#figures">Figures</a></li> + <li><a href="#images">Images</a></li> + <li><a href="#verbatim">Verbatim text</a></li> + <li><a href="#boxes">Boxes, sidebars, and panels</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table> + <p>It is perfectly possible to write whole documents using + nothing but section headings and paragraphs. As mentioned in + <a href="chapter3.html#sections">section 3.5</a>, novels, for example, usually consist + just of chapters divided into paragraphs. However, it's more + common to need other features as well, especially if the + document is technical in nature or complex in structure. + </p> + <p>It's worth pointing out that + ‘technical’ doesn't necessarily mean + ‘computer technical’ or + ‘engineering technical’: it just means it + contains a lot of τηχνε (<i>tekne</i>), the + specialist material or artistry of its field. A literary + analysis such as <cite><a href="bibliography.html#macnamara" name="C28">La Textualisation de Madame + Bovary</a></cite> (on the + marginal notes in the manuscripts of Flaubert's novel) is every bit as + technical in the literary or linguistic field as the maintenance + manual for the Airbus 380 is in the aircraft engineering + field. + </p> + <p>This chapter covers the most common features needed in + writing structured documents: lists, tables, figures (including + images), sidebars like boxes and panels, and verbatim text + (computer program listings). In <a href="chapter7.html#texttools">Chapter 7</a> we + will cover footnotes, cross-references, citations, and other + textual tools. + </p> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.1 <a name="briefstruct">A little think about structure</a></h2> + <p>It's very easy to sit down at a keyboard with a + traditional wordprocessor and just start typing. If it's + a very short document, or something transient or relatively + unimportant, then you just want to type it in and make it look + ‘right’ by highlighting with the mouse + and clicking on font styles and sizes. + </p> + <p>In doing so, you may achieve the effect you wanted, but + your actions have left no trace behind of + <em>why</em> you made these changes. This is + usually unimportant for trivial or short-term documents, but + if you write longer or more complex documents, or if you often + write documents to a regular pattern, then making them + consistent by manual methods becomes a nightmare. + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s facilities for automation are based on you + providing this ‘why’ + information. + </p> + <p>If your documents have any of the features below, then you + have probably already started thinking about structure. + </p> + <ul> + <li> + <p>The document naturally divides into sections (parts, + chapters, etc.). + </p> + </li> + <li> + <p>The document is long.</p> + </li> + <li> + <p>There is lots of repetitive formatting in the + document. + </p> + </li> + <li> + <p>The document is complex (intellectually or + visually). + </p> + </li> + <li> + <p>There are lots of figures or tables (or examples, + exercises, panels, sidebars, etc.). + </p> + </li> + <li> + <p>Accuracy is important in formatting the + document. + </p> + </li> + <li> + <p>A master copy is needed for future reference or + reprinting. + </p> + </li> + <li> + <p>This is a formal or official document needing special + care and attention. + </p> + </li> + <li> + <p>It's <em>my</em> thesis, book, + leaflet, pamphlet, paper, article, etc. + <em>That</em>'s why I care. + </p> + </li> + <li> + <p>The document (or part of it) may need ongoing or + occasional re-editing and republishing. + </p> + </li> + </ul> + <p>If you've got that far, you're over half-way + done. Using a structural editor — even a simple + outliner — can make a huge difference to the quality of + your thinking because you are consciously organising your + thoughts before setting them down. And it can make just as big + a difference to your formatting as well: more consistent, + better presented, easier for the reader to navigate through, + and more likely to be read and understood — which is + presumably why you are writing the document in the first + place. + </p> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2 <a name="lists">Lists</a></h2><a name="I88"></a><p>Lists are useful tools for arranging thoughts in a + digestible format, usually a small piece of information at a + time. There are four basic types of list, shown in <a href="chapter6.html#listtypes">Table 6.1</a>. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 6.1</i>. <a name="listtypes">Types of lists</a></caption> + <tr> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Random or arbitrary lists</b></dt> + <dd>(sometimes called + ‘itemized’ or + ‘bulleted’ lists) where the + order of items is unimportant. The + items are often prefixed with a bullet or other + symbol for clarity or decoration, but are + sometimes simply left blank, looking like + miniature paragraphs (when they are known as + ‘simple’ or + ‘trivial’ lists). + </dd> + </dl> + </td> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Enumerated or sequential lists</b></dt> + <dd>(sometimes called + ‘numbered’ lists) where the + order of items is critical, such as sequences of + instructions or rankings of importance. The + enumeration can be numeric (Arabic or Roman), or + lettered (uppercase or lowercase), and can even be + programmed to be hierarchical (1.a.viii, 2.3.6, + etc.). + </dd> + </dl> + </td> + </tr> + <tr> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Descriptive or labelled lists</b></dt> + <dd>(sometimes called + ‘discussion’ lists), which + are composed of subheadings or topic labels + (usually unnumbered but typographically distinct), + each followed by one or more indented paragraphs + of discussion or explanation. + </dd> + </dl> + </td> + <td valign="top" width="48%" align="left" style=""> + <dl> + <dt><b>Inline lists</b></dt> + <dd>which are sequential in nature, just like + enumerated lists, but are + <i>a</i>) formatted <em>within</em> + their paragraph; and <i>b</i>) usually labelled with letters, like this example. The items + are often mutually inclusive or exclusive, with + the final item prefixed by + ‘and’ or + ‘or’ respectively. + </dd> + </dl> + </td> + </tr> + </table> + </div> + <p>There are actually two other types, segmented lists and + reference lists, but these are much rarer, and outside the + scope of this document. + </p><a name="I89"></a><p>The structure of lists in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is identical for each + type, but with a different environment name. Lists are another + example of this <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> technique (environments), where a pair + of matched commands surrounds some text which needs special + treatment. + </p> + <p>Within a list environment, list items are always + identified by the command <code class="command"><a name="c104">\item</a></code> (followed by + an item label in [square brackets] in the case of labelled + lists). You don't type the bullet or the number or the + formatting, it's all automated. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.1 Itemized lists + </h3><a name="I90"></a><a name="I91"></a><p>To create an itemized list, use the the + <span class="environment"><a name="e13">itemize</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{itemize} + +\item Itemized lists usually have a bullet; + +\item Long items use `hanging indentation', +whereby the text is wrapped with a margin +which brings it clear of the bullet used in +the first line of each item; + +\item The bullet can be changed for any other +symbol, for example from the \textsf{bbding} +or \textsf{pifont} package. + +\end{itemize} + </pre><ul> + <li> + <p>Itemized lists usually have a bullet;</p> + </li> + <li> + <p>Long items use ‘hanging + indentation’, whereby the text is + wrapped with a margin which brings it clear of the + bullet used in the first line of each item; + </p> + </li> + <li> + <p>The bullet can be changed for any other symbol, + for example from the <span class="package"><a name="m41">bbding</a></span> + or <span class="package"><a name="m42">pifont</a></span> package. + </p> + </li> + </ul> + </blockquote> + <p>The default list bullet is round and solid<sup><a href="#F33">1</a></sup> (舦) which is also available with the + command <code class="command"><a name="c105">\textbullet</a></code> if you load the + <span class="package"><a name="m43">textcomp</a></span> package. See <a href="chapter9.html#bullets">section 9.6.1</a> for details of how to change the + settings for list item bullets. + </p> + <ol class="footnotes" start="1"> + <li><a name="F33">If your browser font doesn't show it, don't + worry: most don't. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.2 Enumerated lists + </h3><a name="I92"></a><a name="I93"></a><p>To create an enumerated list, use the + <span class="environment"><a name="e14">enumerate</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{enumerate} + +\item Enumerated lists use numbering on each +item (can also be letters or roman numerals); + +\item Long items use `hanging indentation' +just the same as for itemized lists; + +\item The numbering system can be changed for +any level. + +\end{enumerate} + </pre><ol type="1"> + <li> + <p>Enumerated lists use numbering on each + item (can also be letters or roman numerals); + </p> + </li> + <li> + <p>Long items use ‘hanging + indentation’, just the same as for + itemized lists; + </p> + </li> + <li> + <p>The numbering system can be changed for any + level. + </p> + </li> + </ol> + </blockquote> + <p>See <a href="chapter6.html#numberschemes">section 6.2.6</a> for details of how + to change the numbering schemes for each level. + </p> + <p>In standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document classes, the vertical + spacing between items, and above and below the lists as a + whole, is more than between paragraphs. If you want + tightly-packed lists, use the + <span class="package"><a name="m44">mdwlist</a></span> package, which provides + ‘starred’ versions + (<span class="environment"><a name="e15">itemize*</a></span>, + <span class="environment"><a name="e16">enumerate*</a></span>, etc). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.3 <a name="desc">Description lists</a></h3><a name="I94"></a><a name="I95"></a><p>To create a description list, use the + <span class="environment"><a name="e17">description</a></span> environment: + </p> + <blockquote class="example"><pre> +\begin{description} + +\item[Identification:] description lists +require a topic for each item given in +square brackets; + +\item[Hanging indentation:] Long items use +this in the same way as all other lists; + +\item[Reformatting:] Long topics can be +reprogrammed to fold onto multiple lines. + +\end{description} + </pre><blockquote> + <dl> + <dt><b>Identification:</b></dt> + <dd> + <p>description lists require a topic for each item + given in square brackets; + </p> + </dd> + <dt><b>Hanging indentation:</b></dt> + <dd> + <p>Long items use this in the same way as all other + lists; + </p> + </dd> + <dt><b>Reformatting:</b></dt> + <dd> + <p>Long topics can be reprogrammed to fold onto + multiple lines. + </p> + </dd> + </dl> + </blockquote> + </blockquote> + <p>All three of these types of lists can have multiple + paragraphs per item: just type the additional paragraphs in + the normal way, with a blank line between each. So long as + they are still contained within the enclosing environment, + they will automatically be indented to follow underneath their + item. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.4 <a name="inlinelists">Inline lists</a></h3><a name="I96"></a><p>Inline lists are a special case as they require the use + of the <span class="package"><a name="m45">paralist</a></span> package which + provides the <span class="environment"><a name="e18">inparaenum</a></span> environment + (with an optional formatting specification in square + brackets): + </p> + <blockquote class="example"><pre> +\usepackage{paralist} +... +\textbf{\itshape Inline lists}, which are +sequential in nature, just like enumerated +lists, but are \begin{inparaenum}[\itshape +a\upshape)]\item formatted within their +paragraph; \item usually labelled with +letters; and \item usually have the final +item prefixed with `and' or +`or'\end{inparaenum}, like this example. + </pre><p class="example"><b><i><a name="inlines">Inline lists</a></i></b>, + which are sequential in nature, just like enumerated + lists, but are <i>a</i>) formatted within their paragraph; <i>b</i>) usually labelled with letters; and <i>c</i>) usually have the final + item prefixed with ‘and’ or + ‘or’, like this example. + </p> + </blockquote> + <p>See <a href="chapter8.html#typo">Chapter 8</a> for details of the + font-changing commands used in the optional argument to + <span class="environment"><a name="e19">inparaenum</a></span>. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 15</i>. List practice + </h4> + <p>Add some lists to your document. Pick any two of the + ones described here to practice with. + </p> + <p>If you successfully installed + <span class="package"><a name="m46">paralist</a></span> in <a href="chapter5.html#insttest">the example ‘Install a package’ in section 5.2.2</a> then you can use inline lists as + described in <a href="chapter6.html#inlinelists">section 6.2.4</a>. + </p> + <hr> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.5 Reference lists and segmented lists + </h3> + <p>Reference lists are visually indistinguishable from + numbered or lettered lists, but the numbering or lettering + does <em>not</em> imply a sequence. The numbers + or letters are just used as labels so that the items can be + referred to from elsewhere in the text (as in ‘see + item 501(c)3’). In this sense they are really a + kind of sub-sectional division, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + <code class="command"><a name="c106">\paragraph</a></code> or + <code class="command"><a name="c107">\subparagraph</a></code> commands (with appropriate + renumbering) would probably be a far better solution than + using a list. Label them and refer to them with + <code class="command"><a name="c108">\label</a></code> and <code class="command"><a name="c109">\ref</a></code> as for + any other cross-reference (see <a href="chapter7.html#xrefs">section 7.4</a>). + </p> + <p>Segmented lists are a highly specialised structure and + outside the scope of this document. For details of their + usage, see the the chapter ‘Segmentation and + Alignment’ in <cite><a href="bibliography.html#teiguide" name="C30">Guidelines for the Text Encoding Initiative</a></cite>. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.2.6 <a name="numberschemes">Lists within lists</a></h3> + <p>You can start a new list environment within the item of + an existing list, so you can embed one list inside another + up to four deep. The lists can be of any type, so you can + have a description list containing an item in which there is + a numbered sub-list, within which there is an item + containing a bulleted sub-sub-list. + </p> + <ol type="1"> + <li> + <p>by default an outer enumerated list is numbered in + Arabic numerals; + </p> + <ol type="a"> + <li> + <p>an embedded enumerated list is lettered in + lowercase; + </p> + <ol type="i"> + <li> + <p>a third level is numbered in lowercase Roman + numerals; + </p> + <ol type="A"> + <li> + <p>the fourth level uses uppercase + alphabetic letters. + </p> + </li> + </ol> + </li> + </ol> + </li> + </ol> + </li> + </ol> + <p>Multiple embedded lists automatically change the bullet + or numbering scheme so that the levels don't get + confused, and the spacing between levels is adjusted to + become fractionally tighter for more deeply nested + levels. + </p> + <p>These are only defaults and can easily be changed by + redefining the relevant set of values. You could also add a + fifth and further levels, although I suspect that would mean + your document structure needed some careful analysis, as + lists embedded five deep will probably confuse your + readers. + </p> + <p>The values for lists come in pairs: for each level there + is a counter to count the items and a command to produce the + label:<sup><a href="#F34">2</a></sup></p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="right">Level</th> + <th valign="bottom" align="center">Default</th> + <th valign="bottom" align="left">Counter</th> + <th valign="bottom" align="left">Label command</th> + </tr> + <tr> + <td valign="top" align="right">1</td> + <td valign="top" align="center">digit.</td> + <td valign="top" align="left"><tt><i><a name="l21">enumi</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c110">\theenumi</a></code></td> + </tr> + <tr> + <td valign="top" align="right">2</td> + <td valign="top" align="center">(letter)</td> + <td valign="top" align="left"><tt><i><a name="l22">enumii</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c111">\theenumii</a></code></td> + </tr> + <tr> + <td valign="top" align="right">3</td> + <td valign="top" align="center">roman.</td> + <td valign="top" align="left"><tt><i><a name="l23">enumiii</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c112">\theenumiii</a></code></td> + </tr> + <tr> + <td valign="top" align="right">4</td> + <td valign="top" align="center">LETTER.</td> + <td valign="top" align="left"><tt><i><a name="l24">enumiv</a></i></tt></td> + <td valign="top" align="left"><code class="command"><a name="c113">\theenumiv</a></code></td> + </tr> + </table> + </div> + <p>Note that each counter and command ends with the Roman + numeral value of its level (this is to overcome the rule + that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> commands can only be made of + letters — digits wouldn't work here). To + change the format of a numbered list item counter, just + renew the meaning of its label: + </p> + <blockquote><pre> +\renewcommand{\theenumi}{\Alph{enumi}} +\renewcommand{\theenumii}{\roman{enumii}} +\renewcommand{\theenumiii}{\arabic{enumiii}} + </pre></blockquote> + <p><a name="thecounter"></a>This would make the + outermost list use uppercase letters, the second level use + lowercase roman, and the third level use ordinary Arabic + numerals. The fourth level would remain unaffected. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 16</i>. Nesting + </h4> + <p>Extend your use of lists by nesting one type inside a + different one. + </p> + <hr> + </blockquote> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Lists: a caution to the unwary</a></h4> + <p>Treat lists with care: people sometimes use tables for + labelled information which is really a list and would be + better handled as such. They often do this because their + wordprocessor has no way to do what they want (usually to + place the item label level with the description or + explanation) <em>except</em> by using a table, + hence they are misled into believing that their text is + really a table when it's actually not. + </p> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F34">In fact, any time you define a counter in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + you automatically get a command to reproduce its value. + So if you defined a new counter <tt><i><a name="l19">example</a></i></tt> to use in a teaching + book, by saying <code class="literal">\newcounter{example}</code>, + that automatically makes available the command + <code class="literal">\theexample</code> for use when you want to + display the current value of <tt><i><a name="l20">example</a></i></tt>.</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3 <a name="tables">Tables</a></h2><a name="I97"></a><p>Tabular typesetting is the most complex and time-consuming + of all textual features to get right. This holds true whether + you are typing in plain-text form, using a wordprocessor, + using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, using <small><a href="chapter10.html#HTML" class="acroref" name="A133" title="HyperText Markup Language">HTML</a></small> or + <small><a href="chapter10.html#XML" class="acroref" name="A134" title="Extensible Markup Language">XML</a></small>, using a <small><a href="preface.html#DTP" class="acroref" name="A135" title="desktop publishing">DTP</a></small> system, or some other text-handling + package. Fortunately, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides a + table model with a mixture of defaults and configurability to + let it produce very high quality tables with a minimum of + effort. + </p> + <blockquote class="warning"> + <h4><img src="warning.png" align="middle" alt="!!!"> <a name="">Terminology</a></h4> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, in common with standard typesetting + practice, uses the word ‘Table’ to + mean a formal textual feature, numbered and with a caption, + referred to from the text (as in ‘See + Table 5’). Sometimes you can get + ‘informal’ tables, which simply occur + between two paragraphs, without caption or number. + </p> + <p>The arrangement of information in rows and columns + <em>within</em> either of these structures is + called a ‘tabulation’ or + ‘tabular matter’. + </p> + <p>It is important to keep this distinction firmly in mind + for this section. + </p> + </blockquote> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.1 <a name="floats">Floats</a></h3><a name="I98"></a><p>Tables and Figures are what printers refer to as + ‘floats’. This means they are not + part of the normal stream of text, but separate entities, + positioned in a part of the page to themselves (top, middle, + bottom, left, right, or wherever the designer specifies). + They always have a caption describing them and they are + always numbered so they can be referred to from elsewhere in + the text. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> automatically floats Tables and Figures, + depending on how much space is left on the page at the point + that they are processed. If there is not enough room on the + current page, the float is moved to the top of the next + page. This can be changed by moving the Table or Figure + definition to an earlier or later point in the text, or by + adjusting some of the parameters which control automatic + floating. + </p> + <p>Authors sometimes have many floats occurring in rapid + succession, which raises the problem of how they are + supposed to fit on the page and still leave room for text. + In this case, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> stacks them all up and prints them + together if possible, or leaves them to the end of the + chapter in protest. The skill is to space them out within + your text so that they intrude neither on the thread of your + argument or discussion, nor on the visual balance of the + typeset pages. But this is a skill few authors have, and + it's one point at which professional typographic advice + or manual intervention may be needed. + </p> + <p>There is a <span class="environment"><a name="e20">float</a></span> package which lets + you create new classes of floating object (perhaps Examples + or Exercises). + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.2 Formal tables + </h3> + <p>To create a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Table, use the <span class="environment"><a name="e21">table</a></span> + environment containing a <code class="command"><a name="c114">\caption</a></code> command + where you type the caption, and a <code class="command"><a name="c115">\label</a></code> + command to give the Table a label by which you can refer to + it. + </p> + <blockquote><pre> +\begin{table} +\caption{Project expenditure to year-end 2006} +\label{ye2006exp} +... +\end{table} + </pre></blockquote> + <p>Numbering is automatic, but the <code class="command"><a name="c116">\label</a></code> + command <em>must follow</em> the + <code class="command"><a name="c117">\caption</a></code> command, not precede it. The + numbering automatically includes the chapter number in + document classes where this is appropriate (but this can of + course be overridden). The <code class="command"><a name="c118">\caption</a></code> + command has an optional argument to provide a short caption + if the full caption would be too long for the <a href="chapter3.html#loflot" title="para">List of Tables</a>: + </p> + <blockquote><pre> +\caption[Something short]{Some very long caption that +will only look reasonable in the full figure.} + </pre></blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.3 Tabular matter + </h3> + <p>Within a Table, you can either typeset the tabular + matter using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, or include a table captured as an + image from elsewhere. We will see how to include images in + <a href="chapter6.html#figures">section 6.4</a> on Figures, where they are more + common. + </p> + <p>To typeset tabular matter, use the + <span class="environment"><a name="e22">tabular</a></span> environment. The + <code class="literal">\begin{tabular}</code> command must be followed + by a compulsory second argument in curly braces giving the + alignment of the columns. These are specified for each + column using one of single letters <code class="literal">l</code>, + <code class="literal">c</code>, and <code class="literal">r</code> for + left-aligned, centered, or right-aligned text, or the letter + <code class="literal">p</code> followed by a width argument if you + want a long entry to wrap to several lines (a miniature + paragraph as a single cell on each row). + </p> + <p><span class="TEX">T<span class="E">E</span>X</span>'s original tabular settings were designed + for classical numerical tabulations, where each cell + contains a single value. The <code class="literal">p</code> + specification allows a cell to be a miniature paragraph set + to a specific width. These are <code class="literal">p</code> column + specifications are <em>not</em> multi-row + entries, they are single cells which contain multiple lines + of typesetting: the distinction is very important. + Auto-adjusting space between columns is possible with the + <span class="package"><a name="m47">tabularx</a></span> package, but the + auto-resizing column widths used in web pages are not + available in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>The <span class="package"><a name="m48">array</a></span> package provides for + many other typographic variations such as left-aligned, + right-aligned, and centred multi-line columns, and other + packages provide decimal-aligned columns, row-spanning and + column-spanning, multi-page, and rotated (landscape format) + tables. + </p> + <div align="center" class="table"> + <table> + <caption><i>Table 6.1</i>. <a name="ye2006exp">Project expenditure to year-end 2006</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="center"></th> + <th valign="bottom" align="left">Item</th> + <th valign="bottom" align="right">€ Amount</th> + </tr> + <tr> + <td valign="top" align="center">a)</td> + <td valign="top" align="left">Salaries (2 research assistants)</td> + <td valign="top" align="right">28,000</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Conference fees and travel expenses</td> + <td valign="top" align="right">14,228</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Computer equipment (5 workstations)</td> + <td valign="top" align="right">17,493</td> + </tr> + <tr> + <td valign="top" align="center"></td> + <td valign="top" align="left">Software</td> + <td valign="top" align="right">3,562</td> + </tr> + <tr> + <td valign="top" align="center">b)</td> + <td valign="top" align="left">Rent, light, heat, etc.</td> + <td valign="top" align="right">1,500</td> + </tr> + <tr class="headfoot"> + <th valign="top" align="center"></th> + <th valign="top" align="left">Total</th> + <th valign="top" align="right">64,783</th> + </tr> + </table> + <div align="left"> + <p><small>The Institute also contributes to (a) and + (b).</small></p> + </div> + </div> + <p>As an example, a tabular setting with three columns, the + first one centered, the second left-aligned, and the third + one right-aligned, would therefore be specified as + <code class="literal">{clr}</code>, as in the example below. Note the + use of indentation to make the elements of the table clear + for editing, and note also how the typeset formatting is + unaffected by this (see <a href="chapter6.html#ye2006exp">Table 6.1</a>). + </p> + <blockquote><pre> +\begin{table} + \caption{Project expenditure to year-end 2006} + \label{ye2006exp} + \begin{center} + \begin{tabular}{clr} + &Item&\EUR\ Amount\\ + \hline + a)&Salaries (2 research assistants)&28,000\\ + &Conference fees and travel expenses&14,228\\ + &Computer equipment (5 workstations)&17,493\\ + &Software&3,562\\ + b)&Rent, light, heat, etc.&1,500\\\cline{3-3} + &Total&64,783 + \end{tabular} + \par\medskip\footnotesize +The Institute also contributes to (a) and (b). + \end{center} +\end{table} + </pre></blockquote> + <p>You do not need to format the tabular data in your + editor: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does this for you when it typesets the + table, using the column specifications you provided. Extra + space is automatically added between columns, and can be + adjusted by changing the <tt>\<a name="d25">tabcolsep</a></tt> dimension. + <a name="tak">Takaaki Ota</a> provides an excellent Tables mode for + <i><a name="p159">Emacs</a></i> which provides a + spreadsheet-like interface and can generate <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> table + source code (see <a href="chapter6.html#tabmode">Figure 6.1</a>). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="tabmode">Tables mode for + <i><a name="p160">Emacs</a></i></a></caption> + <div align="center" style="margin:12px"><img src="table.png" width="75%"></div> + <hr> + </div> + <p>It is conventional to centre the tabular setting within + the Table, using the <span class="environment"><a name="e23">center</a></span> environment + (note US spelling) or the <code class="command"><a name="c119">\centering</a></code> + command. The entries for each cell are separated by an + ampersand character (<code class="literal">&</code>) and the end + of a row is marked by + the double-backslash (<code class="literal">\\</code>). + </p> + <p>The <code class="command"><a name="c120">\hline</a></code> command draws a rule across + all columns and the <code class="command"><a name="c121">\cline</a></code> command draws a + rule across a range of columns (here, under column three + only — the argument needs a range). If used, these commands <em>follow</em> + the + <code class="literal">\\</code> of the row they apply to. There are + some extra formatting commands after the tabular material in + the example. These are explained in + <a href="chapter8.html#typo">Chapter 8</a>. + </p> + <p>If there is no data for a cell, just don't type + anything — but you still need the + <code class="literal">&</code> separating it from the next + column's data. The astute reader will already have + deduced that for a table of + <span class="math"><i>n</i></span> columns, there must always be + <span class="math"><i>n</i>−1</span> ampersands in each row. The exception to + this is when the <code class="command"><a name="c122">\multicolumn</a></code> command is + used to create cells which span multiple columns. There is + also a package (<span class="environment"><a name="e24">multirow</a></span>) to enable + cells to span multiple rows, but both of these techniques + are outside the scope of this document. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.3.4 Tabular techniques for alignment + </h3> + <p>As mentioned earlier, it's also perfectly possible + to typeset tabular matter outside a formal Table, where you + want to lay out an informal tabulation between paragraphs + where a fully floating formal Table would be unnecessary + (these are usually quite short: there are several of them in + this document). + </p> + <p>Tabular mode can also be used wherever you need to align + material side by side, such as in designing letterheads, + where you may want your company logo and address on one side + and some other information on the other. + </p> + <p>By default, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesets + <span class="environment"><a name="e25">tabular</a></span> environments inline to the + surrounding text, so if you want your alignment displayed by + itself, put it inside a positioning environment like + <span class="environment"><a name="e26">center</a></span>, + <span class="environment"><a name="e27">flushright</a></span>, or + <span class="environment"><a name="e28">flushleft</a></span>, or leave a blank line or + <code class="command"><a name="c123">\par</a></code> before and after so it gets typeset + separately. + </p> + <p>There is much more to tabular setting: + full details are in the manuals mentioned in + <a href="foreword.html#docs">the last paragraph in the Foreword</a>. One final note to remind you of the + automated crossreferencing features: because the example + table is labelled, it can be referenced from anywhere in the + document as <a href="chapter6.html#ye2006exp">Table 6.1</a> just by using + <code class="literal">\ref{ye2006exp}</code>, regardless of how much + the surrounding document or structure is moved or + edited. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 17</i>. Create a tabulation + </h4> + <p>Create one of the following in your document:</p> + <ul> + <li> + <p>a formal Table with a caption showing the number + of people in your class broken down by age and + sex; + </p> + </li> + <li> + <p>an informal tabulation showing the price for three + products; + </p> + </li> + <li> + <p>the logo <img src="y2klogo.png" align="middle" height="10px" alt="\setlength{\fboxsep}{-3pt}\setlength{\fboxrule}{.4pt} \fbox{\begin{tabular}{cc}\tiny YEAR\\[-.8em]\tiny 2 0 0 0\vrule depth1em width0pt\end{tabular}}" width="48"> (hint: <a href="chapter6.html#fbox">section 6.7.2</a>) + </p> + </li> + </ul> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.4 <a name="figures">Figures</a></h2><a name="I99"></a><a name="I100"></a><p>As explained in <a href="chapter6.html#floats">section 6.3.1</a>, Figures and + Tables float to a vacant part of the page, as they are not + part of the sequence of sentences making up your text, but + illustrative objects that you refer to. + </p> + <p>Figures can contain text, diagrams, pictures, or any other + kind of illustration. To create a figure, use the + <span class="environment"><a name="e29">figure</a></span> environment: like Tables, they + automatically get numbered, and must include a caption (with a + label after the caption, if needed, exactly the same as for + Tables) + </p> + <blockquote><pre> +\begin{figure} +\caption{Total variable overhead variance (after + \citeauthor[p.191]{bull}} +\label{workeff} +\begin{center} +\includegraphics[width=.75\columnwidth]{diagram} +\end{center} +\end{figure} + </pre></blockquote> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="workeff">Total variable overhead variance (after <a href="bibliography.html#bull" name="K31">Bull</a> (1972) p.191)</a></caption> + <div align="center" style="margin:12px"><img src="diagram.png" width="75%"></div> + <hr> + </div> + <p>You can see that the structure is very similar to the + <span class="environment"><a name="e30">table</a></span> environment, but in this case we + have a graphic included. Details of this command + (<code class="command"><a name="c124">\includegraphics</a></code>) are in the next section. + Details of the bibliographic citation mechanism are in <a href="chapter7.html#bib">section 7.4.2</a></p> + <p>The content of the Figure could of course also be textual, + in the form of a list or a text diagram. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a simple + drawing environment called <span class="environment"><a name="e31">picture</a></span>, which + lets you create a limited set of lines and curves, but for a + diagram of any complexity, you should use a standard vector + drawing program (see <a href="chapter6.html#graphictypes">section 6.5.1</a>). + </p> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5 <a name="images">Images</a></h2><a name="I101"></a><a name="I102"></a><p>Images (graphics) can be included anywhere in a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + document, although in most cases of formal documents they will + occur in Figures (see preceding section). To use graphics, you + need to use the <span class="package"><a name="m49">graphicx</a></span> package in + your preamble: + <code class="literal">\usepackage{graphicx}</code><sup><a href="#F35">3</a></sup></p> + <p>This enables the command + <code class="command"><a name="c125">\includegraphics</a></code> which is used to insert an + image in the document. The command is followed by the name of + your graphics file <em>without the filetype</em>, + for example: <code class="literal">\includegraphics{myhouse}</code> + (we'll see in a minute why you don't include the + filetype). + </p> + <p>In most cases you should just make sure the image file is + in the same folder (directory) as the document you use it in. + This avoids a lot of messing around remembering where you put + the files. If you have images you want to use in several + different documents in different places on your disk, there is + a way to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> where to look (see <a href="chapter6.html#graphicsdir">section 6.5.2</a>). + </p> + <p>For standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> with + <i><a name="p161">dvips</a></i>, graphics files + <em>must</em> be in <a name="EPS" class="acroref">Encapsulated + PostScript</a> (<small>EPS</small>) format: this has been the publishing + industry standard for portable graphics for many years, and no + other format will work portably in standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>.<sup><a href="#F36">4</a></sup></p> + <p>All good graphics packages can save images as <small><a href="chapter6.html#EPS" class="acroref" name="A141" title="Encapsulated PostScript">EPS</a></small>, but be very careful because some + packages, especially on Microsoft Windows platforms, use a + very poor quality driver, which creates very poor quality + <small><a href="chapter6.html#EPS" class="acroref" name="A142" title="Encapsulated PostScript">EPS</a></small> files. If in doubt, check with + an expert. If you find an <small><a href="chapter6.html#EPS" class="acroref" name="A143" title="Encapsulated PostScript">EPS</a></small> + graphic doesn't print, the chances are it's been + badly made by the graphics software. Download Adobe's own + PostScript driver from their Web site instead. + </p> + <p>For <i><a name="p162">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, graphics files + can be in <a name="PNG" class="acroref">Portable Network + Graphic</a> (<small>PNG</small>), <a name="JPG" class="acroref">Joint Photographic + Experts Group</a> (<small>JPG</small>), or <small><a href="chapter4.html#PDF" class="acroref" name="A146" title="Portable Document Format">PDF</a></small> + format, <em>not</em> <small><a href="chapter6.html#EPS" class="acroref" name="A147" title="Encapsulated PostScript">EPS</a></small>. This means if you want to use both + standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> as well + as <i><a name="p163">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, you need to keep + your graphics in two formats, <small><a href="chapter6.html#EPS" class="acroref" name="A148" title="Encapsulated PostScript">EPS</a></small> + and one of the others. This is why you don't include the + filetype in the filename you give with + <code class="command"><a name="c126">\includegraphics</a></code>: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will assume + <small><a href="chapter6.html#EPS" class="acroref" name="A149" title="Encapsulated PostScript">EPS</a></small> and + <i><a name="p164">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> will look for <small><a href="chapter6.html#JPG" class="acroref" name="A150" title="Joint Photographic Experts Group">JPG</a></small>, <small><a href="chapter6.html#PNG" class="acroref" name="A151" title="Portable Network Graphic">PNG</a></small> or + <small><a href="chapter4.html#PDF" class="acroref" name="A152" title="Portable Document Format">PDF</a></small> files matching the name. + </p> + <p>The <code class="command"><a name="c127">\includegraphics</a></code> command can take + optional arguments within square brackets before the filename + to specify either the height or width, and the other dimension + will automatically change to scale. If you specify both, the + image will be distorted to fit. You can scale an image by a + factor instead of specifying height or width; clip it to + specified coordinates; and rotate it in either direction. + Multiple optional arguments are separated with commas. + </p> + <blockquote class="example"><pre> +\begin{center} +\includegraphics[width=3cm]{twithcat} +\end{center} + </pre><div align="center" style="margin:12px"><img src="twithcat.png" width="168"></div> + </blockquote> + <p>For details of all the arguments, see the documentation on + the <span class="package"><a name="m51">graphicx</a></span> package or a copy of the + <cite><a href="bibliography.html#companion" name="C32">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite>. This package also + includes commands to <img src="rotate.png" align="middle" height="10px" alt="\raisebox{1ex}{\rotatebox{180}{rotate}}">, + <img src="mirror.png" align="middle" height="10px" alt="\scalebox{-1}[1]{mirror}">, and + <img src="scale.png" align="middle" height="10px" alt="\scalebox{2}[1]{scale}"> text. + <a name="I103"></a><a name="I104"></a><a name="I105"></a></p> + <p>It is in fact possible to tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to generate the + right file format by itself, but this requires an external + command-line graphics converter, and as it gets done afresh + each time, it slows things down rather a lot. + </p> + <p><small><a href="chapter6.html#EPS" class="acroref" name="A153" title="Encapsulated PostScript">EPS</a></small> files, especially bitmaps, + can be very large indeed, because they are stored in <small><a href="chapter2.html#ASCII" class="acroref" name="A154" title="American Standard Code for Information Interchange">ASCII</a></small> format. + <a name="sw">Staszek Wawrykiewicz</a> has drawn my attention to a useful MS-DOS program to + overcome this, called <i><a name="p165">cep</a></i> + (‘Compressed Encapsulated Postscript’) available + from <small><a href="chapter5.html#CTAN" class="acroref" name="A155" title="Comprehensive Archive Network">CTAN</a></small> in the + <code>support/pstools</code> directory, which can + compress <small><a href="chapter6.html#EPS" class="acroref" name="A156" title="Encapsulated PostScript">EPS</a></small> files to a fraction of + their original size. The original file can be replaced by the + new smaller version and still used directly with + <code class="command"><a name="c128">\includegraphics</a></code>. + </p> + <ol class="footnotes" start="3"> + <li><a name="F35">You may find a lot of old files which use a package + called <span class="package"><a name="m50">epsf</a></span>. Don't use it. + It's obsolete.</a></li> + </ol> + <ol class="footnotes" start="4"> + <li><a name="F36">Some distributions of <span class="TEX">T<span class="E">E</span>X</span> systems allow other + formats to be used, such as <small><a href="chapter6.html#PNG" class="acroref" name="A137" title="Portable Network Graphic">PNG</a></small>, + <a name="BMP" class="acroref">Microsoft Bitmap</a> (<small>BMP</small>) files, + Hewlett-Packard's <a name="PCL" class="acroref">Printer Control + Language</a> (<small>PCL</small>) files, and others; but you cannot + send such documents to other <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users and expect + them to work if they don't have the same distribution + installed as you have. Stick to <small><a href="chapter6.html#EPS" class="acroref" name="A140" title="Encapsulated PostScript">EPS</a></small>.</a></li> + </ol> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5.1 <a name="graphictypes">Making images</a></h3> + <p>There are two types of image: bitmaps and + vectors. + </p> + <blockquote> + <dl> + <dt><b>Bitmaps</b></dt> + <dd> + <p>Bitmap images are made of coloured dots, so if you + enlarge them, they go jagged at the edges, and if you + shrink them, they go blurry. Bitmaps are fine for + photographs, where every dot is a different colour, + and no-one will notice if you don't shrink or enlarge + too much. Bitmaps for diagrams and drawings, however, + are almost always the wrong choice, and + often disastrously bad. + </p> + </dd> + <dt><b>Vectors</b></dt> + <dd> + <p>Vector drawings are made from instructions (eg + ‘draw this from here to here, using a line this + thick’). They can be enlarged or shrunk as + much as you like, and never lose accuracy, because + they <em>get redrawn</em> automatically at + any size. You can't do photographs as vectors, but + it's the only acceptable method for drawings or + diagrams. + </p> + </dd> + </dl> + </blockquote> + <p>Vector graphic packages are also better suited for + saving your image directly in <small><a href="chapter6.html#EPS" class="acroref" name="A157" title="Encapsulated PostScript">EPS</a></small> + or <small><a href="chapter4.html#PDF" class="acroref" name="A158" title="Portable Document Format">PDF</a></small> format (both of which use + vectors internally). All the major graphics-generating + packages in all disciplines output vector formats: + <i><a name="p166">AutoCAD</a></i>, + <i><a name="p167">ChemDraw</a></i>, + <i><a name="p168">MathCAD</a></i>, + <i><a name="p169">Maple</a></i>, + <i><a name="p170">Mathematica</a></i>, + <i><a name="p171">ArcInfo</a></i>, and so on. <small><a href="chapter6.html#EPS" class="acroref" name="A159" title="Encapsulated PostScript">EPS</a></small> is the universally-accepted format + for creating vector graphics for publication, with <small><a href="chapter4.html#PDF" class="acroref" name="A160" title="Portable Document Format">PDF</a></small> a close second. Most of the major + graphics (drawing) packages can also save as <small><a href="chapter6.html#EPS" class="acroref" name="A161" title="Encapsulated PostScript">EPS</a></small>, such as + <i><a name="p172">PhotoShop</a></i>, <i><a name="p173">PaintShop + Pro</a></i>, Adobe + <i><a name="p174">Illustrator</a></i>, Corel + <i><a name="p175">Draw</a></i>, and + <i><a name="p176">GIMP</a></i>. There are also some free + vector plotting and diagramming packages available like + <i><a name="p177">tkPaint</a></i> and + <i><a name="p178">GNUplot</a></i> which do the same. Never, + ever (except in the direst necessity) save any + <em>diagram</em> as a bitmap. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 6.1</i>: <a name="">The diagram from <a href="chapter6.html#workeff">Figure 6.1</a> shrunk and + enlarged</a></caption> + <div align="center" style="margin:12px"><img src="diagram.png" style="border:thin solid black;" width="221.20000000000002"> <img src="diagram.png" style="border:thin solid black;"></div> + <hr> + </div> + <p>Bitmap formats like <small><a href="chapter6.html#JPG" class="acroref" name="A162" title="Joint Photographic Experts Group">JPG</a></small> and + <small><a href="chapter6.html#PNG" class="acroref" name="A163" title="Portable Network Graphic">PNG</a></small> are ideal for photographs, as + they are also able to compress the data substantially + without too much loss of quality. However, compressed + formats are bad for screenshots, if you are documenting + computer tasks, because too much compression makes them + blurry. The popular <a name="GIF" class="acroref">Graphics Interchange + Format</a> (<small>GIF</small>) is good for screenshots, but is not + supported by <span class="TEX">T<span class="E">E</span>X</span>: use <small><a href="chapter6.html#PNG" class="acroref" name="A165" title="Portable Network Graphic">PNG</a></small> + instead, with the compression turned down to minimum. Avoid + uncompressible formats like <small><a href="chapter6.html#BMP" class="acroref" name="A166" title="Microsoft Bitmap">BMP</a></small> as + they produce enormous and unmanageable files. The <a name="TIFF" class="acroref">Tagged Image File Format</a> (<small>TIFF</small>), popular with + graphic designers, should also be avoided because far too + many companies have designed and implemented non-standard, + conflicting, proprietary extensions to the format, making it + virtually useless for transfer between different types of + computers (except in faxes, where it's still used in a + much stricter version). + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 18</i>. Adding pictures + </h4> + <p>Add <code class="literal">\usepackage{graphicx}</code> to the + preamble of your document, and copy or download an image + you want to include. Make sure it is a <small><a href="chapter6.html#JPG" class="acroref" name="A168" title="Joint Photographic Experts Group">JPG</a></small>, <small><a href="chapter6.html#PNG" class="acroref" name="A169" title="Portable Network Graphic">PNG</a></small>, or + <small><a href="chapter4.html#PDF" class="acroref" name="A170" title="Portable Document Format">PDF</a></small> image if you use + <i><a name="p179">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, or an <small><a href="chapter6.html#EPS" class="acroref" name="A171" title="Encapsulated PostScript">EPS</a></small> image if you use standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>Add <code class="command"><a name="c129">\includegraphics</a></code> and the + filename in curly braces (without the filetype), and + process the document and preview or print it. + </p> + <p>Make it into a figure following the example in <a href="chapter6.html#figures">section 6.4</a>. + </p> + <p>Be aware that some <small><a href="chapter4.html#DVI" class="acroref" name="A172" title="device-independent">DVI</a></small> + previewers are not able to display all types of graphics, + and some cannot display colour. For best results, use + <small><a href="chapter4.html#PDF" class="acroref" name="A173" title="Portable Document Format">PDF</a></small> or + <a name="t31">PostScript</a> preview. + </p> + <hr> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.5.2 <a name="graphicsdir">Graphics storage</a></h3> + <p>I mentioned earlier that there was a way to tell + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> where to look if you had stored images centrally + for use in many different documents. The answer is in a + command <code class="command"><a name="c130">\graphicspath</a></code> which you supply + with an argument giving the name of an additional directory + path you want searched when a file uses the + <code class="command"><a name="c131">\includegraphics</a></code> command, for + example: + </p> + <blockquote><pre> +\graphicspath{c:\mypict~1\camera} +\graphicspath{/var/lib/images} +\graphicspath{HardDisk:Documents:Reports:Pictures} + </pre></blockquote> + <p>I've used the ‘safe’ + (MS-DOS) form of the Windows <code>My + Pictures</code> folder because it's A Bad Idea to + use directory names containing spaces (see <a href="chapter4.html#filenames">the panel ‘Picking suitable filenames’ in chapter 4</a>). Using + <code class="command"><a name="c132">\graphicspath</a></code> does make your file less + portable, though, because file paths tend to be specific + both to an operating system and to your computer, like the + examples above. + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6 <a name="verbatim">Verbatim text</a></h2><a name="I106"></a><p>If you are documenting computer procedures, you probably + need fixed-width type for examples of programming or data + input or output. Even if you are writing about completely + non-computer topics, you may often want to quote a <small><a href="chapter6.html#URI" class="acroref" name="A174" title="Uniform Resource Indicator">URI</a></small> or email address which needs to be + typeset specially. It is particularly important in these two + examples to avoid hyphenating them if they have to break over + a line-end, because the hyphen might be taken by the user as a + part of the address. + </p> + <p>Standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> includes two features for handling + fixed-format text, and there are many more available in + packages. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6.1 <a name="inlineverb">Inline verbatim</a></h3> + <p>To specify a word or phrase as verbatim text in + typewriter type within a sentence, use the special command + <code class="command"><a name="c133">\verb</a></code>, followed by your piece of text + surrounded by any suitable character which does + <em>not</em> occur in the text itself. This is a + very rare exception to the rule that arguments go in curly + braces. I often use the plus sign for this, for example to + show a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> command, I type + <code class="literal">\verb+\includegraphics[width=3in]{myhouse}+</code> + in order to display + <code class="literal">\includegraphics[width=3in]{myhouse}</code>, but + sometimes I use the + <b><i><a name="grave">grave accent</a></i></b> (<b><i><a name="backtick">backtick</a></i></b> or open-quote) or the + vertical bar when the phrase already has a plus sign in it, + like <code class="literal">\verb|\(y=a+2x^2\)|</code> when + illustrating the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> equation + <code class="literal">\(y=a+x^2\)</code>. + </p> + <p>This command has the advantage that it turns off all + special characters (see <a href="chapter2.html#specials">section 2.5</a>) except + the one you use as the delimiter, so you can easily quote + sequences of characters in any computer syntax without + problems. However, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never break the argument of + <code class="command"><a name="c134">\verb</a></code> at a line-end when formatting a + paragraph, even if it contains spaces, so if it happens to + be long, and falls towards the end of a line, it will stick + out into the margin. See <a href="chapter2.html#hyph">section 2.8.2</a> for more + information on line-ends and hyphenation. + </p> + <p>The <span class="package"><a name="m52">url</a></span> package avoids this by + providing the command <code class="command"><a name="c135">\url</a></code> which works in + the same way as <code class="command"><a name="c136">\verb</a></code>, with the argument + enclosed in a pair of characters, but performs a hyphenless + break at punctuation characters, as in <code>http://www.ucc.ie:8080/cocoon/cc/<br>docs/siteowner.xml</code>. + It was designed for Web <small><a href="chapter6.html#URI" class="acroref" name="A175" title="Uniform Resource Indicator">URI</a></small>s,<sup><a href="#F37">5</a></sup> so it understands their syntax and will never + break mid-way through an unpunctuated word, only at slashes + and full points. Bear in mind, however, that spaces are + forbidden in <small><a href="chapter6.html#URI" class="acroref" name="A179" title="Uniform Resource Indicator">URI</a></small>s, so using spaces + in <code class="command"><a name="c137">\url</a></code> arguments will fail, as will using + other non-<small><a href="chapter6.html#URI" class="acroref" name="A180" title="Uniform Resource Indicator">URI</a></small>-valid + characters. + </p> + <ol class="footnotes" start="5"> + <li><a name="F37">The original term <a name="URL" class="acroref">Uniform Resource + Locator</a> (<small>URL</small>) is now strongly deprecated in the Web + community in favour of the more accurate <a name="URI" class="acroref">Uniform Resource Indicator</a> (<small>URI</small>). For + details see <a href="http://www.w3.org/Addressing/"><tt>http://www.w3.org/Addressing/</tt></a>. + Unfortunately the older term still persists, especially + in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and <small><a href="chapter10.html#XML" class="acroref" name="A178" title="Extensible Markup Language">XML</a></small> + markup.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.6.2 Display verbatim + </h3> + <p>For longer (multiline) chunks of fixed-format text, use + the <span class="environment"><a name="e32">verbatim</a></span> environment: + </p> + <blockquote><pre> +\begin{verbatim} +\documentclass[11pt,a4paper,oneside]{report} +\begin{document} + +\title{Practical Typesetting} +\author{Peter Flynn\\Silmaril Consultants} +\date{December 2004} +\maketitle + +\end{document} +\end{verbatim} + </pre></blockquote> + <p>Like <code class="command"><a name="c138">\verb</a></code>, this turns off all special + characters, so you can include anything at all in the + verbatim text except the exact line + <code class="literal">\end{verbatim}</code></p> + <p>For more control over formatting, however, I recommend + the use of the <span class="package"><a name="m53">fancyvrb</a></span> package, + which provides a <span class="environment"><a name="e33">Verbatim</a></span> environment + (note the capital letter) which lets you draw a rule round + the verbatim text, change the font size, and even have + typographic effects inside the <span class="environment"><a name="e34">Verbatim</a></span> + environment. It can also be used in conjunction with the + <span class="package"><a name="m54">fancybox</a></span> package (see <a href="chapter6.html#fancybox">section 6.7.3</a>), and it can add reference line numbers + (useful for chunks of data or programming), and it can even + include entire external files. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 19</i>. Try some fixed-format text + </h4> + <p>Add your email address and home page <small><a href="chapter6.html#URI" class="acroref" name="A181" title="Uniform Resource Indicator">URI</a></small> using the <code class="command"><a name="c139">\verb</a></code> + and <code class="command"><a name="c140">\url</a></code> commands. You'll need to + <code class="literal">\usepackage{url}</code> for the latter. + </p> + <p>If you know some programming, try a few lines enclosed + in <span class="environment"><a name="e35">verbatim</a></span> and + <span class="environment"><a name="e36">Verbatim</a></span> environments. + </p> + <hr> + </blockquote> + </div> + </div> + <div class="sect1"> + <h2><a href="#otherdoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7 <a name="boxes">Boxes, sidebars, and panels</a></h2><a name="I107"></a><a name="I108"></a><a name="I109"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, like most typesetting systems, works by setting + text into boxes. The default box is the width of the current + page, and works like an old compositor's galley (tray) + from the days of metal type: it accumulates typeset text until + it's a bit longer than the specified page height. At this + stage <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> works out how much of it really will fit on a + page, snips it off and ships it out to the <small><a href="chapter4.html#DVI" class="acroref" name="A182" title="device-independent">DVI</a></small> or <small><a href="chapter4.html#PDF" class="acroref" name="A183" title="Portable Document Format">PDF</a></small> file, + and puts the rest back into the galley to accumulate towards + the following page. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.1 <a name="boxtext">Boxes of text</a></h3> + <p>Because of this ‘box’ model, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can typeset any text into a box of any width + wherever on the page you need it. + </p> + <p>The simplest command for small amounts of text is + <code class="command"><a name="c141">\parbox</a></code>. This command needs two arguments + in curly braces: the first is the width you want the text + set to, and the second is the text itself, for + example: + </p> + <blockquote class="example"><pre> +\parbox{1in}{Please make sure you send in your + completed forms by January 1st + next year, or the penalty clause + 2(a) will apply} + </pre><div align="center"> + <table> + <tr> + <td valign="top" width="144" align="left">Please make sure you send in your completed + forms by January 1st next year, or the penalty + clause 2(a) will apply + </td> + </tr> + </table> + </div> + </blockquote> + <p>The text is typeset to the required width, and the box + is extended downwards for as long as is required to fit the + text. Note that the baseline of a <code class="command"><a name="c142">\parbox</a></code> + is set to the midpoint of the box; that is, if you include a + <code class="command"><a name="c143">\parbox</a></code> in mid-sentence, the centre of the + box will be lined up with the line of type currently being + set.<img src="parbox1.png" width="28" align="middle"> You can specify that it should be the top or + bottom by adding an optional <span class="option"><a name="o11">t</a></span> or + <span class="option"><a name="o12">b</a></span> in square brackets before the width. For + example, + <code class="literal">\parbox[t]{1in}{...}</code> will produce + <img src="parbox2.png" width="72" align="top"></p> + <p>Notice that when setting very narrow measures with type + that is too large, the spacing may become uneven and there + may be too much hyphenation. Either use + <code class="command"><a name="c144">\raggedright</a></code> or reduce the type size, or + (in extreme cases) reword the text or break each line by + hand. It is rare for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to need this: the example above + was deliberately chosen to be obtuse as an + illustration. + </p> + <p>Where the contents is more extensive or more + complicated, you can use the <span class="environment"><a name="e37">minipage</a></span> + environment. + </p> + <p>Within this you can use virtually everything + that occurs in normal text (e.g. lists, paragraphs, + tabulations, etc.) with the exception of floats like + tables and figures. The <span class="environment"><a name="e38">minipage</a></span> + environment has an argument just like + <code class="command"><a name="c145">\parbox</a></code> does, and it means the same: the + width you want the text set to. + </p> + <p>Note that in <span class="environment"><a name="e39">minipage</a></span>s and + <code class="command"><a name="c146">\parbox</a></code>es, the paragraph indentation + (<tt>\<a name="d26">parindent</a></tt>) is + reset to zero. If you need to change it, set it inside the + <span class="environment"><a name="e40">minipage</a></span> or <code class="command"><a name="c147">\parbox</a></code> + using the <code class="command"><a name="c148">\setlength</a></code> command (see <a href="chapter3.html#paragraphs">section 3.6</a>). + </p> + <blockquote class="example"><pre> +\begin{minipage}{3in} +Please make sure you send in your completed +forms by January 1st next year, or the +penalty clause 2(a) will apply. +\begin{itemize} +\item Incomplete forms will be returned to +you unprocessed. +\item Forms must be accompanied by the +correct fee. +\item There is no appeal. The adjudicators' +decision is final. +\end{itemize} +\end{minipage} + </pre><div align="center"> + <table> + <tr> + <td valign="top" width="432" align="left"> + <p>Please make sure you send in your + completed forms by January 1st next year, or the + penalty clause 2(a) will + apply. + </p> + <ul> + <li> + <p>Incomplete forms will be returned to you + unprocessed. + </p> + </li> + <li> + <p>Forms must be accompanied by the correct + fee. + </p> + </li> + <li> + <p>There is no appeal. The + adjudicators' decision is final. + </p> + </li> + </ul> + </td> + </tr> + </table> + </div> + </blockquote> + <p>There are two other ways of typesetting text to widths + other than the normal text width: you can use a one-row, + one-cell <span class="environment"><a name="e41">tabular</a></span> environment with the + <code>p</code> column type specification, or you + can use the <code class="command"><a name="c149">\vbox</a></code> command, which is raw + <span class="TEX">T<span class="E">E</span>X</span>, and outside the scope of this document. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.2 <a name="fbox">Framed boxes</a></h3> + <p>To put a frame round <img src="fbox.png" align="middle" height="10px" alt="\fbox{some text}" width="64">, use the + <code class="command"><a name="c150">\fbox</a></code> command: + <code class="literal">\fbox{some text}</code>. This works for a few + words in mid-line, but the framed box and its contents + won't break over the end of a line. To typeset + multiline text in a box, put it in a + <code class="command"><a name="c151">\parbox</a></code>, or use a + <span class="environment"><a name="e42">minipage</a></span> or + <span class="environment"><a name="e43">tabular</a></span> environment as described above, + and enclose the whole thing in a + <code class="command"><a name="c152">\fbox</a></code>. + </p> + <blockquote class="example"><pre> +\fbox{\begin{minipage}{3in} +This multiline text is more flexible than +a tabular setting: +\begin{itemize} +\item it can contain any type of normal +<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesetting; +\item it can be any specified width; +\item it can even have its own +footnotes\footnote{Like this}. +\end{itemize} +\end{minipage}} + </pre><p>This multiline text is more flexible than a + tabular setting: + </p> + <ul> + <li> + <p>it can contain any type of normal <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + typesetting; + </p> + </li> + <li> + <p>it can be any specified width;</p> + </li> + <li> + <p>it can even have its own footnotes.<sup><a href="#F38">6</a></sup></p> + </li> + </ul> + </blockquote> + <p>The spacing between text and box is controlled by the + value of <tt>\<a name="d27">fboxsep</a></tt>, and + the thickness of the line by <tt>\<a name="d28">fboxrule</a></tt>. The following values + were used above: + </p> + <blockquote><pre> +\setlength{\fboxsep}{1em} +\setlength{\fboxrule}{2pt} + </pre></blockquote> + <p>As we saw before, setting justified text in narrow + measures will produce poor spacing: either use the + <code class="command"><a name="c153">\raggedright</a></code> command, or change the font + size, or add explicit extra hyphenation points. + </p> + <p>Note the <code class="literal">\begin{tabular}</code> and + <code class="literal">\begin{minipage}</code> commands still need the + width specifying: in the case of the + <code class="literal">\begin{tabular}</code> by the use of the + <code class="literal">p</code> column type with its width + specification, and in the case of + <code class="literal">\begin{minipage}</code> by the second + argument. + </p> + <blockquote class="example"><pre> +\fbox{\begin{tabular}{p{1in}} +Multiline text in a box typeset using +\textsf{tabular} +\end{tabular}} + </pre><div align="center"> + <table border="1" cellpadding="6pt"> + <tr> + <td valign="top" width="144" align="left">Multiline text in a box typeset using + <span class="package"><a name="m55">tabular</a></span></td> + </tr> + </table> + </div> + </blockquote> + <ol class="footnotes" start="6"> + <li><a name="F38">Like this.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>6.7.3 <a name="fancybox">Sidebars and panels</a></h3> + <p>The <span class="package"><a name="m56">fancybox</a></span> package lets you + extend the principle of <code class="command"><a name="c154">\fbox</a></code> with + commands to surround text in square, oval (round-cornered), + and drop-shadow boxes (e.g. <code class="command"><a name="c155">\ovalbox</a></code>, + <code class="command"><a name="c156">\shadowbox</a></code>, etc.: see the documentation + for details). + </p> + <p>You can create panels of any size with these borders by + using the <span class="environment"><a name="e44">minipage</a></span> environment to + typeset the text inside a special <span class="environment"><a name="e45">Sbox</a></span> + environment which <span class="package"><a name="m57">fancybox</a></span> defines. + The <span class="environment"><a name="e46">minipage</a></span> formats the text but the + <span class="environment"><a name="e47">Sbox</a></span> ‘captures’ + it, allowing you to put the frame round it as it + prints. + </p> + <p>The printed version of this document uses this extensively and + there is a useful example shown in <a href="chapter9.html#macenv">section 9.5</a>. + </p> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter5.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter7.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter7.html b/info/beginlatex/html/chapter7.html new file mode 100644 index 0000000000..59da986527 --- /dev/null +++ b/info/beginlatex/html/chapter7.html @@ -0,0 +1,941 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:36--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 7 — Textual tools</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 7 — Textual tools</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class="current"><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="texttools">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">7</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Textual tools</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#quotations">Quotations</a></li> + <li><a href="#footnotes">Footnotes and end-notes</a></li> + <li><a href="#marginals">Marginal notes</a></li> + <li><a href="#xrefs">Cross-references</a></li> + <li><a href="#indexes">Indexes and glossaries</a></li> + <li><a href="#multicols">Multiple columns</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I110"></a><p>Every text-handling system needs to support a repertoire of + tools for doing things with text. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> implements many + dozens, of which a small selection of the most frequently used + is given here: + </p> + <ul> + <li> + <p>offset quotations (sometimes called ‘block + quotes’); + </p> + </li> + <li> + <p>footnotes and end-notes;</p> + </li> + <li> + <p>marginal notes;</p> + </li> + <li> + <p>cross-references, both normal ones and bibliographic + citations; + </p> + </li> + <li> + <p>indexes and glossaries;</p> + </li> + <li> + <p>typesetting in multiple columns.</p> + </li> + </ul> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.1 <a name="quotations">Quotations</a></h2> + <p>Direct speech and short quotes within a sentence + ‘like this’ are done with simple + quotation marks as described in <a href="chapter2.html#quotes">section 2.6</a>. Sometimes, however, you may want longer + quotations set as a separate paragraph. Typically these are + indented from the surrounding text. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has two + environments for doing this. + </p> + <p>Such quotations are often set in a smaller size of type, + although this is not the default, hence the use of the + <code class="command"><a name="c157">\small</a></code> command in the second example. The + inclusion of the bibliographic citation at the end is + optional: here it is done with a non-standard command + <code class="command"><a name="c158">\citequote</a></code> which I invented for this example + (there is more about how to do things like this in <a href="chapter9.html#macros">Chapter 9</a>). + </p> + <blockquote> + <dl> + <dt><b>The <span style="font-weight:normal; "><span class="package"><a name="m58">quote</a></span></span> + environment</b></dt> + <dd> + <p>is for up to a line of text each per (short) + quotation, with the whole thing indented from the + previous paragraph but with no additional indentation on + each quote; + </p> + <blockquote class="example"><pre> + +\begin{quote} +Do, Ronny, Do. \textit{Nancy Reagan} + +Da Do Ron Ron. \textit{The Crystals} +\end{quote} + </pre><p class="example">Do, Ronny, Do. <span style="font-style:italic; ">Nancy + Reagan</span></p> + <p class="example">Da Do Ron Ron. <span style="font-style:italic; ">The + Crystals</span></p> + </blockquote> + </dd> + <dt><b>The <span style="font-weight:normal; "><span class="package"><a name="m59">quotation</a></span></span> + environment</b></dt> + <dd> + <p>is for longer passages (a paragraph or more) of a + single quotation, where not only is the block of text + indented, but each paragraph of it also has its own + extra indentation on the first line. + </p> + <blockquote class="example"><pre> +\begin{quotation}\small +At the turn of the century William Davy, +a Devonshire parson, finding errors in +the first edition of his \titleof{davy}, +asked for a new edition to be printed. +His publisher refused and Davy purchased +a press, type, and paper. He harnessed +his gardener to the press and apprenticed +his housemaid to the typesetting. After +twelve years' work, a new edition +of fourteen sets of twenty-six volumes +was issued---which surely indicates that, +when typomania is coupled with religious +fervour, anything up to a miracle may be +achieved.\citequote[p.76]{ryder} +\end{quotation} + </pre><blockquote class="citation"><a name="K33"> </a><p>At the turn of the century William Davy, a + Devonshire parson, finding errors in the first + edition of his <cite><a href="bibliography.html#davy" name="C34">A System of Divinity</a></cite>, + asked for a new edition to be printed. His publisher + refused and Davy purchased a press, type, and paper. + He harnessed his gardener to the press and + apprenticed his housemaid to the typesetting. After + twelve years' work, a new edition of fourteen + sets of twenty-six volumes was issued---which surely + indicates that, when typomania is coupled with + religious fervour, anything up to a miracle may be + achieved. + </p> + <p class="citation">John Ryder (1976), <cite><a href="bibliography.html#ryder">Printing for Pleasure</a></cite>, p.76 + </p> + </blockquote> + </blockquote> + </dd> + </dl> + </blockquote> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.2 <a name="footnotes">Footnotes and end-notes</a></h2><a name="I111"></a><p>The command <code class="command"><a name="c159">\footnote</a></code>, followed by the + text of the footnote in curly braces, will produce an + auto-numbered footnote with a raised small number where you + put the command, and the numbered text automatically printed + at the foot of the page.<sup><a href="#F39">1</a></sup> The number is reset to 1 at the start of each + chapter (but you can override that and make them run + continuously throughout the document, or even restart at 1 on + each page or section). + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> automatically creates room for the footnote, and + automatically reformats it if you change your document in such + a way that the point of attachment and the footnote would move + to the next (or preceding) page. + </p> + <p>Because of the way <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reads the whole footnote before + doing anything with it, you can't use + <code class="command"><a name="c160">\verb</a></code> (<a href="chapter6.html#inlineverb">section 6.6.1</a>) alone + in footnotes: either precede it with + <code class="command"><a name="c161">\protect</a></code> or use [abuse?] the + <code class="command"><a name="c162">\url</a></code> command instead, which you should be + using for Web and email addresses in any case). + </p> + <p>Footnotes inside minipages (see <a href="chapter6.html#boxes">section 6.7</a>) produce lettered notes instead of + numbered ones, and they get printed at the bottom of the + minipage, <em>not</em> the bottom of the physical + page (but this too can be changed). + </p> + <p>There is a package to hold over your footnotes and make + them print at the end of the chapter instead + (<span class="package"><a name="m60">endnote</a></span>) or at the end of the whole + document, and there is a package to print many short footnotes + in a single footnoted paragraph so they take up less space + (<span class="package"><a name="m61">fnpara</a></span>). It is also possible to have + several separate series of footnotes active simultaneously, + which is useful in critical editions or commentaries: a + numbered series may be used to refer to an original + author's notes; a lettered series can be used for notes + by a commentator or authority; and a third series is available + for your own notes. It is also possible to format footnotes + within footnotes. + </p> + <p>If your footnotes are few and far between, you may want to + use footnote symbols instead of numbers. You can do this by + redefining the output of the footnote counter to be the + <code class="command"><a name="c163">\fnsymbol</a></code> command: + </p> + <blockquote><pre> +\renewcommand{\thefootnote{\fnsymbol{footnote}} + </pre></blockquote> + <p>There are also ways to refer more than once to the + same footnote, and to defer the positioning of the footnote if + it occurs in a float like a Table or Figure, where it might + otherwise need to move to a different page. + </p> + <ol class="footnotes" start="1"> + <li><a name="F39">Like this.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.3 <a name="marginals">Marginal notes</a></h2><a name="I112"></a><table width="100%"> + <tr> + <td width="95%" valign="top">You can add marginal notes to your text<a href="#M6" title="See margin">↞</a> instead of + (or as well as) footnotes. You need to make sure that you have + a wide-enough margin, of course: use the + <span class="package"><a name="m62">geometry</a></span> package (see <a href="chapter5.html#colorpkg">section 5.1.1</a>) to allocate enough space, otherwise + the notes will be too cramped. There are several packages to + help with formatting marginal notes, but the simplest way is + to define it yourself. Add this new command to your + preamble: + </td> + <td width="5%" valign="top"><small><a name="M6">Like this.</a></small></td> + </tr> + </table> + <blockquote><pre> +\newcommand{\marginal}[1]{% + \leavevmode\marginpar{\tiny\raggedright#1\par}} + </pre></blockquote> + <table width="100%"> + <tr> + <td width="95%" valign="top">Then you can use <code class="literal">\marginal{Some + text}</code><a href="#M7" title="See margin">↞</a> Be careful, however, because marginal + notes are aligned with the line where the command starts, so a + very long one followed too closely by another will cause + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to try and + adjust the position so they don't overlap. + </td> + <td width="5%" valign="top"><small><a name="M7">Some text where you need + it.</a></small></td> + </tr> + </table> + <p>We're jumping ahead a bit here, as we haven't + covered how to define your own commands yet. I won't even + try to explain it here, although the attentive reader can + probably deduce some of it by inspection. See <a href="chapter9.html#macros">Chapter 9</a> for more information about making up your + own commands. + </p> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4 <a name="xrefs">Cross-references</a></h2><a name="I113"></a><p>This is one of the most powerful features of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. You + can label any point in a document with a name you make up, and + then refer to it by that name from anywhere else in the + document, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will always work out the cross-reference + number for you, no matter how much you edit the text or move + it around. + </p> + <p>A similar method is used to cite documents in a + bibliography or list of references, and there are packages to + sort and format these in the correct manner for different + journals. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.1 <a name="normalxref">Normal cross-references</a></h3> + <p>You label a place in your document by using the command + <code class="command"><a name="c164">\label</a></code> followed by a short name you make + up, in curly braces:<sup><a href="#F40">2</a></sup> we've already seen this done for labelling + Figures and Tables. + </p> + <blockquote><pre> +\section{New Research} +\label{newstuff} + </pre></blockquote> + <p>You can then refer to this point from anywhere in the + same document with the command <code class="command"><a name="c165">\ref</a></code> + followed by the name you used, e.g. + </p> + <blockquote class="example"><pre> +In \S~\ref{newstuff} there is a list of recent +projects. + </pre><p class="example">In <a href="chapter7.html#normalxref">§ 7.4.1</a> + there is a list of recent projects. + </p> + </blockquote> + <p>(The <code class="command"><a name="c166">\S</a></code> command produces a section + sign (§) and the + <code class="command"><a name="c167">\P</a></code> command produces a paragraph sign + (¶).) + </p> + <p>If the label is in normal text, the reference will + provide the current chapter or section number or both + (depending on the current document + class).<sup><a href="#F41">3</a></sup> If the label + was inside a Table or Figure, the reference provides the + Table number or Figure number prefixed by the chapter + number. A label in an enumerated list will provide a + reference to the item number. If there is no apparent + structure to this part of the document, the reference will + be null. Labels must be unique (that is, each value must + occur only <em>once</em> as a label within a + single document), but you can have as many references to + them as you like. + </p> + <p>Note the use of the unbreakable space + (<code class="literal">~</code>) between the <code class="command"><a name="c168">\ref</a></code> + and the word before it. This prints a space but prevents the + line ever breaking at that point, should it fall close to + the end of a line. + </p> + <p>The command <code class="command"><a name="c169">\pageref</a></code> followed by any + of your label values will provide the page number where the + label occurred, regardless of the document structure. This + makes it possible to refer to something by page number as + well as its <code class="command"><a name="c170">\ref</a></code> number, which is useful + to readers in very long documents. + </p> + <p>Unresolved references are printed as two question + marks, and also cause a warning message at the end of the + log file. There's never any harm in having + <code class="command"><a name="c171">\label</a></code>s you don't refer to, but using + <code class="command"><a name="c172">\ref</a></code> when you don't have a matching + <code class="command"><a name="c173">\label</a></code> is an error. + </p> + <ol class="footnotes" start="2"> + <li><a name="F40">This section is labelled + ‘<code>normalxref</code>’, + for example.</a></li> + <li><a name="F41">Thus I can + refer here to + <code class="literal">\ref{normalxref}</code> and get the + value <a href="chapter7.html#normalxref">section 7.4.1</a>.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2 <a name="bib">Bibliographic references</a></h3><a name="I114"></a><a name="I115"></a><p>The mechanism used for references to reading lists and + bibliographies is almost identical to that used for normal + cross-references. Although it is possible to type the + details of each citation manually, there is a companion + program to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> called <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, which manages + bibliographic references automatically. This reduces the time + needed to maintain and format them, and dramatically + improves accuracy. Using <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> means you only ever have + to type the bibliographic details of a work once. You can + then cite it in any document you write, and it will get + formatted automatically to the style you specify. + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.1 <a name="citation">Citing references</a></h4> + <p><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> works exactly the same way as other + bibliographic databases: you keep details of every + document you want to refer to in a separate file, using + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>'s own format (see example below). Many + writers make a habit of adding the details of every book + and article they read, so that when they write a document, + these entries are always available for reference. You give + each entry a short label, just like you do with normal + cross-references (see <a href="chapter7.html#normalxref">section 7.4.1</a>), and + it is this label you use to refer to in your own documents + when you cite the work using the <code class="command"><a name="c174">\cite</a></code> + command: + </p> + <blockquote><pre> +...as has clearly been shown by Fothergill~\cite{fg}. + </pre></blockquote> + <p>By default, this creates a cross-reference number in + square brackets [1] which is a common style in the + Natural Sciences (see <a href="chapter7.html#othercite">section 7.4.2.5</a> for + details of how to change this). There are dozens of + alternative citation formats in extra packages, including + the popular author/year format: + </p> + <blockquote class="example"><pre> +...as has clearly been shown +by~\citeauthoryear{fg}. + </pre><p class="example">...as has clearly been shown by <a href="bibliography.html#fg" name="K35">Fothergill</a> (1929). + </p> + </blockquote> + <p>Note that in this case you don't type the + author's name because it is automatically extracted + by <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>. There are lots of variants on this technique + in many packages, allowing you to phrase your sentences + with references in as natural a way as possible, and rely + on <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> to insert the right data. (If you examine the + source of this document you'll find I use some + homebrew commands like <code class="command"><a name="c175">\authorof</a></code> and + <code class="command"><a name="c176">\titleof</a></code> which I use for a similar + purpose.) + </p> + <p>To print the bibliographic listing (usually called + ‘References’ in articles and + ‘Bibliography’ in books and + reports), add these two lines towards the end of your + document, or wherever you want it printed, substituting + the name of your own <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file and the name of your + chosen bibliography style: + </p> + <blockquote><pre> +\bibliographystyle{ieeetr} +\bibliography{mybib} + </pre></blockquote> + <ul> + <li> + <p>The <code class="command"><a name="c177">\bibliography</a></code> command is + followed by the filename of your <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file + <em>without</em> the + <code>.bib</code> extension. + </p> + </li> + <li> + <p>The <code class="command"><a name="c178">\bibliographystyle</a></code> command + is followed by the name of any of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s + supported bibliography styles, of which there are many + dozens available from <small><a href="chapter5.html#CTAN" class="acroref" name="A184" title="Comprehensive Archive Network">CTAN</a></small>.<sup><a href="#F42">4</a></sup></p> + </li> + </ul> + <p>The styles <span class="option"><a name="o13">plain</a></span> and + <span class="option"><a name="o14">alpha</a></span> are two common generic styles used + for drafts. The example above uses <a name="IEEETR" class="acroref">Transactions of the Institute of Electrical + and Electronics Engineers</a> (<small>IEEETR</small>). + </p> + <ol class="footnotes" start="4"> + <li><a name="F42">The style + shown in the example here provides formatting + according to the specifications for Transactions + of the IEEE (revised).</a></li> + </ol> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.2 <a name="bibtex">Running <i><a name="p180">bibtex</a></i></a></h4> + <p>When you run the <i><a name="p181">bibtex</a></i> + program, the details of every document you have cited will + be extracted from your database, formatted according to + the style you specify, and stored in a temporary + bibliographic (<code>.bbl</code>) file with a + label corresponding to the one you used in your citation, + ready for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to use. This is entirely automatic: all + you do is cite your references in your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document + using the labels you gave the entries in your <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> + file, and run the <i><a name="p182">bibtex</a></i> + program. + </p> + <p>After processing your file with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, run + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> on it by clicking on the + <span class="guiicon"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span></span> toolbar icon (if your editor + has one), or use the + <span class="guimenu">TeX</span>→<span class="guimenuitem">BibTeX + File</span> menu entry, or type the command + <code class="literal">bibtex</code> followed by the name of your + document (without the <code>.tex</code> + extension). When you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> again it will use the + <code>.bbl</code> file which <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> created, + and subsequent runs of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will format the correct + citation numbers (or author/year, or whatever format you + are using). + </p> + <blockquote><pre> +$ latex mybook +$ bibtex mybook +$ latex mybook +$ latex mybook + </pre></blockquote> + <p>Because of this three-stage process, you always get a + warning message about an ‘unresolved + reference’ the first time you add a new + reference to a previously uncited work. This will + disappear after subsequent runs of + <i><a name="p183">bibtex</a></i> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>In practice, authors tend to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> from time to + time during writing anyway, so they can preview the + document. Just run <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> after adding a new + <code class="command"><a name="c179">\cite</a></code> command, and subsequent runs of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will incrementally incorporate all references + without you having to worry about it. You only need to + follow the full formal sequence (<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>) when you have finished writing and + want to ensure that all references have been + resolved. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.3 <a name="bibspec"><span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> format</a></h4> + <p>The format for the <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> file is specified in the + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> documentation (see <a href="chapter5.html#packagedoc">section 5.1.2</a> + for how to find and print it). You create a file with a + name ending in <code>.bib</code>, and add your + entries, for example: + </p> + <blockquote><pre> +@book{fg, + title = {{An Innkeeper's Diary}}, + author = {John Fothergill}, + edition = {3rd}, + publisher = {Penguin}, + year = 1929, + address = {London} +} + </pre></blockquote> + <p>There is a prescribed set of fields for each of a + dozen or so types of document: book, article (in a + journal), article (in a collection), chapter (in a book), + thesis, report, paper (in a Proceedings), etc. Each entry + identifies the document type after the + ‘<code class="literal">@</code>’ sign, + followed by the entry label that you make up, and then + each field (in any order), using the format: + </p> + <blockquote><pre> +keyword = {value}, + </pre></blockquote> + <p>Most <span class="TEX">T<span class="E">E</span>X</span>-sensitive editors have a <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> mode + which understands these entries. + <i><a name="p184">Emacs</a></i> automatically uses its + <code>bibtex-mode</code> whenever you open a + filename ending in <code>.bib</code>. When editing + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> databases, the rules are simple: + </p> + <ul> + <li> + <p>Omit the comma after the last field in the entry + (only — eg after <code class="literal">{London}</code> in + the example). + </p> + </li> + <li> + <p>Titles may have their case changed in some styles: + to prevent this, enclose the title in double curly + braces as in the example. + </p> + </li> + <li> + <p>Values which are purely numeric (e.g. years) + may omit the curly braces. + </p> + </li> + <li> + <p>Fields can occur in any order but the format must + otherwise be strictly observed. + </p> + </li> + <li> + <p>Fields which are not used do not have to be + included (so if your editor automatically inserts them + as blank or prefixed by <code class="literal">OPT</code> + [optional], you can safely delete them as unused + lines). + </p> + </li> + </ul> + <p>To help with this, there are several interfaces to + creating and maintaining <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> files, such as + <i><a name="p185">tkbibtex</a></i> (see <a href="chapter7.html#tkbibtex">Figure 7.1</a>), or + <i><a name="p186">pybliographic</a></i>. + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 7.1</i>: <a name="tkbibtex">tk<span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>, one of several graphical interfaces to + <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> databases</a></caption> + <div align="center" style="margin:12px"><img src="tkbibtex.png" width="75%"></div> + <hr> + </div> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.4 <a name="bibstyle">Changing the layout</a></h4> + <p>To change the title printed over the reference + listing, just change the value of + <code class="command"><a name="c180">\refname</a></code> (articles) or + <code class="command"><a name="c181">\bibname</a></code> (books and reports) by adding a + line like this in your preamble: + </p> + <blockquote><pre> +\renewcommand{\bibname}{Reading List} + </pre></blockquote> + <p>The formatting specifications (<span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> styles) are + based on standard settings for journals and books from + dozens of publishers: you just pick the one you want by + name. The <code>texmf/bib/bst</code> subdirectory + of your installation contains the ones installed by + default, and you can search on <small><a href="chapter5.html#CTAN" class="acroref" name="A186" title="Comprehensive Archive Network">CTAN</a></small> + for others (look for <code>.bst</code> files). + Many of them are named after university press styles + (e.g. <i><a name="p187">harvard</a></i>, + <i><a name="p188">oxford</a></i>) or the publisher or + journal which specified them (e.g. + <i><a name="p189">elsevier</a></i>, + <i><a name="p190">kluwer</a></i>, etc.). + </p> + <p>Some of them have an accompanying package + (<code>.sty</code>) file which + you need to include with the normal + <code class="command"><a name="c182">\usepackage</a></code> command in your preamble. In + this case the format may be distributed as + <code>.dtx</code> and <code>.ins</code> + files and will need installing in the same way as any + other package (see <a href="chapter5.html#pkginst">section 5.2</a>). Always read + the documentation, because most of the formats are very + specific to the journal they were designed for, and may have + fairly absolute requirements. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are writing for a specific publisher, you + should remember that the rules or formats are laid down + by the typographic designer of that journal or + publisher: you cannot arbitrarily change the format just + because you don't happen to like it: it's not + your choice! + </p> + </blockquote> + <p>It is also possible to write your own <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span> + (<code>.bst</code>) style files, although it uses + a language of its own which really needs a computer + science background to understand. However, this is + rendered unnecessary in most cases: there is an extensive + program (actually written in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>) called + <i><a name="p191">makebst</a></i>, which makes + <code>.bst</code> files by asking you a (long) + series of questions about exactly how you want your + citations formatted. Just type + <code class="literal">latex makebst</code> in a command window, but + give it a dummy run first, because some of the questions + are very detailed, so you need to have thought through how + you want your citations to appear before you start. + </p> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.4.2.5 <a name="othercite">Other modes of citation</a></h4> + <p>The method of citing a work by numeric reference is + common in the Natural Sciences but is not used in Law or + the Humanities. In these fields, citations are usually + done with short references (author/short-title/year) in a + numbered footnote. Sometimes they are actually called + ‘footnotes’ to the exclusion of + ordinary footnotes, although they are really citations + which happen by convention to be + <em>displayed</em> as footnotes: an important + distinction rarely appreciated by authors until they come + to need a normal footnote. + </p> + <p>For these fields, the bibliography at the back of the + document is printed <em>unnumbered</em> in + alphabetic order of author, or perhaps chronologically if + the time-frame is very large. This unnumbered format is + why it is conventionally called + ‘References’ rather than + ‘Bibliography’: a sufficient working + citation has already been provided in the footnote, and + the list at the back is for reference purposes only; + whereas in the Natural Sciences, the citation is just a + number, or possibly an author and year only, so the full + listing is called a Bibliography. + </p> + <p>The <span class="package"><a name="m63">jurabib</a></span> package + (originally intended for German law articles but now + extended to other fields in the Humanities, and to other + languages) has extensive features for doing this style of + citation and is strongly recommended. + </p> + </div> + <ol class="footnotes" start="4"> + <li><a name="F42">The style + shown in the example here provides formatting + according to the specifications for Transactions + of the IEEE (revised).</a></li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.5 <a name="indexes">Indexes and glossaries</a></h2><a name="I116"></a><a name="I117"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has a powerful, automated indexing facility which + uses the standard <i><a name="p192">makeindex</a></i> + program. To use indexing, use the package + <span class="package"><a name="m64">makeidx</a></span> and include the + <code class="command"><a name="c183">\makeindex</a></code> command in your preamble: + </p> + <blockquote><pre> +\usepackage{makeidx} +\makeindex + </pre></blockquote> + <p>When you want to index something, using the command + <code class="command"><a name="c184">\index</a></code> followed by the entry in curly + braces, as you want it to appear in the index, using one of + the following formats: + </p> + <blockquote> + <dl> + <dt><b>Plain entry</b></dt> + <dd> + <p>Typing <code class="literal">\index{beer}</code> will create + an entry for ‘beer’ with the + current page + number.<a name="I118"></a></p> + </dd> + <dt><b>Subindex entry</b></dt> + <dd> + <p>For an entry with a subentry use an exclamation mark + to separate them: + <code class="literal">\index{beer!lite}</code>.<a name="I119"></a> Subsubentries like + <code class="literal">\index{beer!lite!American}</code> work to + another level deep.<a name="I120"></a></p> + </dd> + <dt><b>Cross-references</b></dt> + <dd> + <p>‘See’ entries are done with + the vertical bar (one of the rare times it does + <em>not</em> get interpreted as a math + character): + <code class="literal">\index{Microbrew|see{beer}}</code></p> + </dd> + <dt><b><a name="indextypo">Font changes</a></b></dt> + <dd> + <p>To change the style of an entry, use the @-sign + followed by a font change command: + </p> + <blockquote><pre> +\index{beer!Rogue!Chocolate + Stout@\textit{Chocolate Stout}} + </pre></blockquote> + <p>This example<a name="I122"></a> indexes ‘<i><a name="p193">Chocolate + Stout</a></i>’ and italicises it + at the same time. Any of the standard + <code class="literal">\text...</code> font-change commands work + here: see <a href="chapter8.html#fontcmds">the table in section 8.2.3</a> for details. + </p> + <p>You can also change the font of the index number on + its own, as for first-usage references, by using the + vertical bar in a similar way to the + ‘see’ entries above, but + substituting a font-change command name + (<em>without</em> a backslash) such as + <code class="literal">textbf</code> for bold-face text (see the + index)<a name="I123"></a>: + </p> + <blockquote><pre> +\index{beer!Rogue!Chocolate Stout|textbf} + </pre></blockquote> + </dd> + <dt><b>Out of sequence</b></dt> + <dd> + <p>The same method can be used as for font changes, + but using the alternate index word instead of the font + command name, so + <code class="literal">\index{Oregon Brewing Company@Rogue}</code><a name="I124"></a> will add an entry for + ‘Rogue’ in the + ‘O’ section of the index, as if + it was spelled ‘Oregon Brewing + Company’. + </p> + </dd> + </dl> + </blockquote> + <p>When the document has been processed through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> it + will have created a <code>.idx</code> file, which you + run through the <i><a name="p194">makeindex</a></i> program + by typing (for example): + </p> + <blockquote><pre> +makeindex mythesis + </pre></blockquote> + <p>Some editors may have a button or menu entry for this. The + program will look for the <code>.idx</code> file and + output a <code>.ind</code> file. This gets used by the + command <code class="command"><a name="c185">\printindex</a></code> which you put at the end + of your document, where you want the index printed. The + default index format is two columns. + </p> + <p>Glossaries are done in a similar manner using the command + <code class="command"><a name="c186">\makeglossary</a></code> in the preamble and the + command <code class="command"><a name="c187">\glossary</a></code> in the same way as + <code class="command"><a name="c188">\index</a></code>. There are some subtle differences in + the way glossaries are handled: both the books by <a href="bibliography.html#latexbook" name="K36">Lamport</a> (1994) and by <a href="bibliography.html#companion" name="K37">Mittelbach <i>et al</i></a> (2004) duck the issue, but + there is some documentation on <code>glotex</code> on + <small><a href="chapter5.html#CTAN" class="acroref" name="A187" title="Comprehensive Archive Network">CTAN</a></small>. + </p> + </div> + <div class="sect1"> + <h2><a href="#texttools"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>7.6 <a name="multicols">Multiple columns</a></h2><a name="I125"></a><p>Use the <span class="package"><a name="m65">multicol</a></span> package: the + environment is called <span class="environment"><a name="e48">multicols</a></span> (note the + plural form) and it takes the number of columns as a separate + argument in curly braces: + </p> + <blockquote><pre> +\usepackage{multicol} +... +\begin{multicols}{3} +... +\end{multicols} + </pre></blockquote> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built-in support for two-column typesetting + via the <code class="literal">twocolumn</code> option in the standard + Document Class Declarations, but it is relatively inflexible + in that you cannot change from full-width to double-column + and back again on the same page, and the final page does not + balance the column heights. However, it does feature special + <span class="environment"><a name="e49">figure*</a></span> and <span class="environment"><a name="e50">table*</a></span> + environments which typeset full-width figures and tables + across a double-column setting. + </p> + <p>The more extensive solution is the + <span class="package"><a name="m66">multicol</a></span> package, which will set up + to 10 columns, and allows the number of columns to be + changed or reset to one in mid-page, so that full-width + graphics can still be used. It also balances the height of + the final page so that all columns are the same + height — if possible: it's not always + achievable — and you can control the width of the gutter + by setting the <code class="command"><a name="c189">\columnsep</a></code> length to a new + dimension. + </p> + <p>Multi-column work needs some skill in typographic + layout, though: the narrowness of the columns makes + typesetting less likely to fit smoothly because it's hard to + hyphenate and justify well when there is little space to + manœuvre in. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter6.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter8.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter8.html b/info/beginlatex/html/chapter8.html new file mode 100644 index 0000000000..98bfc185ba --- /dev/null +++ b/info/beginlatex/html/chapter8.html @@ -0,0 +1,2391 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:41--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 8 — Fonts and layouts</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 8 — Fonts and layouts</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class="current"><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="typo">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">8</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Fonts and layouts</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#layouts">Changing layout</a></li> + <li><a href="#fontuse">Using fonts</a></li> + <li><a href="#instfonts">Installing new fonts</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I126"></a><p>This is the chapter that most users want first, because they + come to structured documents from a wordprocessing environment + where the <em>only</em> way to convey different + types of information is to fiddle with the font and size + drop-down menus. + </p> + <p>As I hope you have seen, this is normally completely + unnecessary in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, which does most of the hard work for you + automatically. However, there are occasions when you need to + make manual typographic changes, and this chapter is about how + to do them. + </p> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1 <a name="layouts">Changing layout</a></h2> + <p>The design of the page can be a very subjective matter, + and also rather a subtle one. Many organisations large and + small pay considerable sums to designers to come up with page + layouts to suit their purposes. Styles in page layouts change + with the years, as do fashions in everything else, so what may + have looked attractive in 1991 may look rather dated in + 2011. + </p> + <p>As with most aspects of typography, making the document + readable involves making it consistent, so the reader is not + interrupted or distracted too much by apparently random + changes in margins, widths, or placement of objects. However, + there are a number of different occasions where the layout + usually <em>does</em> change, related to the + frequency with which the format appears. + </p> + <ul> + <li> + <p>The title page, the half-title, copyright page, + dedication, and other one-page preliminaries (if you use + them) are usually designed individually, as the information + on it only occurs once in that format anywhere in the + document. + </p> + </li> + <li> + <p>The table of contents and other related lists like + figures and tables all need to share one + design. + </p> + </li> + <li> + <p>The prelims like Foreword, Introduction, and Preface + should likewise follow the same format between + them. + </p> + </li> + <li> + <p>Chapter and Appendix start pages usually share a + layout. + </p> + </li> + <li> + <p>Other (normal) pages have a single layout, but it may + specify individual variations to handle tables, lists, + figures, sidebars, exercises, footnotes, etc. + </p> + </li> + </ul> + <p>If you are going to design a whole document, it's + probably a good idea to read a couple of books on layout + design first, to get a feel for the conventions which + contribute to making the reader comfortable reading. + </p> + <p>While unusual or radical layouts have an important role in + attention-grabbing, or in making a socio-political statement + (<cite><a href="bibliography.html#wired" name="C38">WIRED</a></cite> magazine is an obvious + recent example), they are usually out of place in business + reports, white papers, books, theses, and journals. In + ephemera, on the other hand, as in advertising, they are + probably critical. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1.1 <a name="spacing">Spacing</a></h3><a name="I127"></a><a name="I128"></a><p>We mentioned in <a href="chapter7.html#marginals">section 7.3</a> and + elsewhere the existence of the + <span class="package"><a name="m67">geometry</a></span> package which lets you + change margins. It also lets you set the text-area height + and width and a lot of other layout settings: read the + documentation for details (see <a href="chapter5.html#packagedoc">section 5.1.2</a> for how to read package + documentation). + </p> + <blockquote><pre> +\usepackage[left=2cm,top=1cm,bottom=2cm,right=3cm, + nohead,nofoot]{geometry} + </pre></blockquote> + <p>The spacing around the individual textual components + (headings, paragraphs, lists, footnotes, etc.) can + also be changed on a document-wide basis, as we saw with + paragraph spacing and indentation in <a href="chapter3.html#paraspace">the text in section 3.6</a>. + </p> + <p>Changing the spacing of section headings for the whole + document can be done with the + <span class="package"><a name="m68">sectsty</a></span> package, designed to let + you adjust section-head spacing without having to know about + the internal <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> coding, which is quite complex. + </p> + <p>The spacing for lists can be adjusted with the + <span class="package"><a name="m69">mdwlist</a></span> package. In both cases the + user with highly specific requirements such as a + publisher's Compositor's Specification should read + the relevant sections in the <cite><a href="bibliography.html#companion" name="C39">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> or ask for expert help, as + there are many internal settings which can also be changed + to fine-tune your design, but which need some knowledge of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals. + </p> + <p>All the above are for automating changes so that they + occur every time in a consistent manner. You can also make + manual changes whenever you need: + </p> + <blockquote> + <dl> + <dt><b>Flexible vertical space</b></dt> + <dd><a name="I130"></a><p>There are three commands + <code class="command"><a name="c190">\smallskip</a></code>, + <code class="command"><a name="c191">\medskip</a></code>, and + <code class="command"><a name="c192">\bigskip</a></code>. These output flexible + (dynamic, or ‘rubber’) space, + approximately 3pt, 6pt, and 12pt high respectively, + and they will automatically compress or expand a + little, depending on the demands of the rest of the + page (for example to allow one extra line to fit, or a + heading to be moved to the next page without anyone + except a typographer noticing the change). These + commands can only be used after a paragraph break (a + blank line or the command + <code class="command"><a name="c193">\par</a></code>). + </p> + </dd> + <dt><b>Fixed vertical space</b></dt> + <dd><a name="I131"></a><a name="I132"></a><p>For a fixed-height space which will + <em>not</em> stretch or shrink, use the + command <code class="command"><a name="c194">\vspace</a></code> followed by a length + in curly braces, e.g. <code class="literal">\vspace{18pt}</code> + (again, this has to be after a paragraph break). Bear + in mind that extra space which ends up at a page-break + when the document is formatted <em>will get + discarded entirely</em> to make the bottom and + top lines fall in the correct places. To force a + vertical space to remain and be taken into account + even after a page break (very rare), use the starred + variant <code class="command"><a name="c195">\vspace*</a></code>, e.g. + <code class="literal">\vspace*{19pt}</code>. + </p> + </dd> + <dt><b>Double spacing</b></dt> + <dd><a name="I133"></a><a name="I134"></a><p>Double-spacing normal lines of text is usually a + bad idea, as it looks very ugly. It is still + unfortunately a requirement in some universities for + thesis submission, a historical relic from the days of + typewriters. Nowadays, 1⅓ or 1½ line + spacing is considered acceptable, according to your + font size. If your institution still thinks they + should have double line spacing, they are probably + wrong, and just don't understand that the world has + moved on since the typewriter. Show them this + paragraph and explain that they need to enter the 21st + century and adapt to the features of computer + typesetting. If they still insist, use the + <span class="package"><a name="m70">setspace</a></span> package,which has + commands for double line-spacing and one-and-a-half + line spacing, but be prepared for some very ugly + output (so warn your supervisor and extern). + </p> + <p>The space between lines is defined by the value of + the length variable <tt>\<a name="d29">baselineskip</a></tt> multiplied + by the value of the <code class="command"><a name="c196">\baselinestretch</a></code> + command. In general, <em>don't meddle with + <tt>\<a name="d30">baselineskip</a></tt> at + all</em>, and with + <code class="command"><a name="c197">\baselinestretch</a></code> only if you know + what you are doing. (Both can, however, safely be used + as reference values in commands like + <code class="literal">\vspace{\baselineskip}</code> to leave a + whole line space.) + </p> + <p>The value of <tt>\<a name="d31">baselineskip</a></tt> changes with + the font size (see <a href="chapter8.html#fontsize">section 8.2.4</a>) but is conventionally set to + 1.2 times the current nominal font size. This is a + value derived from long experience: only change it if + you understand what it means and what effect it will + have. + </p> + <p>Quite separately, there are some perfectly genuine + and normal reasons for wanting wide line spacing, + for example when typesetting a proof of a + critical or variorum edition, where editors and + contributors are going to want to add notes manually + by writing between the lines, or where the text is + going to be overprinted by something else like + Braille, or in advertising or display text for special + effects. + </p> + </dd> + <dt><b>Horizontal space</b></dt> + <dd><a name="I137"></a><p>There is a horizontal equivalent to the + <code class="command"><a name="c198">\vspace</a></code> command: + <code class="command"><a name="c199">\hspace</a></code>, which works in the same + way, so I can force a 1″ space like + this<img src="whitespace.png" align="middle" height="10px" alt="\hspace*{1in}" width="72">in + mid-paragraph. There are also some predefined + (shorter) spaces available: + </p> + <ul> + <li> + <p><code class="command"><a name="c200">\thinspace</a></code> (1/6em), + which we saw between single and double quotes in + <a href="chapter2.html#thinspace">the last paragraph in section 2.6</a>. It's also + sometimes used between the full point after + abbreviations and a following number, as in page + references like p. 199, where a word space + would look too big, and setting it solid would + look too tight. + </p> + </li> + <li> + <p><code class="command"><a name="c201">\enspace</a></code> (½em). + There is no direct equivalent predefined in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for mid and thick spaces as used by metal + typesetters, although it would be possible to + define them. The en as a unit is often used as the + width of a single digit in some fonts, as a + convenience so that tables of figures are easy to + line up. + </p> + </li> + <li> + <p><code class="command"><a name="c202">\quad</a></code> (1em). + </p> + </li> + <li> + <p><code class="command"><a name="c203">\qquad</a></code> (2em). + </p> + </li> + </ul> + <p>Beyond this, all horizontal space within + paragraphs is automatically flexible, + <a name="I139"></a> as this is what + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses to achieve justification. Never be + tempted to try and change the spacing between letters + unless you have some professional training in + typography. Some systems use letterspacing + (incorrectly called ‘tracking’) as an aid + to justification and it is almost always wrong to do + so (and looks it). While it <em>is</em> + possible to change letterspacing (with the + <span class="package"><a name="m71">soul</a></span> package), it should only + be done by a typographer, and then only very rarely, + as the settings are very subtle and beyond the scope + of this book. + </p> + </dd> + </dl> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.1.2 <a name="runningheads">Headers and footers</a></h3> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built-in settings to control the page style + of its default page layouts. These are implemented with the + <code class="command"><a name="c204">\pagestyle</a></code> command, which can take one of + the following arguments. + </p> + <blockquote> + <dl> + <dt><b><span class="option"><a name="o15">plain</a></span></b></dt> + <dd> + <p>for a page number centered at the bottom;</p> + </dd> + <dt><b><span class="option"><a name="o16">empty</a></span></b></dt> + <dd> + <p>for nothing at all, not even a page number;</p> + </dd> + <dt><b><span class="option"><a name="o17">headings</a></span></b></dt> + <dd> + <p>for running heads based on the current chapter and + section; + </p> + </dd> + <dt><b><span class="option"><a name="o18">myheadings</a></span></b></dt> + <dd> + <p>which lets you use your own reprogrammed + definitions of how <code class="command"><a name="c205">\markright</a></code> and + <code class="command"><a name="c206">\markboth</a></code> commands, which control + how chapter and section titles get into page + headers. + </p> + </dd> + </dl> + </blockquote> + <p>The command <code class="command"><a name="c207">\thispagestyle</a></code> (taking the + same arguments) can be used to force a specific style for + the current page only. + </p> + <p>However, the easiest way is to use the + <span class="package"><a name="m72">fancyhdr</a></span> package, which lets you + redefine the left-hand, centre, and right-hand page headers + and footers for both odd and even pages (twelve objects in + all). These areas can contain a page number, fixed text, + variable text (like the current chapter or section title, or + the catch-words of a dictionary), or even a small image. + They can also be used to do page backgrounds and frames, by + making one of them the top corner of an invisible box which + ‘hangs’ text or images down over the whole + page. + </p> + <p>The settings for the downloadable version of this + document can be used as an example: for the whole story you + have to read the documentation. + </p> + <blockquote><pre> +\pagestyle{fancy}\fancyhead{} +\renewcommand\headrulewidth{.1pt} +\fancyhead[LO,RE]{\footnotesize\sffamily\lite\leftmark} +\fancyhead[LE,RO]{\footnotesize\sffamily\lite\itshape + \rightmark} +\fancyfoot[C]{} +\fancyfoot[LE,RO]{\setlength{\fboxsep}{2pt}\ovalbox% + {\footnotesize\sffamily\thepage}} +\fancyfoot[LO,RE]{\footnotesize\sffamily\lite\@title} +\fancypagestyle{plain}{\fancyhf{} + \fancyfoot[R]{\setlength{\fboxsep}{2pt}\ovalbox{% + \footnotesize\sffamily\thepage}} + \fancyfoot[L]{\footnotesize\sffamily\lite\@title} + \renewcommand{\headrulewidth}{0pt}} + </pre></blockquote> + <p>This is probably more complex than most documents, but + it illustrates some common requirements: + </p> + <ol type="1"> + <li> + <p>Settings are prefixed by making the + <code class="command"><a name="c208">\pagestyle</a></code> ‘fancy’ + and setting the <code class="command"><a name="c209">\fancyhead</a></code> to + null to zap any predefined values. + </p> + </li> + <li> + <p>The thickness of the rule at the top of the page can + be changed (or set to 0pt to make it disappear). + </p> + </li> + <li> + <p>The header and footer settings are specified with L, + C, and R for left, centre, and right; and with O and E + for Odd and Even numbered pages. In each setting, the + typeface style, size, and font can be specified along + with macros which implement various dynamic texts (here, + the current chapter and section titles, which <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + stores in <code class="command"><a name="c210">\rightmark</a></code> and + <code class="command"><a name="c211">\leftmark</a></code>). + </p> + </li> + <li> + <p>The ‘plain’ variant is used for chapter + starts, and resets some of the parameters + accordingly. + </p> + </li> + </ol> + </div> + </div> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2 <a name="fontuse">Using fonts</a></h2><a name="I140"></a><p>The default typeface in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is <a name="CM" class="acroref">Computer Modern</a> (<small>CM</small>). This typeface was + designed by Knuth for use with <span class="TEX">T<span class="E">E</span>X</span> because it is a book + face, and he designed <span class="TEX">T<span class="E">E</span>X</span> originally for typesetting books. + Because it is one of the very few book typefaces with a + comprehensive set of fonts, including a full suite of + mathematics, it has remained the default, rather than the + Times you find in wordprocessors, because until recently the + mathematical symbols for Times were a commercial product often + unavailable to users of free software. + </p> + <p><a name="I141"></a><a name="I142"></a><span style="font-family:Times; font-size:12ptpt; "><img src="cmr.png" width="100%" class="invisible"></span></p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">If you are reading this in a web browser, the above + paragraph is only a low-resolution copy because browsers + don't usually have the Computer Modern font available. + All the rest of this document is set in your current browser serif font, with + your current browser sans-serif font for some of the headings and your current browser monospace font for the + fixed-width type. + </p> + </blockquote> + <p>In addition to <small><a href="chapter8.html#CM" class="acroref" name="A189" title="Computer Modern">CM</a></small>, there are + many other METAFONT fonts which can be downloaded from + <small><a href="chapter5.html#CTAN" class="acroref" name="A190" title="Comprehensive Archive Network">CTAN</a></small>, including a large collection + of historical, symbol, initial, and non-Latin fonts. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + also comes with the ‘Adobe 35’ + typefaces which are built into laser printers and other + <small><a href="preface.html#DTP" class="acroref" name="A191" title="desktop publishing">DTP</a></small> systems, and some more fonts + donated by the X Consortium. Plus, of course, standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use any of the thousands of + Type 1 fonts available, and + <i><a name="p195">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> can use any of the + thousands of TrueType fonts as well. + </p> + <p>In the following lists, if there is a package available, + its name is given in parentheses after the name of the + typeface. The font-family name is shown on the right-hand + side. If a non-standard font-encoding is needed, its name is + shown before the font-family name. + </p><a name="I143"></a><a name="I144"></a><a name="I145"></a><a name="I146"></a><div align="center" class="sampler"><a name="fontable-mf"></a><h3 align="left" class="tablehead">Latin-alphabet typefaces (METAFONT)</h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Roman</small></th> + <td align="right"><small>cmr</small></td> + </tr> + </table><img src="p70-01.png" alt="Sample of cmr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Sans</small></th> + <td align="right"><small>cmss</small></td> + </tr> + </table><img src="p70-02.png" alt="Sample of cmss" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Computer Modern Typewriter</small></th> + <td align="right"><small>cmtt</small></td> + </tr> + </table><img src="p70-03.png" alt="Sample of cmtt" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora</small></th> + <td align="right"><small>panr</small></td> + </tr> + </table><img src="p70-04.png" alt="Sample of panr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora Sans</small></th> + <td align="right"><small>pss</small></td> + </tr> + </table><img src="p70-05.png" alt="Sample of pss" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Pandora Typewriter</small></th> + <td align="right"><small>pntt</small></td> + </tr> + </table><img src="p70-05.png" alt="Sample of pntt" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Universal</small></th> + <td align="right"><small>uni</small></td> + </tr> + </table><img src="p70-06.png" alt="Sample of uni" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Concrete</small></th> + <td align="right"><small>ccr</small></td> + </tr> + </table><img src="p70-07.png" alt="Sample of ccr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Éıreannach</small></th> + <td align="right"><small>eiad</small></td> + </tr> + </table><img src="p70-10.png" alt="Sample of eiad" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Rustic</small></th> + <td align="right"><small>rust</small></td> + </tr> + </table><img src="p70-15.png" alt="Sample of rust" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Uncial</small></th> + <td align="right"><small>uncl</small></td> + </tr> + </table><img src="p70-17.png" alt="Sample of uncl" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Dürer</small></th> + <td align="right"><small>zdu</small></td> + </tr> + </table><img src="p70-18.png" alt="Sample of zdu" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Fraktur</small></th> + <td align="right"><small>yfrak</small></td> + </tr> + </table><img src="p70-19.png" alt="Sample of yfrak" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Gothic</small></th> + <td align="right"><small>ygoth</small></td> + </tr> + </table><img src="p70-20.png" alt="Sample of ygoth" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Schwäbische</small></th> + <td align="right"><small>yswab</small></td> + </tr> + </table><img src="p70-21.png" alt="Sample of yswab" width="100%"><hr> + </div> + <div align="center" class="sampler"><a name="fontable-adobe"></a><h3 align="left" class="tablehead">Latin-alphabet typefaces (PostScript Type 1) from + Adobe + </h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Avant Garde</small></th> + <td align="right"><small>pag</small></td> + </tr> + </table><img src="p70-26.png" alt="Sample of pag" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Bookman</small></th> + <td align="right"><small>pbk</small></td> + </tr> + </table><img src="p70-22.png" alt="Sample of pbk" width="100%">Uses Avant Garde as the sans-serif and Courier for + monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Courier</small></th> + <td align="right"><small>pcr</small></td> + </tr> + </table><img src="p70-29.png" alt="Sample of pcr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Helvetica</small></th> + <td align="right"><small>phv</small></td> + </tr> + </table><img src="p70-27.png" alt="Sample of phv" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>New Century Schoolbook</small></th> + <td align="right"><small>pnc</small></td> + </tr> + </table><img src="p70-23.png" alt="Sample of pnc" width="100%">Uses Helvetica as the sans-serif font and Courier + for monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Palatino</small></th> + <td align="right"><small>ppl</small></td> + </tr> + </table><img src="p70-24.png" alt="Sample of ppl" width="100%">Uses Avant Garde as the sans-serif and Courier for + monospace. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Symbol</small></th> + <td align="right"><small>psy</small></td> + </tr> + </table><img src="p70-31.png" alt="Sample of psy" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Times New Roman</small></th> + <td align="right"><small>ptm</small></td> + </tr> + </table><img src="p70-25.png" alt="Sample of ptm" width="100%">Uses Helvetica as the sans-serif font and Courier + for monospace. Mathematical symbols for Times are + available both free and commercially. + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Zapf Chancery</small></th> + <td align="right"><small>pzc</small></td> + </tr> + </table><img src="p70-28.png" alt="Sample of pzc" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Zapf Dingbats</small></th> + <td align="right"><small>pzd</small></td> + </tr> + </table><img src="p70-30.png" alt="Sample of pzd" width="100%"><hr> + </div> + <p>As mentioned in <a href="chapter4.html#print">section 4.4</a>, the + ‘Adobe 35’ fonts can be used with any + printer, not just a laser printer or typesetter. The + <i><a name="p196">Ghostscript</a></i> interpreter and the + <i><a name="p197">GSview</a></i> viewer come with a large set + of printer drivers, so you just create PostScript output and + print from <i><a name="p198">GSview</a></i>. + </p> + <p>Incidentally, the 35 refers to the total number of fonts + for the 10 typefaces, including their bold, italic, and + bold-italic variants. + </p> + <p>Postscript Type 1 fonts have been the mainstay of the + graphic arts industries for many years, as they allow much + better definition of variance + (‘hinting’) than most other formats. + However, the font format remains proprietary to Adobe, even + though they have released it for public use, which means they + could change it without warning. A new format called + ‘OpenType’ is designed to overcome + this, and some versions of <span class="TEX">T<span class="E">E</span>X</span> are + already able to use OpenType fonts. + </p> + <div align="center" class="sampler"><a name="fontable-x"></a><h3 align="left" class="tablehead">Latin-alphabet fonts (PostScript Type 1) from the X + Consortium + </h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>Charter</small></th> + <td align="right"><small>bch</small></td> + </tr> + </table><img src="p70-32.png" alt="Sample of bch" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Nimbus Roman</small></th> + <td align="right"><small>unm</small></td> + </tr> + </table><img src="p70-33.png" alt="Sample of unm" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Nimbus Sans</small></th> + <td align="right"><small>unms</small></td> + </tr> + </table><img src="p70-34.png" alt="Sample of unms" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>URW Antiqua</small></th> + <td align="right"><small>uaq</small></td> + </tr> + </table><img src="p70-35.png" alt="Sample of uaq" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>URW Grotesk</small></th> + <td align="right"><small>ugq</small></td> + </tr> + </table><img src="p70-36.png" alt="Sample of ugq" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Utopia</small></th> + <td align="right"><small>put</small></td> + </tr> + </table><img src="p70-37.png" alt="Sample of put" width="100%">Removed from recent distributions as it is not + free. + <hr> + </div> + <div align="center" class="sampler"><a name="fontable-nonlat"></a><h3 align="left" class="tablehead">Non-Latin-alphabet typefaces (METAFONT)</h3> + <hr> + <table width="100%"> + <tr> + <th align="left"><small>BB Dingbats</small></th> + <td align="right"><small>ding</small></td> + </tr> + </table><img src="p70-08.png" alt="Sample of ding" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Cypriot</small></th> + <td align="right"><small>cypr</small></td> + </tr> + </table><img src="p70-09.png" alt="Sample of cypr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Etruscan</small></th> + <td align="right"><small>etr</small></td> + </tr> + </table><img src="p70-11.png" alt="Sample of etr" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Linear `B'</small></th> + <td align="right"><small>linb</small></td> + </tr> + </table><img src="p70-12.png" alt="Sample of linb" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Phoenician</small></th> + <td align="right"><small>phnc</small></td> + </tr> + </table><img src="p70-13.png" alt="Sample of phnc" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Runic</small></th> + <td align="right"><small>fut</small></td> + </tr> + </table><img src="p70-14.png" alt="Sample of fut" width="100%"><hr> + <table width="100%"> + <tr> + <th align="left"><small>Bard</small></th> + <td align="right"><small>zba</small></td> + </tr> + </table><img src="p70-16.png" alt="Sample of zba" width="100%"><hr> + </div> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Just to make it clear: standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses only + METAFONT and <a name="t32">PostScript</a> Type 1 + fonts. <i><a name="p199">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> can use TrueType + fonts as well. + </p> + </blockquote> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.1 Changing the default font family + </h3><a name="I147"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> expects to work with three font families as + defaults: + </p><a name="I148"></a><div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Font family</th> + <th valign="bottom" align="left">Code</th> + </tr> + <tr> + <td valign="top" align="left">Roman (serif, with tails on the uprights), the + default + </td> + <td valign="top" align="left" style="font-family:monospace;">rm</td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif, with no tails on + the uprights + </td> + <td valign="top" align="left" style="font-family:monospace;">sf</td> + </tr> + <tr> + <td valign="top" align="left">Monospace (fixed-width or + typewriter) + </td> + <td valign="top" align="left" style="font-family:monospace;">tt</td> + </tr> + </table> + </div> + <p>The start-up default for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> equates the + <code class="literal">rm</code> default with the + <i><a name="v32">cmr</a></i> font-family (Computer Modern Roman), + <code class="literal">sf</code> with <i><a name="v33">cmss</a></i>, and + <code class="literal">tt</code> with <i><a name="v34">cmtt</a></i>. If you + use one of the packages listed in <a href="chapter8.html#fontable-mf">the table in section 8.2</a>, it will + replace the defaults of the same type: for example, + <code class="literal">\usepackage{bookman}</code> makes the default + <code class="literal">rm</code> font-family Bookman + (<i><a name="v35">pbk</a></i>), but leaves the sans-serif + (<code class="literal">sf</code>) and monospace + (<code class="literal">tt</code>) families untouched. Equally, + <code class="literal">\usepackage{helvet}</code> changes the default + sans-serif family to Helvetica but leaves the serif (Roman) + and monospace families untouched. Using both commands will + change both defaults because they operate + independently. + </p> + <p><em>However</em>...as it is common to + want to change all three defaults at the same time, some of + the most common ‘suites’ of typefaces + are provided as packages: + </p> + <blockquote> + <dl> + <dt><b><span class="package"><a name="m73">times</a></span></b></dt> + <dd> + <p>changes to Times/Helvetica/Courier.</p> + </dd> + <dt><b><span class="package"><a name="m74">pslatex</a></span></b></dt> + <dd> + <p>same as <span class="package"><a name="m75">times</a></span> but uses a + specially narrowed Courier to save space (normal + Courier is rather inelegantly wide). This is the + preferred setting if you want Times.<sup><a href="#F43">1</a></sup></p> + </dd> + <dt><b><span class="package"><a name="m78">newcent</a></span></b></dt> + <dd> + <p>changes to New Century + Schoolbook/Helvetica/Courier. + </p> + </dd> + <dt><b><span class="package"><a name="m79">palatino</a></span></b></dt> + <dd> + <p>changes to Palatino/Avant Garde/Courier.</p> + </dd> + <dt><b><span class="package"><a name="m80">palatcm</a></span></b></dt> + <dd> + <p>changes the roman to Palatino only, but with + <small><a href="chapter8.html#CM" class="acroref" name="A192" title="Computer Modern">CM</a></small> mathematics + </p> + </dd> + </dl> + </blockquote> + <p>Where no package name is given in <a href="chapter8.html#fontable-mf">the table in section 8.2</a>, it means the + font is rarely used as a default by itself except in special + cases like users' own homebrew packages. To use such a + font you have to specify it manually, or make a little macro + for yourself if you use it more than once. + </p> + <ol class="footnotes" start="1"> + <li><a name="F43">The <span class="package"><a name="m76">pslatex</a></span> package + is also said to be outdated by some experts + because it implements rather long-windedly what + can now be done in three commands. However, until + these replace the current version, I recommend + continuing to use <span class="package"><a name="m77">pslatex</a></span> + when you want Times with Helvetica and narrow + Courier.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.2 <a name="fontfam">Changing the font-family temporarily</a></h3><a name="I149"></a><p>To shift to another font family on a temporary basis, + use the commands <code class="command"><a name="c212">\fontencoding</a></code> (if + needed), <code class="command"><a name="c213">\fontfamily</a></code>, and + <code class="command"><a name="c214">\selectfont</a></code>, and <em>enclose the + commands <span class="normal">and</span> the text in curly + braces</em>. Note that this is a + <em>different</em> way of using curly braces to + how we have used them before: it limits the effect of a + change to the material inside the braces. + </p> + <blockquote class="example"><pre> +{\fontfamily{phv}\selectfont +Helvetica looks like this}: +{\fontencoding{OT1}\fontfamily{bch}\selectfont +Charter looks like this}. + </pre><p class="example"><span style="font-family:Helvetica; ">Helvetica + looks like this</span>: <span style="font-family:; ">Charter looks like + this</span>. + </p> + </blockquote> + <p>In this example, the <code class="command"><a name="c215">\fontencoding</a></code> + command has been used to ensure that the typeface will work + even if the sentence is used in the middle of something + typeset in a different encoding (like this + document).<sup><a href="#F44">2</a></sup></p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="grouping">Grouping</a></h3><a name="I150"></a><p>Note carefully this use of curly braces to restrict + the scope of a change rather than delimit the argument to + a command. This is called + ‘grouping’ and it makes the effect + any changes made <em>inside</em> the braces + local, so that they do not interfere with the text + following. Any changes to fonts or other values made + within the curly braces cease when the closing curly brace + is processed. + </p> + </td> + </tr> + </table> + </div> + <p>In a normal document, of course, random typeface changes + like this are rather rare. You select your typeface[s] once + at the start of the document, and stick with them. + </p> + <p>Most cases where people want to do unusual typeface + changes involve things like special symbols on a repetitive + basis, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides much easier programmable ways + to make these changes into shorthand commands (called + macros: see <a href="chapter9.html#macros">Chapter 9</a>). You could, for + example, make a macro called <code class="command"><a name="c216">\product</a></code> + which would let you typeset product names in a distinct + typeface: + </p> + <blockquote><pre> +Andlinger, Inc., has replaced \product{Splosh} with +\product{SuperSplosh}. + </pre></blockquote> + <p>This is one of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s most powerful features. + It means that if you needed to change your + <code class="command"><a name="c217">\product</a></code> command at some later stage to + use a different font, you only have to change three + characters in the macro (the font-family name), and + you don't need to edit your document text at all! + What's more, a macro could do other things at the same time, + like add an entry to an index of products. + </p> + <p>However, vastly more common are changes to type + <em>style</em>, while staying with the same + font-family. + </p> + <ol class="footnotes" start="2"> + <li><a name="F44">Test for the observant reader: in what typeface will + the colon (:) in the example be set?</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.3 Changing font style + </h3><a name="I151"></a><p>Within each typeface or font family there are usually + several different ‘looks’ to the type + design. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> distinguishes between font <b><i><a name="family">family</a></i></b>, font <b><i><a name="shape">shape</a></i></b>, and font <b><i><a name="series">series</a></i></b>: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Type style</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example (using Computer Modern)</th> + </tr> + <tr> + <td valign="top" align="left">Upright</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c218">\upshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; "><img src="p71-01.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Italic</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c219">\itshape</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-style:italic; "><img src="p71-02.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Slanted</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c220">\slshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-style:italic; "><img src="p71-03.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Small Capitals</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c221">\scshape</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-style:smallcaps; "><small>THE QUICK BROWN FOX + JUMPS OVER THE</small></span></td> + </tr> + <tr> + <td valign="top" align="left">Bold</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c222">\bfseries</a></code>* + </td> + <td valign="top" align="left"><span style="font-family:Times; font-weight:bold; "><img src="p71-05.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Bold Extended</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c223">\bfseries</a></code>† + </td> + <td valign="top" align="left"><span style="font-family:Times; font-weight:bold; "><img src="p71-06.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c224">\sffamily</a></code></td> + <td valign="top" align="left"><span style="font-family:Helvetica; "><img src="p71-07.png" width="100%" class="invisible"></span></td> + </tr> + <tr> + <td valign="top" align="left">Monospace</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="command"><a name="c225">\ttfamily</a></code></td> + <td valign="top" align="left"><span style="font-family:Courier; "><img src="p71-08.png" width="100%" class="invisible"></span></td> + </tr> + </table> + <div align="left"> + <dl><small> + <dd><i>*</i>) Not all typefaces have all + variants! Some only have bold and italics. + </dd> + <dd><i>†</i>) Some typefaces do not have + both bold and bold extended: by default <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses + <code class="command"><a name="c226">\bfseries</a></code> for bold + extended. + </dd></small></dl> + </div> + </div> + <p>These ‘shape’, + ‘series’, and + ‘family’ commands are <b><i><a name="commutative">commutative</a></i></b>, so you can + combine a shape with a series and/or a family, without the + need to use <code class="command"><a name="c227">\selectfont</a></code>: + </p> + <blockquote><pre> +This gives you {\bfseries\itshape\sffamily bold +italic sans-serif type}, but beware + </pre></blockquote> + <p>This gives you <span style="font-family:sans-serif; font-weight:bold; font-style:italic; ">bold italic sans-serif type</span>, but + beware of pushing your fonts beyond their limits unless you + are a typographer. It is not normally meaningful to combine + one shape or series class with another of the same class, + such as trying to get slanted-italics. It's an + impossibility to combine one family with another (such as a + seriffed sans-serif typeface!). Slanted plus italics, for + example, doesn't make sense, as italics are already + slanted (although it is technically possible); and while + some typefaces may well possess italic small caps, they are + not in common use. Sans-serif and monospace (typewriter) are + different fonts, and often different typeface families + entirely.<sup><a href="#F45">3</a></sup></p> + <p>There is an alternative syntax for the most common type + shape and series commands which uses curly braces in the + normal ‘argument’ manner: + </p> + <div align="center"><a name="fontcmds"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="left">Type style</th> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example</th> + </tr> + <tr> + <td valign="top" align="left">Italic</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textit{text}</code></td> + <td valign="top" align="left">puts <span style="font-style:italic; ">text</span> + into italics + </td> + </tr> + <tr> + <td valign="top" align="left">Slanted</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsl{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:Times; font-style:italic; ">text</span> into + slanted type* + </td> + </tr> + <tr> + <td valign="top" align="left">Small Capitals</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsc{text}</code></td> + <td valign="top" align="left">puts <span style="font-style:smallcaps; "><small>TEXT</small></span> into + small caps + </td> + </tr> + <tr> + <td valign="top" align="left">Bold</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textbf{text}</code></td> + <td valign="top" align="left">puts <span style="font-weight:bold; ">text</span> into + bold type + </td> + </tr> + <tr> + <td valign="top" align="left">Sans-serif</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\textsf{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:sans-serif; ">text</span> + into sans-serif type + </td> + </tr> + <tr> + <td valign="top" align="left">Monospace</td> + <td valign="top" align="left" style="font-family:monospace;"><code class="literal">\texttt{text}</code></td> + <td valign="top" align="left">puts <span style="font-family:monospace; ">text</span> into + typewriter type + </td> + </tr> + </table> + <div align="left"> + <dl><small> + <dd><i>*</i>) If slanted is available separately + from italics. + </dd></small></dl> + </div> + </div> + <p>You can nest these inside one another too:</p> + <blockquote><pre> +...\textbf{\itshape\textsf{bold italic +sans-serif type}}... + </pre></blockquote> + <p><a name="uline"></a>Underlining isn't a font, and it is extremely + rare in typography except for special purposes. If you think + you need it, use the <span class="package"><a name="m81">ulem</a></span> package + with the <code class="literal">normalem</code> option, and the + <code class="command"><a name="c228">\uline</a></code> command. + </p> + <ol class="footnotes" start="3"> + <li><a name="F45">Although if you're a typographer wanting to + experiment with typewriter typefaces with and without + serifs, you can use METAFONT to do exactly this kind + of thing. But that's way outside the scope of this + document.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.4 <a name="fontsize">Font sizes</a></h3><a name="I152"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has built into its defaults a set of predefined + font size steps corresponding more or less to the + traditional sizes available to metal typesetters. This is + deliberate, as these sizes have grown up over 500 years of + printing as those which go best together for book-work, + which is where <span class="TEX">T<span class="E">E</span>X</span> originated. + </p> + <p>These sizes are also reflected in the size steps at + which Computer Modern was designed. It often comes as a + surprise to new users that many typefaces are not designed + as a single font and just scaled up or down, but specially + drawn at different sizes to make them more legible. + </p> + <p>As an example, <img src="cmr12-12.png" align="middle" alt="here's 12pt Computer Modern" height="12pt">, and <img src="cmr5-12.png" align="middle" height="10px" alt="{\font\cmbig=cmr5 at12pt\cmbig here's 5pt Computer Modern scaled up to 12pt}">, and + <img src="cmr17-12.png" align="middle" height="10px" alt="{\font\cmsmall=cmr17 at12pt\cmsmall here's 17pt Computer Modern scaled down to 12pt}"> so you can see there really is a + significant difference. In general, you probably don't + want to go scaling fonts too much beyond their design size + because they will start to look very odd. + </p> + <p>The default sizes (and the commands that operate them) + are based on the use of a 10pt font, which is the normal + size for most texts. Using the larger defaults (11pt and + 12pt) for the body font will use 11pt and 12pt designs, with + other sizes (eg headings) resized to match. The exact sizes + used are listed in the macros in the Class Option files + <code>size10.clo</code>, + <code>size11.clo</code> and + <code>size12.clo</code>. <span class="TEX">T<span class="E">E</span>X</span>'s default fonts + above 10pt are in fact scaled by a factor of 1.2, as shown + in the fourth column of the table below. + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Command</th> + <th valign="bottom" align="left">Example</th> + <th valign="bottom" align="left">Nominal point + size + </th> + <th valign="bottom" align="left">Exact point + size + </th> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c229">\tiny</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:5pt; ">The quick brown fox + jumps over the lazy dog</span></td> + <td valign="top" align="right">5</td> + <td valign="top" align="right">5</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c230">\scriptsize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:7pt; ">The quick brown + fox jumps over the laz</span></td> + <td valign="top" align="right">7</td> + <td valign="top" align="right">7</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c231">\footnotesize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:8pt; ">The quick + brown fox jumps over the l</span></td> + <td valign="top" align="right">8</td> + <td valign="top" align="right">8</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c232">\small</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:9pt; ">The quick brown fox + jumps over th</span></td> + <td valign="top" align="right">9</td> + <td valign="top" align="right">9</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c233">\normalsize</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:10pt; ">The quick + brown fox jumps over</span></td> + <td valign="top" align="right">10</td> + <td valign="top" align="right">10</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c234">\large</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:12pt; ">The quick brown fox + jumps</span></td> + <td valign="top" align="right">12</td> + <td valign="top" align="right">12</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c235">\Large</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:14pt; ">The quick brown fox + ju</span></td> + <td valign="top" align="right">14</td> + <td valign="top" align="right">14.40</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c236">\LARGE</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:18pt; ">The quick brown + fo</span></td> + <td valign="top" align="right">18</td> + <td valign="top" align="right">17.28</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c237">\huge</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:20pt; ">The quick + brown</span></td> + <td valign="top" align="right">20</td> + <td valign="top" align="right">20.74</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c238">\Huge</a></code></td> + <td valign="top" align="left"><span style="font-family:Times; font-size:24pt; ">The quick + bro</span></td> + <td valign="top" align="right">24</td> + <td valign="top" align="right">24.88</td> + </tr> + </table> + </div> + <p>While these ‘shorthand’ commands + relieve the beginner of having to worry about the + ‘right’ size for a given task, when + you need a specific size there is the + <code class="command"><a name="c239">\fontsize</a></code> command: + </p> + <blockquote><pre> +\fontsize{22}{28}\selectfont This is 22pt +type 6pt leaded + </pre></blockquote> + <p>‘Leading’ comes from the old metal-type + practice of adding a lead strip between lines to increase the + spacing. + </p> + <p>The <code class="command"><a name="c240">\fontsize</a></code> command takes two + arguments: the point size and the baseline distance. The + above example gives you 22pt type on a 28pt baseline + (i.e. with 6pt extra space or + ‘leading’ between the lines). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Computer Modern fonts (the default) come fixed at the + named size steps shown in the table, and if you try to use + an odd size in between, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will pick the closest + step instead. If you really need to use <small><a href="chapter8.html#CM" class="acroref" name="A193" title="Computer Modern">CM</a></small> at arbitrary sizes there is a + package <span class="package"><a name="m82">type1cm</a></span> which lets you + override the default steps. If you use + <a name="t33">PostScript</a> (Type 1) fonts, the + step sizes do not apply and the font scaling is infinitely + variable. + </p> + </blockquote> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.5 Logical markup + </h3> + <p>All this playing around with fonts is very pretty but + you normally only do it for a reason, even if that reason is + just to be decorative. Italics, for example, are used for + many things: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Cause</th> + <th valign="bottom" align="left">Effect</th> + </tr> + <tr> + <td valign="top" align="left">Foreign words</td> + <td valign="top" align="left" style="font-style:italic;">ex officio</td> + </tr> + <tr> + <td valign="top" align="left">Scientific names</td> + <td valign="top" align="left" style="font-style:italic;">Ranunculus ficaria</td> + </tr> + <tr> + <td valign="top" align="left">Emphasis</td> + <td valign="top" align="left" style="font-style:italic;">must not</td> + </tr> + <tr> + <td valign="top" align="left">Titles of documents</td> + <td valign="top" align="left" style="font-style:italic;">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion + </td> + </tr> + <tr> + <td valign="top" align="left">Product names</td> + <td valign="top" align="left" style="font-style:italic;">Corel's WordPerfect</td> + </tr> + <tr> + <td valign="top" align="left">Variables in maths</td> + <td valign="top" align="left" style="font-style:italic;"><span class="math"><i>E=mc</i><sup>2</sup></span></td> + </tr> + <tr> + <td valign="top" align="left">Subtitles or headings</td> + <td valign="top" align="left" style="font-style:italic;">How to get started</td> + </tr> + <tr> + <td valign="top" align="left">Decoration</td> + <td valign="top" align="left" style="font-style:italic;">FREE UPGRADE!!!</td> + </tr> + </table> + </div> + <p>Humans usually have no problem telling the difference + between these reasons, because they can read and understand + the meaning and context. Computers cannot (yet), so it has + become conventional to use descriptive names which make the + distinction explicit, even though the appearance may be the + same. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has some of these built in, like + <code class="command"><a name="c241">\emph</a></code>, which provides + <em>emphasis</em>. This has a special feature + because <span style="font-style:italic; ">when the surrounding text is + already italic, <span class="normal">emphasis</span> + automatically reverts to <span class="normal">upright + type</span></span>, which is the normal practice + for typesetting. + </p> + <blockquote><pre> +This has a special feature because {\itshape when the +surrounding text is already italic, \emph{emphasis} +automatically reverts to upright type, which is the + </pre></blockquote> + <p><a name="emph"></a>This sensitivity to logic is programmed into + the definition of <code class="command"><a name="c242">\emph</a></code> and it's not + hard to make up other commands of your own which could do + the same, such as <code class="command"><a name="c243">\foreign</a></code> or + <code class="command"><a name="c244">\product</a></code>. + </p> + <p>But why would you bother? In a short document it's + probably not important, but if you're writing a long + report, or a formal document like an article, a book, or a + thesis, it makes writing and editing hugely easier if you + can control whole groups of special effects with a single + command, such as italicising, indexing, or cross-referencing + to a glossary. If a format needs changing, you only have to + change the definition, and every occurrence automatically + follows suit. + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">Beware of this ‘vaine conceipt of simple men, + which judge things by ther effects, and not by ther + causes’. (Edmund Spenser, 1633) It's hugely + more efficient to have control of the cause than the + effect. + </p> + </blockquote> + <p>It also makes it possible to find and act on groups of + meanings — such as making an index of scientific names + or product names (as in this document) — if they are + identified with a special command. Otherwise you'd + spend weeks hunting manually through every + <code class="command"><a name="c245">\textit</a></code> command to find the ones you + wanted. This is the importance of automation: it can save + you time and money. + </p> + <p>In <a href="chapter9.html#macros">Chapter 9</a> we will see how to make your + own simple commands like this. + </p> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.2.6 Colour + </h3><a name="I153"></a><a name="I154"></a><p>You can typeset anything in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in any colour you + want using the <span class="package"><a name="m83">color</a></span> package. + First, you need to add the command + <code class="literal">\usepackage{color}</code> to your preamble (note + the US spelling of color!). This makes available a default + palette of primary colours: <span style="color:red; ">red</span>, <span style="color:green; ">green</span>, and <span style="color:blue; ">blue</span> for the <small><a href="chapter8.html#RGB" class="acroref" name="A194" title="Red-Green-Blue">RGB</a></small> colour model used for emitted light + (television screens), and <span style="color:cyan; ">cyan</span>, <span style="color:magenta; ">magenta</span>, <span style="color:yellow; ">yellow</span>, and black for the + <small><a href="chapter8.html#CMYK" class="acroref" name="A195" title="Cyan-Magenta-Yellow-Black">CMYK</a></small> colour model used for + reflected light (printing). + </p> + <p>For the occasional word or phrase in colour, use the + command <code class="command"><a name="c246">\textcolor</a></code> with two arguments, the + colour name and the text: <code class="literal">\textcolor{red}{like + this}</code>. There is a <code class="command"><a name="c247">\color</a></code> + command as well, for use within groups: + </p> + <blockquote><pre> +...{\color{blue}some text in blue}... + </pre></blockquote> + <p>If you have the <a name="t34">PostScript</a> + printer driver <i><a name="p200">dvips</a></i> installed, + you also get a separate 64-colour palette of predefined + <b><i><a name="colornames">color names</a></i></b>. These + represent approximately the colours in the big box of + <i><a name="p201">Crayola</a></i> colouring pencils much + favoured by artists and designers. This adds a new colour + model called ‘<code class="literal">named</code>’, so if + you want the <i><a name="p202">Crayola</a></i> colour + <span style="color:#FF00DD; ">RubineRed</span>, you can use the + <code class="command"><a name="c248">\color</a></code> or <code class="command"><a name="c249">\textcolor</a></code> + commands with a preceding optional argument + ‘<span class="option"><a name="o19">named</a></span>’: + </p> + <blockquote><pre> +\color[named]{RubineRed} +\textcolor[named]{RubineRed}{some red text} +</pre></blockquote> + <p>As some of the ‘<code class="literal">named</code>’ + colour names are quite long, you can create a short name of + your own for colours you use frequently, using the + <code class="command"><a name="c250">\definecolor</a></code> command: + </p> + <blockquote><pre> +\definecolor{mb}{named}{MidnightBlue} + </pre></blockquote> + <p>The <code class="command"><a name="c251">\definecolor</a></code> command needs three + arguments: your shorthand name, the name of the colour model, + and the colour specification. In the case of the + ‘<code class="literal">named</code>’ model, the last + argument is one of the 64 colour names. To + use these names with <i><a name="p203">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>, + you need to use the <span class="option"><a name="o20">pdftex</a></span> option to the + <span class="package"><a name="m84">color</a></span> package. + </p> + <p>Using the <code class="command"><a name="c252">\definecolor</a></code> command, you + can define any colour you want by giving it a name, + specifying which colour model, and providing the <a name="RGB" class="acroref">Red-Green-Blue</a> (<small>RGB</small>) or <a name="CMYK" class="acroref">Cyan-Magenta-Yellow-Black</a> (<small>CMYK</small>) colour + values expressed as decimals, separated by commas. For + example, an <small><a href="chapter8.html#RGB" class="acroref" name="A198" title="Red-Green-Blue">RGB</a></small> shade given as + (37,125,224) in decimal (#250FE0 in hexadecimal as used + on the Web) can be given as + <blockquote><pre> +\definecolor{midblue}{rgb}{0.145,0.490,0.882} + </pre></blockquote> (divide each value by 255, the maximum for + each of the hues in the Red-Green-Blue colour model). You + can then use <code class="command"><a name="c253">\textcolor</a></code> with your new + colour name: <span style="color:midblue; ">the midblue looks like + this if you're reading in colour.</span></p> + <p>The <span class="package"><a name="m85">color</a></span> package also provides + a colour version of <code class="command"><a name="c254">\fbox</a></code> (see <a href="chapter6.html#fbox">section 6.7.2</a>) called + <code class="command"><a name="c255">\colorbox</a></code>: + </p> + <blockquote><pre> +\colorbox{midblue}{\color{magenta}Magenta on midblue} + </pre></blockquote> + <p><span style="background-color:#257DE2;color:magenta; ">Magenta on midblue</span>: you can + see how careful you need to be with colours! + </p> + </div> + </div> + <div class="sect1"> + <h2><a href="#typo"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3 <a name="instfonts">Installing new fonts</a></h2><a name="I155"></a><p>Different fonts come in a variety of packagings: the three + most common used with <span class="TEX">T<span class="E">E</span>X</span> systems are + <a name="t35">PostScript</a> fonts, TrueType fonts, and + METAFONT fonts. How you install them and where they go + depends on how you installed <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: all I can deal with here + are the standard locations within the <small><a href="chapter5.html#TDS" class="acroref" name="A199" title="Directory Structure">TDS</a></small>. + </p> + <p>Typefaces come supplied as one or more font + ‘outline’ files and a number of + ancillary files: + </p> + <blockquote> + <dl> + <dt><b>METAFONT typefaces</b></dt> + <dd> + <p>have a number of <code>.mf</code> source + (outline) files, possibly also some + <code>.fd</code> (font definition) files and a + <code>.sty</code> (style) file. The + <code>.tfm</code> (<span class="TEX">T<span class="E">E</span>X</span> font metric) files are + not needed, as they can be generated from the + outlines. + </p> + </dd> + <dt><b>PostScript typefaces</b></dt> + <dd> + <p>come as a pair of files: a <code>.pfb</code> + (PostScript font binary) or <code>.pfa</code> + (PostScript font <small><a href="chapter2.html#ASCII" class="acroref" name="A200" title="American Standard Code for Information Interchange">ASCII</a></small>) + outline, and an <code>.afm</code> (Adobe font + metric) file. There may also be + <code>.inf</code> and other files but these are + not needed for use with <span class="TEX">T<span class="E">E</span>X</span> systems. + </p> + </dd> + <dt><b>TrueType typefaces</b></dt> + <dd> + <p>are a single <code>.ttf</code> file, which + combines outline and metrics in one. + </p> + </dd> + </dl> + </blockquote> + <p>The instructions here assume the use of the <a name="NFSS" class="acroref">New Font Selection Scheme</a> (<small>NFSS</small>) used in + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>. If you are running the obsolete <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> 2.09, + upgrade it now. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1 <a name="mffonts">Installing METAFONT fonts</a></h3> + <p>This is the simplest installation. When you download + METAFONT fonts from <small><a href="chapter5.html#CTAN" class="acroref" name="A202" title="Comprehensive Archive Network">CTAN</a></small>, + you'll usually find a large number of outline files + (<code>.mf</code> files) and maybe some other types + as well (see below). + </p> + <div class="figure" align="center"> + <hr> + <caption><i>Figure 8.1</i>: <a name="mkfontdir">Creating a new subdirectory for a font</a></caption> + <div align="center" style="margin:12px"><img src="public.png" width="75%"></div> + <hr> + </div> + <ol> + <li> + <p>Create a new subdirectory named after the typeface + you're installing in + <code>texmf-local/fonts/source/public/</code>: + </p> + </li> + <li> + <p>Copy all the <code>.mf</code> + files to this directory. + </p> + </li> + <li> + <p>Copy the <code>.fd</code> (Font Definition) + file[s] and the <code>.sty</code> (style) file + to your <code>texmf/tex/latex/mfnfss</code> + directory. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="chapter5.html#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + <p>That's it. Unlike <a name="t36">PostScript</a> + fonts, METAFONT fonts can be used to generate the font + metric file (<code>.tfm</code> files) automatically + on-the-fly the first time the typeface is used, so there + should be nothing else to install. + </p> + <p>Now you can put a <code class="command"><a name="c256">\usepackage</a></code> command + in your preamble with whatever name the + <code class="literal">.sty</code> file was called, and read the + documentation to see what commands it gives to use the font + (refer to <a href="chapter5.html#packinst">the last paragraph in section 5.2.1</a> and <a href="chapter5.html#dtxdoc">step 2</a>). + </p> + <p>If the font came <em>without</em><code>.fd</code> or <code>.sty</code> files, + you'll need to find someone who can make them for you + (or follow the outline in <a href="chapter8.html#psfonts">section 8.3.2</a>, <a href="chapter8.html#fdfiles">step 11</a>). + </p> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1.1 Pre-generated metrics (optional) + </h4> + <p>Some METAFONT fonts come with pre-generated + <code>.tfm</code> files which you can install if + your system is slow at generating them itself: + </p> + <ol> + <li> + <p>Create a new subdirectory within + <code>texmf-local/fonts/tfm/public/</code> + named the same as the one you created for the + <code>.mf</code> files above. + </p> + </li> + <li> + <p>Copy all the <code>.tfm</code> files into + this subdirectory. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="chapter5.html#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + </div> + <div class="sect3"> + <h4><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.1.2 Pre-generated bitmaps (optional) + </h4> + <p>In some rare cases, pre-generated packed bitmap fonts + (<code>.pk</code> files) are also available from + <small><a href="chapter5.html#CTAN" class="acroref" name="A203" title="Comprehensive Archive Network">CTAN</a></small> (normally your previewer + and print driver creates these automatically, but you can + use the pre-generated ones if you have a very slow + system). If you really want to install these, it's a + similar procedure to the <code>.tfm</code> + files: + </p> + <ol> + <li> + <p>Create a new subdirectory within + <code>texmf-local/fonts/pk/modeless/</code> + named the same as the one you created for the + <code>.mf</code> and <code>.tfm</code> + files above. + </p> + </li> + <li> + <p>Copy all the <code>.nnnpk</code> files + into this subdirectory (<i>nnn</i> is + a number reflecting the dot-density of the bitmap). On + Microsoft systems the files may just end in + <code>.pk</code> and be kept in subdirectories + named after the dot-density, e.g. + <code>dpi360</code>. + </p> + </li> + <li> + <p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="chapter5.html#texindex">step 4 in the procedure in section 5.2.2</a>). + </p> + </li> + </ol> + </div> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.2 <a name="psfonts">Installing PostScript fonts</a></h3><a name="I156"></a><p>Lots of people will tell you that + <a name="t37">PostScript</a> fonts and PostScript + output are dead and that TrueType or OpenType fonts and PDF + output are the way to go. While this is true for many cases, + standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> does not work with TrueType fonts and does + not produce <small><a href="chapter4.html#PDF" class="acroref" name="A204" title="Portable Document Format">PDF</a></small> directly. Only + <i><a name="p204">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> does that, and there are + still many printers whose typesetters and platemakers use + <a name="t38">PostScript</a> rather than <small><a href="chapter4.html#PDF" class="acroref" name="A205" title="Portable Document Format">PDF</a></small>. In addition, operating system + support for scalable fonts is still very poor on Unix + systems (including Linux), despite the advances in recent + years, so in many cases it still makes sense to use + <span class="TEX">T<span class="E">E</span>X</span>'s built-in support for PostScript. + </p> + <p>Two files are needed for each font: the + <code>.afm</code><a name="AFM" class="acroref">Adobe Font + Metric</a> (<small>AFM</small>) and the <code>.pfb</code><a name="PFB" class="acroref">PostScript Font Binary</a> (<small>PFB</small>) files. + <em>You must have both for each font before you + start.</em> If you only have the near-obsolete + <code>.pfa</code><a name="PFA" class="acroref">PostScript Font + ASCII</a> (<small>PFA</small>) files, it may be possible to generate the + <code>.pfb</code> files using the + <i><a name="p205">t1binary</a></i> program from the + <i><a name="p206">t1utils</a></i> suite (see <a href="http://gnuwin32.sourceforge.net/packages/t1utils.htm"><tt>http://gnuwin32.sourceforge.net/packages/t1utils.htm</tt></a>) + or the excellent <i><a name="p207">PFAedit</a></i> font + editor (from <a href="http://pfaedit.sourceforge.net"><tt>http://pfaedit.sourceforge.net</tt></a>). There are + unfortunately still some companies distributing Type 1 + fonts in <code>.pfa</code> format (Mathematica is + one reported recently). + </p> + <blockquote class="warning"><a name=""></a><p><img src="warning.png" align="left" alt="!!!">The installation method I described in earlier + editions has worked perfectly for me for years, but I have + updated it here to use the facilities of the + <i><a name="p208">updmap</a></i> program (which comes + with your <span class="TEX">T<span class="E">E</span>X</span> installation). This removes the need for + one of the steps I gave before, which required editing the + <code>psfonts.map</code> file, as this is now + recreated by <i><a name="p209">updmap</a></i>. The + procedure below is <em>not</em> the official + way (that's <i><a name="p210">fontinst</a></i>), but + it is the basis for a script I am working on called + <i><a name="p211">Gutta-Percha</a></i><sup><a href="#F46">4</a></sup>, which automates the whole process. + </p> + </blockquote> + <p>I'll repeat this: before you start, make sure you + have all the <code>.afm</code> and + <code>.pfb</code> files for the typeface you want. + In the example below, I'm going to use a single font + from an imaginary typeface called Foo, so I have + <code class="literal">foo.afm</code> and + <code class="literal">foo.pfb</code> files. + </p> + <ol> + <li><b>Put the files in your temporary directory</b><br><p>This is <code>/tmp</code> on Linux, and + should be <code>C:\tmp</code> or + <code>C:\temp</code> or even + <code>C:\Windows\temp</code> on Microsoft + Windows. + </p> + </li> + <li><b>Decide on the short font name to use + inside <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>.</b><br><p>This is <em>not</em> the full + descriptive name (e.g. Baskerville Italic Bold + Extended) but an encoded font name in the format + <code class="literal">fnnsseec</code>, devised by <a name="N18">Karl Berry</a>, which stores the same information in no + more than eight characters for compatibility with + systems which cannot handle long filenames. The letters + in the format above have the following meanings (see the + <i><a name="p212">fontname</a></i> documentation on + your computer for more details): + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Letter</th> + <th valign="bottom" align="left">Meaning</th> + <th valign="bottom" align="left">Examples</th> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">f</code></td> + <td valign="top" align="left">foundry</td> + <td valign="top" align="left"><code class="literal">b</code>=Bitstream, + <code class="literal">m</code>=Monotype, + <code class="literal">p</code>=Adobe + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">nn</code></td> + <td valign="top" align="left">typeface</td> + <td valign="top" align="left"><code class="literal">ba</code>=Baskerville, + <code class="literal">tm</code>=Times, + <code class="literal">pl</code>=Palatino + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ss</code></td> + <td valign="top" align="left">series/shape</td> + <td valign="top" align="left"><code class="literal">r</code>=roman, + <code class="literal">bi</code>=bold italic, etc. + </td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ee</code></td> + <td valign="top" align="left">encoding</td> + <td valign="top" align="left"><code class="literal">8a</code>=default 8-bit ANSI, + <code class="literal">ly</code>=Y&Y's + <span class="TEX">T<span class="E">E</span>X</span>'n'ANSI + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-weight:bold; "><code class="literal">c</code></span></td> + <td valign="top" align="left">[small]caps</td> + <td valign="top" align="left">(this is a literal + ‘c’ character, used only + if needed) + </td> + </tr> + </table> + </div> + <p>The <code>texmf/fontname</code> directory in + your installation of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has files for several + foundries giving fully-formed names like these for + common fonts (e.g. <code class="literal">ptmr8a</code> is [Adobe] + <u><b>P</b></u>ost­Script + <u><b>T</b></u>i<u><b>m</b></u>es + <u><b>R</b></u>oman in an + <u><b>8</b></u>–bit <u><b>A</b></u>NSI + encoding; + <code class="literal">bgslly</code> is <u><b>B</b></u>itstream + <u><b>G</b></u>ill <u><b>S</b></u>ans + <u><b>L</b></u>ight in Y&Y's + <span class="TEX">T<span class="E">E</span>X</span>'n'ANSI encoding + [<u><b>LY</b></u>1]).<sup><a href="#F47">5</a></sup> Read the documentation in <cite><a href="http://www.ctan.org/tex-archive/info/fontname/" name="C40">Fontname: Filenames for <span class="TEX">T<span class="E">E</span>X</span> fonts</a></cite> to find out how to make up + your own short names if the foundry and font you want is + not shown in the <code>fontname</code> + directory. + </p> + <p>In this example we'll call our mythical example + typeface ‘zork’ (standing for + <u><b>Z</b></u>fonts <u><b>Or</b></u>dinary + Boo<u><b>k</b></u>face, because + <code>k</code> is the letter used for Book + fonts, <code>b</code> being already the code + for bold) and we'll assume the font comes in the two + files <code>foo.afm</code> and + <code>foo.pfb</code> that I mentioned + above. + </p> + <p>While the <i><a name="p213">fontname</a></i> + directories have ready-made lists of these names for + popular collections of typefaces, making them up + requires some knowledge of typographic terms and a + careful reading of the + <i><a name="p214">fontname</a></i> + documentation. + </p> + </li> + <li><b>Decide on your encoding</b><br><p>This is what tripped me up the first few times until + someone pointed me at Y&Y's<sup><a href="#F48">6</a></sup><span class="TEX">T<span class="E">E</span>X</span>'n'ANSI encoding which (to me) seems to + be the only one that includes the glyphs I want where I + want them.<sup><a href="#F49">7</a></sup><a name="I157"></a> Your mileage may vary. This encoding is + referred to as <code class="literal">LY1</code> within <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and + the encoding file is in + <code>texmf/dvips/base/texnansi.enc</code>. + Encoding is needed because Adobe fonts store their + characters in different places to the <span class="TEX">T<span class="E">E</span>X</span> + standard. + </p> + <p>Copy this encoding file to the temporary directory + where you're doing all this stuff. If you're + using the 8a or 8r encoding (or some other encoding), + then copy that file instead + (<code>8a.enc</code>, + <code>8r.enc</code>). + </p> + </li> + <li><b><a name="idfile">Convert <code>.afm</code> files to + <code>.tfm</code></a></b><br><p>The <i><a name="p215">afm2tfm</a></i> program is a + standard utility in the <code>bin</code> + directory of your <span class="TEX">T<span class="E">E</span>X</span> installation. If it's not, + update your installation. + </p> + <p>In a command window, type:</p> + <blockquote><pre class="footnotesize"> +afm2tfm foo.afm -v zorkly.vpl -p texnansi.enc \ +rzorkly.tfm >zork.id + </pre></blockquote> + <p>(Here and elsewhere I have sometimes had to break + the line to fit it on the printed page. It's actually + all typed as one long line if you omit the + backslash.) + </p> + <p>This creates a special ‘raw’<span class="TEX">T<span class="E">E</span>X</span> Font Metric file (hence the special + <code class="literal">r</code> prefix) that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use, with + a list of all its properties encoded with LY1 (the + <code>.vpl</code> or Virtual Property List + file). Many people will tell you that virtual fonts are + dead and that this is the wrong way to do it, but no-one + has ever shown me an alternative that works, so I stick + with it. + </p> + </li> + <li><b><a name="sc">Small caps (optional)</a></b><br><p>If you want a small caps variant faked up (perhaps + because the typeface family doesn't have a special + small-caps font), repeat the medicine like this: + </p> + <blockquote><pre class="footnotesize"> +afm2tfm foo.afm -V zorklyc.vpl -p texnansi.enc \ +rzorkly.tfm >>zork.id + </pre></blockquote> + <p>Note the capital <code class="literal">V</code> option here. + Yes, it <em>does</em> overwrite the + <code>rzorkly.tfm</code> created in the first + command. Let it. And those are <em>two</em> + of the ‘greater-than’ signs + before the <code>zork.id</code> filename because + we want to append to it, not overwrite it. + </p> + </li> + <li><b>Create the virtual font</b><br><p>Turn the <code>.vpl</code> files into + <code>.vf</code> and <code>.tfm</code> + pairs. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses these to convert from Adobe's + encoding to its own. + </p> + <blockquote><pre> +vptovf zorkly.vpl zorkly.vf zorkly.tfm +vptovf zorklyc.vpl zorklyc.vf zorklyc.tfm + </pre></blockquote> + <p>Again, the <code>vptovf</code> program is a + standard part of your <span class="TEX">T<span class="E">E</span>X</span> distribution. + </p> + </li> + <li><b>Make directories to hold the files</b><br><div class="figure" align="center"> + <hr> + <caption><i>Figure 8.1</i>: <a name="mksubdir">Making subdirectories to hold the files</a></caption> + <div align="center" style="margin:12px"><img src="fonts.png" width="75%"></div> + <hr> + </div> + <p>Under your <code>texmf-local</code> + directory there should be a <code>fonts</code> + directory, and in there there should be + <code>afm</code>, <code>tfm</code>, + <code>type1</code>, and <code>vf</code> + directories. Create them if they do not already + exist. + </p> + <p>In each of these four, create a directory for the + foundry, and within them create a directory for the + typeface (using a human-readable typeface name, not the + short <a name="N19">Karl Berry</a> fontname). In our example, this + means: + </p> + <blockquote><pre> +cd /usr/TeX/texmf-local/fonts +mkdir -p afm/zfonts/ordinary +mkdir -p tfm/zfonts/ordinary +mkdir -p type1/zfonts/ordinary +mkdir -p vf/zfonts/ordinary +cd /tmp + </pre></blockquote> + <p>Or if you're lazy like me:</p> + <blockquote><pre> +(cd /usr/TeX/texmf-local/fonts;\ +for d in afm tfm type1 vf;\ +do mkdir -p $d/zfonts/ordinary;done) + </pre></blockquote> + <p>For Microsoft Windows users, the path before + <code>texmf-local</code> may look something like + <code class="literal">C:\Program Files\TeXLive\</code>, depending + on how and where you have installed your <span class="TEX">T<span class="E">E</span>X</span> + system. + </p> + <p>The <code class="literal">-p</code> is a Unix feature: it + automatically creates any missing intervening + subdirectories. If your directory-making command + doesn't do this, you'll have to make the + intervening directories by hand first. + </p> + </li> + <li><b>Copy the files to their rightful places</b><br><p>Copy the four groups of files to the four new + directories: + </p> + <blockquote><pre> +cp *.afm /usr/TeX/texmf/fonts/afm/zfonts/ordinary/ +cp *.tfm /usr/TeX/texmf/fonts/tfm/zfonts/ordinary/ +cp *.pfb /usr/TeX/texmf/fonts/type1/zfonts/ordinary/ +cp *.vf /usr/TeX/texmf/fonts/vf/zfonts/ordinary/ + </pre></blockquote> + <p>You can of course do all this with a directory + window and mouse if you find it easier. + </p> + </li> + <li><b>Create a font map</b><br><p>The font map is what tells + <i><a name="p216">dvips</a></i> which <small><a href="chapter8.html#PFB" class="acroref" name="A209" title="PostScript Font Binary">PFB</a></small> file to use for which font. The + configuration file for <i><a name="p217">dvips</a></i> + is <code>texmf/dvips/config/config.ps</code> and + it gets its entries from the program + <i><a name="p218">updmap</a></i> which reads map files + for each typeface. The configuration file for + <i><a name="p219">updmap</a></i> is + <code>texmf-var/web2c/updmap.cfg</code><sup><a href="#F50">8</a></sup>, so it needs an entry for our new font, + using the three-letter font family abbreviation (the + first three letters of the Berry fontname (here + ‘<code class="literal">zor</code>’): + </p> + <blockquote><pre> +Map zor.map + </pre></blockquote> + <p>We also have to create this map file + (<code>zor.map</code>) in a subdirectory of + <code>texmf-local/dvips/config/</code> named + after the foundry, so we need to create + <code>texmf-local/dvips/config/zfonts</code> as + well. + </p> + <ol> + <li> + <p>Open + <code>/usr/TeX/texmf-var/web2c/updmap.cfg</code> + in your editor. + </p> + </li> + <li> + <p>At the bottom, add the line: + <code class="literal">Map zor.map</code></p> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>The font entries in our + <code class="literal">zor.map</code> will be on a + <em>single</em> line each, with no + line-wrapping. Each entry gives the short name of the + font, the long (Adobe) name, the + <a name="t39">PostScript</a> encoding parameters + (in quotes), and then two filenames prefixed by input + redirects (less-than signs): the encoding file and the + <a name="t40">PostScript</a> outline file. + </p> + <ol> + <li> + <p>First create the directory if it doesn't already + exist: + </p> + <blockquote><pre> +mkdir -p /usr/TeX/texmf-local/dvips/config/zfonts + </pre></blockquote> + </li> + <li> + <p>Use your editor to open (create) the file + <code>/usr/TeX/texmf-local/dvips/config/zfonts/zor.map</code>. + </p> + </li> + <li> + <p>Insert the line:</p> + <blockquote><pre class="scriptsize"> +rzorkly Ordinary-Blackface "TeXnANSIEncoding ReEncodeFont" <texnansi.enc <foo.pfb + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>You get the full font name (here, + ‘Ordinary-Blackface’) from the + <code class="literal">zork.id</code> which was created back in + <a href="chapter8.html#idfile">step 4</a> when we ran + <i><a name="p220">afm2tfm</a></i>. You must get this + exactly right, because it's the + ‘official’ full name of the font, + and <a name="t41">PostScript</a> files using this + font need to match it. + </p> + </li> + <li><b>Create a style file</b><br><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> needs a style file to implement the + interface to the font. Call it after the typeface or + something related; in this example we'll call it + <code>foozork.sty</code>. In it go some details + of the name and date we did this, what version of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> it needs, and any other command necessary to + operate the font, like the font encoding and whether it + is to supersede the current default Roman font. + </p> + <ol> + <li> + <p>Use your editor to open (create) + <code>foozork.sty</code> in your + <code>texmf-local/tex/latex/psnfss</code> + directory. + </p> + </li> + <li> + <p>Insert the following lines:</p> + <blockquote><pre> +% foozork - created from foo for Zork +\def\fileversion{1.0} +\def\filedate{2002/12/03} +\def\docdate{2002/12/03} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{foozork} + [\filedate\space\fileversion\space + Zfonts Ordinary PSNFSS2e package] +\RequirePackage[LY1]{fontenc} +\renewcommand{\rmdefault}{zor} +\endinput + </pre></blockquote> + <p>Note the following:</p> + <ul> + <li> + <p>The first argument to + <code class="command"><a name="c257">\ProvidesPackage</a></code> + <em>must</em> be the same as this + style file name; and that the font family is + referred to as <code class="literal">zor</code>, being the + foundry letter plus the fontname abbreviation. + This acts as a prefix for any/all font variants + (bold, italic, etc.). + </p> + </li> + <li> + <p>If you are not using Y&Y encoding, + omit the line referring to LY1 font + encoding. + </p> + </li> + <li> + <p>If this is a typewriter font, make the + renewed command <code class="command"><a name="c258">\rmdefault</a></code> + into <code class="command"><a name="c259">\ttdefault</a></code>. + </p> + </li> + <li> + <p>If it's a sans-serif font, make it + <code class="command"><a name="c260">\sfdefault</a></code> instead. + </p> + </li> + <li> + <p>Omit the command completely if you + don't want the style file to supersede the + current defaults but simply to make the font + available. If you do this, you probably want to + write a new command or two to use it, typically + one for grouped use and one for argument + use: + </p> + </li> + </ul> + <blockquote><pre class="footnotesize"> +\newcommand{\zorkfamily}{\fontencoding{LY1}% + \fontfamily{zor}\selectfont} +\newcommand{\textzork}[1]{{\zorkfamily#1}} + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + </li> + <li><b><a name="fdfiles">Create the Font Definition file</a></b><br><p>The last file to create is the <b><i><a name="fontdef">font definition</a></i></b> + (<code>.fd</code>) file. This is named + following the pattern <code class="literal">eeefnn.fd</code>, + using the same conventions as before, by prepending the + (lowercase) encoding abbreviation to the foundry letter + and fontname abbreviation, so our example would be + <code class="literal">ly1zor.fd</code> for the LY1 encoding and + the <code class="literal">zor</code> short font name. + </p> + <ol> + <li> + <p>Use your editor to open (create) + <code>texmf-local/tex/latex/psnfss/ly1zor.fd</code></p> + </li> + <li> + <p>Enter the following lines:</p> + <blockquote><pre> +\ProvidesFile{ly1zor.fd}[2002/03/03 v0.1 manual + font definitions for LY1/zor.] + +\DeclareFontFamily{LY1}{zor}{} + +\DeclareFontShape{LY1}{zor}{k}{n}{<-> zorkly}{} +\DeclareFontShape{LY1}{zor}{k}{sc}{<-> zorklyc}{} + </pre></blockquote> + </li> + <li> + <p>Save and close the file.</p> + </li> + </ol> + <p>FD files typically use one + <code class="command"><a name="c261">\DeclareFontFamily</a></code> command which + specifies the encoding and the short font name. Then as + many pairs of <code class="command"><a name="c262">\DeclareFontShape</a></code> + commands as you converted fonts (assuming you did both + normal and small caps for each font: see + <a href="chapter8.html#sc">step 5</a>; if you didn't, then only one + such command per font is needed here). The arguments to + the <code class="command"><a name="c263">\DeclareFontShape</a></code> command to watch + are the 3rd (weight/width), 4th (shape), and 5th (font + outline name): the rest are static for each + <code>.fd</code> file and simply identify the + encoding and the font family. + </p> + <p>The codes to use are given on + pages 414–15 of the <cite><a href="bibliography.html#companion" name="C41">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> and should also be in + your copies of + <code>texmf/fontnames/weight.map</code> and + <code>texmf/fontnames/width.map</code>. The + rules for combining weight and width need care: <small><a href="chapter1.html#RTFM" class="acroref" name="A210" title="Read The Fine Manual">RTFM</a></small> for + <span class="package"><a name="m86">fontname</a></span>. There is no + <code>shape.map</code> in + <span class="package"><a name="m87">fontname</a></span> because it's not + part of font file names, it's purely a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + creation, so here's what the same book says: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Character</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">n</code></td> + <td valign="top" align="left">normal (upright)</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">it</code></td> + <td valign="top" align="left">italic</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">sl</code></td> + <td valign="top" align="left">slanted</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">sc</code></td> + <td valign="top" align="left">small caps</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ui</code></td> + <td valign="top" align="left">upright italic</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">ol</code></td> + <td valign="top" align="left">outline</td> + </tr> + </table> + </div> + <p>Add your own for other oddities, but be consistent: + I use <code class="literal">cu</code> for cursive (scripts), for + example, and <code class="literal">k</code> for blackletter faces + (not to be confused with <code class="literal">k</code> as a + <em>width</em> for + ‘book’). + </p> + <p>The default fontspec + <code class="literal"><-></code> in the 5th argument + in the <code class="command"><a name="c264">\DeclareFontShape</a></code> command means + that all sizes are to come from the same font outline + (remember if this was a METAFONT font with different + design sizes like <small><a href="chapter8.html#CM" class="acroref" name="A211" title="Computer Modern">CM</a></small> it would + be much more complex). + </p> + <p>If the face has only a few variants, you can create + any other entries for bold, italic, slanted, etc. with + the relevant weight and width and shape values pointing + at the relevant outline file. + </p> + <p>If you want one font to substitute for a missing one + (for example italics to substitute for slanted in a + typeface which has no slanted variant of its own) give + the + <code class="literal">ssub</code> (‘silent + substitution’) command in the fontspec: + for example to make all references to + <code class="literal">sl</code> (slanted) type use an existing + italic font, make the 5th argument like this: + </p> + <blockquote><pre> +{<-> ssub * zor/m/it} + </pre></blockquote> + <p>If you find the x-height of a font too big or too + small to sort well with another font you are using, you + can specify an <code class="literal">s</code> + (‘scale’) factor in this argument + instead: this example will shrink the result to + 80% of normal: + </p> + <blockquote><pre> +{<-> s * [0.8] zorkly} + </pre></blockquote> + </li> + <li><b>Update the index and the map files</b><br><p>Run your <span class="TEX">T<span class="E">E</span>X</span> indexer program (see <a href="chapter5.html#texindex">step 4 in the procedure in section 5.2.2</a>) so that + <i><a name="p221">updmap</a></i> can find the files it + needs. + </p> + <p>Then run <i><a name="p222">updmap</a></i> (just + type <code>updmap</code>). This updates the + maps and runs the <span class="TEX">T<span class="E">E</span>X</span> indexer program again + automatically. + </p> + </li> + </ol> + <p>Now you can <code class="literal">\usepackage{foozork}</code> in + your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file to make it the default font. To use the + font incidentally instead of as the default, you can + say: + </p> + <blockquote><pre> +This is {\zorkfamily ZORK} or \textzork{ZORK} + </pre></blockquote> + <ol class="footnotes" start="4"> + <li><a name="F46">Yes, as in rubber.</a></li> + <li><a name="F47">Confusingly, Bitstream fonts (and others from + similar sources) mostly have different names from + the original fonts, so what they call Humanist 521 + is actually Gill Sans. Until recently, US law only + allowed the <em>names</em> of typefaces + to be copyrighted, not the font designs themselves, + leading to widespread piracy.</a></li> + <li><a name="F48">Sadly, Y&Y, Inc has ceased trading and + their <span class="TEX">T<span class="E">E</span>X</span> distribution is not longer available, + although there is email support at <a href="http://lists.ucc.ie/lists/archives/yandytex.html"><tt>http://lists.ucc.ie/lists/archives/yandytex.html</tt></a>, + and their encoding files continue to be used.</a></li> + <li><a name="F49">The only one I still have problems with is + ‘ø’, which for some weird + reason isn't catered for in this encoding.</a></li> + <li><a name="F50">There is another one of these at + <code>texmf/web2c/updmap.cfg</code>, but + that contains the map references for the fonts which + came with your distribution of <span class="TEX">T<span class="E">E</span>X</span>, so you should + not interfere with it.</a></li> + </ol> + </div> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>8.3.3 <a name="type1cm">Installing the Type 1 Computer Modern + fonts</a></h3> + <p>Most new distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> use the + <a name="t42">PostScript</a> Type 1 versions of + the Computer Modern fonts. If your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installation + uses the METAFONT (bitmap) versions of <small><a href="chapter8.html#CM" class="acroref" name="A212" title="Computer Modern">CM</a></small>, you may want to switch to the + Type 1 version, especially if you are going to be using + <i><a name="p223">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i> instead of standard + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, because Acrobat Reader makes such a hames of + displaying Type3 fonts. <i><a name="p224">GSview</a></i> + and <i><a name="p225">pdfview</a></i> handle them + correctly. + </p> + <p>To do this, install one of the sets of <small><a href="chapter8.html#CM" class="acroref" name="A213" title="Computer Modern">CM</a></small> PostScript fonts. There are several + available: + </p> + <ul> + <li> + <p>The fonts from BlueSky Research at <a href="http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bluesky/"><tt>http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bluesky/</tt></a></p> + </li> + <li> + <p><a name="bkm">Basil K. Malyshev</a>'s ‘BaKoMa’ + fonts at <a href="http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/"><tt>http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/</tt></a></p> + </li> + <li> + <p><a name="vv">Vladimir Volovich</a>'s CM-Super at <a href="http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/"><tt>http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/</tt></a></p> + </li> + <li> + <p><a name="bj">Bogusław Jackowski</a>'s Latin Modern at <a href="ftp://cam.ctan.org/tex-archive/fonts/ps-type1/lm.tar.gz"><tt>ftp://cam.ctan.org/tex-archive/fonts/ps-type1/lm.tar.gz</tt></a></p> + </li> + </ul> + <p>The BaKoMa fonts include the <a name="AMS" class="acroref">American + Mathematical Society</a> (<small>AMS</small>) fonts for extended + mathematics, but are more complex to install because they + come with a special set of TFM files. + </p> + <p>The BlueSky fonts are just <small><a href="chapter8.html#PFB" class="acroref" name="A215" title="PostScript Font Binary">PFB</a></small> + and AFM files, and are a drop-in replacement requiring no + further changes, as they use the same TFM files as the + METAFONT version. Follow the <code>README</code> + file in the downloadable archive for installation + instructions. + </p> + <p>The Latin Modern and CM-Super fonts are new and I + haven't tested them but they are well spoken of. + Feedback on this is very welcome. + </p> + <p>The <span class="TEX">T<span class="E">E</span>X</span> Live and <span class="TEX">T<span class="E">E</span>X</span> Collection distributions use + Type 1 versions of Computer Modern by default. There + are more details in the FAQ at <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts"><tt>http://www.tex.ac.uk/cgi-bin/texfaq2html?label=uselmfonts</tt></a> . + </p> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter7.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter9.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/chapter9.html b/info/beginlatex/html/chapter9.html new file mode 100644 index 0000000000..537a26a7fc --- /dev/null +++ b/info/beginlatex/html/chapter9.html @@ -0,0 +1,692 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:47--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Chapter 9 — Programmability (macros)</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Chapter 9 — Programmability (macros)</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class="current"><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="chapter"> + <table width="100%"> + <tr> + <td align="center"><small><i class="chaphead"><b><a name="macros">CHAPTER</a></b></i></small><br><table border="1"> + <tr> + <td class="chapno">9</td> + </tr> + </table> + </td> + <td><pre class="spacing"></pre></td> + <td> + <p> </p> + <h1>Programmability (macros)</h1> + </td> + <td class="toc"> + <p> </p> + <ol> + <li><a href="#replacement">Simple replacement macros</a></li> + <li><a href="#macinf">Macros using information gathered previously</a></li> + <li><a href="#macargs">Macros with arguments</a></li> + <li><a href="#macnest">Nested macros</a></li> + <li><a href="#macenv">Macros and environments</a></li> + <li><a href="#reprog">Reprogramming <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals</a></li> + </ol> + </td> + <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td> + </tr> + </table><a name="I158"></a><p>We've touched several times on the ability of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + to be reprogrammed. This is one of its central features, and one + that still, after nearly a quarter of a century, puts it well + above many other typesetting systems, even those with macro + systems of their own. It's also the one that needs most + foreknowledge, which is why this chapter is in this + position. + </p> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is in fact itself just a collection of + macros — rather a big collection — written in + <span class="TEX">T<span class="E">E</span>X</span>'s internal typesetting language. These <b><i><a name="macs">macros</a></i></b> are little program-like sets of + instructions with a name which can be used as shorthand for an + operation you wish to perform more than once. + </p> + <p>Macros can be arbitrarily complex. Many of the ones used in + the standard <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages are several pages long, but as we + will see, even short ones can very simply automate otherwise + tedious chores and allow the author to concentrate on + <em>writing</em>. + </p> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.1 <a name="replacement">Simple replacement macros</a></h2> + <p>In its simplest form, a <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> macro can just be a + straightforward text replacement of a phrase to avoid + misspelling something each time you need it, e.g. + </p> + <blockquote><pre> +\newcommand{\ef}{European Foundation for the + Improvement of Living and Working Conditions} + </pre></blockquote> + <p>Put this in your preamble, and you can then use + <code class="command"><a name="c265">\ef</a></code> in your document and it will typeset it + as the full text. Remember that after a command ending in a + letter you need to leave a space to avoid the next word + getting gobbled up as part of the command (see + <a href="chapter2.html#swallow">the first paragraph in section 2.4.1</a>). And when you want to force a space + to be printed, use a backslash followed by a space, + e.g. + </p> + <blockquote><pre> +The \ef\ is an institution of the Commission of the + European Union. + </pre></blockquote> + <p>As you can see from this example, the + <code class="command"><a name="c266">\newcommand</a></code> command takes two arguments: + <i>a</i>) the name you want to give the new command; and <i>b</i>) the expansion to be performed when you use it, so there are always two sets of curly braces + after <code class="command"><a name="c267">\newcommand</a></code>. + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.2 <a name="macinf">Macros using information gathered previously</a></h2> + <p>A more complex example is the macro + <code class="command"><a name="c268">\maketitle</a></code> which is used in almost every + formal document to format the title block. In the basic + document classes (book, report, and article) it performs small + variations on the layout of a centred block with the title + followed by the author followed by the date, as we saw in + <a href="chapter3.html#titling">section 3.3</a>. + </p> + <p>If you inspect one of these document class files, such as + <code>texmf/tex/latex/base/report.cls</code> you will + see <code class="command"><a name="c269">\maketitle</a></code> defined (and several variants + called <code class="command"><a name="c270">\@maketitle</a></code> for use in different + circumstances). It uses the values for the title, author, and + date which are assumed already to have been stored in the + internal macros <code class="command"><a name="c271">\@title</a></code>, + <code class="command"><a name="c272">\@author</a></code>, and <code class="command"><a name="c273">\@date</a></code> by + the author using the matching <code class="command"><a name="c274">\title</a></code>, + <code class="command"><a name="c275">\author</a></code>, and <code class="command"><a name="c276">\date</a></code> + commands in the document. + </p> + <p>This use of one command to store the information in + another is a common way of gathering the information from the + user. The use of macros containing the + <code class="literal">@</code> character prevents their accidental + misuse by the user: in fact to use them in your preamble we + have to allow the <code class="literal">@</code> sign to become a + ‘letter’ so it can be recognised in a + command name, and remember to turn it off again afterwards + (see <a href="chapter9.html#makeat">item 1</a> below). + </p> + <blockquote><pre> +\makeatletter +\renewcommand{\maketitle}{% + \begin{flushleft}% + \sffamily + {\Large\bfseries\color{red}\@title\par}% + \medskip + {\large\color{blue}\@author\par}% + \medskip + {\itshape\color{green}\@date\par}% + \bigskip\hrule\vspace*{2pc}% + \end{flushleft}% +} +\makeatother + </pre></blockquote> + <p>Insert this in the sample file on <a href="chapter5.html#oldtitle"></a> immediately before the + <code class="literal">\begin{document}</code> and remove the + <code class="literal">\color{...}</code> commands from the title, + author, and date. Re-run the file through <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and you + should get something like this: + </p> + <div align="center" style="margin:1cm"><img src="newtitle.png" width="75%"></div> + <p>In this redefinition of <code class="command"><a name="c277">\maketitle</a></code>, + we've done the following: + </p> + <ol type="1"> + <li> + <p><a name="makeat"></a>Enclosed the changes in + <code class="command"><a name="c278">\makeatletter</a></code> and + <code class="command"><a name="c279">\makeatother</a></code> to allow us to use the + <code class="literal">@</code> sign in command names;<sup><a href="#F51">1</a></sup></p> + </li> + <li> + <p>Used <code class="command"><a name="c280">\renewcommand</a></code> and put + <code class="command"><a name="c281">\maketitle</a></code> in curly braces after + it; + </p> + </li> + <li> + <p>Opened a pair of curly braces to hold the new + definition. The closing curly brace is immediately before + the <code class="command"><a name="c282">\makeatother</a></code>; + </p> + </li> + <li> + <p>Inserted a <span class="environment"><a name="e51">flushleft</a></span> environment + so the whole title block is left-aligned; + </p> + </li> + <li> + <p>Used <code class="command"><a name="c283">\sffamily</a></code> so the whole title + block is in the defined sans-serif typeface; + </p> + </li> + <li> + <p>For each of <code class="command"><a name="c284">\@title</a></code>, + <code class="command"><a name="c285">\@author</a></code>, and <code class="command"><a name="c286">\@date</a></code>, + we have used some font variation and colour, and enclosed + each one in curly braces to restrict the changes just to + each command. The closing <code class="command"><a name="c287">\par</a></code> makes + sure that multiline title and authors and dates get + typeset with the relevant line-spacing; + </p> + </li> + <li> + <p>Added some flexible space between the lines, and + around the <code class="command"><a name="c288">\hrule</a></code> (horizontal rule) at + the end; + </p> + </li> + </ol> + <p>Note the <code class="literal">%</code> signs after any line ending + in a curly brace, to make sure no intrusive white-space find + its way into the output. These aren't needed after simple + commands where there is no curly brace because excess + white-space gets gobbled up there anyway. + </p> + <ol class="footnotes" start="1"> + <li><a name="F51">If you move all this preamble into a style file of + your own, you don't need these commands: the use + of <code class="literal">@</code> signs in command names is + allowed in style and class files.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.3 <a name="macargs">Macros with arguments</a></h2> + <p>But macros are not limited to text expansion. They can + take arguments of their own, so you can define a command to do + something with specific text you give it. This makes them much + more powerful and generic, as you can write a macro to do + something a certain way, and then use it hundreds of times + with a different value each time. + </p> + <p>We looked earlier (<a href="chapter8.html#emph">the text in section 8.2.5</a>) at making new + commands to put specific classes of words into certain fonts, + such as product names into italics, keywords into bold, and so + on. Here's an example for a command + <code class="command"><a name="c289">\product</a></code>, which also indexes the product + name and adds a trademark sign: + </p> + <blockquote><pre> +\newcommand{\product}[1]{% + \textit{#1}\texttrademark% + \index{#1@\textit{#1}}% +} + </pre></blockquote> + <p>If I now type <code class="literal">\tmproduct{Velcro}</code> then I + get <i><a name="p226">Velcro</a></i>™ typeset, and if + you look in the index, you'll find this page referenced + under ‘<span style="font-style:italic; ">Velcro</span>’. Let's + examine what this does: + </p> + <ol type="1"> + <li> + <p>The macro is specified as having one argument + (that's the <code class="literal">[1]</code> in the + definition). This will + be the product name you type in curly braces when you use + <code class="command"><a name="c290">\product</a></code>. Macros can have up to nine + arguments. + </p> + </li> + <li> + <p>The expansion of the macro is contained in the second + set of curly braces, spread over several lines (see <a href="chapter9.html#macrolines">item 5</a> for why). + </p> + </li> + <li> + <p>It prints the value of the first argument (that's + the <code class="literal">#1</code>) in italics, which is + conventional for product names, and adds the + <code class="command"><a name="c291">\texttrademark</a></code> command. + </p> + </li> + <li> + <p>Finally, it creates an index entry using the same + value (<code class="literal">#1</code>), making sure that it's + italicised in the index (see <a href="chapter7.html#indextypo">the item ‘Font changes’ in section 7.5</a> to remind yourself of how indexing + something in a different font works). + </p> + </li> + <li> + <p><a name="macrolines"></a>Typing this macro over several lines makes it easier + for humans to read. I could just as easily have + typed + </p> + <blockquote><pre class="footnotesize"> +\newcommand{\product}[1]{\textit{#1}\index{#1@\textit{#1}}} + </pre></blockquote> + <p><a name="macrolines"></a>but it wouldn't have been as clear what I was + doing. + </p> + <p><a name="macrolines"></a>One thing to notice is that to prevent unwanted spaces + creeping into the output when <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> reads the macro, I + ended each line with a comment character + (<code>%</code>). <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> normally treats + newlines as spaces when formatting (remember <a href="chapter2.html#comment">the first paragraph in section 2.5.1</a>), so this stops the end of line + being turned into an unwanted space when the macro is + used. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> always ignores spaces at the + <em>start</em> of macro lines anyway, so + indenting lines for readability is fine. + </p> + </li> + </ol> + <p>In <a href="chapter2.html#hyph" title="sect2"></a> we mentioned the problem + of frequent use of unbreakable text leading to poor + justification or to hyphenation problems. A solution is to + make a macro which puts the argument into an + <code class="command"><a name="c292">\mbox</a></code> with the appropriate font change, but + precedes it all with a conditional + <code class="command"><a name="c293">\linebreak</a></code> which will make it more + attractive to <span class="TEX">T<span class="E">E</span>X</span> to start a new line. + </p> + <blockquote><pre> +\newcommand{\var}[1]{\linebreak[3]\mbox{\ttfamily#1}} + </pre></blockquote> + <p>This only works effectively if you have a reasonably wide + setting and paragraphs long enough for the differences in + spacing elsewhere to get hidden. If you have to do this in + narrow journal columns, you may have to adjust wording and + spacing by hand occasionally. + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.4 <a name="macnest">Nested macros</a></h2> + <p>Here's a slightly more complex example, where one + macro calls another. It's common in normal text to refer + to people by their forename and surname (in that order), for + example <a name="N23">Don Knuth</a>, but to have them indexed as <em>surname, + forename</em>. This pair of macros, + <code class="command"><a name="c294">\person</a></code> and <code class="command"><a name="c295">\reindex</a></code>, + automates that process to minimize typing and indexing. + </p> + <blockquote><pre> +\newcommand{\person}[1]{#1\reindex #1\sentinel} +\def\reindex #1 #2\sentinel{\index{#2, #1}} + </pre></blockquote> + <ol type="1"> + <li> + <p>The digit 1 in square brackets means that + <code class="command"><a name="c296">\person</a></code> has one argument, so you put the + whole name in a single set of curly braces, e.g. + <code class="literal">\person{Don Knuth}</code>. + </p> + </li> + <li> + <p>The first thing the macro does is output + <code class="literal">#1</code>, which is the value of what you typed, + just as it stands, so the whole name gets typeset exactly + as you typed it. + </p> + </li> + <li> + <p>But then it uses a special feature of Plain <span class="TEX">T<span class="E">E</span>X</span> + macros (which use <code class="command"><a name="c297">\def</a></code> instead of + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s <code class="command"><a name="c298">\newcommand</a></code><sup><a href="#F52">2</a></sup>): they too can have multiple arguments but you + can separate them with other characters (here a space) to + form a pattern which <span class="TEX">T<span class="E">E</span>X</span> will recognise when reading the + arguments. + </p> + <p>In this example (<code class="command"><a name="c301">\reindex</a></code>) it's + expecting to see a string of characters + (<code class="literal">#1</code>) followed by a space, followed by + another string of characters (<code class="literal">#2</code>) + followed by a dummy command (<code class="command"><a name="c302">\sentinel</a></code>). + In effect this makes it a device for splitting a name into + two halves on the space between them, so the two halves + can be handled separately. The <code class="command"><a name="c303">\reindex</a></code> + command can now read the two halves of the name + separately. + </p> + </li> + <li> + <p>The <code class="command"><a name="c304">\person</a></code> command invokes + <code class="command"><a name="c305">\reindex</a></code> and follows it with the name + you typed plus the dummy command + <code class="command"><a name="c306">\sentinel</a></code> (which is just there to signal + the end of the name). Because <code class="command"><a name="c307">\reindex</a></code> + is expecting two arguments separated by a space and + terminated by a <code class="command"><a name="c308">\sentinel</a></code>, it sees + ‘<code class="literal">Don</code> and + <code class="literal">Knuth</code>’ as two separate + arguments. + </p> + <p>It can therefore output them using + <code class="command"><a name="c309">\index</a></code> in reverse order, which is + exactly what we want. + </p> + </li> + </ol> + <p>A book or report with a large number of personal names to + print and index could make significant use of this to allow + them to be typed as + <code class="literal">\person{Leslie Lamport}</code> and printed as + <a name="ll">Leslie Lamport</a>, but have them indexed as + ‘Lamport, Leslie’ with virtually no effort + on the author's part at all. + </p> + <blockquote class="exercise"> + <hr> + <h4><img src="kwrite.png" align="middle"> <i>Exercise 20</i>. Other names + </h4> + <p>Try to work out how to make this + <code class="command"><a name="c310">\person</a></code> feature work with names + like: + </p> + <dl> + <dd>Blanca Maria Bartosova de Paul</dd> + <dd>Patricia Maria Soria de Miguel</dd> + <dd>Arnaud de la Villèsbrunne</dd> + <dd>Prince</dd> + <dd>Pope John Paul II</dd> + </dl> + <p>Hints: the command <code class="command"><a name="c311">\space</a></code> produces a + normal space, and one way around <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s requirements + on spaces after command names ending with a letter is to + follow such commands with an empty set of curly braces + <code class="literal">{}</code>. + </p> + <hr> + </blockquote> + <ol class="footnotes" start="2"> + <li><a name="F52">Don't try this at home alone, children! This + one is safe enough, but you should strictly avoid + <code class="command"><a name="c299">\def</a></code> for a couple of years. Stick to + <code class="command"><a name="c300">\newcommand</a></code> for now.</a></li> + </ol> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.5 <a name="macenv">Macros and environments</a></h2> + <p>As mentioned in <a href="chapter6.html#fancybox">section 6.7.3</a>, it is possible + to define macros to capture text in an environment and reuse + it afterwards. This avoids any features of the subsequent use + affecting the formatting of the text. + </p> + <p>One example of this uses the facilities of the + <span class="package"><a name="m88">fancybox</a></span> package, which defines a + variety of framed boxes to highlight your text, and a special + environment <span class="environment"><a name="e52">Sbox</a></span> which + ‘captures’ your text for use in these + boxes. + </p> + <blockquote class="example"><pre> +\begin{Sbox} +\begin{minipage}{3in} +This text is formatted to the specifications +of the minipage environment in which it +occurs. + +Having been typeset, it is held in the Sbox +until it is needed, which is after the end +of the minipage, where you can (for example) +align it and put it in a special framed box. +\end{minipage} +\end{Sbox} +\begin{flushright} +\shadowbox{\theSbox} +\end{flushright} + </pre><div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <p>This text is formatted to the specifications of the + minipage environment in which it occurs. + </p> + <p>Having been typeset, it is held in the Sbox until it + is needed, which is after the end of the minipage, where + you can (for example) centre it and put it in a special + framed box. + </p> + </td> + </tr> + </table> + </div> + </blockquote> + <p>By putting the text (here in a + <span class="environment"><a name="e53">minipage</a></span> environment because we want to + change the width) inside the <span class="environment"><a name="e54">Sbox</a></span> + environment, it is typeset into memory and stored in the macro + <code class="command"><a name="c312">\theSbox</a></code>. It can then be used afterwards as + the argument of the <code class="command"><a name="c313">\shadowbox</a></code> command (and + in this example it has also been centred). + </p> + </div> + <div class="sect1"> + <h2><a href="#macros"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.6 <a name="reprog">Reprogramming <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals</a></h2> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal macros can also be reprogrammed or + even rewritten entirely, although doing this can require a + considerable degree of expertise. Simple changes, however, are + easily done. + </p> + <p>Recall that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s default document structure for + the Report document class uses Chapters as the main unit of + text, whereas in reality most reports are divided into + Sections, not Chapters (<a href="chapter3.html#repchap">footnote 24 in section 3.5</a>). The result + of this is that if you start off your report with + <code class="literal">\section{Introduction}</code>, it will print + as + </p> + <p><span style="font-size:big; font-weight:bold; ">0.1 Introduction</span></p> + <p>which is not at all what you want. The zero is + caused by it not being part of any chapter. But this numbering + is controlled by macros, and you can redefine them. In this + case it's a macro called <code class="literal">\thesection</code> + which reproduces the current section number counter (see <a href="chapter6.html#thecounter">the last paragraph in section 6.2.6</a>). It's redefined afresh in each + document class file, using the command + <code class="command"><a name="c314">\renewcommand</a></code> (in this case in + <code>texmf/tex/latex/base/report.cls</code>): + </p> + <blockquote><pre> +\renewcommand \thesection + {\thechapter.\@arabic\c@section} + </pre></blockquote> + <p>You can see it invokes <code class="command"><a name="c315">\thechapter</a></code> + (which is defined elsewhere to reproduce the value of the + <tt><i><a name="l36">chapter</a></i></tt> counter), and it + then prints a dot, followed by the Arabic value of the counter + called <tt><i><a name="l37">section</a></i></tt> (that + <code class="literal">\c@</code> notation is <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal way + of referring to counters). You can redefine this in your + preamble to simply leave out the reference to chapters: + </p> + <blockquote><pre> +\renewcommand{\thesection}{\arabic{section}} + </pre></blockquote> + <p>I've used the more formal method of enclosing the + command being redefined in curly braces. For largely + irrelevant historical reasons these braces are often omitted + in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internal code (as you may have noticed in + the example earlier). And I've also used the + ‘public’ macro + <code class="command"><a name="c316">\arabic</a></code> to output the value of <tt><i><a name="l38">section</a></i></tt> (<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s internals + use a ‘private’ set of control + sequences containing <code class="literal">@</code>-signs, designed to + protect + them against being changed accidentally). + </p> + <p>Now the introduction to your report will start + with: + </p> + <p><span style="font-size:big; font-weight:bold; ">1 Introduction</span></p> + <p>What's important is that you <em>don't + ever</em> need to alter the original document class + file <code>report.cls</code>: you just copy the + command you need to change into your own document preamble, + and modify that instead. It will then override the + default. + </p> + <div class="sect2"> + <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>9.6.1 <a name="bullets">Changing list item bullets</a></h3> + <p>As mentioned <a href="chapter6.html#labelitem" title="itemizedlist">earlier</a>, + here's how to redefine a bullet for an itemized list, + with a slight tweak: + </p> + <blockquote><pre> +\usepackage{bbding} +\renewcommand{\labelitemi}{% + \raisebox{-.25ex}{\PencilRight}} + </pre></blockquote> + <p>Here we use the <span class="package"><a name="m89">bbding</a></span> package + which has a large selection of + ‘dingbats’ or little icons, and we + make the label for top-level itemized lists print a + right-pointing pencil (the names for the icons are in the + package documentation: see <a href="chapter5.html#packagedoc">section 5.1.2</a> for + how to get it). + </p> + <p>In this case, we are using the + <code class="command"><a name="c317">\raisebox</a></code> command within the redefinition + because it turns out that the symbols in this font are + positioned slightly too high for the typeface we're + using. The <code class="command"><a name="c318">\raisebox</a></code> command takes two + arguments: the first is a dimension, how much to raise the + object by (and a negative value means + ‘lower’: there is no need for a + <code class="literal">\lowerbox</code> command); and the second is + the text you want to affect. Here, we are shifting the + symbol down by ¼ex (see <a href="chapter2.html#dimensions">section 2.8.1</a> + for a + list of dimensions <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use). + </p> + <p>There is a vast number of symbols available: see + <cite><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/" name="C42">A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></a></cite> for a + comprehensive list. + </p> + </div> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="chapter8.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter10.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/cmr.png b/info/beginlatex/html/cmr.png Binary files differnew file mode 100644 index 0000000000..893647e45e --- /dev/null +++ b/info/beginlatex/html/cmr.png diff --git a/info/beginlatex/html/cmr12-12.png b/info/beginlatex/html/cmr12-12.png Binary files differnew file mode 100644 index 0000000000..9deb5b5cfa --- /dev/null +++ b/info/beginlatex/html/cmr12-12.png diff --git a/info/beginlatex/html/cmr17-12.png b/info/beginlatex/html/cmr17-12.png Binary files differnew file mode 100644 index 0000000000..b128521501 --- /dev/null +++ b/info/beginlatex/html/cmr17-12.png diff --git a/info/beginlatex/html/cmr5-12.png b/info/beginlatex/html/cmr5-12.png Binary files differnew file mode 100644 index 0000000000..48f9c263dd --- /dev/null +++ b/info/beginlatex/html/cmr5-12.png diff --git a/info/beginlatex/html/diagram.png b/info/beginlatex/html/diagram.png Binary files differnew file mode 100644 index 0000000000..b93dc4505e --- /dev/null +++ b/info/beginlatex/html/diagram.png diff --git a/info/beginlatex/html/dontpanic.png b/info/beginlatex/html/dontpanic.png Binary files differnew file mode 100644 index 0000000000..47e7113328 --- /dev/null +++ b/info/beginlatex/html/dontpanic.png diff --git a/info/beginlatex/html/down.png b/info/beginlatex/html/down.png Binary files differnew file mode 100644 index 0000000000..b9f9567780 --- /dev/null +++ b/info/beginlatex/html/down.png diff --git a/info/beginlatex/html/emacs.png b/info/beginlatex/html/emacs.png Binary files differnew file mode 100644 index 0000000000..840e3d15d0 --- /dev/null +++ b/info/beginlatex/html/emacs.png diff --git a/info/beginlatex/html/euro-dvi.png b/info/beginlatex/html/euro-dvi.png Binary files differnew file mode 100644 index 0000000000..6eb145d16a --- /dev/null +++ b/info/beginlatex/html/euro-dvi.png diff --git a/info/beginlatex/html/finish.png b/info/beginlatex/html/finish.png Binary files differnew file mode 100644 index 0000000000..3ca65be02a --- /dev/null +++ b/info/beginlatex/html/finish.png diff --git a/info/beginlatex/html/fonts.png b/info/beginlatex/html/fonts.png Binary files differnew file mode 100644 index 0000000000..8e39fbf6c9 --- /dev/null +++ b/info/beginlatex/html/fonts.png diff --git a/info/beginlatex/html/foreword.html b/info/beginlatex/html/foreword.html new file mode 100644 index 0000000000..728e5650b3 --- /dev/null +++ b/info/beginlatex/html/foreword.html @@ -0,0 +1,201 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:01:55--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Foreword</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Foreword</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class="current"><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="foreword">Foreword</a></h3> + <p>As noted in <a href="intro.html#intro">this Introduction</a>, + this document accompanies a two-day introductory training course. + It became obvious from repeated questions in class and + afterwards, as well as from general queries on <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> that many people do + not read the <small><a href="chapter5.html#FAQ" class="acroref" name="A32" title="Frequently-Asked Questions">FAQ</a></small>s, do not use the + <small><a href="appendixB.html#TUG" class="acroref" name="A33" title="Users Group">TUG</a></small> web site, do not buy the books and + manuals, do not use the newsgroups and mailing lists, and do not + download the free documentation. Instead, they try to get by + using the training technique known as ‘sitting by + Nelly’, which involves looking over a + colleague's shoulder in the office, lab, library, pub, or + classroom, and absorbing all his or her bad habits. + </p> + <p>In the summer of 2001 I presented a short proposal on the + marketing of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to the annual conference of the <span class="TEX">T<span class="E">E</span>X</span> Users + Group held at the University of Delaware, and showed an example + of a <a href="http://www.silmaril.ie/documents/latex-brochure/leaflet.pdf">draft + brochure</a> designed to persuade newcomers to try <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + for their typesetting requirements. As a result of questions and + suggestions, it was obvious that it needed to include a pointer + to some documentation, and I agreed to make available a revised + form of this document, expanded to be used outside the + classroom, and to include those topics on which I have had most + questions from users over the years. + </p> + <p>It turned out to mean a significant + reworking of a lot of the material. Some of it appears in almost + every other manual and book on <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> but it is essential to + the beginner and therefore bears repetition. Some of it appears + other forms elsewhere, and is included here because it needs + explaining better. And some of it appears nowhere else but this + document. I took the opportunity to revise the structure of the + training course in parallel with the book (expanding it from its + original one day to two days), and to include a more + comprehensive index. It is by no means perfect (in both senses), + and I would be grateful for comments and corrections to be sent + to me at the address given under the credits. + </p> + <p>I had originally hoped that the <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> version of the + document would be processable by any freshly-installed default + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> system, but the need to include font samples which go + well beyond the default installation, and to use some packages + which the new user is unlikely to have installed, means that + this document itself is not really a simple piece of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + however simply it may describe the process itself. + </p> + <p>However, as the careful reader will have already noticed, + the master source of the document is not maintained in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + but in <small><a href="chapter10.html#XML" class="acroref" name="A34" title="Extensible Markup Language">XML</a></small>. A future task is therefore + to compare the packages required with those installed by + default, and flag portions of the document requiring additional + features so that an abbreviated version can be generated which + can be guaranteed to process even with a basic <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + installation. + </p> + <p><a name="docs"></a>If you are just starting with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, at an early + opportunity you should buy or borrow a copy of <cite><a href="bibliography.html#latexbook" name="C15"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: A Document Preparation System</a></cite> which is the original + author's manual. More advanced users should get the + <cite><a href="bibliography.html#companion" name="C16">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> or one of its + successors. In the same series there are also the <cite><a href="bibliography.html#graphicscomp" name="C17">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Graphics Companion</a></cite> and the <cite><a href="bibliography.html#webcomp" name="C18">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Web Companion</a></cite>. Mathematical users might want to + read <cite><a href="http://www.ams.org/tex/short-math-guide.html" name="C19">Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></cite>. + </p> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="intro.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="preface.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/forward.png b/info/beginlatex/html/forward.png Binary files differnew file mode 100644 index 0000000000..57bd635a21 --- /dev/null +++ b/info/beginlatex/html/forward.png diff --git a/info/beginlatex/html/gp.png b/info/beginlatex/html/gp.png Binary files differnew file mode 100644 index 0000000000..f06ec23c72 --- /dev/null +++ b/info/beginlatex/html/gp.png diff --git a/info/beginlatex/html/help.png b/info/beginlatex/html/help.png Binary files differnew file mode 100644 index 0000000000..5858f03f7e --- /dev/null +++ b/info/beginlatex/html/help.png diff --git a/info/beginlatex/html/index.html b/info/beginlatex/html/index.html new file mode 100644 index 0000000000..90fac678ab --- /dev/null +++ b/info/beginlatex/html/index.html @@ -0,0 +1,1114 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:03:20--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Index</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Index</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class="current"><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="ind"> + <h2><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="index">Index</a></h2> + <p>The same fonts are used here as in the text of the book + (see <a href="intro.html#symbols">section 8</a>) to distinguish between different + meanings: + </p> + <div align="center"> + <table> + <tr class="headfoot"> + <th valign="bottom" align="left">Notation</th> + <th valign="bottom" align="left">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><small><a href="chapter5.html#CTAN" class="acroref" name="A308" title="Comprehensive Archive Network">CTAN</a></small></td> + <td valign="top" align="left">Acronyms (small caps in some typefaces)</td> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c321">\command</a></code></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> control sequences (monospace font) + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-weight:bold; font-style:italic; ">term</span></td> + <td valign="top" align="left">Defining instance of a specialist term (bold + italics) + </td> + </tr> + <tr> + <td valign="top" align="left"><i><a name="p289">product</a></i></td> + <td valign="top" align="left">program or product name (italics)</td> + </tr> + <tr> + <td valign="top" align="left"><span class="environment"><a name="e55">environment</a></span></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> environment (sans-serif bold) + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="package"><a name="m91">package</a></span></td> + <td valign="top" align="left"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> package (sans-serif; all available from + <small><a href="chapter5.html#CTAN" class="acroref" name="A309" title="Comprehensive Archive Network">CTAN</a></small>) + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="option"><a name="o21">options</a></span></td> + <td valign="top" align="left">Options to environments (sans-serif oblique)</td> + </tr> + <tr> + <td valign="top" align="left"><tt><i><a name="l39">variables</a></i></tt></td> + <td valign="top" align="left">Variables (monospace oblique)</td> + </tr> + </table> + </div> + <p>In the online version, the entries below are all hyperlinked + to their source, with subsequent multiple occurrences giving the + section number or name. Page or section numbers in <span style="font-weight:bold; ">bold type</span> indicate a defining + instance. + </p> + <hr> + <div align="center"> + <table> + <tr> + <td><a href="#A">A</a></td> + <td><a href="#B">B</a></td> + <td><a href="#C">C</a></td> + <td><a href="#D">D</a></td> + <td><a href="#E">E</a></td> + <td><a href="#F">F</a></td> + <td><a href="#G">G</a></td> + <td><a href="#H">H</a></td> + <td><a href="#I">I</a></td> + <td><a href="#J">J</a></td> + <td><a href="#K">K</a></td> + <td><a href="#L">L</a></td> + <td><a href="#M">M</a></td> + <td><a href="#N">N</a></td> + <td><a href="#O">O</a></td> + <td><a href="#P">P</a></td> + <td><a href="#Q">Q</a></td> + <td><a href="#R">R</a></td> + <td><a href="#S">S</a></td> + <td><a href="#T">T</a></td> + <td><a href="#U">U</a></td> + <td><a href="#V">V</a></td> + <td><a href="#W">W</a></td> + <td><a href="#X">X</a></td> + <td><a href="#Y">Y</a></td> + <td><a href="#Z">Z</a></td> + </tr> + </table> + </div> + <hr> + <h4><a name="A">A</a></h4> + <br><a class="option-first" href="chapter3.html#o1">a4paper</a> (3.1.1) + <br><a class="productname-first" href="chapter10.html#p233">AbiWord</a> (10.1), + <a class="productname-subseq" href="chapter10.html#p262">(10.1.1)</a> + <br><a class="modespec-first" href="chapter3.html#e8">abstract</a> (3.4) + <br><a class="command-first" href="chapter3.html#c60">\abstractname</a> (3.4) + <br><a class="soloindex" href="chapter3.html#I53">abstracts</a> + <br><a class="soloindex" href="chapter2.html#I22">accents</a> + <br><a class="productname-single" href="chapter10.html#p280">Acrobat</a> (10.2.4) + <br><a class="productname-first" href="chapter1.html#p28">Acrobat Reader</a> (1.1), + <a class="productname-subseq" href="chapter4.html#p123">(4.1)</a>, + <a class="productname-subseq" href="chapter4.html#p137">(4.3.3)</a> + <br><a class="command-single" href="chapter3.html#c92">\addcontentsline</a> (3.7) + <br><a class="command-single" href="chapter3.html#c52">\affiliation</a> (3.3) + <br><a href="chapter8.html#AFM" class="acroid">AFM</a> (Adobe Font + Metric) (8.3.2) + <br><a class="productname-first" href="chapter8.html#p215">afm2tfm</a> (8.3.2) + <br><a class="option-single" href="chapter7.html#o14">alpha</a> (7.4.2.1) + <br><a href="chapter8.html#AMS" class="acroid">AMS</a> (American + Mathematical Society) (8.3.3) + <br><a href="appendixC.html#ANSI" class="acroid">ANSI</a> (American National + Standards Institute) (C) + <br><a class="soloindex" href="chapter1.html#I13">Apple Mac</a> + <br><a class="productname-single" href="chapter1.html#p39">apt-get</a> (1.2) + <br><a class="command-single" href="chapter9.html#c316">\arabic</a> (9.6) + <br><a class="productname-single" href="chapter6.html#p171">ArcInfo</a> (6.5.1) + <br><b><i><a href="chapter2.html#arguments" class="firstterm">arguments</a></i></b> (2.4.2) + <br><a class="methodname-single" href="chapter6.html#m48">array</a> (6.3.3) + <br><a class="methodname-first" href="chapter3.html#m14">article</a> (3.1) + <br><a href="chapter2.html#ASCII" class="acroid">ASCII</a> (American Standard Code for Information + Interchange) (2), <a class="acrorefs" href="chapter2.html#A11">(Introduction)</a>, <a class="acrorefs" href="chapter2.html#A78">(2.7)</a>, <a class="acrorefs" href="chapter2.html#A79">(2.9)</a>, <a class="acrorefs" href="chapter2.html#A97">(4.3.2)</a>, <a class="acrorefs" href="chapter2.html#A154">(6.5)</a>, <a class="acrorefs" href="chapter2.html#A200">(8.3)</a>, <a class="acrorefs" href="chapter2.html#A275">(10.1.1)</a>, <a class="acrorefs" href="chapter2.html#A302">(C)</a> + <br><b><i><a href="intro.html#asynchronous" class="firstterm">asynchronous typographic + display</a></i></b> (Introduction) + <br><a class="productname-single" href="chapter2.html#p111">AUC<span class="TEX">T<span class="E">E</span>X</span></a> (2.3.6) + <br><a class="command-first" href="chapter3.html#c47">\author</a> (3.3), + <a class="command-subseq" href="chapter9.html#c275">(9.2)</a> + <br><a class="command-single" href="chapter7.html#c175">\authorof</a> (7.4.2.1) + <br><a class="productname-single" href="chapter6.html#p166">AutoCAD</a> (6.5.1) + <br><a class="productname-first" href="chapter1.html#p51">Autorun</a> (1.4) + <h4><a name="B">B</a></h4> + <br><a class="option-single" href="chapter6.html#o12">b</a> (6.7.1) + <br><a class="methodname-first" href="chapter2.html#m9">babel</a> (2.8.6), + <a class="methodname-subseq" href="chapter3.html#m27">(3.6)</a> + <br><b><i><a href="chapter2.html#backslash" class="firstterm">backslash</a></i></b> (2.4) + <br><b><i><a href="chapter6.html#backtick" class="firstterm">backtick</a></i></b> (6.6.1) + <br><b><i><a href="chapter4.html#badness" class="firstterm"></a></i></b> (4.2.3.4) + <br><a class="productname-single" href="chapter10.html#p245">Balise</a> (10.1) + <br><a class="varname-first" href="chapter8.html#v29">baselineskip</a> (8.1.1) + <br><a class="command-first" href="chapter8.html#c196">\baselinestretch</a> (8.1.1) + <br><a class="productname-single" href="chapter1.html#p45">bash</a> (1.3) + <br><a class="methodname-first" href="chapter6.html#m41">bbding</a> (6.2.1), + <a class="methodname-subseq" href="chapter9.html#m89">(9.6.1)</a> + <br><a class="headword" href="chapter7.html#I118">beer</a><br> <a class="secondary" href="chapter7.html#I119">lite</a> (7.5)<br> <a class="tertiary" href="chapter7.html#I120">American</a> (7.5) + <br><a class="command-single" href="chapter3.html#c44">\begin</a> (3.2) + <br><a href="chapter1.html#kb" class="personname">Berry, Karl</a> (1), <a class="personname" href="chapter1.html#kb">(8.3.2)</a> + <br><a href="chapter8.html#" class="personname">Berry, Karl</a> (8.3.2) + <br><a class="command-first" href="chapter8.html#c222">\bfseries</a> (8.2.3) + <br><a class="soloindex" href="chapter7.html#I114">bibliographies</a> + <br><a class="command-single" href="chapter7.html#c177">\bibliography</a> (7.4.2.1) + <br><a class="command-single" href="chapter7.html#c178">\bibliographystyle</a> (7.4.2.1) + <br><a class="command-single" href="chapter7.html#c181">\bibname</a> (7.4.2.4) + <br><a class="productname-first" href="chapter7.html#p180">bibtex</a> (7.4.2.2) + <br><a class="command-single" href="chapter8.html#c192">\bigskip</a> (8.1.1) + <br><a href="chapter6.html#BMP" class="acroid">BMP</a> (Microsoft Bitmap) (6.5), <a class="acrorefs" href="chapter6.html#A166">(6.5.1)</a> + <br><a class="methodname-first" href="chapter3.html#m15">book</a> (3.1), + <a class="methodname-subseq" href="chapter3.html#m23">(3.5)</a> + <br><a class="soloindex" href="chapter6.html#I107">boxes</a> + <br><a class="soloindex" href="chapter2.html#I33">bp (big points)</a> + <br>braces, see curly bracescurly braces + <h4><a name="C">C</a></h4> + <br><a class="varname-single" href="chapter1.html#v5">C</a> (1.2) + <br><a class="command-first" href="chapter6.html#c114">\caption</a> (6.3.2) + <br><a class="soloindex" href="chapter2.html#I36">cc (Ciceros)</a> + <br><a href=".html#CD-ROM" class="acroid">CD-ROM</a> (Compact Disc Read-Only Memory) (Revision Info), <a class="acrorefs" href=".html#A217">(10)</a> + <br><a class="modespec-first" href="chapter6.html#e23">center</a> (6.3.3), + <a class="modespec-subseq" href="chapter6.html#e26">(6.3.4)</a> + <br><a class="command-single" href="chapter6.html#c119">\centering</a> (6.3.3) + <br><a class="productname-single" href="chapter6.html#p165">cep</a> (6.5) + <br><a href="intro.html#CGI" class="acroid">CGI</a> (Common Gateway Interface) (Introduction) + <br><a class="command-first" href="chapter3.html#c69">\chapter</a> (3.5) + <br><a class="varname-single" href="chapter9.html#v36">chapter</a> (9.6) + <br><a class="productname-single" href="chapter2.html#p116">charmap</a> (2.7) + <br><a class="productname-single" href="chapter6.html#p167">ChemDraw</a> (6.5.1) + <br><a href="chapter10.html#kac" class="personname">Chikrii, Kirill</a> (10.2.1) + <br><a class="headword" href="chapter7.html#I122">Chocolate Stout</a>, + <a class="primary" href="chapter7.html#I123">(7.5)</a> + <br><a class="productname-single" href="chapter7.html#p193">Chocolate + Stout</a> (7.5) + <br><a class="command-first" href="chapter7.html#c174">\cite</a> (7.4.2.1), + <a class="command-subseq" href="chapter7.html#c179">(7.4.2.2)</a> + <br><a class="command-single" href="chapter7.html#c158">\citequote</a> (7.1) + <br><a href="intro.html#CLI" class="acroid">CLI</a> (Command-Line Interface) (Introduction), <a class="acrorefs" href="intro.html#A46">(Preface)</a> + <br><a class="command-single" href="chapter6.html#c121">\cline</a> (6.3.3) + <br><a href="chapter8.html#CM" class="acroid">CM</a> (Computer Modern) (8.2), <a class="acrorefs" href="chapter8.html#A4">(Revision Info)</a>, <a class="acrorefs" href="chapter8.html#A5">(Revision Info)</a>, <a class="acrorefs" href="chapter8.html#A189">(8.2)</a>, <a class="acrorefs" href="chapter8.html#A192">(8.2.1)</a>, <a class="acrorefs" href="chapter8.html#A193">(8.2.4)</a>, <a class="acrorefs" href="chapter8.html#A211">(8.3.2)</a>, <a class="acrorefs" href="chapter8.html#A212">(8.3.3)</a> + <br><a class="soloindex" href="chapter2.html#I40">cm (centimeters)</a> + <br><a class="varname-single" href="chapter8.html#v32">cmr</a> (8.2.1) + <br><a class="varname-single" href="chapter8.html#v33">cmss</a> (8.2.1) + <br><a class="varname-single" href="chapter8.html#v34">cmtt</a> (8.2.1) + <br><a href="chapter8.html#CMYK" class="acroid">CMYK</a> (Cyan-Magenta-Yellow-Black) (8.2.6), <a class="acrorefs" href="chapter8.html#A116">(5.1.1)</a>, <a class="acrorefs" href="chapter8.html#A195">(8.2.6)</a> + <br><a class="methodname-first" href="chapter5.html#m30">color</a> (5.1.1), + <a class="methodname-subseq" href="chapter5.html#m37">(5.2.1)</a>, + <a class="methodname-subseq" href="chapter8.html#m83">(8.2.6)</a> + <br><a class="command-first" href="chapter8.html#c247">\color</a> (8.2.6) + <br><a class="command-single" href="chapter8.html#c255">\colorbox</a> (8.2.6) + <br><b><i><a href="chapter8.html#colornames" class="firstterm">color names</a></i></b> (8.2.6) + <br><a class="soloindex" href="chapter8.html#I153">colour</a> + <br><a class="soloindex" href="chapter7.html#I125">columns</a> + <br><a class="command-single" href="chapter7.html#c189">\columnsep</a> (7.6) + <br><a class="command-first" href="intro.html#c1">\command</a> (Introduction), + <a class="command-subseq" href="index.html#c321">(Index)</a> + <br><b><i><a href="chapter2.html#commentchar" class="firstterm">comment character</a></i></b> (2.5.1) + <br><a class="soloindex" href="intro.html#I4">commercial implementations</a> + <br><b><i><a href="chapter8.html#commutative" class="firstterm">commutative</a></i></b> (8.2.3) + <br><a class="productname-single" href="chapter5.html#p156">configure</a> (5.2.2) + <br><a class="varname-single" href="intro.html#v3">counter</a> (Introduction) + <br><a class="productname-first" href="preface.html#p24">Crayola</a> (Preface), + <a class="productname-subseq" href="chapter8.html#p201">(8.2.6)</a> + <br><a class="soloindex" href="chapter7.html#I113">cross-references</a> + <br><a href="chapter5.html#CTAN" class="acroid">CTAN</a> (Comprehensive Archive + Network) (5), <a class="acrorefs" href="chapter5.html#A15">(Introduction)</a>, <a class="acrorefs" href="chapter5.html#A47">(Preface)</a>, <a class="acrorefs" href="chapter5.html#A50">(1)</a>, <a class="acrorefs" href="chapter5.html#A57">(1.4.3)</a>, <a class="acrorefs" href="chapter5.html#A68">(2.3.2)</a>, <a class="acrorefs" href="chapter5.html#A71">(2.3.3)</a>, <a class="acrorefs" href="chapter5.html#A72">(2.3.4)</a>, <a class="acrorefs" href="chapter5.html#A108">(4.4)</a>, <a class="acrorefs" href="chapter5.html#A111">(5)</a>, <a class="acrorefs" href="chapter5.html#A115">(5.1)</a>, <a class="acrorefs" href="chapter5.html#A120">(5.1.2)</a>, <a class="acrorefs" href="chapter5.html#A121">(5.2)</a>, <a class="acrorefs" href="chapter5.html#A128">(5.3)</a>, <a class="acrorefs" href="chapter5.html#A155">(6.5)</a>, <a class="acrorefs" href="chapter5.html#A184">(7.4.2.1)</a>, <a class="acrorefs" href="chapter5.html#A186">(7.4.2.4)</a>, <a class="acrorefs" href="chapter5.html#A187">(7.5)</a>, <a class="acrorefs" href="chapter5.html#A190">(8.2)</a>, <a class="acrorefs" href="chapter5.html#A202">(8.3.1)</a>, <a class="acrorefs" href="chapter5.html#A203">(8.3.1.2)</a>, <a class="acrorefs" href="chapter5.html#A252">(10.1)</a>, <a class="acrorefs" href="chapter5.html#A279">(10.2.1)</a>, <a class="acrorefs" href="chapter5.html#A295">(10.2.5)</a>, <a class="acrorefs" href="chapter5.html#A299">(B)</a>, <a class="acrorefs" href="chapter5.html#A308">(Index)</a> + <br><b><i><a href="chapter2.html#curly" class="firstterm">curly + braces</a></i></b> (2.4.2) + <br><a class="productname-single" href="chapter5.html#p157">Cygwin</a> (5.2.3) + <h4><a name="D">D</a></h4> + <br><a href="chapter10.html#rd" class="personname">Dambra, Ruggero</a> (10.1) + <br><a class="command-first" href="chapter3.html#c48">\date</a> (3.3), + <a class="command-subseq" href="chapter4.html#c94">(4.2.3.1)</a>, + <a class="command-subseq" href="chapter4.html#c98">(4.2.3.3)</a>, + <a class="command-subseq" href="chapter9.html#c276">(9.2)</a> + <br><a class="soloindex" href="chapter2.html#I35">dd (Didot points)</a> + <br><a href="preface.html#DEC" class="acroid">DEC</a> (Digital Equipment + Corporation) (Preface) + <br><a class="command-single" href="chapter8.html#c261">\DeclareFontFamily</a> (8.3.2) + <br><a class="command-first" href="chapter8.html#c262">\DeclareFontShape</a> (8.3.2) + <br><a class="command-first" href="chapter9.html#c297">\def</a> (9.4) + <br><a class="command-first" href="chapter8.html#c250">\definecolor</a> (8.2.6) + <br><a class="modespec-single" href="chapter6.html#e17">description</a> (6.2.3) + <br><a class="productname-single" href="chapter10.html#p284">detex</a> (10.2.5) + <br><a class="soloindex" href="chapter2.html#I27">dimension</a> + <br><b><i><a href="chapter3.html#dimension" class="firstterm">dimension</a></i></b> (3.6) + <br><a class="soloindex" href="chapter2.html#I23">dimensions</a> + <br><a class="soloindex" href="chapter5.html#I84">DOC<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a class="productname-single" href="intro.html#p19">DocBook</a> (Introduction) + <br><a class="modespec-first" href="chapter3.html#e6">document</a> (3.2), + <a class="modespec-subseq" href="chapter3.html#e7">(3.3)</a>, + <a class="modespec-subseq" href="chapter3.html#e12">(3.4)</a> + <br><b><i><a href="chapter3.html#documentclass" class="firstterm">document + class</a></i></b> (3) + <br><a class="command-first" href="chapter3.html#c43">\documentclass</a> (3.1), + <a class="command-subseq" href="chapter3.html#c62">(3.4)</a> + <br><a class="soloindex" href="chapter3.html#I49">document class</a> + <br><a href="chapter10.html#fd" class="personname">Dorner, Fernando</a> (10.2.1) + <br><a class="soloindex" href="chapter8.html#I134">double-spacing</a> + <br><a class="option-single" href="chapter3.html#o8">draft</a> (3.1.1) + <br><a class="productname-single" href="chapter6.html#p175">Draw</a> (6.5.1) + <br><a href="chapter10.html#DSSSL" class="acroid">DSSSL</a> (Document + Style Semantics and Specification Language) (10.1) + <br><a href="chapter10.html#DTD" class="acroid">DTD</a> (Document Type + Definition) (10.1), <a class="acrorefs" href="chapter10.html#A26">(Introduction)</a>, <a class="acrorefs" href="chapter10.html#A256">(10.1)</a> + <br><a href="preface.html#DTP" class="acroid">DTP</a> (desktop publishing) (Preface), <a class="acrorefs" href="preface.html#A45">(Preface)</a>, <a class="acrorefs" href="preface.html#A135">(6.3)</a>, <a class="acrorefs" href="preface.html#A191">(8.2)</a> + <br><a href=".html#DVD" class="acroid">DVD</a> (Digital Versatile Disk) (Revision Info), <a class="acrorefs" href=".html#A218">(10)</a> + <br><a href="chapter4.html#DVI" class="acroid">DVI</a> (device-independent) (4.1), <a class="acrorefs" href="chapter4.html#A42">(Preface)</a>, <a class="acrorefs" href="chapter4.html#A51">(1.1)</a>, <a class="acrorefs" href="chapter4.html#A61">(2.2)</a>, <a class="acrorefs" href="chapter4.html#A66">(2.3.2)</a>, <a class="acrorefs" href="chapter4.html#A91">(4.1.3)</a>, <a class="acrorefs" href="chapter4.html#A92">(4.3)</a>, <a class="acrorefs" href="chapter4.html#A95">(4.3.1)</a>, <a class="acrorefs" href="chapter4.html#A98">(4.3.2)</a>, <a class="acrorefs" href="chapter4.html#A103">(4.3.3)</a>, <a class="acrorefs" href="chapter4.html#A118">(5.1.2)</a>, <a class="acrorefs" href="chapter4.html#A172">(6.5.1)</a>, <a class="acrorefs" href="chapter4.html#A182">(6.7)</a>, <a class="acrorefs" href="chapter4.html#A296">(10.2.5)</a> + <br><a class="productname-single" href="chapter4.html#p152">dvialw</a> (4.4) + <br><a class="productname-single" href="chapter4.html#p150">dvieps</a> (4.4) + <br><a class="productname-single" href="chapter4.html#p151">dvihp</a> (4.4) + <br><a class="productname-first" href="chapter4.html#p131">dvips</a> (4.3.2), + <a class="productname-subseq" href="chapter4.html#p142">(4.4)</a>, + <a class="productname-subseq" href="chapter6.html#p161">(6.5)</a>, + <a class="productname-subseq" href="chapter8.html#p200">(8.2.6)</a>, + <a class="productname-subseq" href="chapter8.html#p216">(8.3.2)</a> + <br><a class="productname-single" href="chapter4.html#p129">dviview</a> (4.3.1) + <br><a class="productname-single" href="chapter10.html#p240">DynaTag</a> (10.1) + <h4><a name="E">E</a></h4> + <br><a href="intro.html#ECDL" class="acroid">ECDL</a> (European Computer Driving + Licence) (Introduction), <a class="acrorefs" href="intro.html#A14">(Introduction)</a> + <br><a class="soloindex" href="chapter2.html#I15">editors</a> + <br><a class="command-single" href="chapter9.html#c265">\ef</a> (9.1) + <br><b><i><a href="chapter3.html#element" class="firstterm">element</a></i></b> (3) + <br><a class="productname-single" href="chapter7.html#p189">elsevier</a> (7.4.2.4) + <br><a class="soloindex" href="chapter2.html#I37">em (relative + measure)</a> + <br><a class="productname-first" href="intro.html#p10">Emacs</a> (Introduction), + <a class="productname-subseq" href="chapter1.html#p43">(1.2)</a>, + <a class="productname-subseq" href="chapter1.html#p77">(1.4.2)</a>, + <a class="productname-subseq" href="chapter2.html#p88">(2.1)</a>, + <a class="productname-subseq" href="chapter2.html#p95">(2.3)</a>, + <a class="productname-subseq" href="chapter2.html#p106">(2.3.6)</a>, + <a class="productname-subseq" href="chapter2.html#p114">(2.6)</a>, + <a class="productname-subseq" href="chapter4.html#p124">(4.1.3)</a>, + <a class="productname-subseq" href="chapter4.html#p126">(4.2.1)</a>, + <a class="productname-subseq" href="chapter4.html#p145">(4.4)</a>, + <a class="productname-subseq" href="chapter6.html#p159">(6.3.3)</a>, + <a class="productname-subseq" href="chapter7.html#p184">(7.4.2.3)</a>, + <a class="productname-subseq" href="chapter10.html#p258">(10.1)</a> + <br><a class="command-first" href="chapter8.html#c241">\emph</a> (8.2.5) + <br><a class="option-single" href="chapter8.html#o16">empty</a> (8.1.2) + <br><a class="command-single" href="chapter3.html#c45">\end</a> (3.2) + <br><a class="methodname-single" href="chapter7.html#m60">endnote</a> (7.2) + <br><a class="command-single" href="chapter8.html#c201">\enspace</a> (8.1.1) + <br><a class="modespec-single" href="chapter6.html#e14">enumerate</a> (6.2.2) + <br><a class="modespec-single" href="chapter6.html#e16">enumerate*</a> (6.2.2) + <br><a class="varname-single" href="chapter6.html#v21">enumi</a> (6.2.6) + <br><a class="varname-single" href="chapter6.html#v22">enumii</a> (6.2.6) + <br><a class="varname-single" href="chapter6.html#v23">enumiii</a> (6.2.6) + <br><a class="varname-single" href="chapter6.html#v24">enumiv</a> (6.2.6) + <br><a class="modespec-first" href="intro.html#e1">environment</a> (Introduction) + <br><b><i><a href="chapter3.html#environment" class="firstterm">environment</a></i></b> (3.2) + <br><a class="soloindex" href="chapter6.html#I89">environment</a>, + <a class="modespec-subseq" href="index.html#e55">(Index)</a> + <br><a href="chapter6.html#EPS" class="acroid">EPS</a> (Encapsulated + PostScript) (6.5), <a class="acrorefs" href="chapter6.html#A140">(6.5)</a>, <a class="acrorefs" href="chapter6.html#A157">(6.5.1)</a> + <br><a class="methodname-single" href="chapter6.html#m50">epsf</a> (6.5) + <br><a class="modespec-single" href="chapter2.html#e5">equation</a> (2.9)<br> <a class="secondary" href="chapter4.html#I74">File not found</a> (4.2.3.6)<br> <a class="secondary" href="chapter4.html#I72">Overfull hbox</a> (4.2.3.5)<br> <a class="secondary" href="chapter4.html#I68">Runaway argument</a> (4.2.3.3) + <br><a class="headword" href="chapter4.html#I64">Error messages</a><a class="secondary" href="chapter4.html#I64">Too many }'s</a> (4.2.3.1)<br> <a class="secondary" href="chapter4.html#I66">Undefined control sequence</a> (4.2.3.2)<br> <a class="secondary" href="chapter4.html#I70">Underfull hbox</a> (4.2.3.4) + <br><a href="chapter1.html#esser" class="personname">Esser, Thomas</a> (1) + <br><a class="command-single" href="chapter2.html#c17">\EUR</a> (2.5.1) + <br><font color="red">sortas:euro</font> + <br><a class="productname-single" href="chapter10.html#p236">EuroMath</a> (10.1) + <br><a class="soloindex" href="chapter2.html#I38">ex (relative + measure)</a> + <br><a class="varname-first" href="chapter6.html#v19">example</a> (6.2.6) + <br><a class="productname-single" href="chapter10.html#p250">Excel</a> (10.1) + <h4><a name="F">F</a></h4> + <br><b><i><a href="chapter8.html#family" class="firstterm">family</a></i></b> (8.2.3) + <br><a class="methodname-first" href="chapter6.html#m54">fancybox</a> (6.6.2), + <a class="methodname-subseq" href="chapter6.html#m56">(6.7.3)</a>, + <a class="methodname-subseq" href="chapter9.html#m88">(9.5)</a> + <br><a class="methodname-single" href="chapter8.html#m72">fancyhdr</a> (8.1.2) + <br><a class="command-single" href="chapter8.html#c209">\fancyhead</a> (8.1.2) + <br><a class="methodname-single" href="chapter6.html#m53">fancyvrb</a> (6.6.2) + <br><a href="chapter5.html#FAQ" class="acroid">FAQ</a> (Frequently-Asked Questions) (5.3.1), <a class="acrorefs" href="chapter5.html#A32">(Foreword)</a>, <a class="acrorefs" href="chapter5.html#A114">(5)</a>, <a class="acrorefs" href="chapter5.html#A130">(5.3.1)</a>, <a class="acrorefs" href="chapter5.html#A131">(5.3.4)</a> + <br><a class="command-first" href="chapter6.html#c150">\fbox</a> (6.7.2), + <a class="command-subseq" href="chapter6.html#c154">(6.7.3)</a>, + <a class="command-subseq" href="chapter8.html#c254">(8.2.6)</a> + <br><a class="varname-single" href="chapter6.html#v28">fboxrule</a> (6.7.2) + <br><a class="varname-single" href="chapter6.html#v27">fboxsep</a> (6.7.2) + <br><a href="chapter1.html#tf" class="personname">Feuerstack, Thomas</a> (1) + <br><a class="modespec-single" href="chapter6.html#e29">figure</a> (6.4) + <br><a class="modespec-single" href="chapter7.html#e49">figure*</a> (7.6) + <br><a class="soloindex" href="chapter6.html#I99">figures</a> + <br><a class="soloindex" href="chapter4.html#I62">filenames</a> + <br><a class="soloindex" href="chapter4.html#I73">File not found</a> + <br><a href="intro.html#jf" class="personname">Fine, Jonathan</a> (Introduction) + <br><a class="modespec-single" href="chapter6.html#e20">float</a> (6.3.1) + <br><a class="headword" href="chapter6.html#I98">floats</a>, + <a class="primary" href="chapter6.html#I100">(6.4)</a> + <br><a class="modespec-first" href="chapter6.html#e28">flushleft</a> (6.3.4), + <a class="modespec-subseq" href="chapter9.html#e51">(9.2)</a> + <br><a class="modespec-single" href="chapter6.html#e27">flushright</a> (6.3.4) + <br><a class="methodname-single" href="chapter7.html#m61">fnpara</a> (7.2) + <br><a class="command-single" href="chapter7.html#c163">\fnsymbol</a> (7.2) + <br><b><i><a href="chapter8.html#fontdef" class="firstterm">font definition</a></i></b> (8.3.2) + <br><a class="command-first" href="chapter8.html#c212">\fontencoding</a> (8.2.2) + <br><a class="command-single" href="chapter8.html#c213">\fontfamily</a> (8.2.2) + <br><a class="productname-single" href="chapter8.html#p210">fontinst</a> (8.3.2) + <br><a class="productname-first" href="chapter8.html#p212">fontname</a> (8.3.2) + <br><a class="methodname-first" href="chapter8.html#m86">fontname</a> (8.3.2)<br> <a class="secondary" href="chapter8.html#I149">changing temporarily</a> (8.2.2)<br> <a class="secondary" href="chapter8.html#I147">changing the default</a> (8.2.1)<br> <a class="secondary" href="chapter8.html#I154">colour</a> (8.2.6)<br> <a class="secondary" href="chapter8.html#I142">Computer Modern</a> (8.2)<br> <a class="secondary" href="chapter8.html#I157">encoding</a> (8.3.2)<br> <a class="secondary" href="chapter8.html#I148">families</a> (8.2.1)<br> <a class="secondary" href="chapter8.html#I140">in general</a> (8.2), + <a class="primary" href="chapter8.html#I155">(8.3)</a> + <br><a class="command-first" href="chapter8.html#c239">\fontsize</a> (8.2.4)<br> <a class="secondary" href="chapter8.html#I141">METAFONT</a> (8.2), + <a class="primary" href="chapter8.html#I144">(8.2)</a><br> <a class="secondary" href="chapter8.html#I145">PostScript</a> (8.2), + <a class="primary" href="chapter8.html#I156">(8.3.2)</a> + <br><a class="headword" href="chapter3.html#I51">fonts</a><a class="secondary" href="chapter3.html#I51">sizes</a> (3.1.1), + <a class="primary" href="chapter8.html#I152">(8.2.4)</a><br> <a class="secondary" href="chapter8.html#I151">styles</a> (8.2.3)<br> <a class="secondary" href="chapter8.html#I143">TrueType</a> (8.2)<br> <a class="secondary" href="chapter8.html#I146">Type 1</a> (8.2) + <br><a class="command-single" href="chapter7.html#c159">\footnote</a> (7.2) + <br><a class="soloindex" href="chapter7.html#I111">footnotes</a> + <br><a class="command-single" href="chapter8.html#c231">\footnotesize</a> (8.2.4) + <br><a class="command-single" href="chapter8.html#c243">\foreign</a> (8.2.5) + <br><a class="productname-single" href="intro.html#p6">fp<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="soloindex" href="chapter1.html#I6">fp<span class="TEX">T<span class="E">E</span>X</span></a> + <br><font color="red">sortas:fptex</font> + <br><a class="productname-single" href="chapter10.html#p230">FrameMaker</a> (10) + <br><a href="intro.html#FTP" class="acroid">FTP</a> (File + Transfer Protocol) (Introduction), <a class="acrorefs" href="intro.html#A110">(5)</a><h4><a name="G">G</a></h4> + <br><a class="methodname-first" href="chapter5.html#m31">geometry</a> (5.1.1), + <a class="methodname-subseq" href="chapter5.html#m36">(5.1.2)</a>, + <a class="methodname-subseq" href="chapter7.html#m62">(7.3)</a>, + <a class="methodname-subseq" href="chapter8.html#m67">(8.1.1)</a> + <br><a class="productname-first" href="chapter4.html#p134">Ghostscript</a> (4.3.2), + <a class="productname-subseq" href="chapter4.html#p149">(4.4)</a>, + <a class="productname-subseq" href="chapter8.html#p196">(8.2)</a> + <br><a class="productname-first" href="chapter1.html#p56">GhostScript</a> (1.4.1) + <br><a class="productname-single" href="chapter1.html#p33">GhostView</a> (1.1) + <br><a href="chapter6.html#GIF" class="acroid">GIF</a> (Graphics Interchange + Format) (6.5.1) + <br><a class="productname-single" href="chapter6.html#p176">GIMP</a> (6.5.1) + <br><a class="soloindex" href="chapter7.html#I117">glossaries</a> + <br><a class="command-single" href="chapter7.html#c187">\glossary</a> (7.5) + <br><a href="chapter2.html#GNU" class="acroid">GNU</a> (GNU's Not + Unix) (2.3.6), <a class="acrorefs" href="chapter2.html#A30">(Introduction)</a>, <a class="acrorefs" href="chapter2.html#A74">(2.3.6)</a> + <br><a class="productname-single" href="chapter6.html#p178">GNUplot</a> (6.5.1) + <br><a href="chapter10.html#ag" class="personname">Granzer, Andreas</a> (10.2.1) + <br><a class="methodname-single" href="chapter5.html#m38">graphics</a> (5.2.1) + <br><a class="soloindex" href="chapter6.html#I102">graphics</a> + <br><a class="command-first" href="chapter6.html#c130">\graphicspath</a> (6.5.2) + <br><a class="methodname-first" href="chapter6.html#m49">graphicx</a> (6.5) + <br><b><i><a href="chapter6.html#grave" class="firstterm">grave accent</a></i></b> (6.6.1) + <br><a class="soloindex" href="chapter8.html#I150">grouping</a> + <br><a class="productname-first" href="chapter1.html#p26">GSview</a> (1.1), + <a class="productname-subseq" href="chapter1.html#p57">(1.4.1)</a>, + <a class="productname-subseq" href="chapter4.html#p119">(4.1)</a>, + <a class="productname-subseq" href="chapter4.html#p133">(4.3.2)</a>, + <a class="productname-subseq" href="chapter4.html#p140">(4.3.3)</a>, + <a class="productname-subseq" href="chapter4.html#p141">(4.4)</a>, + <a class="productname-subseq" href="chapter8.html#p197">(8.2)</a>, + <a class="productname-subseq" href="chapter8.html#p224">(8.3.3)</a> + <br><a class="productname-first" href="chapter1.html#p82">GSView</a> (1.4.2) + <br><a href="intro.html#GUI" class="acroid">GUI</a> (Graphical User Interface) (Introduction), <a class="acrorefs" href="intro.html#A23">(Introduction)</a>, <a class="acrorefs" href="intro.html#A35">(Preface)</a>, <a class="acrorefs" href="intro.html#A89">(4.1.2)</a> + <br><a class="productname-single" href="chapter8.html#p211">Gutta-Percha</a> (8.3.2) + <br><a class="productname-single" href="chapter1.html#p34">gv</a> (1.1) + <h4><a name="H">H</a></h4> + <br>H&J, see hyphenation, justificationhyphenation, justification + <br><a class="soloindex" href="chapter2.html#I44">hard space</a> + <br><a class="productname-single" href="chapter7.html#p187">harvard</a> (7.4.2.4) + <br><b><i><a href="chapter2.html#hash" class="firstterm">hash mark</a></i></b> (2.5.1) + <br><a class="option-single" href="chapter8.html#o17">headings</a> (8.1.2) + <br><a class="soloindex" href="chapter5.html#I87">help</a> + <br><a href="chapter10.html#wh" class="personname">Hennings, Wilfried</a> (10.2.1) + <br><font color="red">sortas:hj</font> + <br><a class="command-single" href="chapter6.html#c120">\hline</a> (6.3.3) + <br><a class="command-single" href="chapter9.html#c288">\hrule</a> (9.2) + <br><a class="command-single" href="chapter8.html#c199">\hspace</a> (8.1.1) + <br><a href="chapter10.html#HTML" class="acroid">HTML</a> (HyperText + Markup Language) (10), <a class="acrorefs" href="chapter10.html#A2">(Release Info)</a>, <a class="acrorefs" href="chapter10.html#A27">(Introduction)</a>, <a class="acrorefs" href="chapter10.html#A60">(2.1)</a>, <a class="acrorefs" href="chapter10.html#A82">(3.1)</a>, <a class="acrorefs" href="chapter10.html#A85">(3.6)</a>, <a class="acrorefs" href="chapter10.html#A133">(6.3)</a>, <a class="acrorefs" href="chapter10.html#A223">(10.1)</a>, <a class="acrorefs" href="chapter10.html#A273">(10.1.1)</a>, <a class="acrorefs" href="chapter10.html#A277">(10.2)</a>, <a class="acrorefs" href="chapter10.html#A282">(10.2.1)</a>, <a class="acrorefs" href="chapter10.html#A283">(10.2.2)</a>, <a class="acrorefs" href="chapter10.html#A290">(10.2.3)</a>, <a class="acrorefs" href="chapter10.html#A306">(D.2)</a> + <br><a class="productname-single" href="chapter10.html#p239">HTML + Tidy</a> (10.1) + <br><a class="command-single" href="chapter8.html#c237">\huge</a> (8.2.4) + <br><a class="command-single" href="chapter8.html#c238">\Huge</a> (8.2.4) + <br><a class="soloindex" href="chapter2.html#I24">hyphenation</a> + <br><a class="command-single" href="chapter2.html#c25">\hyphenation</a> (2.8.2)<br> <a class="secondary" href="chapter2.html#I43">discretionary</a> (2.8.2) + <br><a class="headword" href="chapter2.html#I42">hyphens</a><a class="secondary" href="chapter2.html#I42">soft</a> (2.8.2) + <h4><a name="I">I</a></h4> + <br><a class="command-single" href="chapter2.html#c22">\i</a> (2.7) + <br><a href=".html#IBM" class="acroid">IBM</a> (International Business Machines) (Revision Info), <a class="acrorefs" href=".html#A29">(Introduction)</a> + <br><a href="chapter1.html#IDE" class="acroid">IDE</a> (Integrated Development + Environment) (1.4.1) + <br><a href="chapter7.html#IEEETR" class="acroid">IEEETR</a> (Transactions of the Institute of Electrical + and Electronics Engineers) (7.4.2.1) + <br><a class="productname-single" href="chapter6.html#p174">Illustrator</a> (6.5.1) + <br><a class="productname-single" href="chapter1.html#p47">I<span class="TEX">T<span class="E">E</span>X</span>Mac</a> (1.3) + <br><a class="soloindex" href="chapter6.html#I101">images</a> + <br><a class="soloindex" href="chapter2.html#I41">in (inches)</a> + <br><a class="command-first" href="chapter6.html#c124">\includegraphics</a> (6.4), + <a class="command-subseq" href="chapter6.html#c125">(6.5)</a>, + <a class="command-subseq" href="chapter6.html#c129">(6.5.1)</a>, + <a class="command-subseq" href="chapter6.html#c131">(6.5.2)</a> + <br><a class="command-first" href="chapter7.html#c184">\index</a> (7.5), + <a class="command-subseq" href="chapter9.html#c309">(9.4)</a> + <br><a class="soloindex" href="chapter7.html#I116">indexes</a> + <br><b><i><a href="chapter6.html#inlines" class="firstterm">Inline lists</a></i></b> (6.2.4) + <br><a class="modespec-first" href="chapter6.html#e18">inparaenum</a> (6.2.4) + <br><a class="methodname-first" href="chapter2.html#m5">inputenc</a> (2.7), + <a class="methodname-subseq" href="chapter2.html#m12">(2.9)</a>, + <a class="methodname-subseq" href="appendixC.html#m90">(C)</a> + <br><a class="productname-single" href="intro.html#p18">Instant + Preview</a> (Introduction) + <br><a href="chapter10.html#ISO" class="acroid">ISO</a> (International Organization for + Standardization) (10.1) + <br><a class="productname-single" href="chapter2.html#p96">ispell</a> (2.3.2) + <br><a class="command-single" href="chapter6.html#c104">\item</a> (6.2) + <br><a class="modespec-single" href="chapter6.html#e13">itemize</a> (6.2.1) + <br><a class="modespec-single" href="chapter6.html#e15">itemize*</a> (6.2.2) + <br><a class="command-single" href="chapter8.html#c219">\itshape</a> (8.2.3) + <h4><a name="J">J</a></h4> + <br><a href="chapter8.html#bj" class="personname">Jackowski, Bogusław</a> (8.3.3) + <br><a class="productname-first" href="intro.html#p21">Java</a> (Introduction), + <a class="productname-subseq" href="chapter10.html#p260">(10.1.1)</a> + <br><a href="chapter6.html#JPG" class="acroid">JPG</a> (Joint Photographic + Experts Group) (6.5), <a class="acrorefs" href="chapter6.html#A150">(6.5)</a>, <a class="acrorefs" href="chapter6.html#A162">(6.5.1)</a> + <br><a class="methodname-single" href="chapter7.html#m63">jurabib</a> (7.4.2.5) + <br><a class="soloindex" href="chapter2.html#I25">justification</a><h4><a name="K">K</a></h4> + <br><a href="intro.html#dk" class="personname">Kastrup, David</a> (Introduction), <a class="personname" href="intro.html#dk">(9.4)</a> + <br><a href="intro.html#mk" class="personname">Kay, Michael</a> (Introduction) + <br><a href="chapter5.html#ul" class="personname">Kern, Uwe</a> (5.1.1) + <br><a href="chapter1.html#tk" class="personname">Kiffe, Tom</a> (1) + <br><a class="productname-single" href="chapter7.html#p190">kluwer</a> (7.4.2.4) + <br><a href="preface.html#knuth" class="personname">Knuth, Don</a> (Preface) + <br><a class="methodname-first" href="chapter3.html#m19">komascript</a> (3.1) + <br><a class="productname-single" href="chapter10.html#p234">Kword</a> (10.1) + <h4><a name="L">L</a></h4> + <br><a class="varname-single" href="chapter1.html#v6">L</a> (1.2) + <br><a class="command-first" href="chapter6.html#c108">\label</a> (6.2.5), + <a class="command-subseq" href="chapter6.html#c115">(6.3.2)</a>, + <a class="command-subseq" href="chapter7.html#c164">(7.4.1)</a> + <br><a href="chapter9.html#ll" class="personname">Lamport, Leslie</a> (9.4) + <br><a class="command-single" href="chapter8.html#c234">\large</a> (8.2.4) + <br><a class="command-single" href="chapter8.html#c235">\Large</a> (8.2.4) + <br><a class="command-single" href="chapter8.html#c236">\LARGE</a> (8.2.4) + <br><a class="command-single" href="chapter10.html#c319">\LaTeX</a> (10.1.1) + <br><a class="productname-single" href="chapter10.html#p272">latex2rtf</a> (10.2.1) + <br><a class="command-single" href="chapter8.html#c211">\leftmark</a> (8.1.2) + <br><a class="varname-single" href="intro.html#v1">length</a> (Introduction) + <br><b><i><a href="chapter3.html#length" class="firstterm">length</a></i></b> (3.6) + <br><a class="methodname-first" href="chapter3.html#m16">letter</a> (3.1) + <br><a class="option-first" href="chapter3.html#o2">letterpaper</a> (3.1.1) + <br><a class="soloindex" href="chapter8.html#I139">letterspacing</a> + <br><a class="command-single" href="chapter9.html#c293">\linebreak</a> (9.3) + <br><a class="soloindex" href="chapter1.html#I9">Linux</a> + <br><a class="command-single" href="chapter3.html#c87">\listoffigures</a> (3.7) + <br><a class="command-single" href="chapter3.html#c88">\listoftables</a> (3.7) + <br><a class="headword" href="chapter6.html#I88">lists</a><br> <a class="secondary" href="chapter6.html#I91">bulleted</a> (6.2.1)<br> <a class="secondary" href="chapter6.html#I94">description</a> (6.2.3)<br> <a class="secondary" href="chapter6.html#I95">discussion</a> (6.2.3)<br> <a class="secondary" href="chapter6.html#I93">enumerated</a> (6.2.2)<br> <a class="secondary" href="chapter6.html#I96">inline</a> (6.2.4)<br> <a class="secondary" href="chapter6.html#I90">itemized</a> (6.2.1)<br> <a class="secondary" href="chapter6.html#I92">numbered</a> (6.2.2) + <br><a href="chapter1.html#ml" class="personname">Lotz, Manfred</a> (1) + <h4><a name="M">M</a></h4> + <br><a class="soloindex" href="chapter1.html#I12">Mac OS X</a> + <br><a class="soloindex" href="chapter9.html#I158">macros</a> + <br><b><i><a href="chapter9.html#macs" class="firstterm">macros</a></i></b> (9) + <br><a class="command-single" href="chapter9.html#c278">\makeatletter</a> (9.2) + <br><a class="command-first" href="chapter9.html#c279">\makeatother</a> (9.2) + <br><a class="productname-single" href="chapter7.html#p191">makebst</a> (7.4.2.4) + <br><a class="command-single" href="chapter7.html#c186">\makeglossary</a> (7.5) + <br><a class="methodname-single" href="chapter7.html#m64">makeidx</a> (7.5) + <br><a class="productname-first" href="intro.html#p9">makeindex</a> (Introduction), + <a class="productname-subseq" href="chapter7.html#p192">(7.5)</a> + <br><a class="command-single" href="chapter7.html#c183">\makeindex</a> (7.5) + <br><a class="command-first" href="chapter3.html#c50">\maketitle</a> (3.3), + <a class="command-subseq" href="chapter3.html#c58">(3.4)</a>, + <a class="command-subseq" href="chapter4.html#c96">(4.2.3.3)</a>, + <a class="command-subseq" href="chapter9.html#c268">(9.2)</a> + <br><a href="chapter8.html#bkm" class="personname">Malyshev, Basil K.</a> (8.3.3) + <br><a class="productname-first" href="chapter6.html#p169">Maple</a> (6.5.1), + <a class="productname-subseq" href="chapter10.html#p238">(10.1)</a> + <br><a class="soloindex" href="chapter7.html#I112">marginal notes</a> + <br><a class="soloindex" href="chapter8.html#I128">margins</a> + <br><a class="command-single" href="chapter8.html#c206">\markboth</a> (8.1.2) + <br><a class="command-single" href="chapter8.html#c205">\markright</a> (8.1.2) + <br><b><i><a href="chapter2.html#markup" class="firstterm">markup</a></i></b> (2.1) + <br><a class="methodname-single" href="chapter2.html#m4">marvosym</a> (2.5.1) + <br><a class="productname-single" href="chapter6.html#p168">MathCAD</a> (6.5.1) + <br><a class="soloindex" href="chapter2.html#I47">math characters</a> + <br><a class="productname-first" href="chapter6.html#p170">Mathematica</a> (6.5.1), + <a class="productname-subseq" href="chapter10.html#p237">(10.1)</a> + <br><a class="headword" href="intro.html#I3">mathematics</a>, + <a class="primary" href="chapter2.html#I46">(2.9)</a> + <br><a href="chapter1.html#em" class="personname">Matthes, Eberhard</a> (1.4.2) + <br><a class="command-first" href="chapter2.html#c26">\mbox</a> (2.8.3), + <a class="command-subseq" href="chapter9.html#c292">(9.3)</a> + <br><a class="methodname-first" href="chapter6.html#m44">mdwlist</a> (6.2.2), + <a class="methodname-subseq" href="chapter8.html#m69">(8.1.1)</a> + <br><a class="command-single" href="chapter8.html#c191">\medskip</a> (8.1.1) + <br><a class="methodname-first" href="chapter3.html#m18">memoir</a> (3.1) + <br><b><i><a href="chapter2.html#metacharacters" class="firstterm">metacharacters</a></i></b> (2.5) + <br><b><i><a href="chapter3.html#metadata" class="firstterm"></a></i></b> (3.3) + <br><b><i><a href="chapter3.html#metainformation" class="firstterm"></a></i></b> (3.3) + <br><a class="productname-single" href="chapter10.html#p244">Metamorphosis</a> (10.1) + <br>Microbrew, see beerbeer + <br><a class="soloindex" href="chapter1.html#I11">Microsoft Windows</a> + <br><a class="soloindex" href="chapter1.html#I8">MiK<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a class="productname-first" href="chapter1.html#p53">MIK<span class="TEX">T<span class="E">E</span>X</span></a> (1.4.1) + <br><font color="red">sortas:miktex</font> + <br><a class="modespec-first" href="chapter6.html#e37">minipage</a> (6.7.1), + <a class="modespec-subseq" href="chapter6.html#e42">(6.7.2)</a>, + <a class="modespec-subseq" href="chapter6.html#e44">(6.7.3)</a>, + <a class="modespec-subseq" href="chapter9.html#e53">(9.5)</a> + <br><a class="soloindex" href="chapter6.html#I104">mirror</a> + <br><a class="productname-single" href="chapter1.html#p40">mkfs</a> (1.2) + <br><a class="productname-first" href="chapter5.html#p155">mktexlsr</a> (5.2.2), + <a class="productname-subseq" href="appendixA.html#p285">(A)</a> + <br><a class="soloindex" href="chapter2.html#I39">mm (millimeters)</a> + <br><a class="productname-single" href="chapter5.html#p158">Mozilla</a> (5.3.4) + <br><a class="methodname-first" href="chapter7.html#m65">multicol</a> (7.6) + <br><a class="modespec-single" href="chapter7.html#e48">multicols</a> (7.6) + <br><a class="command-single" href="chapter6.html#c122">\multicolumn</a> (6.3.3) + <br><a class="modespec-single" href="chapter6.html#e24">multirow</a> (6.3.3) + <br><a class="productname-single" href="chapter1.html#p50">My + Computer</a> (1.4) + <br><a class="option-single" href="chapter8.html#o18">myheadings</a> (8.1.2) + <h4><a name="N">N</a></h4> + <br><a class="option-single" href="chapter8.html#o19">named</a> (8.2.6) + <br><a class="productname-single" href="chapter10.html#p278">NetPBM</a> (10.2.2) + <br><a class="methodname-single" href="chapter8.html#m78">newcent</a> (8.2.1) + <br><a class="command-first" href="chapter9.html#c266">\newcommand</a> (9.1), + <a class="command-subseq" href="chapter9.html#c298">(9.4)</a> + <br><a class="command-single" href="intro.html#c2">\newpage</a> (Introduction) + <br><a href="chapter8.html#NFSS" class="acroid">NFSS</a> (New Font Selection Scheme) (8.3) + <br><a class="productname-first" href="intro.html#p12"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a> (Introduction) + <br><a class="soloindex" href="chapter1.html#I7"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a>, + <a class="productname-subseq" href="chapter1.html#p55">(1.4.1)</a>, + <a class="productname-subseq" href="chapter2.html#p85">(2.1)</a>, + <a class="productname-subseq" href="chapter2.html#p99">(2.3.4)</a> + <br><a class="productname-single" href="chapter2.html#p92"><span class="TEX">T<span class="E">E</span>X</span>nic + Center</a> (2.3) + <br><a class="command-single" href="chapter8.html#c233">\normalsize</a> (8.2.4) + <br><a class="productname-first" href="intro.html#p4">Notepad</a> (Introduction), + <a class="productname-subseq" href="chapter2.html#p105">(2.3.5)</a> + <br><a href="preface.html#NTS" class="acroid">NTS</a> (New Typesetting System) (Preface) + <h4><a name="O">O</a></h4> + <br><a class="varname-single" href="chapter1.html#v7">O</a> (1.2) + <br><a href="chapter10.html#OASIS" class="acroid">OASIS</a> (Organisation for the + Advancement of Structured Information Systems) (10.1) + <br><b><i><a href="chapter2.html#octothorpe" class="firstterm">octothorpe</a></i></b> (2.5.1) + <br><a class="productname-single" href="chapter10.html#p251">Office 11</a> (10.1) + <br><a class="productname-single" href="chapter10.html#p243">Omnimark</a> (10.1) + <br><a class="option-single" href="chapter3.html#o5">oneside</a> (3.1.1) + <br><a class="productname-first" href="intro.html#p1">OpenOffice</a> (Introduction), + <a class="productname-subseq" href="chapter10.html#p247">(10.1)</a> + <br><a class="productname-single" href="chapter4.html#p122">Opera</a> (4.1) + <br><a class="option-single" href="index.html#o21">options</a> (Index) + <br><font color="red">sortas:Oregon Brewing Company</font> + <br><a class="soloindex" href="chapter1.html#I14">OS X</a> + <br><a href="chapter6.html#tak" class="personname">Ota, Takaaki</a> (6.3.3) + <br><a class="command-single" href="chapter6.html#c155">\ovalbox</a> (6.7.3) + <br><a class="soloindex" href="chapter4.html#I71">Overfull hbox</a> + <br><a class="productname-single" href="chapter7.html#p188">oxford</a> (7.4.2.4) + <h4><a name="P">P</a></h4> + <br><a class="command-single" href="chapter7.html#c167">\P</a> (7.4.1) + <br><b><i><a href="chapter5.html#pack" class="firstterm">packages</a></i></b> (5.1) + <br><a class="methodname-first" href="intro.html#m2">package</a> (Introduction), + <a class="methodname-subseq" href="index.html#m91">(Index)</a><br> <a class="secondary" href="chapter5.html#I81">documentation</a> (5.1.2)<br> <a class="secondary" href="chapter5.html#I82">downloading</a> (5.2)<br> <a class="secondary" href="chapter5.html#I86">indexing</a> (5.2.2)<br> <a class="secondary" href="chapter5.html#I83">installing</a> (5.2), + <a class="primary" href="chapter5.html#I85">(5.2.2)</a> + <br><a class="headword" href="chapter5.html#I80">packages</a><a class="secondary" href="chapter5.html#I80">using</a> (5.1) + <br><a class="productname-single" href="chapter10.html#p229">PageMaker</a> (10) + <br><a class="command-single" href="chapter7.html#c169">\pageref</a> (7.4.1)<br> <a class="secondary" href="chapter8.html#I127">margins</a> (8.1.1) + <br><a class="headword" href="chapter4.html#I77">page size</a><a class="secondary" href="chapter4.html#I77">scaling</a> (4.4) + <br><a class="command-first" href="chapter8.html#c204">\pagestyle</a> (8.1.2) + <br><a class="productname-single" href="chapter6.html#p173">PaintShop + Pro</a> (6.5.1) + <br><a class="methodname-single" href="chapter8.html#m80">palatcm</a> (8.2.1) + <br><a class="methodname-single" href="chapter8.html#m79">palatino</a> (8.2.1) + <br><a class="soloindex" href="chapter6.html#I109">panels</a> + <br><a class="soloindex" href="chapter3.html#I50">paper sizes</a> + <br><a class="command-first" href="chapter6.html#c123">\par</a> (6.3.4), + <a class="command-subseq" href="chapter8.html#c193">(8.1.1)</a>, + <a class="command-subseq" href="chapter9.html#c287">(9.2)</a> + <br><a class="command-first" href="chapter3.html#c73">\paragraph</a> (3.5), + <a class="command-subseq" href="chapter6.html#c106">(6.2.5)</a> + <br><a class="methodname-first" href="chapter4.html#m29">paralist</a> (4.2.3.6), + <a class="methodname-subseq" href="chapter5.html#m39">(5.2.2)</a>, + <a class="methodname-subseq" href="chapter6.html#m45">(6.2.4)</a> + <br><a class="command-first" href="chapter6.html#c141">\parbox</a> (6.7.1), + <a class="command-subseq" href="chapter6.html#c151">(6.7.2)</a> + <br><a class="varname-first" href="chapter3.html#v16">parindent</a> (3.6), + <a class="varname-subseq" href="chapter6.html#v26">(6.7.1)</a> + <br><a class="varname-first" href="intro.html#v2">parskip</a> (Introduction), + <a class="varname-subseq" href="chapter3.html#v13">(3.6)</a> + <br><a class="methodname-single" href="chapter3.html#m28">parskip</a> (3.6) + <br><a class="command-single" href="chapter3.html#c68">\part</a> (3.5) + <br><a class="command-single" href="chapter3.html#c78">\part*</a> (3.5.1) + <br><a class="varname-single" href="chapter8.html#v35">pbk</a> (8.2.1) + <br><a class="soloindex" href="chapter2.html#I31">pc (picas)</a> + <br><a href="chapter6.html#PCL" class="acroid">PCL</a> (Printer Control + Language) (6.5) + <br><a href="intro.html#PDA" class="acroid">PDA</a> (Personal Digital Assistant) (Introduction), <a class="acrorefs" href="intro.html#A48">(Preface)</a>, <a class="acrorefs" href="intro.html#A216">(10)</a> + <br><a class="productname-first" href="chapter2.html#p89">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a> (2.2), + <a class="productname-subseq" href="chapter2.html#p98">(2.3.3)</a>, + <a class="productname-subseq" href="chapter3.html#p117">(3.1.1)</a>, + <a class="productname-subseq" href="chapter4.html#p118">(4.1)</a>, + <a class="productname-subseq" href="chapter4.html#p125">(4.1.3)</a>, + <a class="productname-subseq" href="chapter4.html#p127">(4.3)</a>, + <a class="productname-subseq" href="chapter5.html#p153">(5.2.2)</a>, + <a class="productname-subseq" href="chapter6.html#p162">(6.5)</a>, + <a class="productname-subseq" href="chapter6.html#p179">(6.5.1)</a>, + <a class="productname-subseq" href="chapter8.html#p195">(8.2)</a>, + <a class="productname-subseq" href="chapter8.html#p203">(8.2.6)</a>, + <a class="productname-subseq" href="chapter8.html#p204">(8.3.2)</a>, + <a class="productname-subseq" href="chapter8.html#p223">(8.3.3)</a>, + <a class="productname-subseq" href="chapter10.html#p227">(10)</a>, + <a class="productname-subseq" href="chapter10.html#p281">(10.2.4)</a> + <br><a href="chapter4.html#PDF" class="acroid">PDF</a> (Portable Document Format) (4.3.3), <a class="acrorefs" href="chapter4.html#A3">(Release Info)</a>, <a class="acrorefs" href="chapter4.html#A43">(Preface)</a>, <a class="acrorefs" href="chapter4.html#A52">(1.1)</a>, <a class="acrorefs" href="chapter4.html#A67">(2.3.2)</a>, <a class="acrorefs" href="chapter4.html#A70">(2.3.3)</a>, <a class="acrorefs" href="chapter4.html#A73">(2.3.5)</a>, <a class="acrorefs" href="chapter4.html#A77">(2.6)</a>, <a class="acrorefs" href="chapter4.html#A84">(3.1)</a>, <a class="acrorefs" href="chapter4.html#A88">(4.1)</a>, <a class="acrorefs" href="chapter4.html#A90">(4.1.3)</a>, <a class="acrorefs" href="chapter4.html#A93">(4.3)</a>, <a class="acrorefs" href="chapter4.html#A96">(4.3.2)</a>, <a class="acrorefs" href="chapter4.html#A101">(4.3.3)</a>, <a class="acrorefs" href="chapter4.html#A107">(4.4)</a>, <a class="acrorefs" href="chapter4.html#A122">(5.2.2)</a>, <a class="acrorefs" href="chapter4.html#A146">(6.5)</a>, <a class="acrorefs" href="chapter4.html#A158">(6.5.1)</a>, <a class="acrorefs" href="chapter4.html#A183">(6.7)</a>, <a class="acrorefs" href="chapter4.html#A204">(8.3.2)</a>, <a class="acrorefs" href="chapter4.html#A293">(10.2.4)</a> + <br><a class="option-single" href="chapter8.html#o20">pdftex</a> (8.2.6) + <br><a class="productname-single" href="chapter10.html#p283">pdftotext</a> (10.2.4) + <br><a class="productname-single" href="chapter8.html#p225">pdfview</a> (8.3.3) + <br><a class="productname-single" href="chapter4.html#p120">PDFview</a> (4.1) + <br><a class="command-first" href="chapter9.html#c294">\person</a> (9.4) + <br><a href="chapter8.html#PFA" class="acroid">PFA</a> (PostScript Font + ASCII) (8.3.2) + <br><a class="productname-single" href="chapter8.html#p207">PFAedit</a> (8.3.2) + <br><a href="chapter8.html#PFB" class="acroid">PFB</a> (PostScript Font Binary) (8.3.2), <a class="acrorefs" href="chapter8.html#A209">(8.3.2)</a>, <a class="acrorefs" href="chapter8.html#A215">(8.3.3)</a> + <br><a class="productname-single" href="chapter6.html#p172">PhotoShop</a> (6.5.1) + <br><a class="soloindex" href="chapter2.html#I32">picas</a> + <br><a class="modespec-single" href="chapter6.html#e31">picture</a> (6.4) + <br><a class="methodname-single" href="chapter6.html#m42">pifont</a> (6.2.1) + <br><a class="option-first" href="chapter7.html#o13">plain</a> (7.4.2.1), + <a class="option-subseq" href="chapter8.html#o15">(8.1.2)</a> + <br><b><i><a href="chapter2.html#plain-text" class="firstterm">plain-text</a></i></b> (2) + <br><a href="chapter6.html#PNG" class="acroid">PNG</a> (Portable Network + Graphic) (6.5), <a class="acrorefs" href="chapter6.html#A137">(6.5)</a>, <a class="acrorefs" href="chapter6.html#A163">(6.5.1)</a> + <br><a class="soloindex" href="chapter2.html#I30">points</a> + <br><a class="trademark-first" href=".html#t1">PostScript</a> (Release Info), + <a class="trademark-subseq" href="preface.html#t2">(Preface)</a>, + <a class="trademark-subseq" href="chapter1.html#t3">(1.1)</a>, + <a class="trademark-subseq" href="chapter2.html#t5">(2.3.3)</a>, + <a class="trademark-subseq" href="chapter2.html#t6">(2.3.5)</a>, + <a class="trademark-subseq" href="chapter4.html#t7">(4.3.2)</a>, + <a class="trademark-subseq" href="chapter4.html#t18">(4.3.3)</a>, + <a class="trademark-subseq" href="chapter4.html#t21">(4.4)</a>, + <a class="trademark-subseq" href="chapter6.html#t31">(6.5.1)</a>, + <a class="trademark-subseq" href="chapter8.html#t32">(8.2)</a>, + <a class="trademark-subseq" href="chapter8.html#t33">(8.2.4)</a>, + <a class="trademark-subseq" href="chapter8.html#t34">(8.2.6)</a>, + <a class="trademark-subseq" href="chapter8.html#t35">(8.3)</a>, + <a class="trademark-subseq" href="chapter8.html#t36">(8.3.1)</a>, + <a class="trademark-subseq" href="chapter8.html#t37">(8.3.2)</a>, + <a class="trademark-subseq" href="chapter8.html#t42">(8.3.3)</a>, + <a class="trademark-subseq" href="appendixD.html#t43">(D.2)</a> + <br><font color="red">sortas:pound</font> + <br><b><i><a href="chapter3.html#pre" class="firstterm">preamble</a></i></b> (3.4) + <br><a class="soloindex" href="chapter4.html#I75">preview</a> + <br><a class="methodname-single" href="intro.html#m1">preview-latex</a> (Introduction) + <br><a class="command-single" href="chapter7.html#c185">\printindex</a> (7.5) + <br><a class="headword" href="chapter4.html#I61">printing</a>, + <a class="primary" href="chapter4.html#I76">(4.4)</a><br> <a class="secondary" href="chapter4.html#I78">reverse order</a> (4.4)<br> <a class="secondary" href="chapter4.html#I79">selected pages</a> (4.4) + <br><a class="productname-first" href="intro.html#p23">product</a> (Introduction) + <br><a class="command-first" href="chapter8.html#c216">\product</a> (8.2.2), + <a class="command-subseq" href="chapter8.html#c244">(8.2.5)</a>, + <a class="command-subseq" href="chapter9.html#c289">(9.3)</a>, + <a class="productname-subseq" href="index.html#p289">(Index)</a> + <br><a class="productname-first" href="intro.html#p7">pro<span class="TEX">T<span class="E">E</span>X</span>t</a> (Introduction), + <a class="productname-subseq" href="chapter1.html#p61">(1.4.1)</a>, + <a class="productname-subseq" href="chapter2.html#p102">(2.3.5)</a> + <br><a class="command-single" href="chapter7.html#c161">\protect</a> (7.2) + <br><a class="command-single" href="chapter8.html#c257">\ProvidesPackage</a> (8.3.2) + <br><a href="chapter10.html#PS" class="acroid">PS</a> (PostScript) (10.2.5) + <br><a class="methodname-first" href="chapter8.html#m74">pslatex</a> (8.2.1) + <br><a class="productname-single" href="chapter4.html#p148">psnup</a> (4.4) + <br><a class="productname-single" href="chapter4.html#p147">pstops</a> (4.4) + <br><a class="soloindex" href="chapter2.html#I29">pt (points)</a> + <br><a class="productname-single" href="chapter10.html#p231">Publisher</a> (10) + <br><a class="productname-single" href="chapter7.html#p186">pybliographic</a> (7.4.2.3) + <h4><a name="Q">Q</a></h4> + <br><a class="command-single" href="chapter8.html#c203">\qquad</a> (8.1.1) + <br><a class="command-first" href="chapter2.html#c23">\quad</a> (2.8.1), + <a class="command-subseq" href="chapter8.html#c202">(8.1.1)</a> + <br><a class="methodname-single" href="chapter7.html#m59">quotation</a> (7.1) + <br><a class="soloindex" href="chapter2.html#I21">quotation marks</a> + <br><a class="methodname-single" href="chapter7.html#m58">quote</a> (7.1) + <h4><a name="R">R</a></h4> + <br><a class="methodname-single" href="chapter2.html#m8">ragged2e</a> (2.8.5) + <br><a class="command-single" href="chapter2.html#c28">\raggedleft</a> (2.8.5) + <br><a class="modespec-single" href="chapter2.html#e3">raggedleft</a> (2.8.5) + <br><a class="command-first" href="chapter2.html#c27">\raggedright</a> (2.8.5) + <br><a class="modespec-single" href="chapter2.html#e2">raggedright</a> (2.8.5), + <a class="command-subseq" href="chapter6.html#c144">(6.7.1)</a>, + <a class="command-subseq" href="chapter6.html#c153">(6.7.2)</a> + <br><a href="chapter1.html#sr" class="personname">Rahtz, Sebastian</a> (1) + <br><a class="command-first" href="chapter9.html#c317">\raisebox</a> (9.6.1) + <br><a class="command-first" href="chapter6.html#c109">\ref</a> (6.2.5), + <a class="command-subseq" href="chapter7.html#c165">(7.4.1)</a> + <br><a class="soloindex" href="chapter7.html#I115">references</a> + <br><a class="command-single" href="chapter7.html#c180">\refname</a> (7.4.2.4) + <br><a class="command-first" href="chapter9.html#c295">\reindex</a> (9.4) + <br><a class="command-first" href="chapter3.html#c59">\renewcommand</a> (3.4), + <a class="command-subseq" href="chapter9.html#c280">(9.2)</a>, + <a class="command-subseq" href="chapter9.html#c314">(9.6)</a> + <br><a class="methodname-first" href="chapter3.html#m13">report</a> (3.1), + <a class="methodname-subseq" href="chapter3.html#m24">(3.5)</a> + <br><a href="chapter8.html#RGB" class="acroid">RGB</a> (Red-Green-Blue) (8.2.6), <a class="acrorefs" href="chapter8.html#A117">(5.1.1)</a>, <a class="acrorefs" href="chapter8.html#A194">(8.2.6)</a> + <br><a class="command-single" href="chapter8.html#c210">\rightmark</a> (8.1.2) + <br><a class="command-single" href="chapter8.html#c258">\rmdefault</a> (8.3.2) + <br><a class="soloindex" href="chapter7.html#I124">Rogue</a> + <br><a class="soloindex" href="chapter6.html#I103">rotate</a> + <br><a href="chapter10.html#RTF" class="acroid">RTF</a> (Rich Text Format) (10.1), <a class="acrorefs" href="chapter10.html#A255">(10.1)</a>, <a class="acrorefs" href="chapter10.html#A280">(10.2.1)</a> + <br><a class="productname-first" href="chapter10.html#p257">rtf2latex2e</a> (10.1), + <a class="productname-subseq" href="chapter10.html#p273">(10.2.1)</a> + <br><a href="chapter1.html#RTFM" class="acroid">RTFM</a> (Read The Fine + Manual) (1.2), <a class="acrorefs" href="chapter1.html#A210">(8.3.2)</a> + <br><a class="soloindex" href="chapter4.html#I67">Runaway argument</a><h4><a name="S">S</a></h4> + <br><a class="command-single" href="chapter7.html#c166">\S</a> (7.4.1) + <br><a href="chapter10.html#us" class="personname">Sath­yam, Ujwal</a> (10.1) + <br><a class="productname-first" href="intro.html#p20">Saxon</a> (Introduction), + <a class="productname-subseq" href="chapter10.html#p261">(10.1.1)</a> + <br><a class="modespec-first" href="chapter6.html#e45">Sbox</a> (6.7.3), + <a class="modespec-subseq" href="chapter9.html#e52">(9.5)</a> + <br><a class="soloindex" href="chapter6.html#I105">scale</a> + <br><a class="productname-single" href="chapter1.html#p49">ScanDisk</a> (1.4) + <br><a href="chapter1.html#cs" class="personname">Schenk, Christian</a> (1) + <br><a class="productname-single" href="intro.html#p16">Scientific Word</a> (Introduction) + <br><a class="command-single" href="chapter8.html#c230">\scriptsize</a> (8.2.4) + <br><a class="command-single" href="chapter8.html#c221">\scshape</a> (8.2.3) + <br><a class="varname-first" href="intro.html#v4">secnumdepth</a> (Introduction), + <a class="varname-subseq" href="chapter3.html#v9">(3.5.1)</a> + <br><a class="command-first" href="chapter3.html#c70">\section</a> (3.5), + <a class="command-subseq" href="chapter3.html#c83">(3.6)</a> + <br><a class="varname-first" href="chapter9.html#v37">section</a> (9.6) + <br><a class="soloindex" href="chapter3.html#I56">section numbering</a> + <br><a class="headword" href="chapter3.html#I48">sections</a>, + <a class="primary" href="chapter3.html#I55">(3.5)</a> + <br><a class="methodname-first" href="chapter3.html#m26">sectsty</a> (3.5), + <a class="methodname-subseq" href="chapter8.html#m68">(8.1.1)</a> + <br><a class="command-first" href="chapter8.html#c214">\selectfont</a> (8.2.2), + <a class="command-subseq" href="chapter8.html#c227">(8.2.3)</a> + <br><a class="command-first" href="chapter9.html#c302">\sentinel</a> (9.4) + <br><b><i><a href="chapter8.html#series" class="firstterm">series</a></i></b> (8.2.3) + <br><a class="command-single" href="chapter3.html#c77">\setcounter</a> (3.5.1) + <br><a class="command-first" href="chapter3.html#c80">\setlength</a> (3.6), + <a class="command-subseq" href="chapter6.html#c148">(6.7.1)</a> + <br><a class="methodname-single" href="chapter8.html#m70">setspace</a> (8.1.1) + <br><a class="command-single" href="chapter8.html#c260">\sfdefault</a> (8.3.2) + <br><a class="command-first" href="chapter8.html#c224">\sffamily</a> (8.2.3), + <a class="command-subseq" href="chapter9.html#c283">(9.2)</a> + <br><a href="chapter10.html#SGML" class="acroid">SGML</a> (Standard Generalized Markup + Language) (10.1), <a class="acrorefs" href="chapter10.html#A59">(2.1)</a>, <a class="acrorefs" href="chapter10.html#A81">(3.1)</a>, <a class="acrorefs" href="chapter10.html#A220">(10)</a>, <a class="acrorefs" href="chapter10.html#A227">(10.1)</a> + <br><a class="command-first" href="chapter6.html#c156">\shadowbox</a> (6.7.3), + <a class="command-subseq" href="chapter9.html#c313">(9.5)</a> + <br><b><i><a href="chapter8.html#shape" class="firstterm">shape</a></i></b> (8.2.3) + <br><a class="productname-first" href="intro.html#p11"><span class="TEX">T<span class="E">E</span>X</span>shell</a> (Introduction), + <a class="productname-subseq" href="chapter2.html#p84">(2.1)</a>, + <a class="productname-subseq" href="chapter2.html#p90">(2.3)</a> + <br><a class="productname-single" href="chapter1.html#p46"><span class="TEX">T<span class="E">E</span>X</span>Shop</a> (1.3) + <br><a class="soloindex" href="chapter6.html#I108">sidebars</a> + <br><a class="command-single" href="chapter8.html#c220">\slshape</a> (8.2.3) + <br><a class="command-first" href="chapter7.html#c157">\small</a> (7.1), + <a class="command-subseq" href="chapter8.html#c232">(8.2.4)</a> + <br><a class="command-single" href="chapter8.html#c190">\smallskip</a> (8.1.1) + <br><a class="methodname-single" href="chapter2.html#m7">so</a> (2.8.5) + <br><a class="methodname-single" href="chapter8.html#m71">soul</a> (8.1.1) + <br><a class="soloindex" href="chapter2.html#I34">sp (scaled points)</a> + <br><a class="command-single" href="chapter9.html#c311">\space</a> (9.4) + <br><a class="varname-single" href="chapter2.html#v8">spaceskip</a> (2.8.2) + <br>space, see white-spacewhite-space + <br>spacing, see double-spacingdouble-spacing + <br>spacing, see white-spacewhite-space + <br><a class="soloindex" href="chapter2.html#I18">special characters</a> + <br><a class="methodname-single" href="chapter3.html#m25">ssection</a> (3.5) + <br><a class="productname-single" href="chapter10.html#p246">Star Office</a> (10.1) + <br><a class="command-first" href="chapter3.html#c74">\subparagraph</a> (3.5), + <a class="command-subseq" href="chapter6.html#c107">(6.2.5)</a> + <br><a class="command-single" href="chapter3.html#c79">\subparagraph*</a> (3.5.1) + <br><a class="command-single" href="chapter3.html#c71">\subsection</a> (3.5) + <br><a class="command-single" href="chapter3.html#c72">\subsubsection</a> (3.5) + <br><a class="soloindex" href="chapter3.html#I54">summaries</a> + <br><b><i><a href="intro.html#synchronous" class="firstterm">synchronous + typographic interface</a></i></b> (Introduction) + <h4><a name="T">T</a></h4> + <br><a class="option-single" href="chapter6.html#o11">t</a> (6.7.1) + <br><a class="productname-single" href="chapter8.html#p205">t1binary</a> (8.3.2) + <br><a class="productname-single" href="chapter8.html#p206">t1utils</a> (8.3.2) + <br><a class="varname-single" href="chapter6.html#v25">tabcolsep</a> (6.3.3) + <br><a class="modespec-first" href="chapter6.html#e21">table</a> (6.3.2), + <a class="modespec-subseq" href="chapter6.html#e30">(6.4)</a> + <br><a class="modespec-single" href="chapter7.html#e50">table*</a> (7.6) + <br><a class="command-first" href="chapter2.html#c3">\tableofcontents</a> (2.4), + <a class="command-subseq" href="chapter2.html#c4">(2.4.1)</a>, + <a class="command-subseq" href="chapter3.html#c85">(3.7)</a>, + <a class="command-subseq" href="chapter4.html#c93">(4.2.1)</a><br> <a class="secondary" href="chapter3.html#I58">adding manual entry</a> (3.7) + <br><a class="headword" href="chapter3.html#I57">table of contents</a><a class="secondary" href="chapter3.html#I57">automated entries</a> (3.7) + <br><a class="soloindex" href="chapter6.html#I97">tables</a> + <br><a class="modespec-first" href="chapter6.html#e22">tabular</a> (6.3.3), + <a class="modespec-subseq" href="chapter6.html#e25">(6.3.4)</a>, + <a class="modespec-subseq" href="chapter6.html#e41">(6.7.1)</a>, + <a class="modespec-subseq" href="chapter6.html#e43">(6.7.2)</a> + <br><a class="methodname-single" href="chapter6.html#m55">tabular</a> (6.7.2) + <br><a class="methodname-single" href="chapter6.html#m47">tabularx</a> (6.3.3) + <br><a href="chapter5.html#TDS" class="acroid">TDS</a> ( Directory + Structure) (5.2.3), <a class="acrorefs" href="chapter5.html#A123">(5.2.2)</a>, <a class="acrorefs" href="chapter5.html#A199">(8.3)</a> + <br><a class="productname-single" href="intro.html#p5">te<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="soloindex" href="chapter1.html#I5">te<span class="TEX">T<span class="E">E</span>X</span></a> + <br><a href="chapter10.html#TEI" class="acroid">TEI</a> (Text Encoding Initiative) (10.2.3) + <br><b><i><a href="chapter5.html#tempdir" class="firstterm">temporary directory</a></i></b> (5.2.1) + <br><b><i><a href="intro.html#term" class="firstterm">term</a></i></b> (Introduction) + <br><font color="red">sortas:tetex</font> + <br><font color="red">sortas:texcollection</font> + <br><a class="productname-first" href="chapter1.html#p41">texconfig</a> (1.2) + <br><a class="productname-first" href="chapter5.html#p154">texhash</a> (5.2.2), + <a class="productname-subseq" href="appendixA.html#p286">(A)</a> + <br><font color="red">sortas:texlive</font> + <br><font color="red">sortas:texniccenter</font> + <br><a class="command-single" href="chapter2.html#c5">\textbackslash</a> (2.5) + <br><a class="command-single" href="chapter2.html#c29">\textbrokenbar</a> (2.9) + <br><a class="command-single" href="chapter6.html#c105">\textbullet</a> (6.2.1) + <br><a class="command-first" href="chapter8.html#c246">\textcolor</a> (8.2.6) + <br><a class="methodname-first" href="chapter2.html#m3">textcomp</a> (2.5.1) + <br><a class="modespec-single" href="chapter2.html#e4">textcomp</a> (2.9), + <a class="methodname-subseq" href="chapter6.html#m43">(6.2.1)</a> + <br><a class="command-single" href="chapter2.html#c34">\textdegree</a> (2.9) + <br><a class="command-single" href="chapter2.html#c16">\texteuro</a> (2.5.1) + <br><a class="command-single" href="chapter8.html#c245">\textit</a> (8.2.5) + <br><a class="command-single" href="chapter2.html#c30">\textlangle</a> (2.9) + <br><a class="command-single" href="chapter2.html#c31">\textrangle</a> (2.9) + <br><a class="command-single" href="chapter2.html#c15">\textsterling</a> (2.5.1) + <br><a class="command-single" href="chapter9.html#c291">\texttrademark</a> (9.3) + <br><a class="productname-single" href="intro.html#p15">Textures</a> (Introduction) + <br><a class="command-single" href="chapter9.html#c315">\thechapter</a> (9.6) + <br><a class="command-single" href="chapter6.html#c110">\theenumi</a> (6.2.6) + <br><a class="command-single" href="chapter6.html#c111">\theenumii</a> (6.2.6) + <br><a class="command-single" href="chapter6.html#c112">\theenumiii</a> (6.2.6) + <br><a class="command-single" href="chapter6.html#c113">\theenumiv</a> (6.2.6) + <br><a class="command-single" href="chapter9.html#c312">\theSbox</a> (9.5) + <br><a class="command-first" href="chapter2.html#c18">\thinspace</a> (2.6), + <a class="command-subseq" href="chapter8.html#c200">(8.1.1)</a> + <br><a class="command-single" href="chapter8.html#c207">\thispagestyle</a> (8.1.2) + <br><a href="chapter6.html#TIFF" class="acroid">TIFF</a> (Tagged Image File Format) (6.5.1) + <br><a class="methodname-first" href="chapter8.html#m73">times</a> (8.2.1) + <br><a class="command-single" href="chapter8.html#c229">\tiny</a> (8.2.4) + <br><a class="command-first" href="chapter3.html#c46">\title</a> (3.3), + <a class="command-subseq" href="chapter9.html#c274">(9.2)</a> + <br><a class="command-single" href="chapter7.html#c176">\titleof</a> (7.4.2.1) + <br><a class="option-single" href="chapter3.html#o7">titlepage</a> (3.1.1) + <br><a class="soloindex" href="chapter3.html#I52">titles</a> + <br><a class="productname-single" href="chapter7.html#p185">tkbibtex</a> (7.4.2.3) + <br><a class="productname-single" href="chapter6.html#p177">tkPaint</a> (6.5.1) + <br><a class="varname-first" href="chapter3.html#v10">tocdepth</a> (3.5.1), + <a class="varname-subseq" href="chapter3.html#v18">(3.7)</a> + <br><a class="soloindex" href="chapter7.html#I110">tools</a> + <br><a class="soloindex" href="chapter4.html#I63">Too many }'s</a> + <br>tracking, see letterspacingletterspacing + <br><a class="productname-single" href="chapter2.html#p97">tsconfig</a> (2.3.2) + <br><a class="command-single" href="chapter8.html#c259">\ttdefault</a> (8.3.2) + <br><a class="command-single" href="chapter8.html#c225">\ttfamily</a> (8.2.3) + <br><a href="appendixB.html#TUG" class="acroid">TUG</a> ( Users Group) (B), <a class="acrorefs" href="appendixB.html#A33">(Foreword)</a>, <a class="acrorefs" href="appendixB.html#A36">(Preface)</a> + <br><a class="option-single" href="chapter3.html#o6">twoside</a> (3.1.1) + <br><a class="methodname-single" href="chapter8.html#m82">type1cm</a> (8.2.4) + <br><a class="soloindex" href="chapter4.html#I59">typesetting</a> + <br><a class="soloindex" href="chapter8.html#I126">typographics</a><h4><a name="U">U</a></h4> + <br><a class="methodname-single" href="chapter8.html#m81">ulem</a> (8.2.3) + <br><a class="command-single" href="chapter8.html#c228">\uline</a> (8.2.3) + <br><a class="soloindex" href="chapter4.html#I65">Undefined control sequence</a> + <br><a class="soloindex" href="chapter4.html#I69">Underfull hbox</a> + <br><a class="soloindex" href="chapter2.html#I28">units</a> + <br><a class="soloindex" href="chapter1.html#I10">Unix</a> + <br><a class="productname-single" href="chapter1.html#p38">up2date</a> (1.2) + <br><a class="productname-first" href="chapter8.html#p208">updmap</a> (8.3.2) + <br><a class="command-single" href="chapter8.html#c218">\upshape</a> (8.2.3) + <br><a href="chapter6.html#URI" class="acroid">URI</a> (Uniform Resource Indicator) (6.6.1), <a class="acrorefs" href="chapter6.html#A86">(4)</a>, <a class="acrorefs" href="chapter6.html#A132">(5.3.4)</a>, <a class="acrorefs" href="chapter6.html#A174">(6.6)</a>, <a class="acrorefs" href="chapter6.html#A175">(6.6.1)</a>, <a class="acrorefs" href="chapter6.html#A181">(6.6.2)</a>, <a class="acrorefs" href="chapter6.html#A261">(10.1.1)</a> + <br><a class="methodname-single" href="chapter6.html#m52">url</a> (6.6.1) + <br><a class="command-first" href="chapter6.html#c135">\url</a> (6.6.1), + <a class="command-subseq" href="chapter6.html#c140">(6.6.2)</a>, + <a class="command-subseq" href="chapter7.html#c162">(7.2)</a>, + <a class="command-subseq" href="chapter10.html#c320">(10.1.1)</a> + <br><a href="chapter6.html#URL" class="acroid">URL</a> (Uniform Resource + Locator) (6.6.1) + <br><a class="command-first" href="chapter3.html#c67">\usepackage</a> (3.4), + <a class="command-subseq" href="chapter4.html#c99">(4.2.3.6)</a>, + <a class="command-subseq" href="chapter5.html#c100">(5.1.1)</a>, + <a class="command-subseq" href="chapter7.html#c182">(7.4.2.4)</a>, + <a class="command-subseq" href="chapter8.html#c256">(8.3.1)</a><h4><a name="V">V</a></h4> + <br><a class="productname-single" href="intro.html#p17">V<span class="TEX">T<span class="E">E</span>X</span></a> (Introduction) + <br><a class="varname-single" href="index.html#v39">variables</a> (Index) + <br><a class="command-single" href="chapter6.html#c149">\vbox</a> (6.7.1) + <br><a class="productname-single" href="chapter9.html#p226">Velcro</a> (9.3) + <br><a class="command-first" href="chapter6.html#c133">\verb</a> (6.6.1), + <a class="command-subseq" href="chapter6.html#c138">(6.6.2)</a>, + <a class="command-subseq" href="chapter7.html#c160">(7.2)</a> + <br><a class="modespec-first" href="chapter6.html#e32">verbatim</a> (6.6.2) + <br><a class="modespec-first" href="chapter6.html#e33">Verbatim</a> (6.6.2) + <br><a class="soloindex" href="chapter6.html#I106">verbatim text</a> + <br><a class="productname-single" href="chapter1.html#p44">vi</a> (1.2) + <br><a class="soloindex" href="chapter4.html#I60">viewing</a> + <br><a href="chapter8.html#vv" class="personname">Volovich, Vladimir</a> (8.3.3) + <br><a class="command-first" href="chapter8.html#c194">\vspace</a> (8.1.1) + <br><a class="command-single" href="chapter8.html#c195">\vspace*</a> (8.1.1) + <h4><a name="W">W</a></h4> + <br><a href="chapter6.html#sw" class="personname">Wawrykiewicz, Staszek</a> (6.5) + <br><a class="headword" href="chapter2.html#I17">white-space</a><br> <a class="secondary" href="chapter8.html#I133">double-spacing</a> (8.1.1)<br> <a class="secondary" href="chapter2.html#I45">hard</a> (2.8.3)<br> <a class="secondary" href="chapter8.html#I137">horizontal</a> (8.1.1)<br> <a class="tertiary" href="chapter8.html#I132">disappearing</a> (8.1.1)<br> <a class="tertiary" href="chapter8.html#I131">fixed</a> (8.1.1)<br> <a class="tertiary" href="chapter8.html#I130">flexible</a> (8.1.1) + <br><a class="productname-single" href="chapter1.html#p48">Windows Update</a> (1.4) + <br><a class="productname-single" href="chapter2.html#p104">Winedt</a> (2.3.5) + <br><a class="productname-first" href="intro.html#p14">WinEdt</a> (Introduction), + <a class="productname-subseq" href="chapter1.html#p31">(1.1)</a>, + <a class="productname-subseq" href="chapter1.html#p54">(1.4.1)</a>, + <a class="productname-subseq" href="chapter1.html#p81">(1.4.2)</a>, + <a class="productname-subseq" href="chapter2.html#p87">(2.1)</a>, + <a class="productname-subseq" href="chapter2.html#p93">(2.3)</a>, + <a class="productname-subseq" href="chapter2.html#p100">(2.3.5)</a> + <br><a class="productname-first" href="intro.html#p13">WinShell</a> (Introduction), + <a class="productname-subseq" href="chapter1.html#p80">(1.4.2)</a>, + <a class="productname-subseq" href="chapter2.html#p86">(2.1)</a>, + <a class="productname-subseq" href="chapter2.html#p91">(2.3)</a> + <br><a class="productname-first" href="intro.html#p3">Word</a> (Introduction), + <a class="productname-subseq" href="chapter10.html#p235">(10.1)</a>, + <a class="productname-subseq" href="chapter10.html#p269">(10.2.1)</a>, + <a class="productname-subseq" href="chapter10.html#p282">(10.2.4)</a> + <br><a class="productname-single" href="chapter10.html#p256">WordML2<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a> (10.1) + <br><a class="productname-first" href="intro.html#p2">WordPerfect</a> (Introduction), + <a class="productname-subseq" href="chapter10.html#p248">(10.1)</a> + <br><b><i><a href="chapter2.html#wsp" class="firstterm">white-space</a></i></b> (2.4.1) + <br><a href="chapter2.html#WYSIWYG" class="acroid">WYSIWYG</a> (What You See Is + What You Get) (2.3.1), <a class="acrorefs" href="chapter2.html#A41">(Preface)</a>, <a class="acrorefs" href="chapter2.html#A62">(2.2)</a>, <a class="acrorefs" href="chapter2.html#A94">(4.3.1)</a> + <br><a href="chapter2.html#WYSIWYM" class="acroid">WYSIWYM</a> (What You See Is + What You Mean) (2.3.1) + <h4><a name="X">X</a></h4> + <br><a class="methodname-single" href="chapter5.html#m35">xcolor</a> (5.1.1) + <br><a class="productname-first" href="chapter4.html#p128">xdvi</a> (4.3.1), + <a class="productname-subseq" href="chapter4.html#p139">(4.3.3)</a> + <br><a class="productname-single" href="chapter1.html#p78">Xemacs</a> (1.4.2) + <br><a href="chapter10.html#XHTML" class="acroid">XHTML</a> (Extensible HyperText Markup + Language) (10.1) + <br><a class="productname-single" href="chapter2.html#p115">xkeycaps</a> (2.7) + <br><a href="chapter10.html#XML" class="acroid">XML</a> (Extensible Markup + Language) (10), <a class="acrorefs" href="chapter10.html#A17">(Introduction)</a>, <a class="acrorefs" href="chapter10.html#A34">(Foreword)</a>, <a class="acrorefs" href="chapter10.html#A49">(Preface)</a>, <a class="acrorefs" href="chapter10.html#A76">(2.3.6)</a>, <a class="acrorefs" href="chapter10.html#A83">(3.1)</a>, <a class="acrorefs" href="chapter10.html#A134">(6.3)</a>, <a class="acrorefs" href="chapter10.html#A178">(6.6.1)</a>, <a class="acrorefs" href="chapter10.html#A221">(10)</a>, <a class="acrorefs" href="chapter10.html#A226">(10.1)</a>, <a class="acrorefs" href="chapter10.html#A258">(10.1.1)</a>, <a class="acrorefs" href="chapter10.html#A291">(10.2.3)</a>, <a class="acrorefs" href="chapter10.html#A303">(C)</a> + <br><a class="productname-single" href="chapter10.html#p259">XML Spy</a> (10.1) + <br><a class="productname-single" href="chapter1.html#p27">xpdf</a> (1.1) + <br><a class="productname-single" href="chapter4.html#p121">Xpdf</a> (4.1) + <br><a class="productname-single" href="chapter10.html#p228">XPress</a> (10) + <br><a href="chapter10.html#XSLT" class="acroid">XSLT</a> (Extensible Stylesheet Language + [Transformations]) (10.1), <a class="acrorefs" href="chapter10.html#A1">(Release Info)</a>, <a class="acrorefs" href="chapter10.html#A9">(Revision Info)</a>, <a class="acrorefs" href="chapter10.html#A28">(Introduction)</a>, <a class="acrorefs" href="chapter10.html#A238">(10.1)</a>, <a class="acrorefs" href="chapter10.html#A260">(10.1.1)</a>, <a class="acrorefs" href="chapter10.html#A304">(C)</a><h4><a name="Y">Y</a></h4> + <br><a class="productname-single" href="chapter1.html#p37">yum</a> (1.2) + <h4><a name="Z">Z</a></h4> + <br><a class="productname-single" href="preface.html#p25">Zaurus</a> (Preface) + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="bibliography.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/intro.html b/info/beginlatex/html/intro.html new file mode 100644 index 0000000000..70f6584299 --- /dev/null +++ b/info/beginlatex/html/intro.html @@ -0,0 +1,694 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:01:50--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Introduction</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Introduction</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class="current"><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class=""><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="intro">Introduction</a></h3> + <p>This book originally accompanied a 2-day course on using the + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> typesetting system. It has been extensively revised and + updated and can now be used for self-study or in the classroom. + It is aimed at users of Linux, Macintosh, or Microsoft Windows + but it can be used with <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems on any platform, + including other Unix workstations, mainframes, and even your + <a name="PDA" class="acroref">Personal Digital Assistant</a> (<small>PDA</small>). + </p> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Who needs this book? + </h4> + <p>The audience for the original training course was assumed + to be computer-literate and composed of professional, + business, academic, technical, or administrative computer + users. The readers of the book (you) are mostly assumed to be + in a similar position, but may also come from many other + backgrounds, including hobbyists, students, and just people + interested in quality typesetting. You are expected to have + one or more of the following or similar objectives: + </p> + <ul> + <li> + <p>producing typesetter-quality formatting;</p> + </li> + <li> + <p>formatting long, complex, highly-structured, + repetitive, or automatically-generated + documents;<sup><a href="#F1">1</a></sup></p> + </li> + <li> + <p>saving time and effort by automating common + tasks; + </p> + </li> + <li> + <p>achieving or maintaining your independence from + specific makes or models of proprietary hardware, + software, or file formats (portability); + </p> + </li> + <li> + <p>using Open Source software (free of restrictions, + sometimes also free of charge). + </p> + </li> + </ul> + <ol class="footnotes" start="1"> + <li><a name="F1"><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can easily be used for once-off or short + and simple documents as well, but its real strengths + lie in consistency and automation.</a></li> + </ol> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Skills needed + </h4> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a very easy system to learn, and requires no + specialist knowledge, although literacy and some familiarity + with the publishing process is useful. It is, however, assumed + that you are completely fluent and familiar with using your + computer before you start. Specifically, effective use of this + document requires that you already know and understand the + following very thoroughly: + </p> + <ul> + <li> + <p>how to use a good plain-text + editor (<em>not</em> a wordprocessor like + <i><a name="p1">OpenOffice</a></i>, + <i><a name="p2">WordPerfect</a></i>, or Microsoft + <i><a name="p3">Word</a></i>, and + <em>not</em> a toy like Microsoft + <i><a name="p4">Notepad</a></i>); + </p> + </li> + <li> + <p>where to find all 95 of the printable <small><a href="chapter2.html#ASCII" class="acroref" name="A11" title="American Standard Code for Information Interchange">ASCII</a></small> characters on your keyboard and + what they mean, and how to type accents and symbols, if + you use them; + </p> + </li> + <li> + <p>how to create, open, save, + close, rename, move, and delete files and folders + (directories); + </p> + </li> + <li> + <p>how to use a Web browser and/or <a name="FTP" class="acroref">File + Transfer Protocol</a> (<small>FTP</small>) program to + download and save files from the Internet; + </p> + </li> + <li> + <p>how to uncompress and unwrap (unzip or detar) + downloaded files. + </p> + </li> + </ul> + <p>If you don't know how to do + these things yet, it's important to go and learn them + first. Trying to become familiar with the fundamentals of + using a computer <em>at the same time</em> as + learning <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is not likely to be as effective as doing + them in order. + </p> + <p>These are not specialist + skills — they are all included in the <a name="ECDL" class="acroref">European Computer Driving + Licence</a> (<small>ECDL</small>) and the relevant sections of the <small><a href="intro.html#ECDL" class="acroref" name="A14" title="European Computer Driving Licence">ECDL</a></small> syllabus are noted in the margin + above, so they are well within the capability of anyone who + uses a computer. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Objectives of this book + </h4> + <p>By the end of this book, you should be able to undertake + the following tasks: + </p> + <ul> + <li> + <p>use a plain-text editor to create and maintain your + documents; + </p> + </li> + <li> + <p>add <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> markup to identify + your document structure and formatting + requirements; + </p> + </li> + <li> + <p>typeset <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents, correct simple formatting + errors, and display or print the results; + </p> + </li> + <li> + <p>identify, install, and use additional packages (using + <small><a href="chapter5.html#CTAN" class="acroref" name="A15" title="Comprehensive Archive Network">CTAN</a></small> for downloading where + necessary); + </p> + </li> + <li> + <p>recognise the limitations of procedural markup systems + and choose appropriate generic markup methods where + appropriate. + </p> + </li> + </ul> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Synopsis + </h4> + <p>The original course covered the following topics as + separate sessions, which are represented in the book as + chapters: + </p> + <ol type="1"> + <li> + <p>Where to get and how to install + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> (<i><a name="p5">te<span class="TEX">T<span class="E">E</span>X</span></a></i>, + <i><a name="p6">fp<span class="TEX">T<span class="E">E</span>X</span></a></i>, or + <i><a name="p7">pro<span class="TEX">T<span class="E">E</span>X</span>t</a></i> from the + <span class="TEX">T<span class="E">E</span>X</span> Collection disks);<a name="I1"></a><a name="I2"></a></p> + </li> + <li> + <p>How to type <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents: + using an editor to create files + (half a dozen editors for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>); + </p> + </li> + <li> + <p>Basic structures (the Document Class Declaration and + its layout options; the document environment with sections + and paragraphs); + </p> + </li> + <li> + <p>Typesetting, viewing, and printing;</p> + </li> + <li> + <p>The use of packages and <small><a href="chapter5.html#CTAN" class="acroref" name="A16" title="Comprehensive Archive Network">CTAN</a></small> + to adapt formatting using standard tools; + </p> + </li> + <li> + <p>Other document structures (lists, tables, figures, + images, and verbatim text); + </p> + </li> + <li> + <p>Textual tools (footnotes, marginal notes, + cross-references, indexes and glossaries, and + bibliographic citations); + </p> + </li> + <li> + <p>Typographic considerations (white-space and typefaces; + inline markup and font changes; extra font installation + and automation); + </p> + </li> + <li> + <p>Programmability and automation (macros and modifying + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s behaviour); + </p> + </li> + <li> + <p>Conversion and compatibility with other systems + (<small><a href="chapter10.html#XML" class="acroref" name="A17" title="Extensible Markup Language">XML</a></small>, + <i><a name="p8">Word</a></i>, etc.). + </p> + </li> + </ol> + <p>A few changes have been made in the transition to printed + and online form, but the basic structure is the same, and the + document functions as a workbook for the course as well as a + standalone self-teaching guide. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a>Where's the math? + </h4> + <p>It is important to note that + the document <em>does not cover</em> mathematical + typesetting, complex tabular material, the design of + large-scale macros and document classes, or the finer points + of typography or typographic design, although it does refer to + these topics in passing on a few occasions. + </p><a name="I3"></a><p>There are several other guides, introductions, and + ‘get-started’ documents on the Web and + on <small><a href="chapter5.html#CTAN" class="acroref" name="A18" title="Comprehensive Archive Network">CTAN</a></small> which cover these topics and + more. Among the more popular are: + </p> + <ul> + <li> + <p><cite><a href="http://www.tug.org/begin.html" name="C9">Getting Started with <span class="TEX">T<span class="E">E</span>X</span>, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and friends</a></cite>, where all + beginners should start; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/lshort/" name="C10">The (Not So) Short Guide to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>: <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span> in 131 Minutes</a></cite> is a good + beginner's tutorial; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/gentle/" name="C11">A Gentle Introduction to <span class="TEX">T<span class="E">E</span>X</span>: A Manual for Self-Study</a></cite> is a classic + tutorial on Plain <span class="TEX">T<span class="E">E</span>X</span>; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/epslatex.pdf/" name="C12">Using imported graphics in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span></a></cite> shows you how + to do (almost) anything with graphics: side-by-side, + rotated, etc.; + </p> + </li> + <li> + <p><cite><a href="http://www.ams.org/tex/short-math-guide.html" name="C13">Short Math Guide for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></cite> gets you + started with the American Math Society's powerful + packages; + </p> + </li> + <li> + <p><cite><a href="http://www.ctan.org/tex-archive/info/symbols/comprehensive/" name="C14">A comprehensive list of symbols in <span class="TEX">T<span class="E">E</span>X</span></a></cite> shows over + 2,500 symbols available. + </p> + </li> + </ul> + <p>This list was taken from the + <small><a href="chapter5.html#CTAN" class="acroref" name="A19" title="Comprehensive Archive Network">CTAN</a></small> search page. There are also + lots of books published about <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: the most + important of these for users of this document are listed in + <a href="foreword.html#docs">the last paragraph in the Foreword</a>. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="availability">Availability of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems</a></h4> + <p>Because the <span class="TEX">T<span class="E">E</span>X</span> program (the + ‘engine’ which actually does the + typesetting) is separate from whichever editor you choose, + <span class="TEX">T<span class="E">E</span>X</span>-based systems are available in a variety of different + modes using different interfaces, depending on how you want to + use them. + </p> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="gui">Graphical interface</a></h5> + <p>The normal way to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is + to use a toolbar button (icon), a menu item, or a keystroke + in your editor. Click on it and your document gets saved and + typeset. All the other features of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems (the + typeset display, spellchecker, related programs like + <i><a name="p9">makeindex</a></i> and <span class="BIBTEX">B<span class="I">I</span>B<span class="TEX">T<span class="E">E</span>X</span></span>) are run + the same way. This works both in a normal <a name="GUI" class="acroref">Graphical User Interface</a> (<small>GUI</small>) as well as in + text-only interfaces. + </p> + <p>In the popular <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> editors like + <i><a name="p10">Emacs</a></i>, + <i><a name="p11"><span class="TEX">T<span class="E">E</span>X</span>shell</a></i>, + <i><a name="p12"><span class="TEX">T<span class="E">E</span>X</span>nicCenter</a></i>, + <i><a name="p13">WinShell</a></i>, or + <i><a name="p14">WinEdt</a></i>, a record of the + typesetting process is shown in an adjoining window so that + you can see the progress of pages being typeset, and any + errors or warnings that may occur.<sup><a href="#F2">2</a></sup></p> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="cli">Command-line interface</a></h5> + <p>However, the graphical interface + is useless if you want to run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> unattended, as part of an + automated system, perhaps in a web server or e-commerce + environment, where there is no direct connection between + user and program. The underlying <span class="TEX">T<span class="E">E</span>X</span> engine is in fact + a <a name="CLI" class="acroref">Command-Line Interface</a> (<small>CLI</small>) program, + that is, it is used as a + ‘console’ program which you run from + a standard Unix or Mac terminal or shell window (or from an + MS-DOS command window in Microsoft Windows systems). You + type the command + <code class="literal">latex</code> followed by the name of your + document file (see <a href="chapter4.html#clidemo"></a> in <a href="chapter4.html#cmdwin">section 4.1.2</a> for an example). + </p> + <p>Commands like these let you run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in an automated + environment like a + <a name="CGI" class="acroref">Common Gateway Interface</a> (<small>CGI</small>) script + on a web server or a batch file on a document system. All + the popular distributions for Unix and Windows, both free + and commercial, include this interface as standard + (te<span class="TEX">T<span class="E">E</span>X</span>, fp<span class="TEX">T<span class="E">E</span>X</span>, MiK<span class="TEX">T<span class="E">E</span>X</span>, pro<span class="TEX">T<span class="E">E</span>X</span>t, + PC-<span class="TEX">T<span class="E">E</span>X</span>, True<span class="TEX">T<span class="E">E</span>X</span>, + etc.). + </p> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="displays">Typeset displays</a></h5> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> usually displays your + typeset results in a separate window, redisplayed + automatically every time the document is reprocessed, + because the typesetting is done separately from the editing. + Some systems, however, can format the typesetting while you + type, at the expense of some flexibility. + </p> + <blockquote> + <dl> + <dt><b><a name="async">Asynchronous typographic displays</a></b></dt> + <dd> + <p>This method is called an <b><i><a name="asynchronous">asynchronous typographic + display</a></i></b> because the typeset window only + updates <em>after</em> you have typed + something and reprocessed it, not + <em>while</em> you are still typing, as it + would with a wordprocessor.<sup><a href="#F3">3</a></sup></p> + </dd> + <dt><b><a name="sync">Synchronous typographic displays</a></b></dt> + <dd> + <p><a name="synchro"></a>Some distributions of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + offer a <b><i><a name="synchronous">synchronous + typographic interface</a></i></b>. In these, you type + directly into the typographic display, as with a + wordprocessor. Three popular examples are + <i><a name="p15">Textures</a></i>, + <i><a name="p16">Scientific Word</a></i>, and + <i><a name="p17">V<span class="TEX">T<span class="E">E</span>X</span></a></i> (see table below). + At least one free version (<span class="LYX">L<span class="Y">Y</span>X</span>, see <a href="chapter2.html#lyxwin">Figure 2.1</a> in <a href="chapter2.html#editors">section 2.3</a>) + offers a similar interface. + </p> + <p>With a synchronous display + you get Instant Textual Gratification™, but your + level of control is restricted to that of the <small><a href="intro.html#GUI" class="acroref" name="A23" title="Graphical User Interface">GUI</a></small> you use, which cannot provide + access to everything that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can do. For + complete control of the formatting + you may still need access to your normal source + (input) file in the same way as for asynchronous + implementations. + </p> + </dd> + <dt><b>Near-synchronous displays</b></dt> + <dd> + <p>There are several other + methods available free for Unix and some other systems + for close-to-synchronous updates of the typeset + display (including <a name="jf">Jonathan Fine</a>'s <i><a name="p18">Instant + Preview</a></i> and the <span class="TEX">T<span class="E">E</span>X</span> daemon), and + for embedding typographic fragments from the typeset + display back into the editor window (<a name="dk">David Kastrup</a>'s <span class="package"><a name="m1">preview-latex</a></span> + package). + </p> + </dd> + </dl> + </blockquote> + </div> + <div class="subsection"> + <h5><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="commercial">Commercial distributions</a></h5> + <p>Whatever method you choose, the + <span class="TEX">T<span class="E">E</span>X</span> Collection CD and <small><a href="chapter5.html#CTAN" class="acroref" name="A24" title="Comprehensive Archive Network">CTAN</a></small> are + not the only source of software. The vendors listed in <a href="intro.html#vendors">Table </a> offer excellent commercial + implementations of <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, + and if you are in a position where their enhanced support + and additional features are of benefit, I urge you to + support them. In most cases their companies, founders, and + staff have been good friends of the <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + communities for many years.<a name="I4"></a></p> + <div align="center" class="table"> + <table> + <caption><i>Table 1</i>. <a name="vendors">Popular commercial implementations of <span class="TEX">T<span class="E">E</span>X</span> systems</a></caption> + <tr class="headfoot"> + <th valign="bottom" align="left" width="93.60000000000001">Product</th> + <th valign="bottom" align="left" width="144">Platform</th> + <th valign="bottom" align="left" width="129.6">Company</th> + <th valign="bottom" align="left">URI</th> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">PC<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">Personal <span class="TEX">T<span class="E">E</span>X</span>, Inc + </td> + <td valign="top" align="left"><a href="www.pctex.com/"><tt>www.pctex.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">True<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">True <span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" align="left"><a href="truetex.com/"><tt>truetex.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">Textures</td> + <td valign="top" width="144" align="left">Apple Mac</td> + <td valign="top" width="129.6" align="left">Blue Sky Research</td> + <td valign="top" align="left"><a href="www.bluesky.com/"><tt>www.bluesky.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">Scientific Word</td> + <td valign="top" width="144" align="left">MS-Windows</td> + <td valign="top" width="129.6" align="left">Mackichan Software</td> + <td valign="top" align="left"><a href="www.mackichan.com/"><tt>www.mackichan.com/</tt></a></td> + </tr> + <tr> + <td valign="top" width="93.60000000000001" align="left">V<span class="TEX">T<span class="E">E</span>X</span></td> + <td valign="top" width="144" align="left">MS-Windows, Linux, OS/2</td> + <td valign="top" width="129.6" align="left">MicroPress, Inc</td> + <td valign="top" align="left"><a href="www.micropress-inc.com/"><tt>www.micropress-inc.com/</tt></a></td> + </tr> + </table> + </div> + </div> + <ol class="footnotes" start="2"> + <li><a name="F2">Recent versions of some editors hide this display by + default unless errors occur in the typesetting.</a></li> + <li><a name="F3">Among other reasons, <span class="TEX">T<span class="E">E</span>X</span> typesets whole + paragraphs at a time, not line-by-line as lesser + systems do, in order to get the hyphenation and + justification (H&J) right (see <a href="chapter2.html#handj">section 2.8</a>). + </a></li> + </ol> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="prodnote">Production note</a></h4> + <p>This document is written and maintained in <small><a href="chapter10.html#XML" class="acroref" name="A25" title="Extensible Markup Language">XML</a></small>, using a customized version of the + <i><a name="p19">DocBook</a></i> <small><a href="chapter10.html#DTD" class="acroref" name="A26" title="Document Type Definition">DTD</a></small>. Conversions were made to <small><a href="chapter10.html#HTML" class="acroref" name="A27" title="HyperText Markup Language">HTML</a></small> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> using <small><a href="chapter10.html#XSLT" class="acroref" name="A28" title="Extensible Stylesheet Language [Transformations]">XSLT</a></small> scripts and <a name="mk">Michael Kay</a>'s <i><a name="p20">Saxon</a></i> + processor. + </p> + <p>The complete source, with all ancillary files, is + available online at <a href="http://www.ctan.org/tex-archive/info/beginlatex/src/"><tt>http://www.ctan.org/tex-archive/info/beginlatex/src/</tt></a> + but if you want to try processing it yourself you must install + <i><a name="p21">Java</a></i> (from Sun, <small>IBM</small>, or a number of + others) and <i><a name="p22">Saxon</a></i> (from <a href="http://saxon.sourceforge.net/"><tt>http://saxon.sourceforge.net/</tt></a>), in addition + to <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>. + </p> + <p>This document is published under the terms and conditions + of the <small><a href="chapter2.html#GNU" class="acroref" name="A30" title="GNU's Not Unix">GNU</a></small> Free Documentation + License. Details are in <a href="appendixD.html#gfdl">this appendix</a>. + </p> + </div> + <div class="section"> + <h4><a href="#doctoc"><img src="up.png" title="Contents" width="32" alt="ToC" align="right" border="0"></a><a name="symbols">Symbols and conventions</a></h4> + <p>The following typographic notations are used:</p> + <div align="center"><a name="symboltable"></a><table> + <tr class="headfoot"> + <th valign="bottom" align="left">Notation</th> + <th valign="bottom" align="left" width="504">Meaning</th> + </tr> + <tr> + <td valign="top" align="left"><code class="command"><a name="c1">\command</a></code></td> + <td valign="top" width="504" align="left">Control sequences which perform an + action, e.g. <code class="command"><a name="c2">\newpage</a></code></td> + </tr> + <tr> + <td valign="top" align="left"><tt>\<a name="d1">length</a></tt></td> + <td valign="top" width="504" align="left">Control sequences which store a dimension + (measurement in units), e.g. <tt>\<a name="d2">parskip</a></tt></td> + </tr> + <tr> + <td valign="top" align="left"><tt><i><a name="l3">counter</a></i></tt></td> + <td valign="top" width="504" align="left">Values used for counting (whole numbers, as + opposed to measuring in units), e.g. <tt><i><a name="l4">secnumdepth</a></i></tt></td> + </tr> + <tr> + <td valign="top" align="left"><b><i><a name="term">term</a></i></b></td> + <td valign="top" width="504" align="left">Defining instance of a + new term + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="environment"><a name="e1">environment</a></span></td> + <td valign="top" width="504" align="left">A <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> formatting environment + </td> + </tr> + <tr> + <td valign="top" align="left"><span class="package"><a name="m2">package</a></span></td> + <td valign="top" width="504" align="left">A <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> package (available from <small><a href="chapter5.html#CTAN" class="acroref" name="A31" title="Comprehensive Archive Network">CTAN</a></small>) + </td> + </tr> + <tr> + <td valign="top" align="left"><i><a name="p23">product</a></i></td> + <td valign="top" width="504" align="left">Program or product name</td> + </tr> + <tr> + <td valign="top" align="left"><code class="literal">typewriter type</code></td> + <td valign="top" width="504" align="left">Examples of source code (stuff you + type) + </td> + </tr> + <tr> + <td valign="top" align="left"><span style="font-family:monospace; "><u>mybook</u></span> or <span style="font-family:monospace; font-style:italic; ">value</span></td> + <td valign="top" width="504" align="left">Mnemonic examples of + things you have to supply real-life values for + </td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">x</tt></td> + <td valign="top" width="504" align="left">A key on your keyboard</td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">Ctrl</tt>–<tt class="keycap">x</tt> + </td> + <td valign="top" width="504" align="left">Two keys pressed together</td> + </tr> + <tr> + <td valign="top" align="left"><tt class="keycap">Esc</tt> <tt class="keycap">q</tt></td> + <td valign="top" width="504" align="left">Two keys pressed one after another</td> + </tr> + <tr> + <td valign="top" align="left"><span class="guiicon">Submit</span></td> + <td valign="top" width="504" align="left">On-screen button to click</td> + </tr> + <tr> + <td valign="top" align="left"><span class="guimenu">Menu</span>→<span class="guimenuitem">Item</span></td> + <td valign="top" width="504" align="left">Drop-down menu with items</td> + </tr> + </table> + </div> + <p>Examples of longer fragments of input are shown with a + border round them. Where necessary, the formatted output is + shown immediately beneath. Warnings are shown with a shaded + background. Exercises are shown with a double border. + </p> + </div> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="foreword.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/ktip.png b/info/beginlatex/html/ktip.png Binary files differnew file mode 100644 index 0000000000..fcf613160f --- /dev/null +++ b/info/beginlatex/html/ktip.png diff --git a/info/beginlatex/html/kword.png b/info/beginlatex/html/kword.png Binary files differnew file mode 100644 index 0000000000..347286436f --- /dev/null +++ b/info/beginlatex/html/kword.png diff --git a/info/beginlatex/html/kwrite.png b/info/beginlatex/html/kwrite.png Binary files differnew file mode 100644 index 0000000000..bb1d25b2d3 --- /dev/null +++ b/info/beginlatex/html/kwrite.png diff --git a/info/beginlatex/html/lyx.png b/info/beginlatex/html/lyx.png Binary files differnew file mode 100644 index 0000000000..57134ecd24 --- /dev/null +++ b/info/beginlatex/html/lyx.png diff --git a/info/beginlatex/html/math.png b/info/beginlatex/html/math.png Binary files differnew file mode 100644 index 0000000000..94d7fa116d --- /dev/null +++ b/info/beginlatex/html/math.png diff --git a/info/beginlatex/html/mdot.png b/info/beginlatex/html/mdot.png Binary files differnew file mode 100644 index 0000000000..feb7fc0c39 --- /dev/null +++ b/info/beginlatex/html/mdot.png diff --git a/info/beginlatex/html/memberapp.png b/info/beginlatex/html/memberapp.png Binary files differnew file mode 100644 index 0000000000..859c52c17e --- /dev/null +++ b/info/beginlatex/html/memberapp.png diff --git a/info/beginlatex/html/newtitle.png b/info/beginlatex/html/newtitle.png Binary files differnew file mode 100644 index 0000000000..95d5498075 --- /dev/null +++ b/info/beginlatex/html/newtitle.png diff --git a/info/beginlatex/html/next.png b/info/beginlatex/html/next.png Binary files differnew file mode 100644 index 0000000000..18723a9e5c --- /dev/null +++ b/info/beginlatex/html/next.png diff --git a/info/beginlatex/html/old-diagram.png b/info/beginlatex/html/old-diagram.png Binary files differnew file mode 100644 index 0000000000..b93dc4505e --- /dev/null +++ b/info/beginlatex/html/old-diagram.png diff --git a/info/beginlatex/html/ootie.png b/info/beginlatex/html/ootie.png Binary files differnew file mode 100644 index 0000000000..997969120e --- /dev/null +++ b/info/beginlatex/html/ootie.png diff --git a/info/beginlatex/html/p70-01.png b/info/beginlatex/html/p70-01.png Binary files differnew file mode 100644 index 0000000000..0f816c1dcb --- /dev/null +++ b/info/beginlatex/html/p70-01.png diff --git a/info/beginlatex/html/p70-02.png b/info/beginlatex/html/p70-02.png Binary files differnew file mode 100644 index 0000000000..afbdb89289 --- /dev/null +++ b/info/beginlatex/html/p70-02.png diff --git a/info/beginlatex/html/p70-03.png b/info/beginlatex/html/p70-03.png Binary files differnew file mode 100644 index 0000000000..e1ff209c32 --- /dev/null +++ b/info/beginlatex/html/p70-03.png diff --git a/info/beginlatex/html/p70-04.png b/info/beginlatex/html/p70-04.png Binary files differnew file mode 100644 index 0000000000..8368fe6983 --- /dev/null +++ b/info/beginlatex/html/p70-04.png diff --git a/info/beginlatex/html/p70-05.png b/info/beginlatex/html/p70-05.png Binary files differnew file mode 100644 index 0000000000..e7f0b3ae3a --- /dev/null +++ b/info/beginlatex/html/p70-05.png diff --git a/info/beginlatex/html/p70-06.png b/info/beginlatex/html/p70-06.png Binary files differnew file mode 100644 index 0000000000..3877844260 --- /dev/null +++ b/info/beginlatex/html/p70-06.png diff --git a/info/beginlatex/html/p70-07.png b/info/beginlatex/html/p70-07.png Binary files differnew file mode 100644 index 0000000000..179c1e473a --- /dev/null +++ b/info/beginlatex/html/p70-07.png diff --git a/info/beginlatex/html/p70-08.png b/info/beginlatex/html/p70-08.png Binary files differnew file mode 100644 index 0000000000..116a7a036f --- /dev/null +++ b/info/beginlatex/html/p70-08.png diff --git a/info/beginlatex/html/p70-09.png b/info/beginlatex/html/p70-09.png Binary files differnew file mode 100644 index 0000000000..b1c2349d66 --- /dev/null +++ b/info/beginlatex/html/p70-09.png diff --git a/info/beginlatex/html/p70-10.png b/info/beginlatex/html/p70-10.png Binary files differnew file mode 100644 index 0000000000..f878d8ec46 --- /dev/null +++ b/info/beginlatex/html/p70-10.png diff --git a/info/beginlatex/html/p70-11.png b/info/beginlatex/html/p70-11.png Binary files differnew file mode 100644 index 0000000000..a0d116f8e7 --- /dev/null +++ b/info/beginlatex/html/p70-11.png diff --git a/info/beginlatex/html/p70-12.png b/info/beginlatex/html/p70-12.png Binary files differnew file mode 100644 index 0000000000..d42312ecb3 --- /dev/null +++ b/info/beginlatex/html/p70-12.png diff --git a/info/beginlatex/html/p70-13.png b/info/beginlatex/html/p70-13.png Binary files differnew file mode 100644 index 0000000000..06c069b014 --- /dev/null +++ b/info/beginlatex/html/p70-13.png diff --git a/info/beginlatex/html/p70-14.png b/info/beginlatex/html/p70-14.png Binary files differnew file mode 100644 index 0000000000..f88529c1d8 --- /dev/null +++ b/info/beginlatex/html/p70-14.png diff --git a/info/beginlatex/html/p70-15.png b/info/beginlatex/html/p70-15.png Binary files differnew file mode 100644 index 0000000000..bfeba96422 --- /dev/null +++ b/info/beginlatex/html/p70-15.png diff --git a/info/beginlatex/html/p70-16.png b/info/beginlatex/html/p70-16.png Binary files differnew file mode 100644 index 0000000000..17f869942d --- /dev/null +++ b/info/beginlatex/html/p70-16.png diff --git a/info/beginlatex/html/p70-17.png b/info/beginlatex/html/p70-17.png Binary files differnew file mode 100644 index 0000000000..bf79e84c26 --- /dev/null +++ b/info/beginlatex/html/p70-17.png diff --git a/info/beginlatex/html/p70-18.png b/info/beginlatex/html/p70-18.png Binary files differnew file mode 100644 index 0000000000..fbfce3a872 --- /dev/null +++ b/info/beginlatex/html/p70-18.png diff --git a/info/beginlatex/html/p70-19.png b/info/beginlatex/html/p70-19.png Binary files differnew file mode 100644 index 0000000000..6a154cc48b --- /dev/null +++ b/info/beginlatex/html/p70-19.png diff --git a/info/beginlatex/html/p70-20.png b/info/beginlatex/html/p70-20.png Binary files differnew file mode 100644 index 0000000000..982d3b2779 --- /dev/null +++ b/info/beginlatex/html/p70-20.png diff --git a/info/beginlatex/html/p70-21.png b/info/beginlatex/html/p70-21.png Binary files differnew file mode 100644 index 0000000000..6bed71f5cb --- /dev/null +++ b/info/beginlatex/html/p70-21.png diff --git a/info/beginlatex/html/p70-22.png b/info/beginlatex/html/p70-22.png Binary files differnew file mode 100644 index 0000000000..0716a0dd27 --- /dev/null +++ b/info/beginlatex/html/p70-22.png diff --git a/info/beginlatex/html/p70-23.png b/info/beginlatex/html/p70-23.png Binary files differnew file mode 100644 index 0000000000..cc6ee873e2 --- /dev/null +++ b/info/beginlatex/html/p70-23.png diff --git a/info/beginlatex/html/p70-24.png b/info/beginlatex/html/p70-24.png Binary files differnew file mode 100644 index 0000000000..8b3634f57d --- /dev/null +++ b/info/beginlatex/html/p70-24.png diff --git a/info/beginlatex/html/p70-25.png b/info/beginlatex/html/p70-25.png Binary files differnew file mode 100644 index 0000000000..7ed53f734e --- /dev/null +++ b/info/beginlatex/html/p70-25.png diff --git a/info/beginlatex/html/p70-26.png b/info/beginlatex/html/p70-26.png Binary files differnew file mode 100644 index 0000000000..69592a3f96 --- /dev/null +++ b/info/beginlatex/html/p70-26.png diff --git a/info/beginlatex/html/p70-27.png b/info/beginlatex/html/p70-27.png Binary files differnew file mode 100644 index 0000000000..9ff8a6809a --- /dev/null +++ b/info/beginlatex/html/p70-27.png diff --git a/info/beginlatex/html/p70-28.png b/info/beginlatex/html/p70-28.png Binary files differnew file mode 100644 index 0000000000..bce41b8f1f --- /dev/null +++ b/info/beginlatex/html/p70-28.png diff --git a/info/beginlatex/html/p70-29.png b/info/beginlatex/html/p70-29.png Binary files differnew file mode 100644 index 0000000000..2b0896212b --- /dev/null +++ b/info/beginlatex/html/p70-29.png diff --git a/info/beginlatex/html/p70-30.png b/info/beginlatex/html/p70-30.png Binary files differnew file mode 100644 index 0000000000..7e3455e1fd --- /dev/null +++ b/info/beginlatex/html/p70-30.png diff --git a/info/beginlatex/html/p70-31.png b/info/beginlatex/html/p70-31.png Binary files differnew file mode 100644 index 0000000000..ba76d029db --- /dev/null +++ b/info/beginlatex/html/p70-31.png diff --git a/info/beginlatex/html/p70-32.png b/info/beginlatex/html/p70-32.png Binary files differnew file mode 100644 index 0000000000..43a4c05295 --- /dev/null +++ b/info/beginlatex/html/p70-32.png diff --git a/info/beginlatex/html/p70-33.png b/info/beginlatex/html/p70-33.png Binary files differnew file mode 100644 index 0000000000..ee4ae7533f --- /dev/null +++ b/info/beginlatex/html/p70-33.png diff --git a/info/beginlatex/html/p70-34.png b/info/beginlatex/html/p70-34.png Binary files differnew file mode 100644 index 0000000000..d796444645 --- /dev/null +++ b/info/beginlatex/html/p70-34.png diff --git a/info/beginlatex/html/p70-35.png b/info/beginlatex/html/p70-35.png Binary files differnew file mode 100644 index 0000000000..63fee3428f --- /dev/null +++ b/info/beginlatex/html/p70-35.png diff --git a/info/beginlatex/html/p70-36.png b/info/beginlatex/html/p70-36.png Binary files differnew file mode 100644 index 0000000000..70c25f6c92 --- /dev/null +++ b/info/beginlatex/html/p70-36.png diff --git a/info/beginlatex/html/p70-37.png b/info/beginlatex/html/p70-37.png Binary files differnew file mode 100644 index 0000000000..b2c5f8cab1 --- /dev/null +++ b/info/beginlatex/html/p70-37.png diff --git a/info/beginlatex/html/p71-01.png b/info/beginlatex/html/p71-01.png Binary files differnew file mode 100644 index 0000000000..360f83fd5b --- /dev/null +++ b/info/beginlatex/html/p71-01.png diff --git a/info/beginlatex/html/p71-02.png b/info/beginlatex/html/p71-02.png Binary files differnew file mode 100644 index 0000000000..19d508cc00 --- /dev/null +++ b/info/beginlatex/html/p71-02.png diff --git a/info/beginlatex/html/p71-03.png b/info/beginlatex/html/p71-03.png Binary files differnew file mode 100644 index 0000000000..4fb3136314 --- /dev/null +++ b/info/beginlatex/html/p71-03.png diff --git a/info/beginlatex/html/p71-04.png b/info/beginlatex/html/p71-04.png Binary files differnew file mode 100644 index 0000000000..da7b4526f0 --- /dev/null +++ b/info/beginlatex/html/p71-04.png diff --git a/info/beginlatex/html/p71-05.png b/info/beginlatex/html/p71-05.png Binary files differnew file mode 100644 index 0000000000..eecb685e9c --- /dev/null +++ b/info/beginlatex/html/p71-05.png diff --git a/info/beginlatex/html/p71-06.png b/info/beginlatex/html/p71-06.png Binary files differnew file mode 100644 index 0000000000..f7351608da --- /dev/null +++ b/info/beginlatex/html/p71-06.png diff --git a/info/beginlatex/html/p71-07.png b/info/beginlatex/html/p71-07.png Binary files differnew file mode 100644 index 0000000000..c1c3e2a3c6 --- /dev/null +++ b/info/beginlatex/html/p71-07.png diff --git a/info/beginlatex/html/p71-08.png b/info/beginlatex/html/p71-08.png Binary files differnew file mode 100644 index 0000000000..439b2c4044 --- /dev/null +++ b/info/beginlatex/html/p71-08.png diff --git a/info/beginlatex/html/para.png b/info/beginlatex/html/para.png Binary files differnew file mode 100644 index 0000000000..dfaef90076 --- /dev/null +++ b/info/beginlatex/html/para.png diff --git a/info/beginlatex/html/parbox1.png b/info/beginlatex/html/parbox1.png Binary files differnew file mode 100644 index 0000000000..2640829f07 --- /dev/null +++ b/info/beginlatex/html/parbox1.png diff --git a/info/beginlatex/html/parbox2.png b/info/beginlatex/html/parbox2.png Binary files differnew file mode 100644 index 0000000000..d8604c3f4c --- /dev/null +++ b/info/beginlatex/html/parbox2.png diff --git a/info/beginlatex/html/preface.html b/info/beginlatex/html/preface.html new file mode 100644 index 0000000000..01823a5c28 --- /dev/null +++ b/info/beginlatex/html/preface.html @@ -0,0 +1,387 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd"> + +<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:00--><html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + <title>Formatting information: Preface</title> + <link rel="stylesheet" href="typebook.css" type="text/css"> + <meta http-equiv="Content-Style-Type" content="text/css"> + </head> + <body> + <table width="100%"> + <tr> + <th class="title" width="66%"> + <h1><a name="doctitle">Formatting information</a></h1> + <h2>A beginner's introduction to typesetting with + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2> + <h3>Preface</h3> + <h3>Peter Flynn</h3> + <h4>Silmaril Consultants<br>Textual Therapy Division + </h4><br>v. 3.6 (March 2005) + </th> + <td class="toc" width="33%"> + <h4><a name="doctoc">Contents</a></h4> + <dl> + <dd class=""><a href="intro.html#intro">Introduction</a></dd> + <dd class=""><a href="foreword.html#foreword">Foreword</a></dd> + <dd class="current"><a href="preface.html#preface">Preface</a></dd> + </dl> + <ol> + <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li> + <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li> + <li class=""><a href="chapter3.html#basic">Basic document structures</a></li> + <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li> + <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li> + <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li> + <li class=""><a href="chapter7.html#texttools">Textual tools</a></li> + <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li> + <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li> + <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li> + </ol> + <ol type="A"> + <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li> + <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li> + <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li> + <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li> + </ol> + <dl> + <dd class=""><a href="bibliography.html#biblio">References</a></dd> + <dd class=""><a href="index.html#index">Index</a></dd> + </dl> + </td> + </tr> + <tr> + <td class="credits"> + <p>This edition of <cite>Formatting + Information</cite> was prompted by the generous help I + have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention + individually. Shortly after TUGboat published the November + 2003 edition, I was reminded by a spate of email of the + fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is + constantly under development. There have been revisions to + packages; issues of new distributions, new tools, and new + interfaces; new books and other new documents; corrections to + my own errors; suggestions for rewording; and in one or two + cases mild abuse for having omitted package X which the author + felt to be indispensable to users. ¶ I am grateful as always to the people who sent me + corrections and suggestions for improvement. Please keep them + coming: only this way can this book reflect what people + want to learn. The same limitation still applies, however: no + mathematics, as there are already a dozen or more excellent + books on the market — as well as other online + documents — dealing with mathematical typesetting in + <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am + capable of. ¶ The structure remains the same, but I have revised and + rephrased a lot of material, especially in the earlier + chapters where a new user cannot be expected yet to have + acquired any depth of knowledge. Many of the screenshots have + been updated, and most of the examples and code fragments have + been retested. ¶ As I was finishing this edition, I was asked to review + an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which + grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The + author specifically took the writers of documentation to task + for failing to explain things more clearly, and as I read + more, I found myself agreeing, and resolving to clear up some + specific problems areas as far as possible. It is very + difficult for people who write technical documentation to + remember how they struggled to learn what has now become a + familiar system. So much of what we do is second nature, and a + lot of it actually has nothing to do with the software, but + more with the way in which we view and approach information, + and the general level of knowledge of computing. If I have + obscured something by making unreasonable assumptions about + <em>your</em> knowledge, please let me know so + that I can correct it. + <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>. + </p> + </p> + </td> + <td class="legal"> + <p> + <p>This document is Copyright © 1999–2005 by + Silmaril Consultants under the terms of what is now the GNU + Free Documentation License (copyleft). + </p> + <p>Permission is granted to copy, distribute and/or modify + this document under the terms of the GNU Free Documentation + License, Version 1.2 or any later version published by the + Free Software Foundation; with no Invariant Sections, no + Front-Cover Texts, and no Back-Cover Texts. A copy of the + license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>. + </p> + <p>You are allowed to distribute, reproduce, and modify it + without fee or further requirement for consent subject to the + conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has + asserted his right to be identified as the author of this + document. If you make useful modifications you are asked to + inform the author so that the master copy can be updated. See + the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>. + + </p> + </p> + </td> + </tr> + </table> + <div class="prelim"> + <h3><a href="#doctoc"><img src="up.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a><a name="preface">Preface</a></h3> + <p>Many people discover <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> after + years of struggling with wordprocessors and desktop publishing + systems, and are amazed to find that <span class="TEX">T<span class="E">E</span>X</span> has been around for + over 25 years and they hadn't heard of it. It's not a + conspiracy, just ‘a well-kept secret known only to a few + million people’, as one anonymous user has put + it. + </p> + <p>Perhaps a key to why it has remained + so popular is that it removes the need to fiddle with the + formatting while you write. Although playing around with fonts + and formatting is attractive to the newcomer, it is completely + counter-productive for the serious author or editor who wants to + concentrate on <em>writing</em> — ask any + journalist or professional writer. + </p> + <p>A few years ago a new <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> user expressed concern on + the <a href="comp.text.tex"><tt>comp.text.tex</tt></a> newsgroup about + ‘learning to write in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>’. <a href="news:comp.text.tex/MPG.18d82140d65ddc5898968c@news.earthlink.net">Some + excellent advice</a> was posted in response to this query, + which I reproduce with permission below [the bold text is my + emphasis]: + </p> + <blockquote class="citation"><a name="K20"> </a><tt> + <p>No, the harder part might be <em>writing</em>, + period. <span class="TEX">T<span class="E">E</span>X</span>/<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is actually easy, once you relax and + stop worrying about appearance as a be-all-and-end-all. Many + people have become ‘Word Processing + Junkies’ and <strong>no longer + ‘write’ documents, they + ‘draw’ them</strong>, almost at the + same level as a pre-literate 3-year old child might pretend to + ‘write’ a story, but is just creating a + sequence of pictures with a pad of paper and box of + <i><a name="p24">Crayola</a></i>s — this is perfectly + normal and healthy in a 3-year old child who is being + creative, but is of questionable usefulness for, say, a grad + student writing a Master's or PhD thesis or a business + person writing a white paper, etc. For this reason, + <em>I</em> strongly recommend + <em>not</em> using any sort of fancy <small><a href="intro.html#GUI" class="acroref" name="A35" title="Graphical User Interface">GUI</a></small> ‘crutch’. + Use a plain vanilla text editor and treat it like an + old-fashioned typewriter. Don't waste time playing with + your mouse. + </p> + <p>Note: I am <em>not</em> saying that you should + have no concerns about the appearance of your document, just + that you should <em>write</em> the document + (completely) first and tweak the appearance + later...<em>not</em> [spend time on] lots of + random editing in the bulk of the document itself. + </p></tt><p class="citation"> (11 March 2003), <cite><a href="bibliography.html#heller"><a href="newscomp.text.tex"><tt>comp.text.tex</tt></a></a></cite></p> + </blockquote> + <p>Learning to write well can be hard, but authors shouldn't + have to make things even harder for themselves by using + manually-driven systems which break their concentration every + few seconds for some footling adjustment to the appearance, + simply because the software is incapable of doing it right by + itself. + </p> + <p><a name="mathtex"></a><a name="knuth">Don Knuth</a> originally wrote <span class="TEX">T<span class="E">E</span>X</span> to typeset mathematics for + the second edition of his master-work <cite><a href="bibliography.html#aocs" name="C21">The Art of Computer Programming</a></cite>, and it remains pretty much the only + typesetting program to include fully-automated mathematical + formatting done the way mathematicians want it. But he also + published a booklet called <cite><a href="bibliography.html#mathwrite" name="C22">Mathematical Writing</a></cite> which shows how + important it is to think about what you write, and how the + computer should be able to help, not hinder. + </p> + <p>And <span class="TEX">T<span class="E">E</span>X</span> is much more than math: + it's a programmable typesetting system which can be used + for almost any formatting task, and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has made it usable by + almost anyone. Professor Knuth generously placed the entire system in the + public domain, so for many years there was no publicity of the + commercial kind which would have got <span class="TEX">T<span class="E">E</span>X</span> noticed outside the + technical field. + </p> + <p>Nowadays, however, there are many companies + selling <span class="TEX">T<span class="E">E</span>X</span> software or services,<sup><a href="#F4">1</a></sup> dozens + of publishers accepting <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> documents for + publication, and hundreds of thousands of users using <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> + for millions of documents.<sup><a href="#F5">2</a></sup></p> + <p>To count yourself as a <span class="TEX">T<span class="E">E</span>X</span> or <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> user, visit the + <span class="TEX">T<span class="E">E</span>X</span> Users Group's + ‘<span class="TEX">T<span class="E">E</span>X</span> Counter’ web site + (and get a nice certificate!). + </p> + <p>There is occasionally some confusion among newcomers between + the two main programs, <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>: + </p> + <ul> + <li> + <p><span class="TEX">T<span class="E">E</span>X</span> is a typesetting program, originally written by + Prof Knuth at Stanford around 1978. It implements a + macro-driven typesetters' programming language of some + 300 basic operations and it has formed the core of many + other <a name="DTP" class="acroref">desktop publishing</a> (<small>DTP</small>) + systems. Although it is still possible to write in the raw + <span class="TEX">T<span class="E">E</span>X</span> language, you need to study it in depth, and you need + to be able to write macros (subprograms) to perform even the + simplest of repetitive tasks. + </p> + </li> + <li> + <p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a user interface for <span class="TEX">T<span class="E">E</span>X</span>, designed by + <a name="lamport">Leslie Lamport</a> at <a name="DEC" class="acroref">Digital Equipment + Corporation</a> (<small>DEC</small>) in 1985 to automate all the common + tasks of document preparation. It provides a simple way for + authors and typesetters to use the power of <span class="TEX">T<span class="E">E</span>X</span> without + having to learn the underlying language. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is the + recommended system for all users except professional + typographic programmers and computer scientists who want to + study the internals of <span class="TEX">T<span class="E">E</span>X</span>. + </p> + </li> + </ul> + <p>Both <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> have been + constantly updated since their inception. Knuth has now frozen + development of the <span class="TEX">T<span class="E">E</span>X</span> engine so that users and developers + can have a virtually bug-free, rock-stable platform to work + with.<sup><a href="#F6">3</a></sup> Typographic programming development continues with + the <a name="NTS" class="acroref">New Typesetting System</a> (<small>NTS</small>), planned + as a successor to <span class="TEX">T<span class="E">E</span>X</span>. The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>3 project has taken over + development of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, and the current version is + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span>ε</span>, which is what we are concentrating on here. Details + of all developments can be had from the <small><a href="appendixB.html#TUG" class="acroref" name="A40" title="Users Group">TUG</a></small> at <a href="http://www.tug.org"><tt>http://www.tug.org</tt></a></p> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="myths">Debunking the mythology</a></h3> + <p>Naturally, over all the years, a few myths have grown up + around <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, often propagated by people who should know + better. So, just to clear up any potential + misunderstandings... + </p> + <blockquote> + <dl> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> has only got one + font’</b></dt> + <dd> + <p>Most <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> systems can use any OpenType, + TrueType, Adobe (<a name="t2">PostScript</a>) + Type1 or Type3, or METAFONT font. This is more than + most other known typesetting system. + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s default font is Computer Modern (based + on Monotype Series 8: see + <a href="chapter8.html#fontable-mf">the table in section 8.2</a>), not Times Roman, and some + people get upset because it ‘looks + different’ to Times. Typefaces differ: + that's what they're for — get used to it. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> isn't <small><a href="chapter2.html#WYSIWYG" class="acroref" name="A41" title="What You See Is What You Get">WYSIWYG</a></small>’</b></dt> + <dd> + <p>Simply not true. <small><a href="chapter4.html#DVI" class="acroref" name="A42" title="device-independent">DVI</a></small> + and <small><a href="chapter4.html#PDF" class="acroref" name="A43" title="Portable Document Format">PDF</a></small> preview is better + <small><a href="chapter2.html#WYSIWYG" class="acroref" name="A44" title="What You See Is What You Get">WYSIWYG</a></small> than any wordprocessor + and most <small><a href="preface.html#DTP" class="acroref" name="A45" title="desktop publishing">DTP</a></small> systems. What + people mean is that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s typographic display + is asynchronous with the edit window. This is only true + for the default <small><a href="intro.html#CLI" class="acroref" name="A46" title="Command-Line Interface">CLI</a></small> + implementations. See <a href="intro.html#synchro">the first paragraph in section 3 of the Introduction</a> for details of synchronous + versions. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is obsolete’</b></dt> + <dd> + <p>Quite the opposite: it's under constant + development, with new features being added almost + weekly. Check the <a href="news:comp.text.tex"><tt>comp.text.tex</tt></a> for messages about recent + uploads to <small><a href="chapter5.html#CTAN" class="acroref" name="A47" title="Comprehensive Archive Network">CTAN</a></small>. It's + arguably more up-to-date than most other systems: + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> had the Euro (€) before anyone else, it had + Inuktitut typesetting before the Inuit got their own + province in Canada, and it still produces better + mathematics than anything else. + </p> + </dd> + </dl> + </blockquote> + </td> + </tr> + </table> + </div> + <div align="center" class="sidebar"> + <table width="75%"> + <tr> + <td align="left" class="sidebar"> + <h3><img src="ktip.png" align="middle"> <a name="myths2">More mythology</a></h3> + <blockquote> + <dl> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Unix system’</b></dt> + <dd> + <p>People are also heard saying: + ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Windows system’, + ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is a Mac system’, etc., + etc. <i>ad nauseam</i>. + <span class="TEX">T<span class="E">E</span>X</span> systems run on almost every computer in use, from + some of the biggest supercomputers down to handhelds + (<small><a href="intro.html#PDA" class="acroref" name="A48" title="Personal Digital Assistant">PDA</a></small>s like the Sharp + <i><a name="p25">Zaurus</a></i>). That includes + Windows and Linux PCs, Macs, and all other Unix systems. + If you're using something <span class="TEX">T<span class="E">E</span>X</span> doesn't run + on, it must be either incredibly new, incredibly old, or + unbelievably obscure. + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is ‘too + difficult’’</b></dt> + <dd> + <p>This has been heard from + physicists who can split atoms; from mathematicians who + can explain why <span class="math">π</span> exists; from business people who can + read a balance sheet; from historians who can grasp + Byzantine politics; from librarians who can understand + LoC and MARC; and from linguists who can decode Linear + ‘B’. It's nonsense: most people grasp + <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in 20 minutes or so. It's not rocket + science (or if it is, I know any number of unemployed + rocket scientists who will teach it to you). + </p> + </dd> + <dt><b>MYTH: ‘<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> is ‘only for + scientists and + mathematicians’’</b></dt> + <dd> + <p>Untrue. Although it grew up + in the mathematical and computer science fields, two of + its biggest growth areas are in the humanities and + business, especially since the rise of <small><a href="chapter10.html#XML" class="acroref" name="A49" title="Extensible Markup Language">XML</a></small> brought new demands for automated + web-based typesetting. + </p> + </dd> + </dl> + </blockquote> + </td> + </tr> + </table> + </div> + <ol class="footnotes" start=""> + <li><a name="F4">See, for example, the list of <span class="TEX">T<span class="E">E</span>X</span> vendors on <a href="intro.html#vendors">Table </a>, and the list of consultants + published by <small><a href="appendixB.html#TUG" class="acroref" name="A36" title="Users Group">TUG</a></small>.</a></li> + <li><a name="F5">A guesstimate. With free software it's impossible + to tell how many people are using it, but it's a + <em>lot</em>.</a></li> + <li><a name="F6">Knuth still fixes bugs, although the chances of finding + a bug in <span class="TEX">T<span class="E">E</span>X</span> these days approaches zero.</a></li> + </ol> + </div> + <hr> + <table width="100%"> + <tr> + <td align="left"><a href="foreword.html"><img src="previous.png" alt="Previous" border="0"></a></td> + <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td> + <td align="right"><a href="chapter1.html"><img src="next.png" alt="Next" border="0"></a></td> + </tr> + </table> + </body> +</html>
\ No newline at end of file diff --git a/info/beginlatex/html/previous.png b/info/beginlatex/html/previous.png Binary files differnew file mode 100644 index 0000000000..50b39d15f9 --- /dev/null +++ b/info/beginlatex/html/previous.png diff --git a/info/beginlatex/html/public.png b/info/beginlatex/html/public.png Binary files differnew file mode 100644 index 0000000000..3155b407fe --- /dev/null +++ b/info/beginlatex/html/public.png diff --git a/info/beginlatex/html/qpdf.png b/info/beginlatex/html/qpdf.png Binary files differnew file mode 100644 index 0000000000..05868e9a40 --- /dev/null +++ b/info/beginlatex/html/qpdf.png diff --git a/info/beginlatex/html/sdot.png b/info/beginlatex/html/sdot.png Binary files differnew file mode 100644 index 0000000000..6139b8a61f --- /dev/null +++ b/info/beginlatex/html/sdot.png diff --git a/info/beginlatex/html/start.png b/info/beginlatex/html/start.png Binary files differnew file mode 100644 index 0000000000..9bf7f03ff8 --- /dev/null +++ b/info/beginlatex/html/start.png diff --git a/info/beginlatex/html/table.png b/info/beginlatex/html/table.png Binary files differnew file mode 100644 index 0000000000..00da335eac --- /dev/null +++ b/info/beginlatex/html/table.png diff --git a/info/beginlatex/html/tcdvddir.png b/info/beginlatex/html/tcdvddir.png Binary files differnew file mode 100644 index 0000000000..70043011bf --- /dev/null +++ b/info/beginlatex/html/tcdvddir.png diff --git a/info/beginlatex/html/tcptfirstdoc.png b/info/beginlatex/html/tcptfirstdoc.png Binary files differnew file mode 100644 index 0000000000..71f72cc0f1 --- /dev/null +++ b/info/beginlatex/html/tcptfirstdoc.png diff --git a/info/beginlatex/html/tcptpdf.png b/info/beginlatex/html/tcptpdf.png Binary files differnew file mode 100644 index 0000000000..68ec73681f --- /dev/null +++ b/info/beginlatex/html/tcptpdf.png diff --git a/info/beginlatex/html/tcptstart.png b/info/beginlatex/html/tcptstart.png Binary files differnew file mode 100644 index 0000000000..1a08ec4979 --- /dev/null +++ b/info/beginlatex/html/tcptstart.png diff --git a/info/beginlatex/html/terminal.png b/info/beginlatex/html/terminal.png Binary files differnew file mode 100644 index 0000000000..314bf54b60 --- /dev/null +++ b/info/beginlatex/html/terminal.png diff --git a/info/beginlatex/html/texconfig.png b/info/beginlatex/html/texconfig.png Binary files differnew file mode 100644 index 0000000000..59d3ebc162 --- /dev/null +++ b/info/beginlatex/html/texconfig.png diff --git a/info/beginlatex/html/texniccenter.png b/info/beginlatex/html/texniccenter.png Binary files differnew file mode 100644 index 0000000000..127f8f835d --- /dev/null +++ b/info/beginlatex/html/texniccenter.png diff --git a/info/beginlatex/html/texshell.png b/info/beginlatex/html/texshell.png Binary files differnew file mode 100644 index 0000000000..415f5a338f --- /dev/null +++ b/info/beginlatex/html/texshell.png diff --git a/info/beginlatex/html/title.png b/info/beginlatex/html/title.png Binary files differnew file mode 100644 index 0000000000..d3d95ce19e --- /dev/null +++ b/info/beginlatex/html/title.png diff --git a/info/beginlatex/html/tkbibtex.png b/info/beginlatex/html/tkbibtex.png Binary files differnew file mode 100644 index 0000000000..711cede544 --- /dev/null +++ b/info/beginlatex/html/tkbibtex.png diff --git a/info/beginlatex/html/tlcdoc.png b/info/beginlatex/html/tlcdoc.png Binary files differnew file mode 100644 index 0000000000..0fa84f3e50 --- /dev/null +++ b/info/beginlatex/html/tlcdoc.png diff --git a/info/beginlatex/html/tocnav.png b/info/beginlatex/html/tocnav.png Binary files differnew file mode 100644 index 0000000000..9cbf3570a9 --- /dev/null +++ b/info/beginlatex/html/tocnav.png diff --git a/info/beginlatex/html/top.png b/info/beginlatex/html/top.png Binary files differnew file mode 100644 index 0000000000..4b2a52d774 --- /dev/null +++ b/info/beginlatex/html/top.png diff --git a/info/beginlatex/html/twithcat.png b/info/beginlatex/html/twithcat.png Binary files differnew file mode 100644 index 0000000000..4261262ef1 --- /dev/null +++ b/info/beginlatex/html/twithcat.png diff --git a/info/beginlatex/html/typebook.css b/info/beginlatex/html/typebook.css new file mode 100644 index 0000000000..0886bd8016 --- /dev/null +++ b/info/beginlatex/html/typebook.css @@ -0,0 +1,119 @@ +body { background-color:white; font-family:serif; } + +th.title { vertical-align:top; } +td.toc { vertical-align:top; font-size:small; } +td.credits { vertical-align:top; font-size:small; font-family:sans-serif; } +td.legal { vertical-align:top; font-size:small; font-family:sans-serif; } + +blockquote.warning { background-color:#FFCCCC; padding:6px; } +blockquote.note { background-color:#CCCCFF; padding:6px; } +td.sidebar { background-color:#99CC99; font-family:sans-serif; font-size:small; padding:6px; } + +td.chapno { background-color:black; font-family:sans-serif; font-weight:bold; + color:#CCCCCC; font-size:64px; padding:6px; } + +blockquote.exercise { background-color:#CCCCFF; font-family:sans-serif; padding:12px; } + +blockquote.example { background-color:#CC99CC; } +p.example { padding-top:0px; padding-bottom:12px; padding-left:12px } +pre { background-color:#CCFFCC; + font-family:monospace; + font-size:small; + text-align:left; + padding-left:12px; + padding-top:12px; } +pre.spacing { background-color:white; } +pre.footnotesize { font-size:11px; } +pre.scriptsize { font-size:10px; } +pre.tiny { font-size:9px; } +blockquote.citation { font-size:small; } +p.citation { text-align:right; padding-top:0pt; } + +li.current { background-color:#99FF99; } + +dt { font-weight:bold; } +dd p { margin-top:0px; } +dd.current { background-color:#99FF99; } + +i.chaphead { font-family:sans-serif; font-weight:bold; font-style:italic; } + +sub,sup { font-size:small; } + +lh { font-weight:bold; + font-style:italic; + display:block; + padding-bottom:12px; + text-align:left; } +ol.footnotes { font-size:small; + background-color:#CCCCCC; + padding-top:5px; + padding-bottom:3px; + padding-right:3px; } + +tt.keycap { font-family:monospace; font-size:small; border:solid 1px; padding:1px; background-color:#666666; color:#EEEEEE; } + +code.command { color:#660000; } +code.error { color:#FF0000; } +code.literal { color:#000066; } + +span.package { font-family:sans-serif; } +span.option { font-family:sans-serif; font-style:italic; } +span.environment { font-family:sans-serif; font-weight:bold; } + +span.guimenu { font-family:sans-serif; font-weight:bold; } +span.guisubmenu { font-family:sans-serif; font-weight:bold; } +span.guimenuitem { font-family:sans-serif; font-weight:bold; font-style:italic; } +span.guiicon { font-family:sans-serif; font-size:small; border:solid 1px; padding:1px; background-color:#CCCCCC; color:#6666FF; } +span.normal { font-style:normal; } + +div.figure { text-align:center; } +/* div.table { text-align:center; } */ +caption { font-weight:bold; } +div.sampler { font-family:sans-serif; font-size:small; } + +a.acrodef { color:#006600; } +a.acroref { color:#006600; } +a.acroid { text-decoration:none; font-size:small; } +a.acrorefs { text-decoration:none; } + +a.firstterm { text-decoration:none; font-weight:bold; font-style:italic; } +a.soloindex { text-decoration:none; } +a.command-single { text-decoration:none; font-family:monospace; } +a.command-first { text-decoration:none; font-family:monospace; } +a.command-subseq { text-decoration:none; font-family:monospace; } +a.methodname-single { text-decoration:none; font-family:sans-serif; } /* =package */ +a.methodname-first { text-decoration:none; font-family:sans-serif; } /* =package */ +a.methodname-subseq { text-decoration:none; font-family:sans-serif; } /* =package */ +a.option-single { text-decoration:none; font-family:sans-serif; } +a.option-first { text-decoration:none; font-family:sans-serif; } +a.option-subseq { text-decoration:none; font-family:sans-serif; } +a.modespec-single { text-decoration:none; font-family:monospace; font-weight:bold; } /* =environment */ +a.modespec-first { text-decoration:none; font-family:monospace; font-weight:bold; } /* =environment */ +a.modespec-subseq { text-decoration:none; font-family:monospace; font-weight:bold; } /* =environment */ +a.productname-single { text-decoration:none; font-style:italic; } +a.productname-first { text-decoration:none; font-style:italic; } +a.productname-subseq { text-decoration:none; font-style:italic; } +a.trademark-single { text-decoration:none; font-style:normal; } +a.trademark-first { text-decoration:none; font-style:normal; } +a.trademark-subseq { text-decoration:none; font-style:normal; } +a.varname-single { text-decoration:none; font-family:monospace; font-style:italic; } +a.varname-first { text-decoration:none; font-family:monospace; font-style:italic; } +a.varname-subseq { text-decoration:none; font-family:monospace; font-style:italic; } + +span.affil { font-weight:normal; } + +span.TEX {letter-spacing: -0.125em; padding-right:0.125em; } +span.TEX span.E{ position:relative;top:0.4ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } + +span.LATEX { padding-right:-0.8em; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +span.LATEX span.E { position:relative; top:0.4ex; } +a span.LATEX span.A {text-decoration: none; } + +span.BIBTEX { } +span.BIBTEX span.I { position:relative;top:0.4ex; } + +span.LYX { } +span.LYX span.Y { position:relative;top:0.4ex; } diff --git a/info/beginlatex/html/up.png b/info/beginlatex/html/up.png Binary files differnew file mode 100644 index 0000000000..8e0dd82648 --- /dev/null +++ b/info/beginlatex/html/up.png diff --git a/info/beginlatex/html/warning.png b/info/beginlatex/html/warning.png Binary files differnew file mode 100644 index 0000000000..7460a38007 --- /dev/null +++ b/info/beginlatex/html/warning.png diff --git a/info/beginlatex/html/whitespace.png b/info/beginlatex/html/whitespace.png Binary files differnew file mode 100644 index 0000000000..cc24e2c036 --- /dev/null +++ b/info/beginlatex/html/whitespace.png diff --git a/info/beginlatex/html/winedt.png b/info/beginlatex/html/winedt.png Binary files differnew file mode 100644 index 0000000000..3597b1a8f3 --- /dev/null +++ b/info/beginlatex/html/winedt.png diff --git a/info/beginlatex/html/winshell.png b/info/beginlatex/html/winshell.png Binary files differnew file mode 100644 index 0000000000..b68fec0ff3 --- /dev/null +++ b/info/beginlatex/html/winshell.png diff --git a/info/beginlatex/html/xdvi.png b/info/beginlatex/html/xdvi.png Binary files differnew file mode 100644 index 0000000000..e21a5b5d7c --- /dev/null +++ b/info/beginlatex/html/xdvi.png diff --git a/info/beginlatex/html/zedit.png b/info/beginlatex/html/zedit.png Binary files differnew file mode 100644 index 0000000000..f094121db1 --- /dev/null +++ b/info/beginlatex/html/zedit.png diff --git a/info/beginlatex/html/zlatex.png b/info/beginlatex/html/zlatex.png Binary files differnew file mode 100644 index 0000000000..2d8775b003 --- /dev/null +++ b/info/beginlatex/html/zlatex.png |