583
The Memoir Class

memman

Embed Size (px)

Citation preview

TheMemoirClassThe Memoir ClassforCongurable TypesettingUser GuidePeter WilsonMaintained by Lars MadsenTHPThe Herries Pressc 2001 2010 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 19 18 17 16 15 14 13First 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 2009Eighth edition: August 2009Manual last changed 2010/09/19memoir, 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 xviList of Tables xixList of typeset examples xxiPreface xxiiiIntroduction to the eighth edition xxvRemarks to the user xxxiiiTerminology xxxv1 Starting o 12 Laying out the page 73 Text and fonts 334 Titles 535 Abstracts 676 Document divisions 717 Pagination and headers 1158 Paragraphs and lists 1339 Contents lists 15110 Floats and captions 177viiviii SHORT CONTENTS11 Rows and columns 21312 Page notes 23713 Decorative text 25314 Poetry 25915 Boxes, verbatims and les 27516 Cross referencing 29917 Back matter 30318 Miscellaneous 32919 For package users 35520 An example book design 35921 An example thesis design 367A Packages and macros 387B Sniplets 391C Pictures 395D LaTeX and TeX 415E The terrors of errors 431Notes 451Command summary 453Bibliography 493Index 499Index of rst lines 543ContentsShort contents viiContents ixList of Figures xviList of Tables xixList of typeset examples xxiPreface xxiiiIntroduction to the eighth edition xxvGeneral considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvClass options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviSectioning styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviCaptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiVerse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviiiEnd matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxixMiscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxixPackages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxixResources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxType conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiAcknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiRemarks to the user xxxiiiTerminology xxxvUnits of measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxvi1 Starting o 11.1 Stock paper size options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Type size options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2.1 Extended font sizes 31.3 Printing options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Other options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4ixx CONTENTS1.5 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Laying out the page 72.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Stock material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 The page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4 The typeblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5 Headers, footers and marginal notes . . . . . . . . . . . . . . . . . . . . . 202.6 Putting it together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.7 Side margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.8 Printing and viewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252.9 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262.9.1 The page layout of this manual 272.10 Predened layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Text and fonts 333.1 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333.2 Font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.3 Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.3.1 Paragraphs 47, 3.3.2 Double spacing 483.4 Overfull lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503.5 Sloppybottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 Titles 534.1 Styling the titling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.2 Styling the thanks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 Abstracts 675.1 Styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.2 One column abstracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 Document divisions 716.1 Logical divisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716.2 Sectional divisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726.2.1 Appendices 746.3 Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756.4 Book and part headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756.4.1 Leadpage 786.5 Chapter headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796.5.1 Dening a chapter style 82, 6.5.2 Further chapterstyles 88,6.5.3 Chappell 99, 6.5.4 Demo, Demo2 and demo3 99, 6.5.5 Pedersen 100,6.5.6 Southall 101, 6.5.7 Veelo 101, 6.5.8 Chapter precis 1026.6 Lower level headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046.7 Fancy anonymous breaks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096.8 Footnotes in division headings . . . . . . . . . . . . . . . . . . . . . . . . 1116.9 Predened heading styles . . . . . . . . . . . . . . . . . . . . . . . . . . . 1127 Pagination and headers 115CONTENTS xi7.1 Pagination and folios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1157.2 Page styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167.3 Making headers and footers . . . . . . . . . . . . . . . . . . . . . . . . . . 1197.3.1 Example pagestyles 121, 7.3.2 Index headers 126, 7.3.3 Float pages 1277.4 The showlocs pagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1307.5 Other things to do with page styles . . . . . . . . . . . . . . . . . . . . . . 1308 Paragraphs and lists 1338.1 Paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1338.1.1 Block paragraph 133, 8.1.2 Hanging paragraphs 1348.2 Flush and ragged . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358.3 Quotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1368.4 Some less common paragraph shapes . . . . . . . . . . . . . . . . . . . . 1378.4.1 Last line not short 138, 8.4.2 Russian typography 138, 8.4.3 Fill withrules 139, 8.4.4 Some ragged paragraphs 139, 8.4.5 Left spring right 1418.5 Changing the textwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1418.6 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1439 Contents lists 1519.1 General ToC methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1519.2 The class ToC methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1569.2.1 Changing the titles 157, 9.2.2 Typesetting the entries 159, 9.2.3 Example:No section number 166, 9.2.4 Example: Multicolumn entries 167, 9.2.5 Exam-ple: Multiple contents 1679.3 New List of. . . and entries . . . . . . . . . . . . . . . . . . . . . . . . . . 1709.3.1 Example: plates 1739.4 Chapter precis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1759.5 Contents lists and bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . 17510 Floats and captions 17710.1 New oat environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17710.2 Setting off a oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17810.3 Multiple oats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010.4 Where LaTeX puts oats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18310.5 Captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18910.6 Caption styling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18910.7 Continuation captions and legends . . . . . . . . . . . . . . . . . . . . . . 19310.8 Bilingual captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19810.9 Subcaptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20110.10 Side captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20410.10.1 Tweaks 20610.11 How LaTeX makes captions . . . . . . . . . . . . . . . . . . . . . . . . . . 20810.12 Footnotes in captions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21111 Rows and columns 21311.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21311.2 The preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213xii CONTENTS11.2.1 D column speciers 215, 11.2.2 Dening new column speciers 218,11.2.3 Surprises 21811.3 The array environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21911.4 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22111.5 Fears rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22311.5.1 Fills 22511.6 Tabular environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22711.6.1 Examples 22711.7 Spaces and rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23111.7.1 Spacing 231, 11.7.2 Special variations on horizontal lines 232,11.7.3 Handling of rules 23211.8 Free tabulars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23311.8.1 Continuous tabulars 233, 11.8.2 Automatic tabulars 23412 Page notes 23712.1 Footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23712.1.1 A variety of footnotes 238, 12.1.2 Styling 24012.2 Marginal notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24412.3 Side notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24512.4 Sidebars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24712.5 Side footnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24912.5.1 Bottom aligned side footnotes 249, 12.5.2 Setting the layout for\sidefootnote 249, 12.5.3 Styling \sidefootnote 250, 12.5.4 Side foot-note example 25113 Decorative text 25313.1 Epigraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25313.2 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25413.3 Epigraphs before chapter headings . . . . . . . . . . . . . . . . . . . . . . 25513.3.1 Epigraphs on book or part pages 25814 Poetry 25914.1 Classy verse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26114.1.1 Indented lines 265, 14.1.2 Numbering 26614.2 Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26714.2.1 Main Poem Title layout parameters 268, 14.2.2 Detailed Poem Title lay-out parameters 26814.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269A Limerick 269, Loves lost 270, Fleas 270, In the beginning 271, Mathemat-ics 271, The Young Lady of Ryde 272, Clementine 273, Mouses Tale 27415 Boxes, verbatims and les 27515.1 Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27615.2 Long comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28015.3 Verbatims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28115.3.1 Boxed verbatims 283, 15.3.2 New verbatims 285, 15.3.3 Example: thelcode environment 286CONTENTS xiii15.4 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28715.4.1 Writing to a le 289, 15.4.2 Reading from a le 289, 15.4.3 Example:endnotes 290, 15.4.4 Example: end oats 292, 15.4.5 Example: questions andanswers 29515.5 Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29816 Cross referencing 29916.1 Labels and references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29916.2 Reference by name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30017 Back matter 30317.1 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30317.1.1 BibTex 30517.2 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30617.2.1 Printing an index 306, 17.2.2 Preparing an index 308, 17.2.3 MakeIn-dex 310, 17.2.4 Controlling MakeIndex output 314, 17.2.5 Indexing and thenatbib package 31617.3 Glossaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31717.3.1 Controlling the glossary 31817.4 Endnotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32317.4.1 Changing the appearance 32518 Miscellaneous 329In which we talk of many things, but not shoes or ships or sealing wax, nor cabbagesand kings.18.1 Draft documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32918.2 Change marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32918.3 Trim marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33018.4 Sheet numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33118.5 Gatherings or signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33318.6 Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33418.7 Page breaks before lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33418.8 Changing counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33418.9 New new and provide commands . . . . . . . . . . . . . . . . . . . . . . 33518.10 Changing macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33618.11 String arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33718.12 Odd/even page checking . . . . . . . . . . . . . . . . . . . . . . . . . . . 33818.13 Moving to another page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33818.14 Number formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33918.14.1 Numeric numbers 340, 18.14.2 Named numbers 341, 18.14.3 Frac-tions 34318.15 An array data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34418.16 Checking the processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34518.16.1 Checking for pdfLaTeX 345, 18.16.2 Checking for etex 345,18.16.3 Checking for XeTeX 34518.17 Leading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34618.18 Minor space adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346xiv CONTENTS18.19 Adding a period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34618.20 Words and phrases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34718.21 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34818.22 Two simple macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34818.23 Vertical centering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34818.24 For package writers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34918.24.1 Emulating packages 349, 18.24.2 Inserting code before and after a le,package or class 34918.25 Heading hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35118.26 Documenting LaTeX commands . . . . . . . . . . . . . . . . . . . . . . . . 35319 For package users 35519.1 Class/package name clash . . . . . . . . . . . . . . . . . . . . . . . . . . . 35519.2 Support for bididirectional typesetting . . . . . . . . . . . . . . . . . . . . 35620 An example book design 35920.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35920.2 Design requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35920.3 Specifying the page and typeblock . . . . . . . . . . . . . . . . . . . . . . 36020.4 Specifying the sectional titling styles . . . . . . . . . . . . . . . . . . . . . 36220.4.1 The chapter style 362, 20.4.2 Lower level divisions 36220.5 Specifying the pagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36320.6 Captions and the ToC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36420.7 Preamble or package? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36521 An example thesis design 36721.1 Example US thesis typographic requirements . . . . . . . . . . . . . . . . 36721.1.1 General 367, 21.1.2 Preliminary matter 368, 21.1.3 Table of con-tents 369, 21.1.4 Lists 370, 21.1.5 Main text 370, 21.1.6 Backmatter 37021.2 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37121.2.1 Initialisation 371, 21.2.2 Page layout 372, 21.2.3 Page styles 374,21.2.4 The ToC and friends 374, 21.2.5 Chapter styling 375, 21.2.6 Section,etc., styling 376, 21.2.7 Captions 376, 21.2.8 The bibliography 377, 21.2.9 Endnotes 377, 21.2.10 Preliminary headings 377, 21.2.11 Components of the titleand approval pages 378, 21.2.12 The title and approval pages 379, 21.2.13 Thelast bits 38221.3 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38321.4 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384A Packages and macros 387A.1 Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387A.2 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388B Sniplets 391Sniplet B.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391Sniplet B.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391Sniplet B.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392CONTENTS xvSniplet B.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392Sniplet B.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393C Pictures 395C.1 Basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395C.2 Picture objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397C.2.1 Text 397, C.2.2 Boxes 398, C.2.3 Lines 403, C.2.4 Arrows 405, C.2.5 Cir-cles 405C.3 Repetitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408C.4 Bezier curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411D LaTeX and TeX 415D.1 The TeX process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416D.2 LaTeX les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417D.3 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418D.4 (La)TeX commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419D.5 Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421D.5.1 Numbers 422, D.5.2 Lengths 423D.6 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426E The terrors of errors 431E.1 TeX messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431E.1.1 TeX capacity exceeded 438E.2 LaTeX errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440E.3 LaTeX warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444E.4 Class errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446E.5 Class warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448Notes 451Chapter 3 Text and fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451Chapter 17 Back matter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452Command summary 453Bibliography 493Index 499Index of rst lines 543List of Figures2.1 LaTeX page layout parameters for a recto page . . . . . . . . . . . . . . . . . 82.2 The memoir class page layout parameters for a verso page . . . . . . . . . . 102.3 The memoir class page layout parameters for a recto page . . . . . . . . . . . 112.4 The recto page layout for this manual . . . . . . . . . . . . . . . . . . . . . . 282.5 Default layout for letterpaper . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.6 Letterpaper layout: Left \medievalpage, Right \medievalpage[12] . . . 302.7 Letterpaper layout: Left \isopage, Right \isopage[12] . . . . . . . . . . . 302.8 Letterpaper layout: Left \semiisopage, Right \semiisopage[12] . . . . 302.9 Default layout for a4paper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.10 A4paper layout: Left \medievalpage, Right \medievalpage[12] . . . . . 312.11 A4paper layout: Left \isopage, Right \isopage[12] . . . . . . . . . . . . 312.12 A4paper layout: Left \semiisopage, Right \semiisopage[12] . . . . . . 314.1 Layout of a title page for a book on typography . . . . . . . . . . . . . . . . . 544.2 Example of a mandated title page style for a doctoral thesis . . . . . . . . . . 554.3 Example of a Victorian title page . . . . . . . . . . . . . . . . . . . . . . . . . 564.4 Layout of a title page for a book on book design . . . . . . . . . . . . . . . . 574.5 Layout of a title page for a book about books . . . . . . . . . . . . . . . . . . 586.1 Class layout parameters for chapter titles. Working with\beforechapskip need a little thought, see the text. . . . . . . . . . . . . . 806.2 The default chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.3 The section chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.4 The hangnum chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846.5 The companion chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856.6 The article chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856.7 The bianchi chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886.8 The bringhurst chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896.9 The brotherton chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896.10 The chappell chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906.11 The crosshead chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906.12 The culver chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916.13 The dash chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 916.14 The demo2 chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926.15 The dowding chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92xviLIST OF FIGURES xvii6.16 The ell chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936.17 The ger chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 936.18 The komalike chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946.19 The lyhne chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 946.20 The madsen chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956.21 The ntglike chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956.22 The southall chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966.23 The tandh chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966.24 The thatcher chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976.25 The veelo chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976.26 The verville chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986.27 The wilsondob chapterstyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986.28 Displayed sectional headings . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046.29 Run-in sectional headings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057.1 Header and footer slots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1198.1 Paragraphing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1338.2 The layout parameters for general lists . . . . . . . . . . . . . . . . . . . . . . 1479.1 Example extracts from toc, lof and lot les . . . . . . . . . . . . . . . . . . 1529.2 Layout of a ToC (LoF, LoT) entry . . . . . . . . . . . . . . . . . . . . . . . . . 15310.1 Example framed gure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17910.2 Example framed gure and caption . . . . . . . . . . . . . . . . . . . . . . . . 17910.3 Example ruled gure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18010.4 Example ruled gure and caption . . . . . . . . . . . . . . . . . . . . . . . . . 18010.5 Example oat with two illustrations . . . . . . . . . . . . . . . . . . . . . . . 18010.6 Graphic 1 in a oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18110.7 Graphic 2 in same oat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18110.8 Left center aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18210.9 Right gure. This has more text than the adjacent caption (10.8) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18210.10 Left top aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18310.11 Right gure. This has more text than the adjacent caption (10.10) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18310.12 Left bottom aligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18410.13 Right gure. This has more text than the adjacent caption (10.12) so theheights are unequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18410.14 Float and text page parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 18510.15 Float parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18610.16 Long \bitwonumcaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19910.16 Lang \bitwonumcaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19910.17 Long English \bionenumcaption . . . . . . . . . . . . . . . . . . . . . . . . 199Lang Deutsch \bionenumcaption . . . . . . . . . . . . . . . . . . . . . . . . 19910.18 Short English \bicaption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20010.19 Figure with two subgures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203xviii LIST OF FIGURES(a) Subgure 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203(b) Subgure 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20310.20 A picture is worth a thousand words . . . . . . . . . . . . . . . . . . . . . . . 21010.21 A different kind of gure caption . . . . . . . . . . . . . . . . . . . . . . . . . 21011.1 Example of a regular tabular . . . . . . . . . . . . . . . . . . . . . . . . . . . 22811.2 Example tabularx and tabular* with widths of 250pt . . . . . . . . . . . 22811.3 Example tabularx and tabular* with widths of 300pt . . . . . . . . . . . 22911.4 Changing the width of a row ordered table . . . . . . . . . . . . . . . . . . . 23511.5 Changing the width of a column ordered table . . . . . . . . . . . . . . . . . 23612.1 Footnote layout parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24112.2 Interpretation of the arguments to the \Xmargin commands for specifyingthe side in which to place side note like material. X here equals marginpar,sidepar, sidebar, or sidefoot. . . . . . . . . . . . . . . . . . . . . . . . . 24517.1 Rawindexing: (left) index commands in the source text; (right) idx le entries 31117.2 Processed index: (left) alphabeticized ind le; (right) typeset index . . . . . 31217.3 Example endnote listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32418.1 The four trimmark types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332(a) \trimXmarks (default) . . . . . . . . . . . . . . . . . . . . . . . . . . . 332(b) \trimLmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332(c) \trimFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332(d) \quarkmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33221.1 Example Archibald Smythe University title page . . . . . . . . . . . . . . . . 38021.2 Example Archibald Smythe University approval page . . . . . . . . . . . . . 381C.1 Some points in the cartesian coordinate system . . . . . . . . . . . . . . . . . 396C.2 Specication of a line or arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . 404C.3 Sloping lines and arrows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405C.4 Some measuring scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409C.5 Two Bezier curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412List of Tables1 Traditional font size designations . . . . . . . . . . . . . . . . . . . . . . . . . xxxvi2 Printers units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxvi1.1 Class stock metric paper size options, and commands . . . . . . . . . . . . . 11.2 Class stock US paper size options, and commands . . . . . . . . . . . . . . . 21.3 Class stock British paper size options, and commands . . . . . . . . . . . . . 22.1 Arguments and results for \settrimmedsize and \settypeblocksize . 122.2 Average characters per line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.3 Lowercase alphabet lengths, in points, for various fonts . . . . . . . . . . . . 162.4 Arguments and results for \setlrmargins . . . . . . . . . . . . . . . . . . 172.5 Arguments and results for \setlrmarginsandblock . . . . . . . . . . . . 182.6 Arguments and results for \setulmargins . . . . . . . . . . . . . . . . . . 192.7 Arguments and results for \setulmarginsandblock . . . . . . . . . . . . 202.8 Arguments and results for \setheaderspaces . . . . . . . . . . . . . . . . 212.9 The class and LaTeX page layout parameters . . . . . . . . . . . . . . . . . . 232.10 Results from sample \textheight adjustments . . . . . . . . . . . . . . . . 243.1 Glyphs in the LaTeX supplied Palatino roman font . . . . . . . . . . . . . . . 343.2 Glyphs in the LaTeX distributed Symbol font . . . . . . . . . . . . . . . . . . 353.3 Glyphs in the LaTeX distributed Zapf Dingbat font . . . . . . . . . . . . . . . 363.4 Font categorisation and commands . . . . . . . . . . . . . . . . . . . . . . . . 393.5 Font declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.6 Standard font size declarations . . . . . . . . . . . . . . . . . . . . . . . . . . 433.7 Standard font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.8 The memoir class font size declarations . . . . . . . . . . . . . . . . . . . . . . 433.9 The memoir class font sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446.1 Division levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756.1 Default display sectioning layout parameter values . . . . . . . . . . . . . . 1056.2 Default run-in sectioning layout parameter values . . . . . . . . . . . . . . . 1056.3 Values for S in section styling macro names. . . . . . . . . . . . . . . . . . . . 1056.4 Default fonts for sectional headings . . . . . . . . . . . . . . . . . . . . . . . . 1126.5 Fonts used by different headstyles . . . . . . . . . . . . . . . . . . . . . . . . 1147.1 The use of \thispagestyle . . . . . . . . . . . . . . . . . . . . . . . . . . . 117xixxx LIST OF TABLES7.2 Mark macros for page headers . . . . . . . . . . . . . . . . . . . . . . . . . . . 1189.1 Indents and Numwidths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1549.2 Values for X in macros for styling the titles of List of. . . . . . . . . . . . . . . 1579.3 Value of K in macros for styling entries in a List of. . . . . . . . . . . . . . . . 16010.1 Float placement parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18710.2 Float spacing parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18710.3 Redesigned table caption style . . . . . . . . . . . . . . . . . . . . . . . . . . . 19210.4 A multi-part table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19410.5 Another table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Legendary table (toc 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Legendary table (toc 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19510.6 Permitted arguments for some sidecaption related commands . . . . . . . . 20711.1 The array and tabular preamble options. . . . . . . . . . . . . . . . . . . . . . 21411.2 Demonstrating the parts of a table . . . . . . . . . . . . . . . . . . . . . . . . 22211.3 Two views of one table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22211.4 Micawbers law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22311.5 A narrow table split half and half . . . . . . . . . . . . . . . . . . . . . . . . . 22311.6 Example table with lls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22611.7 Example automatic row ordered table . . . . . . . . . . . . . . . . . . . . . . 23412.1 Some footnote text styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24317.1 MakeIndex conguration le input parameters . . . . . . . . . . . . . . . . . 31117.2 MakeIndex conguration le output parameters . . . . . . . . . . . . . . . . 31518.1 Dened words and phrases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347D.1 Some internal macros for numbers . . . . . . . . . . . . . . . . . . . . . . . . 422List of typeset examples3.1 Badly mixed fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.2 Sometimes mixed fonts work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413.3 Emphasis upon emphasis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424.1 Example \maketitle title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606.1 A variety of subhead styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1088.1 Setting the source of a quotation . . . . . . . . . . . . . . . . . . . . . . . . . . 1378.2 Paragraphs line not too short . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1388.3 Rules for spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1398.4 Ragged paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1408.5 A sprung paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1418.6 Smallcap quote style description list . . . . . . . . . . . . . . . . . . . . . . . . 1458.7 Changing space before and after lists . . . . . . . . . . . . . . . . . . . . . . . . 14911.1 Tabular with narrow and wide headings . . . . . . . . . . . . . . . . . . . . . . 21714.1 Phantom text in verse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26414.2 Verse with regular quote marks . . . . . . . . . . . . . . . . . . . . . . . . . . . 26514.3 Verse with hanging left quote marks . . . . . . . . . . . . . . . . . . . . . . . . 26516.1 Named references should be to titled elements . . . . . . . . . . . . . . . . . . 30116.2 Current title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30218.1 TeXs minimum number in words (English style) . . . . . . . . . . . . . . . . . 34118.2 TeXs maximum number in words (American style) . . . . . . . . . . . . . . . 34218.3 Varieties of fractions in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34318.4 Super- and subscripts in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344C.1 Picture: text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398C.2 Picture: text in boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399C.3 Picture: positioning text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400C.4 Picture: dashed box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400C.5 Picture: framing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401C.6 Picture: stacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402C.7 Picture: saved boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403C.8 Picture: circles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406C.9 Picture: ovals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407C.10 Picture: text in oval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408C.11 Picture: repetitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411xxiPrefaceFrom 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 2001xxiiiIntroduction to the eighth 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 [Wil09b]. 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 releasedChapter last updated 2010/09/19 (revision 275)xxvxxvi INTRODUCTION TO THE EIGHTH EDITIONnoting extensions to the class. Again, if you want to see how something was done in thisManual, 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 previous editions of the Manual consisted of two parts. The rst discussing someaspects of book design and typography in general, something that I hadnt come across inthe usual LaTeX books and manuals. That was intended to provide a little background forwhen you design your own printed documents. The second, and by far the longest part,described the capabilities of memoir and how to use them.The Manual kept growing until it was approaching 700 pages and I decided that it wasbetter to put the original discussion on typography into a separate document [Wil09d],which is independent of memoir, and in this edition concentrate on how to use memoir.This has reduced the size of this document, but it is still large.This manual is not a LaTeX tutorial; I assume that you already know the basics. Ifyou 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.CAPTIONS xxviiThe 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 itemlikethree 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 :xxviii INTRODUCTION TO THE EIGHTH EDITION\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 twelveVERSEThe 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 MATTER xxixEND 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,for 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 or1memhxc is supplied as part of the memoir distribution.xxx INTRODUCTION TO THE EIGHTH EDITION\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}The 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.The class has built in support for the bidi package for bidirectional typesetting [CK09].RESOURCESScattered throughout are comments about aspects of book design and typography, in somecases accompanied by examples of better and poorer practice. If you want more commentsand examples there are some notes on the topic [Wil09d], and for authorative remarksthere are several books on the subject listed in the Bibliography; I prefer Bringhursts TheElements of Typographic Style [Bri99], while Derek Birdsalls notes on book design [Bir04] ismuch more oriented to illustrated works, like museum catalogues and art books.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 directlyTYPE CONVENTIONS xxxito 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.The 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, Pe-ter Heslin, Timo Hoenig, Morten Hgholm, Henrik Holm, Vladimir Ivanovich, MartinJrgensen, Stefan Kahrs, Christian Keil, Marcus Kohm, Flavian Lambert, Jgen Larsen,Kevin Lin, Matthew Lovell, Daniel Luecking, Anders Lyhne, Lars Hendrik Gam Mad-sen, Lars Madsen, Vittorio De Martino, Ben McKay, Frank Mittelbach, Wilhelm Mller,xxxii INTRODUCTION TO THE EIGHTH EDITIONVilar Camara Neto, Rolf Niepraschk, Patrik Nyman, Heiko Oberdiek, Scott Pakin, Adri-ano Pascoletti, Paul, Ted Pavlic, Troels Pedersen, Steve Peter, Franois Poulain, ErikQuaeghebeur, Bernd Raichle, Martin Reinders, Aaron Rendahl, Ren, Alan Ristow, Robert,Chris Rowley, Gary Ruben, Robert Schlicht, Doug Schenck, Dirk Schlimm, Arnaud Schmit-tbuhl, Rainer Schpf, Paul Stanley, Per Starbck, James Szinger, Jens Taprogge, AjitThakkar, Scott Thatcher, Reuben Thomas, Bastiaan Niels Veelo, Guy Verville, EmanueleVicentini, Jrg Vogt, Jrgen Vollmer, M J Williams, and David Wilson.If 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 you are much morelikely to get a satisfactory and timely response.Of course, none of this would have been possible without Donald Knuths TeX systemand the subsequent development of LaTeX by Leslie Lamport.2Peter is currently occasionably reachable via email at herries dot press (at) earthlink dot net,otherwise write the maintainer at daleif+memoir at imf dot au dot dkRemarks to the usermemoir gives you many ways to change the appearance of your document, and also pro-vides some ready-made styles that might be appropriate for your purposes.As you can see, this manual is not slim and attempts to describe in some detail howthe various aspects of memoir work and gives examples of how you can change these tobetter match your needs. However, there are a myriad of different things that users mightwish to do and it is not possible either for the class to provide ready made simple, or evencomplex, methods to directly support these, or for this manual to give examples of howeverything might be accomplished.If many want a particular facility that is not available, then it may be possible to addthat. If it is only one who wishes it then, unless the one is the author, it is unlikely tobe provided. But dont let this stop you from asking, especially if you can provide thenecessary code.The complete documented code for the class is available in the le memoir.dtx. If youwant to know how something is done then you can read the code for all the details. If youwant to do something different, then the code is there for you to look at and experimentwith. You should, though, not change any of the code in the class. If you need to do so,then copy the code you wish to change into the documents preamble or a package of yourown or a class of your own (with a different name) and make the changes there. Do notexpect any help if you change the memoir class code directly.As the years go by support for memoir will devolve fromone person to another.3Thereforeit is probably safer to ask questions, complain, make suggestions, etc., on the newsgroupcalled comp.text.tex, which is archived and read by many, than correspond directlywith the maintainer, who might well be away for some considerable time and perhaps notnotice your email after having returned to base.Then dealing with memoir issues on comp.text.tex, please include the word memoirin the subject. That will help the memoir maintainer keep track of memoir related matters.If you do not have access to comp.text.tex you may also email the current maintainerat daleif+memoir at imf dot au dot dk.From the maintainer: As I do not regularly read LATEX related forums (like www.latex-community.org or tex.stackexchange.com), it will be a good idea to eitherwrite me directly or re-post the question on comp.text.tex if noone comes up with asuitable answer for questions involving memoir.3This is currently (July 2009) happening as Lars Madsen is taking over from Peter Wilson.xxxiiiTerminologyLike all professions and trades, typographers and printers have their specialised vocabu-lary.First there is the question of pages, leaves and sheets. The trimmed sheets of paper thatmake up a book are called leaves, and I will call the untrimmed sheets the stock material. Aleaf has two sides, and a page is one side of a leaf. If you think of a book being opened at,then you can see two leaves. The front of the righthand leaf, is called the recto page of thatleaf, and the side of the lefthand leaf that you see is called the verso page of that leaf. So,a leaf has a recto and a verso page. Recto pages are the odd-numbered pages and versopages are even-numbered.Then there is the question of folios. The typographical term for the number of a pageis folio. This is not to be confused with the same term as used in Shakespeares First Foliowhere the reference is to the height and width of the book, nor to its use in the phrasefolio signature where the term refers to the number of times a printed sheet is folded. Notevery page in a book has a printed folio, and there may be pages that do not have a folio atall. Pages with folios, whether printed or not, form the pagination of the book. Pages thatare not counted in the pagination have no folios.I have not been able to nd what I think is a good denition for type as it seems tobe used in different contexts with different meanings. It appears to be a kind of genericword; for instance there are type designers, type cutters, type setters, type foundries,...For my purposes I propose that type is one or more printable characters (or variations orextensions to this idea). Printers use the term sort to refer to one piece of lead type.A typeface is a set of one or more fonts, in one or more sizes, designed as a stylisticwhole.A font is a set of characters. In the days of metal type and hot lead a font meant a com-plete alphabet and auxiliary characters in a given size. More recently it is taken to meana complete set of characters regardless of size. A font of roman type normally consistsof CAPITAL LETTERS, SMALL CAPITALS, lowercase letters, numbers, punctuation marks,ligatures (such as and f), and a few special symbols like &.A font family is a set of fonts designed to work harmoniously together, such as a pair ofroman and italic fonts.The size of a font is expressed in points (72.27 points equals 1 inch equals 25.4 millime-ters). The size is a rough indication of the height of the tallest character, but different fontswith the same size may have very different actual heights. Traditionally font sizes werereferred to by names (see Table 1) but nowadays just the number of points is used.The typographers and printers term for the vertical space between the lines of normaltext is leading, which is also usually expressed in points and is usually larger than the fontChapter last updated 2010/05/13 (revision 210)xxxvxxxvi TERMINOLOGYTable 1: Traditional font size designationsPoints Na