The Memoir Class

619
The Memoir Class

description

memoir package manual

Transcript of The Memoir Class

TheMemoirClassThe Memoir ClassforCongurable TypesettingUser GuidePeter WilsonTHPThe Herries Pressc 2001 2009 Peter R. WilsonAll rights reservedThe Herries Press, Normandy Park, WA.Printed in the WorldThe paper used in this publication may meet the minimum requirements of the American National Standard forInformation Sciences Permanence of Paper for Printed Library Materials, ANSI Z39.481984.10 09 08 07 06 05 04 03 02 01 18 17 16 15 14 13 12First edition: 3 June 2001Second impression, with corrections: 2 July 2001Second edition: 14 July 2001Second impression, with corrections: 3 August 2001Third impression, with minor additions: 31 August 2001Third edition: 17 November 2001Fourth edition: 16 March 2002Fifth edition: 10 August 2002Sixth edition: 31 January 2004Seventh edition: 10 May 2008Eighth impression, with very minor corrections: 12 July 2008Ninth impression, with additions and corrections: 8 July 2009memoir, n. a written record set down as material for a history or biography:a biographical sketch: a record of some study investigated by the writer: (inpl.) the transactions of a society. [Fr. mmoire L. memoria, memory memor,mindful.]Chambers Twentieth Century Dictionary, New Edition, 1972.memoir, n. [Fr. mmoire, masc., a memorandum, memoir, fem., memory < L.memoria, MEMORY] 1. a biography or biographical notice, usually written bya relative or personal friend of the subject 2. [pl.] an autobiography, usually afull or highly personal account 3. [pl.] a report or record of important eventsbased on the writers personal observation, special knowledge, etc. 4. areport or record of a scholarly investigation, scientic study, etc. 5. [pl.] therecord of the proceedings of a learned societyWebsters New World Dictionary, Second College Edition.memoir, n. a ction designed to atter the subject and to impress the reader.With apologies to Ambrose BierceShort contentsShort contents viiContents ixList of Figures xviiList of Tables xxiList of typeset examples xxiiiPreface xxvIntroduction to the seventh edition xxviiTerminology xxxvI Art and Theory 11 Historical background 32 The Parts of a Book 173 The page 274 Styling the elements 595 Picky points 67II Practice 776 Starting o 797 Laying out the page 858 Text and fonts 109viiviii SHORT CONTENTS9 Titles 12910 Abstracts 13911 Document divisions 14312 Pagination and headers 18513 Paragraphs and lists 19914 Contents lists 21715 Floats and captions 24316 Rows and columns 27917 Page notes 30318 Decorative text 31719 Poetry 32320 Boxes, verbatims and les 33921 Cross referencing 36322 Back matter 36723 Miscellaneous 39124 An example book design 41525 An example thesis design 423A Packages and macros 443B LaTeX and TeX 447C The terrors of errors 463Notes 483Command summary 487Bibliography 525Index 533Index of rst lines 579ContentsShort contents viiContents ixList of Figures xviiList of Tables xxiList of typeset examples xxiiiPreface xxvIntroduction to the seventh edition xxviiGeneral considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiClass options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiiSectioning styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiiCaptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxixTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxixVerse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxEnd matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxMiscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiPackages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiType conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiiAcknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiiiTerminology xxxvUnits of measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxviI Art and Theory 11 Historical background 31.1 Galloping through the millenia . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Making type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Book types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5ixx CONTENTS1.3.1 Type-related terminology 5, 1.3.2 Blackletter 6, 1.3.3 Oldstyle 7,1.3.4 Transitional 8, 1.3.5 Modern 10, 1.3.6 Square serif 10, 1.3.7 Sans Serif 10,1.3.8 Script/Cursive 11, 1.3.9 Display/Decorative 111.4 Setting type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.5 Today . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.6 Setting maths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 The Parts of a Book 172.1 front matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.1.1 Copyright page 182.2 Main matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.3 Back matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.4 Signatures and casting off . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.5 Paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 The page 273.1 The shape of a book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.1.1 The golden section and Fibonacci series 303.2 The spread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.2.1 A geometric construction 453.3 The typeblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453.3.1 Page color 48, 3.3.2 Legibility 49, 3.3.3 Selecting a typeface 52, 3.3.4 Wid-ows and orphans 52, 3.3.5 Paragraphs and versals 53, 3.3.6 Footnotes 543.4 Folios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543.5 Headers and footers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553.6 Electronic books . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 Styling the elements 594.1 Front matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.1.1 Title pages 59, 4.1.2 Copyright page 59, 4.1.3 Dedication 60, 4.1.4 Fore-word and preface 60, 4.1.5 Acknowledgements 60, 4.1.6 Contents and illustra-tion lists 60, 4.1.7 Introduction 60, 4.1.8 Part title page 604.2 Main matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604.2.1 Chapter openings 60, 4.2.2 Mixed portrait and landscape pages 61,4.2.3 Extracts 61, 4.2.4 Footnotes and endnotes 624.3 Back matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634.3.1 Appendices 63, 4.3.2 Endnotes 64, 4.3.3 Bibliography 64, 4.3.4 Glos-sary 64, 4.3.5 Index 644.4 Type size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644.5 Poems and plays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654.5.1 Poetry 65, 4.5.2 Plays 655 Picky points 675.1 Word and line spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.2 Letterspacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.3 Abbreviations and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . 705.4 Dashes and ellipses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70CONTENTS xi5.5 Punctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715.5.1 Quotation marks 71, 5.5.2 Footnote marks 72, 5.5.3 Font changes 725.6 Narrow measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735.7 Emphasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.8 Captions and legends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745.9 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 755.10 Number formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75II Practice 776 Starting o 796.1 Stock paper size options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796.2 Type size options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806.2.1 Extended font sizes 816.3 Printing options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826.4 Other options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826.5 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 837 Laying out the page 857.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857.2 Stock material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857.3 The page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867.4 The typeblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917.5 Headers, footers and marginal notes . . . . . . . . . . . . . . . . . . . . . 967.6 Putting it together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977.7 Side margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017.8 Printing and viewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017.9 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027.9.1 The page layout of this manual 1037.10 Predened layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1058 Text and fonts 1098.1 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098.2 Font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1188.3 Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1238.3.1 Paragraphs 123, 8.3.2 Double spacing 1248.4 Overfull lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1258.5 Sloppybottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1269 Titles 1299.1 Styling the titling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1309.2 Styling the thanks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13610 Abstracts 13910.1 Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13910.2 One column abstracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141xii CONTENTS11 Document divisions 14311.1 Logical divisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14311.2 Sectional divisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14411.2.1 Appendices 14511.3 Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14611.4 Book and part headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14711.4.1 Leadpage 14911.5 Chapter headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15011.5.1 Dening a chapter style 152, 11.5.2 Further chapterstyles 158,11.5.3 Chappell 169, 11.5.4 Demo, Demo2 and demo3 170, 11.5.5 Peder-sen 170, 11.5.6 Southall 171, 11.5.7 Veelo 172, 11.5.8 Chapter precis 17311.6 Lower level headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17411.7 Fancy anonymous breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17911.8 Footnotes in division headings . . . . . . . . . . . . . . . . . . . . . . . . 18111.9 Predened heading styles . . . . . . . . . . . . . . . . . . . . . . . . . . . 18212 Pagination and headers 18512.1 Pagination and folios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18512.2 Page styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18612.3 Making headers and footers . . . . . . . . . . . . . . . . . . . . . . . . . . 18812.3.1 Example pagestyles 191, 12.3.2 Index headers 195, 12.3.3 Floatpages 19612.4 The showlocs pagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19813 Paragraphs and lists 19913.1 Paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19913.1.1 Block paragraph 199, 13.1.2 Hanging paragraphs 20013.2 Flush and ragged . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20113.3 Quotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20213.4 Some less common paragraph shapes . . . . . . . . . . . . . . . . . . . . 20313.4.1 Last line not short 204, 13.4.2 Russian typography 204, 13.4.3 Fill withrules 205, 13.4.4 Some ragged paragraphs 205, 13.4.5 Left spring right 20713.5 Changing the textwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20713.6 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20914 Contents lists 21714.1 General ToC methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21714.2 The class ToC methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22214.2.1 Changing the titles 223, 14.2.2 Typesetting the entries 224, 14.2.3 Ex-ample: No section number 232, 14.2.4 Example: Multicolumn entries 232,14.2.5 Example: Multiple contents 23314.3 New List of. . . and entries . . . . . . . . . . . . . . . . . . . . . . . . . . 23614.3.1 Example: plates 23914.4 Chapter precis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24014.5 Contents lists and bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . 24115 Floats and captions 243CONTENTS xiii15.1 New oat environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24315.2 Setting off a oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24415.3 Multiple oats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24615.4 Where LaTeX puts oats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25015.5 Captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25515.6 Caption styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25515.7 Continuation captions and legends . . . . . . . . . . . . . . . . . . . . . . 25915.8 Bilingual captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26415.9 Subcaptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26615.10 Side captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27015.10.1 Tweaks 27115.11 How LaTeX makes captions . . . . . . . . . . . . . . . . . . . . . . . . . . 27315.12 Footnotes in captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27616 Rows and columns 27916.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27916.2 The preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27916.2.1 D column speciers 281, 16.2.2 Dening new column speciers 283,16.2.3 Surprises 28416.3 The array environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28516.4 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28716.5 Fears rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28916.5.1 Fills 29116.6 Tabular environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29316.6.1 Examples 29316.7 Spaces and rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29616.7.1 Spacing 296, 16.7.2 Special variations on horizontal lines 297,16.7.3 Handling of rules 29816.8 Free tabulars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29816.8.1 Continuous tabulars 299, 16.8.2 Automatic tabulars 30017 Page notes 30317.1 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30317.1.1 A variety of footnotes 304, 17.1.2 Styling 30717.2 Marginal notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31017.3 Side notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31117.4 Sidebars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31318 Decorative text 31718.1 Epigraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31718.2 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31818.3 Epigraphs before chapter headings . . . . . . . . . . . . . . . . . . . . . . 31918.3.1 Epigraphs on book or part pages 32219 Poetry 32319.1 Classy verse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32519.1.1 Indented lines 329, 19.1.2 Numbering 330xiv CONTENTS19.2 Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33019.2.1 Main Poem Title layout parameters 331, 19.2.2 Detailed Poem Title lay-out parameters 33219.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332A Limerick 333, Loves lost 333, Fleas 334, In the beginning 334, Mathemat-ics 335, The Young Lady of Ryde 336, Clementine 336, Mouses Tale 33820 Boxes, verbatims and les 33920.1 Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34020.2 Long comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34420.3 Verbatims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34520.3.1 Boxed verbatims 347, 20.3.2 New verbatims 349, 20.3.3 Example: thelcode environment 35020.4 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35120.4.1 Writing to a le 352, 20.4.2 Reading from a le 353, 20.4.3 Example:endnotes 354, 20.4.4 Example: end oats 355, 20.4.5 Example: questions andanswers 35820.5 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36121 Cross referencing 36321.1 Labels and references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36321.2 Reference by name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36422 Back matter 36722.1 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36722.1.1 BibTex 36922.2 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37022.2.1 Printing an index 370, 22.2.2 Preparing an index 372, 22.2.3 MakeIn-dex 374, 22.2.4 Controlling MakeIndex output 377, 22.2.5 Indexing and thenatbib package 38022.3 Glossaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38022.3.1 Controlling the glossary 38122.4 Endnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38622.4.1 Changing the appearance 38923 Miscellaneous 391In which we talk of many things, but not shoes or ships or sealing wax, nor cabbagesand kings.23.1 Draft documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39123.2 Change marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39123.3 Trim marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39223.4 Sheet numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39323.5 Gatherings or signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39423.6 Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39523.7 Page breaks before lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39523.8 Changing counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39523.9 New new and provide commands . . . . . . . . . . . . . . . . . . . . . . 396CONTENTS xv23.10 Changing macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39723.11 String arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39823.12 Odd/even page checking . . . . . . . . . . . . . . . . . . . . . . . . . . . 39823.13 Moving to another page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39923.14 Number formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40023.14.1 Numeric numbers 400, 23.14.2 Named numbers 401, 23.14.3 Frac-tions 40323.15 An array data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40423.16 Checking the processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40523.16.1 Checking for pdfLaTeX 405, 23.16.2 Checking for etex 406,23.16.3 Checking for XeTeX 40623.17 Leading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40623.18 Minor space adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40723.19 Adding a period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40723.20 Words and phrases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40723.21 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40923.22 Two simple macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40923.23 Vertical centering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40923.24 For package writers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40923.24.1 Emulating packages 409, 23.24.2 Inserting code before and after a le,package or class 41023.25 Heading hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41223.25.1 Documenting LaTeX commands 41324 An example book design 41524.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41524.2 Design requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41524.3 Specifying the page and typeblock . . . . . . . . . . . . . . . . . . . . . . 41624.4 Specifying the sectional titling styles . . . . . . . . . . . . . . . . . . . . . 41824.4.1 The chapter style 418, 24.4.2 Lower level divisions 41824.5 Specifying the pagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41924.6 Captions and the ToC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42024.7 Preamble or package? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42125 An example thesis design 42325.1 Example US thesis typographic requirements . . . . . . . . . . . . . . . . 42325.1.1 General 423, 25.1.2 Preliminary matter 423, 25.1.3 Table of con-tents 425, 25.1.4 Lists 425, 25.1.5 Main text 426, 25.1.6 Backmatter 42625.2 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42725.2.1 Initialisation 427, 25.2.2 Page layout 428, 25.2.3 Page styles 429,25.2.4 The ToC and friends 430, 25.2.5 Chapter styling 431, 25.2.6 Section,etc., styling 432, 25.2.7 Captions 432, 25.2.8 The bibliography 432, 25.2.9 Endnotes 432, 25.2.10 Preliminary headings 433, 25.2.11 Components of the titleand approval pages 433, 25.2.12 The title and approval pages 434, 25.2.13 Thelast bits 43825.3 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43825.4 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439xvi CONTENTSA Packages and macros 443A.1 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443A.2 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444B LaTeX and TeX 447B.1 The TeX process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448B.2 LaTeX les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449B.3 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450B.4 (La)TeX commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451B.5 Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453B.5.1 Numbers 453, B.5.2 Lengths 455B.6 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458C The terrors of errors 463C.1 TeX messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463C.1.1 TeX capacity exceeded 470C.2 LaTeX errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472C.3 LaTeX warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475C.4 Class errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477C.5 Class warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480Notes 483Chapter 1 Historical background . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Chapter 3 The page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Chapter 8 Text and fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484Chapter 22 Back matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485Command summary 487Bibliography 525Index 533Index of rst lines 579List of Figures1.1 Examples of some typographical type-related terms . . . . . . . . . . . . . . 71.2 An example of the Fraktur style of Blackletter types . . . . . . . . . . . . . . 71.3 An example of an Oldstyle Aldine/French type: Palatino . . . . . . . . . . . 81.4 An example of a Transitional type: URW Antiqua . . . . . . . . . . . . . . . 91.5 An example of a Transitional newspaper type: New Century Schoolbook . . 91.6 An example of a Modern type: GFS Didot . . . . . . . . . . . . . . . . . . . . 101.7 An example of a square serif type: Bera Serif . . . . . . . . . . . . . . . . . . 101.8 An example of a sans serif type: Bera Sans . . . . . . . . . . . . . . . . . . . . 111.9 An example of a Script/Cursive Brush type: Brush Script . . . . . . . . . . . 111.10 An example of a Script/Cursive Calligraphic type: Zapf Chancery . . . . . . 111.11 An example of a Display/Decorative type: Cyklop . . . . . . . . . . . . . . . 121.12 The California job case layout . . . . . . . . . . . . . . . . . . . . . . . . . . . 133.1 Some page proportions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.2 Two spreads: Canada, 1992 and England, 1970 . . . . . . . . . . . . . . . . . 343.3 Two spreads: USA, 1909 and England, 1964. . . . . . . . . . . . . . . . . . . . 353.4 Two spreads: France, 1559 and Canada, 1995 . . . . . . . . . . . . . . . . . . 353.5 Two spreads: USA, 1949 and 1990 . . . . . . . . . . . . . . . . . . . . . . . . . 363.6 Two spreads: England, 1908 and USA, 1993 . . . . . . . . . . . . . . . . . . . 373.7 Two spreads: USA, 1931 and England, 1968 . . . . . . . . . . . . . . . . . . . 373.8 Two spreads: USA, 1994 and England, 1988 . . . . . . . . . . . . . . . . . . . 383.9 Title page design based on The Thames and Hudson Manual of Typography (1988) 393.10 Two spreads: Italy, 1523 and 1499 . . . . . . . . . . . . . . . . . . . . . . . . . 403.11 Two spreads: France/Portugal, 1530 and Gutenberg, C15th . . . . . . . . . . 403.12 Two spreads: Persia, 1525 and USA, 1975 . . . . . . . . . . . . . . . . . . . . 413.13 Two spreads: USA, 1952 and England, 1087 . . . . . . . . . . . . . . . . . . . 413.14 Two spreads for ISO page sizes . . . . . . . . . . . . . . . . . . . . . . . . . . 423.15 Two spreads: England, 1973 and LaTeX 10pt book style . . . . . . . . . . . . 423.16 Two spreads: USA, 1967 and England, 1982 . . . . . . . . . . . . . . . . . . . 423.17 Title page design based on Adrian Wilsons The Design of Books . . . . . . . . 443.18 Two spreads: England, 1972 and Switzerland, 1980 . . . . . . . . . . . . . . . 453.19 Two spreads: England, 1969 and USA 1989 . . . . . . . . . . . . . . . . . . . 453.20 The construction of the Gutenberg page design . . . . . . . . . . . . . . . . . 464.1 Portrait and landscape spreads . . . . . . . . . . . . . . . . . . . . . . . . . . 61xviixviii LIST OF FIGURES4.2 Landscape and portrait spreads . . . . . . . . . . . . . . . . . . . . . . . . . . 614.3 Double landscape spreads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625.1 Interword spacings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685.2 Interline spacings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695.3 Letterspacing: uppercase letters . . . . . . . . . . . . . . . . . . . . . . . . . . 695.4 Letterspacing: small caps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695.5 Quotation marks: top English, bottom American . . . . . . . . . . . . . . . . 715.6 Raggedright text in narrow columns . . . . . . . . . . . . . . . . . . . . . . . 737.1 LaTeX page layout parameters for a recto page . . . . . . . . . . . . . . . . . 867.2 The memoir class page layout parameters for a verso page . . . . . . . . . . 887.3 The memoir class page layout parameters for a recto page . . . . . . . . . . . 897.4 The recto page layout for this manual . . . . . . . . . . . . . . . . . . . . . . 1047.5 Default layout for letterpaper . . . . . . . . . . . . . . . . . . . . . . . . . . . 1067.6 Letterpaper layout: Left \medievalpage, Right \medievalpage[12] . . . 1067.7 Letterpaper layout: Left \isopage, Right \isopage[12] . . . . . . . . . . . 1067.8 Letterpaper layout: Left \semiisopage, Right \semiisopage[12] . . . . 1067.9 Default layout for a4paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077.10 A4paper layout: Left \medievalpage, Right \medievalpage[12] . . . . . 1077.11 A4paper layout: Left \isopage, Right \isopage[12] . . . . . . . . . . . . 1077.12 A4paper layout: Left \semiisopage, Right \semiisopage[12] . . . . . . 1079.1 Example of a mandated title page style for a doctoral thesis . . . . . . . . . . 1319.2 Example of a Victorian title page . . . . . . . . . . . . . . . . . . . . . . . . . 13211.1 Class layout parameters for chapter titles . . . . . . . . . . . . . . . . . . . . 15111.2 The default chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15311.3 The section chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15411.4 The hangnum chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15411.5 The companion chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15511.6 The article chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15511.7 The bianchi chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15911.8 The bringhurst chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15911.9 The brotherton chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16011.10 The chappell chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16011.11 The crosshead chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16111.12 The culver chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16111.13 The dash chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16111.14 The demo2 chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16211.15 The dowding chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16311.16 The ell chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16311.17 The ger chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16411.18 The komalike chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16411.19 The lyhne chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16511.20 The madsen chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16511.21 The ntglike chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166LIST OF FIGURES xix11.22 The southall chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16611.23 The tandh chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16711.24 The thatcher chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16711.25 The veelo chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16811.26 The verville chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16811.27 The wilsondob chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16911.28 Displayed sectional headings . . . . . . . . . . . . . . . . . . . . . . . . . . . 17511.29 Run-in sectional headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17512.1 Header and footer slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18913.1 Paragraphing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19913.2 The layout parameters for general lists . . . . . . . . . . . . . . . . . . . . . . 21314.1 Example extracts from toc, lof and lot les . . . . . . . . . . . . . . . . . . 21814.2 Layout of a ToC (LoF, LoT) entry . . . . . . . . . . . . . . . . . . . . . . . . . 21915.1 Example framed gure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24515.2 Example framed gure and caption . . . . . . . . . . . . . . . . . . . . . . . . 24515.3 Example ruled gure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24615.4 Example ruled gure and caption . . . . . . . . . . . . . . . . . . . . . . . . . 24615.5 Example oat with two illustrations . . . . . . . . . . . . . . . . . . . . . . . 24615.6 Graphic 1 in a oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24715.7 Graphic 2 in same oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24715.8 Left center aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24815.9 Right gure. This has more text than the adjacent caption (15.8) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24815.10 Left top aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24915.11 Right gure. This has more text than the adjacent caption (15.10) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24915.12 Left bottom aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24915.13 Right gure. This has more text than the adjacent caption (15.12) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24915.14 Float and text page parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 25115.15 Float parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25215.16 Long \bitwonumcaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26515.16 Lang \bitwonumcaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26515.17 Long English \bionenumcaption . . . . . . . . . . . . . . . . . . . . . . . . 265Lang Deutsch \bionenumcaption . . . . . . . . . . . . . . . . . . . . . . . . 26515.18 Short English \bicaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26615.19 Figure with two subgures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269(a) Subgure 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269(b) Subgure 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26915.20 A picture is worth a thousand words . . . . . . . . . . . . . . . . . . . . . . . 27515.21 A different kind of gure caption . . . . . . . . . . . . . . . . . . . . . . . . . 27616.1 Example of a regular tabular . . . . . . . . . . . . . . . . . . . . . . . . . . . 294xx LIST OF FIGURES16.2 Example tabularx and tabular* with widths of 250pt . . . . . . . . . . . 29416.3 Example tabularx and tabular* with widths of 300pt . . . . . . . . . . . 29416.4 Changing the width of a row ordered table . . . . . . . . . . . . . . . . . . . 30116.5 Changing the width of a column ordered table . . . . . . . . . . . . . . . . . 30217.1 Footnote layout parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30722.1 Rawindexing: (left) index commands in the source text; (right) idx le entries 37522.2 Processed index: (left) alphabeticized ind le; (right) typeset index . . . . . 37622.3 Example endnote listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38825.1 Example Archibald Smythe University title page . . . . . . . . . . . . . . . . 43525.2 Example Archibald Smythe University approval page . . . . . . . . . . . . . 436List of Tables1 Traditional font size designations . . . . . . . . . . . . . . . . . . . . . . . . . xxxvi2 Printers units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxvi1.1 A rational typeface categorization system . . . . . . . . . . . . . . . . . . . . 62.1 Front matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.2 Common signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3 Some American paper sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.4 Some traditional British book paper sizes . . . . . . . . . . . . . . . . . . . . 222.5 Metric book paper sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.6 Common American commercial paper sizes . . . . . . . . . . . . . . . . . . . 223.1 Some page designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2 Average characters per line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474.1 Some relative type sizes for elements of books . . . . . . . . . . . . . . . . . 656.1 Class stock metric paper size options, and commands . . . . . . . . . . . . . 796.2 Class stock US paper size options, and commands . . . . . . . . . . . . . . . 806.3 Class stock British paper size options, and commands . . . . . . . . . . . . . 807.1 Arguments and results for \settrimmedsize and \settypeblocksize . 907.2 Lowercase alphabet lengths, in points, for various fonts . . . . . . . . . . . . 927.3 Arguments and results for \setlrmargins . . . . . . . . . . . . . . . . . . 937.4 Arguments and results for \setlrmarginsandblock . . . . . . . . . . . . 947.5 Arguments and results for \setulmargins . . . . . . . . . . . . . . . . . . 957.6 Arguments and results for \setulmarginsandblock . . . . . . . . . . . . 967.7 Arguments and results for \setheaderspaces . . . . . . . . . . . . . . . . 977.8 The class and LaTeX page layout parameters . . . . . . . . . . . . . . . . . . 997.9 Results from sample \textheight adjustments . . . . . . . . . . . . . . . . 1008.1 Glyphs in the LaTeX supplied Palatino roman font . . . . . . . . . . . . . . . 1108.2 Glyphs in the LaTeX distributed Symbol font . . . . . . . . . . . . . . . . . . 1118.3 Glyphs in the LaTeX distributed Zapf Dingbat font . . . . . . . . . . . . . . . 1128.4 Font categorisation and commands . . . . . . . . . . . . . . . . . . . . . . . . 1158.5 Font declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1168.6 Standard font size declarations . . . . . . . . . . . . . . . . . . . . . . . . . . 119xxixxii LIST OF TABLES8.7 Standard font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1198.8 The memoir class font size declarations . . . . . . . . . . . . . . . . . . . . . . 1198.9 The memoir class font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12011.1 Division levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14711.2 Default display sectioning layout parameter values . . . . . . . . . . . . . . 17411.3 Default run-in sectioning layout parameter values . . . . . . . . . . . . . . . 17511.4 Values for S in section styling macro names. . . . . . . . . . . . . . . . . . . . 17511.5 Default fonts for sectional headings . . . . . . . . . . . . . . . . . . . . . . . . 18211.6 Fonts used by different headstyles . . . . . . . . . . . . . . . . . . . . . . . . 18412.1 The use of \thispagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . 18712.2 Mark macros for page headers . . . . . . . . . . . . . . . . . . . . . . . . . . . 18814.1 Indents and Numwidths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22014.2 Values for X in macros for styling the titles of List of. . . . . . . . . . . . . . . 22314.3 Value of K in macros for styling entries in a List of. . . . . . . . . . . . . . . . 22615.1 Float placement parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25315.2 Float spacing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25315.3 Redesigned table caption style . . . . . . . . . . . . . . . . . . . . . . . . . . . 25815.4 A multi-part table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26015.5 Another table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Legendary table (toc 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261Legendary table (toc 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26115.6 Permitted arguments for some sidecaption related commands . . . . . . . . 27216.1 The array and tabular preamble options. . . . . . . . . . . . . . . . . . . . . . 28016.2 Demonstrating the parts of a table . . . . . . . . . . . . . . . . . . . . . . . . 28716.3 Two views of one table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28816.4 Micawbers law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28916.5 A narrow table split half and half . . . . . . . . . . . . . . . . . . . . . . . . . 28916.6 Example table with lls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29216.7 Example automatic row ordered table . . . . . . . . . . . . . . . . . . . . . . 30017.1 Some footnote text styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30922.1 MakeIndex conguration le input parameters . . . . . . . . . . . . . . . . . 37522.2 MakeIndex conguration le output parameters . . . . . . . . . . . . . . . . 37823.1 Dened words and phrases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408B.1 Some internal macros for numbers . . . . . . . . . . . . . . . . . . . . . . . . 454List of typeset examples8.1 Badly mixed fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1168.2 Sometimes mixed fonts work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1178.3 Emphasis upon emphasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1189.1 Example \maketitle title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13311.1 A variety of subhead styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17813.1 Setting the source of a quotation . . . . . . . . . . . . . . . . . . . . . . . . . . 20213.2 Paragraphs line not too short . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20413.3 Rules for spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20513.4 Ragged paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20613.5 A sprung paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20713.6 Smallcap quote style description list . . . . . . . . . . . . . . . . . . . . . . . . 21113.7 Changing space before and after lists . . . . . . . . . . . . . . . . . . . . . . . . 21516.1 Tabular with narrow and wide headings . . . . . . . . . . . . . . . . . . . . . . 28319.1 Phantom text in verse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32819.2 Verse with regular quote marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 32919.3 Verse with hanging left quote marks . . . . . . . . . . . . . . . . . . . . . . . . 32921.1 Named references should be to titled elements . . . . . . . . . . . . . . . . . . 36521.2 Current title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36623.1 TeXs minimum number in words (English style) . . . . . . . . . . . . . . . . . 40223.2 TeXs maximum number in words (American style) . . . . . . . . . . . . . . . 40323.3 Varieties of fractions in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40423.4 Super- and subscripts in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404xxiiiPrefaceFrom personal experience and also from lurking on the comp.text.tex newsgroup themajor problems with using LaTeX are related to document design. Some years ago mostquestions on ctt were answered by someone providing a piece of code that solved a par-ticular problem, and again and again. More recently these questions are answered alongthe lines of Use the package, and again and again.I have used many of the more common of these packages but my ling system is notalways well ordered and I tend to mislay the various user manuals, even for the packages Ihave written. The memoir class is an attempt to integrate some of the more design-relatedpackages with the LaTeX book class. I chose the book class as the report class is virtuallyidentical to book, except that book does not have an abstract environment while reportdoes; however it is easy to fake an abstract if it is needed. With a little bit of tweaking,book class documents can be made to look just like article class documents, and the memoirclass is designed with tweaking very much in mind.The memoir class effectively incorporates the facilties that are usually accessed by us-ing external packages. In most cases the class code is new code reimplementing packagefunctionalities. The exceptions tend to be where I have cut and pasted code from someof my packages. I could not have written the memoir class without the excellent workpresented by the implementors of LaTeX and its many packages.Apart from packages that I happen to have written I have gained many ideas fromthe other packages listed in the Bibliography. One way or another their authors have allcontributed, albeit unknowingly. The participants in the comp.text.tex newsgroup havealso provided valuable input, partly by questioning how to do something in LaTeX, andpartly by providing answers. It is a friendly and educational forum.PETER WILSONSeattle, WAJune 2001xxvIntroduction to the seventh editionThe memoir class and this manual have seen many changes since they rst saw the light ofday. The major functions, and extensions to them, were listed in the various introductionsto the previous editions of this manual and it would now be tedious to read them.The memoir class was rst released in 2001 and since then has proven to be reasonablypopular. The class can be used as a replacement for the book and report classes, by defaultgenerating documents virtually indistinguisable from ones produced by those classes. Theclass includes some options to produce documents with other appearances; for example anarticle class look or one that looks as though the document was produced on a typewriterwith a single font, double spacing, no hyphenation, and so on. In the following I use theterm standard class to denote the book and report classes and, when appropriate, thearticle class as well.The memoir class includes the functionality of many packages, for instance the tocloftpackage for controlling the table of contents or methods similar to the fancyhdr packagefor designing your own headers. The built-in package functions are mainly related todocument design and layout; memoir does not touch upon areas like those that are coveredby the babel or hyperref packages or any related to typesetting mathematics. On the otherhand it is easy to congure a work produced with memoir to meet a universitys thesislayout requirements.memoir has improved substantially since it was rst released over 50 LaTeXers haveprovided code or suggestions for improvements. The class is included in the TeX UsersGroup TeX distributions and the latest version of the class and its supporting documenta-tion is always available from CTAN at latex/contrib/memoir.This is not a guide to the general use of LaTeX but rather concentrates on where thememoir class differs from the standard LaTeX book and report classes. There are othersources that deal with LaTeX in general, some of which are noted later. I assume that youhave already used LaTeX and therefore know how to prepare a LaTeX manuscript, how torun LaTeX and print the resulting document, and that you can also use auxiliary programslike MakeIndex and BibTeX.GENERAL CONSIDERATIONSThe class is a large one consisting of about 10,000 lines of LaTeX code documented in a400 page report; there is no need for most users to look at this [Wil07b]. However if youwant to see exactly how some part, or all of, memoir is dened it is there for you to peruse.The document you are now reading is the separate comprehensive User Manual [Wil07c]which runs to about 500 pages, and from time to time an Addendum [Wil07d] is releasednoting extensions to the class. Again, if you want to see how something was done in thisxxviixxviii INTRODUCTION TO THE SEVENTH EDITIONManual, which of course was prepared using memoir itself, the source is available for youto read. There is also the memexsupp package by Lars Madsen [Mad07] which providessome extra facilities for the class.The rst part of this Manual discusses some aspects of book design and typographyin general, something that I havent come across in the usual LaTeX books and manuals.This is intended to provide a little background for when you design your own printeddocuments.The second, and by far the longer part, describes the capabilities of memoir and how touse them. This manual is not a LaTeX tutorial; I assume that you already know the basics.If you dont then there are several free tutorials available. In some instances I show youthe internal code for the class which may involve LaTeX commands that you wont comeacross in the tutorials and also sometimes basic TeX commands. Information on these, ifyou want it, is obtained fromreading the LaTeXsource itself and the TeXbook, and perhapsone of the free TeX manuals such as TeX for the Impatient [AHK90] or TeX by Topic [Eij92].CLASS OPTIONSThe standard classes provide point options of 10, 11, or 12 points for the main body font.memoir extends this by also providing a 9 point option, and options ranging from 14 to60 points. The width of the text block is automatically adjusted according to the selectedpoint size to try and keep within generally accepted typographical limits for line lengths;you can override this if you wish. The class also provides easy methods for specifying thepage layout parameters such as the margins both the side margins and those at the topand bottom of the page; the methods are similar to those of the geometry package.The page layout facilities also include methods, like those provided by the fancyhdrpackage, for dening your own header and footer styles, and you can have as many differ-ent ones as you wish. In fact the class provides seven styles to choose from before havingto create your own if none of the built-in styles suit you.Sometimes it is useful, or even required, to place trimming marks on each page show-ing the desired size of the nal page with respect to the sheet of paper that is used in theprinter. This is provided by the showtrims option. A variety of trim marks are providedand you can dene your own if you need some other kind.SECTIONING STYLESHandles are provided for designing and using your own styles for chapter titles and such.The class comes with over 20 predened chapter styles ranging from the default look toa style that mimics that used in the Companion series of LaTeX books. There are even acouple which use words instead of numerals for chapter numbers.For those who like putting quotations near chapter titles the epigraph environmentcan be used.The options for changing \section and lower level titles are more constrained, butgenerally speaking document design, unless for advertisements or other eye-catchingephemera, should be constrained. The class does provide 9 integrated sets of sectionalheading styles instead of the usual single set.Sometimes, but particularly in novels, a sectional division is indicated by just leaving ablank line or two between a pair of paragraphs, or there might be some decorative itemlikeCAPTIONS xxixthree or four asterisks, or a euron or two. (A euron is a printers ornament looking like aleaf, such as v or .) Commands are available for typesetting such anonymous divisions.In the standard classes the sectioning commands have an optional argument whichcan be used to put a short version of the section title into the table of contents and thepage header. memoir extends this with a second optional argument so you can specify oneshort version for the contents and an even shorter one for page headers where space is ata premium.CAPTIONSmemoir incorporates the code from my ccaption package which lets you easily modifythe appearance of gure and table captions; bilingual captions are available if required,as are captions placed at the side of a gure or table or continuation captions from, say,one illustration to another. Captioning can also be applied to non-oating illustrationsor as legends (i.e., unnumbered captions) to the regular oats. The captioning system alsosupports subgures and subtables along the lines of the subg package, plus letting youdene your own new kinds of oats together with the corresponding List of. . . .TABLESCode from the array, dcolumn, delarray and tabularx packges is integrated within the class.To improve the appearance of rules in tabular material the booktabs package is also in-cluded.Multipage tabulations are often set with the longtable or xtab packages, which can ofcourse be used with the class. For simple tabulations that may continue from one pageto the next, memoir offers a continuous tabular environment. This doesnt have all theexibility provided by the packages but can often serve instead of using them.More interestingly, but more limited, the class provides automatic tabulars. For theseyou provide a list of simple entries, like a set of names, and a number of columns and theentries are automatically put into the appropriate column. You choose whether the entriesshould be added row-by-row, like this with the \autorows command:\autorows{c}{5}{l}{one, two, three, four,five, six, seven, eight, nine, ten,eleven, twelve, thirteen }one two three four vesix seven eight nine teneleven twelve thirteenOr if you use the \autocols command the entries are listed column-by-column, likethis :\autocols{c}{5}{l}{one, two, three, four,five, six, seven, eight, nine, ten,eleven, twelve, thirteen }one four seven ten thirteentwo ve eight eleventhree six nine twelvexxx INTRODUCTION TO THE SEVENTH EDITIONVERSEThe standard classes provide a very simple verse environment for typesetting poetry.This is greatly extended in memoir. For example in the standard classes the verse stanzasare at a xed indentation from the left margin whereas memoir lets you control the amountof indentation so that you can make a poemappear optically centered within the textwidth.Stanzas may be numbered, as can individual lines within a poem. There is a specialenvironment for stanzas where lines are alternately indented. Also you can dene anindentation pattern for stanzas when this is not regular as, for example, in a limerick wherethe 3rd and 4th of the ve lines are indented with respect to the other three as shown below.\indentpattern{00110}\begin{verse}\begin{patverse}There was a young man of Quebec \\Who was frozen in snow to his neck. \\When asked: Are you friz? \\He replied: Yes, I is, \\But we dont call this cold in Quebec.\end{patverse}\end{verse}There was a young man of QuebecWho was frozen in snow to his neck.When asked: Are you friz?He replied: Yes, I is,But we dont call this cold in Quebec.It is not always possible to t a line into the available space and you can specify the par-ticular indentation to be used when a logical verse line spills over the available textwidth,thus forming two or more typeset physical lines. On other occasions where there are twohalf lines the poet might want the second half line to start where the rst one nished, likethis:\begin{verse}Come away with me. \\\vinphantom{Come away with me.} Impossible!\end{verse}Come away with me.Impossible!END MATTERNormally appendices come after the main body of a book. The class provides variousmethods for introducing appendices at the end, or you can place one or more appendicesat the end of selected chapters if that suits you better.memoir also lets you have more than one index and an index can be set in either thenormal double column style or as a single column which would be more appropriate, say,MISCELLANEOUS xxxifor an index of rst lines in a book of poetry. The titles of any bibliography or indexes areadded to the table of contents, but you can prevent this if you wish.The class provides a set of tools for making glossaries or lists of symbols, the appear-ance of which can, of course, be easily altered. The MakeIndex program is used to sort theentries. Also, the class provides congurable end notes which can be used as well as, orinstead of, footnotes.MISCELLANEOUSHooks and macros are provided for most aspects of document layout; for instance, foot-notes can be as normal, typeset in two or three columns, or all run into a single paragraph.There is a \sidepar macro which is a non-oating \marginpar as well as the \sidebarmacro for typesetting sidebars in the margin, starting at the top of the text block. Youcan create new verbatim-like environments, read and write information in external les,design your own style of \maketitle, convert numbers to words, reserve space at thebottom of a page, and so on and so forth.PACKAGESMost packages work with the memoir class, the main exception being the hyperref package.This package modies many of the internals of the standard classes but does not cater forall of the differences between memoir and the standard ones. If you wish to use hyperrefwith memoir then you must use the memhxc package1after using hyperref. For examplelike:\documentclass[...]{memoir}...\usepackage[...]{hyperref}\usepackage{memhfixc}...\begin{document}However, if you have a version of hyperref dated 2006/11/15 or after, hyperref will auto-matically call in memhxc so that you dont have to do anything.The memoir class includes code either equivalent to, or extensions of, the followingpackages; that is, the set of commands and environments is at least the same as those inthe packages: abstract, appendix, array, booktabs, ccaption, chngcntr, chngpage, dcolumn,delarray, enumerate, epigraph, framed, ifmtarg, ifpdf, index, makeidx, moreverb, needspace,newle, nextpage, parskip, patchcmd, setspace, shortvrb, showidx, tabularx, titleref, titling,tocbibind, tocloft, verbatim, verse. The class automatically ignores any \usepackage or\RequirePackage related to these. However, if you want to specically use one of thesepackages rather than the integrated version then you can do so. For arguments sake, as-suming you really want to use the titling the package you can do this:\documentclass[...]{memoir}\DisemulatePackage{titling}\usepackage{titling}1memhxc is supplied as part of the memoir distribution.xxxii INTRODUCTION TO THE SEVENTH EDITIONThe memoir class incorporates a version of the setspace package, albeit using differentnames for the macros. The package enables documents to be set double spaced but leavessome document elements, like captions for example, single spaced. To do this it has tomake some assumptions about how the document class works. I felt that this kind ofcapability should be part of the class and not depend on assumptions. In the particularcase of the setspace package, even with the standard classes, there can be some unexpectedspacing around displayed material; this has not occured with memoirs implementation.The class also provides functions similar to those provided by the following packages,although the commands are different: crop, fancyhdr, geometry, sidecap, subgure, titlesec.You can use these packages if you wish, or just use the capabilities of the memoir class.RESOURCESScattered throughout, but mainly in Part I, are comments about aspects of book designand typography, in some cases accompanied by examples of better and poorer practice.If you want more authorative remarks there are several books on the subject listed in theBibliography; I prefer Bringhursts The Elements of Typographic Style [Bri99].LaTeX is based on the TeX program which was designed principally for typesettingdocuments containing a lot of mathematics. In such works the mathematics breaks up theow of the text on the page, and the vertical space required for displayed mathematicsis highly dependent on the mathematical particularities. Most non-technical books aretypeset on a xed grid as they do not have arbitrary insertions into the text; it is thesekinds of publications that typographers are most comfortable talking about.There are other sources that deal with LaTeX in general, some of which are listed in theBibliography. Lamport [Lam94] is of course the original user manual for LaTeX, while theCompanion series [MG+04, GM+07, GR99] go into further details and auxiliary programs.George Grtzers Math into LaTeX is valuable if you typeset a lot of mathematics withexcellent coverage of the American Mathematical Societys packages.The Comprehensive TeX Archive Network (CTAN) is an invaluable source of free in-formation and of the LaTeX system itself. For general questions see the FAQ (FrequentlyAsked Questions, and answers) maintained by Robin Fairbairns [FAQ], which also haspointers to many information sources. Among these are The Not So Short Introduction toLaTeX2e [Oet], Keith Reckdahls Using imported graphics in LaTeX2e [Rec97] and Piet vanOostrums Page layout in LaTeX [Oos96]. Peter Flynns Formatting information [Fly98] isunique in that it describes how to install a LaTeX system and editors for writing your doc-uments as well as how to use LaTeX. There are a myriad of packages and software toolsfreely available to enhance any LaTeX system; the great majority of these are listed in Gra-ham Williams magnicent on line searchable catalogue [Wil00], which also links directlyto CTAN. This is just one of the services offered by the TeX Users Group (TUG) and infor-mation on how to access it is available at http://www.tug.org which is the homepagefor the TeX Users Group.The most recent crops of messages on the comp.text.tex newsgroup (CTT) show anincreasing interest in using a wider range of fonts with LaTeX. This is a question that I haveleft alone. Alan Hoenigs book [Hoe98] is the best guide to this that I know of. CTAN hostsPhilipp Lehmans font installation guide [Leh04]; this is well worth looking at just as anexample of ne typesetting.TYPE CONVENTIONS xxxiiiThe source code for the memoir class is, of course, freely available from CTAN if youwish to see exactly what it does and how it does it.For a more interactive resource you can ask questions on the comp.text.tex news-group. If you are a newcomer to CTT please read the FAQ [FAQ] before asking a question,and also read a few days worth of messages to check that your question hasnt just beenanswered.TYPE CONVENTIONSThe following conventions are used: The names of LaTeX classes and packages are typeset in this font. Class options are typeset in this font. The names of chapterstyles and pagestyles are typeset in this font. LaTeX code is typeset in this font. The names of programs are in this font.Macro command syntax is enclosed in a rectangular box.For referential purposes, arguments are denoted by 'arg`ACKNOWLEDGEMENTSMany people have contributed to the memoir class and this manual in the forms of code,solutions to problems, suggestions for new functions, bringing my attention to errors andinfelicities in the code and manual, and last but not least in simply being encouraging. Iam very grateful to the following for all they have done, whether they knew it or not: PaulAbrahams, William Adams, Tim Arnold, Donald Arseneau, Stephan von Bechtolsheim,Jens Berger, Karl Berry, Ingo Beyritz, Javier Bezos, Stefano Bianchi, Sven Bovin, Alan Bud-den, Ignasi Furi Caldenty, Ezequiel Martn Cmara, David Carlisle, Gustafo Cevolani,Jean-Cme Charpentier, Michael A. Cleverly, Steven Douglas Cochran, Frederic Connes,arko F. Cu cej, Christopher Culver, Iain Dalton, Michael W. Daniels, Michael Downes,Christopher Dutchyn, Thomas Dye, Victor Eijkhout, Roman Eisele, Danie Els, Robin Fair-bairns, Simon Fear, Antnio Ferreira, Kai von Fintel, Ivars Finvers, Ulrike Fischer, MatthewFord, Musa Furber, Daniel Richard G, Ignacio Fernndez Galvn, Gerardo Garcia, RomanoGiannetti, Kheng-Swee Goh, Donald Goodman, Gabriel Guernik, Matthias Haldiman,Kathryn Hargreaves, Sven Hartrumpf, hazydirk, Carsten Heinz, Florence Henry, PeterHeslin, Timo Hoenig, Morton Hgholm, Henrik Holm, Vladimir Ivanovich, Martin Jr-gensen, Stefan Kahrs, Christian Keil, Marcus Kohm, Flavian Lambert, Jgen Larsen, KevinLin, Matthew Lovell, Daniel Luecking, Anders Lyhne, Lars Hendrik Gam Madsen, LarsMadsen, Vittorio De Martino, Ben McKay, Frank Mittelbach, Wilhelm Mller, Vilar Ca-mara Neto, Rolf Niepraschk, Patrik Nyman, Heiko Oberdiek, Scott Pakin, Adriano Pasco-letti, Paul, Ted Pavlic, Troels Pedersen, Steve Peter, Franois Poulain, Erik Quaeghebeur,Bernd Raichle, Martin Reinders, Aaron Rendahl, Ren, Alan Ristow, Robert, Chris Rowley,Robert Schlicht, Doug Schenck, Dirk Schlimm, Arnaud Schmittbuhl, Rainer Schpf, PaulStanley, Per Starbck, James Szinger, Jens Taprogge, Ajit Thakkar, Scott Thatcher, ReubenThomas, Bastiaan Niels Veelo, Guy Verville, Emanuele Vicentini, Jrg Vogt, Jrgen Vollmer,M J Williams, and David Wilson.xxxiv INTRODUCTION TO THE SEVENTH EDITIONIf I have inadvertently left anyone off the list I apologise, and please let me know sothat I can correct the omisssion.2Along those lines, if you have any questions please directthem to the comp.text.tex newsgroup instead of directly to me as