summaryrefslogtreecommitdiff
path: root/info/beginlatex/html/chapter3.html
blob: a6d8032a41382703eebe174d7f5c00e348ab6769 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "/dtds/html4t.dtd">

<!--Generated from beginlatex.XML.xml with typebook-html.xslt on 2005-04-04T01:02:15--><html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   
      <title>Formatting information: Chapter 3&nbsp;&#8212; Basic document structures</title>
      <link rel="stylesheet" href="typebook.css" type="text/css">
      <meta http-equiv="Content-Style-Type" content="text/css">
   </head>
   <body>
      <table width="100%">
         <tr>
            <th class="title" width="66%">
               <h1><a name="doctitle">Formatting information</a></h1>
               <h2>A beginner's introduction to typesetting with
                  <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></h2>
               <h3>Chapter 3&nbsp;&#8212; Basic document structures</h3>
               <h3>Peter Flynn</h3>
               <h4>Silmaril Consultants<br>Textual Therapy Division
               </h4><br>v. 3.6 (March 2005)
            </th>
            <td class="toc" width="33%">
               <h4><a name="doctoc">Contents</a></h4>
               <dl>
                  <dd class=""><a href="intro.html#intro">Introduction</a></dd>
                  <dd class=""><a href="foreword.html#foreword">Foreword</a></dd>
                  <dd class=""><a href="preface.html#preface">Preface</a></dd>
               </dl>
               <ol>
                  <li class=""><a href="chapter1.html#get">Installing <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></li>
                  <li class=""><a href="chapter2.html#plaintext">Using your editor to create documents</a></li>
                  <li class="current"><a href="chapter3.html#basic">Basic document structures</a></li>
                  <li class=""><a href="chapter4.html#process">Typesetting, viewing and printing</a></li>
                  <li class=""><a href="chapter5.html#ctan">CTAN, packages, and online help</a></li>
                  <li class=""><a href="chapter6.html#otherdoc">Other document structures</a></li>
                  <li class=""><a href="chapter7.html#texttools">Textual tools</a></li>
                  <li class=""><a href="chapter8.html#typo">Fonts and layouts</a></li>
                  <li class=""><a href="chapter9.html#macros">Programmability (macros)</a></li>
                  <li class=""><a href="chapter10.html#compat">Compatibility with other systems</a></li>
               </ol>
               <ol type="A">
                  <li class=""><a href="appendixA.html#cnf">Configuring <span class="TEX">T<span class="E">E</span>X</span> search paths</a></li>
                  <li class=""><a href="appendixB.html#tugform"><span class="TEX">T<span class="E">E</span>X</span> Users Group membership</a></li>
                  <li class=""><a href="appendixC.html#asciicharset">The ASCII character set</a></li>
                  <li class=""><a href="appendixD.html#gfdl">GNU Free Documentation License</a></li>
               </ol>
               <dl>
                  <dd class=""><a href="bibliography.html#biblio">References</a></dd>
                  <dd class=""><a href="index.html#index">Index</a></dd>
               </dl>
            </td>
         </tr>
         <tr>
            <td class="credits">
               <p>This edition of <cite>Formatting
                     	  Information</cite> was prompted by the generous help I
                  	have received from <span class="TEX">T<span class="E">E</span>X</span> users too numerous to mention
                  	individually. Shortly after TUGboat published the November
                  	2003 edition, I was reminded by a spate of email of the
                  	fragility of documentation for a system like <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> which is
                  	constantly under development. There have been revisions to
                  	packages; issues of new distributions, new tools, and new
                  	interfaces; new books and other new documents; corrections to
                  	my own errors; suggestions for rewording; and in one or two
                  	cases mild abuse for having omitted package X which the author
                  	felt to be indispensable to users. &para;&nbsp;I am grateful as always to the people who sent me
                  	corrections and suggestions for improvement. Please keep them
                  	coming: only this way can this book reflect what people
                  	want to learn. The same limitation still applies, however: no
                  	mathematics, as there are already a dozen or more excellent
                  	books on the market&nbsp;&#8212; as well as other online
                  	documents&nbsp;&#8212; dealing with mathematical typesetting in
                  <span class="TEX">T<span class="E">E</span>X</span> and <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> in finer and better detail than I am
                  	capable of. &para;&nbsp;The structure remains the same, but I have revised and
                  	rephrased a lot of material, especially in the earlier
                  	chapters where a new user cannot be expected yet to have
                  	acquired any depth of knowledge. Many of the screenshots have
                  	been updated, and most of the examples and code fragments have
                  	been retested. &para;&nbsp;As I was finishing this edition, I was asked to review
                  	an article for <cite><a href="http://www.tug.org/pracjourn/" name="C3">The Prac<span class="TEX">T<span class="E">E</span>X</span> Journal</a></cite>, which
                  	grew out of the Practical <span class="TEX">T<span class="E">E</span>X</span> Conference in 2004. The
                  	author specifically took the writers of documentation to task
                  	for failing to explain things more clearly, and as I read
                  	more, I found myself agreeing, and resolving to clear up some
                  	specific problems areas as far as possible. It is very
                  	difficult for people who write technical documentation to
                  	remember how they struggled to learn what has now become a
                  	familiar system. So much of what we do is second nature, and a
                  	lot of it actually has nothing to do with the software, but
                  	more with the way in which we view and approach information,
                  	and the general level of knowledge of computing. If I have
                  	obscured something by making unreasonable assumptions about
                  	<em>your</em> knowledge, please let me know so
                  	that I can correct&nbsp;it. 
                  <p>Peter Flynn is author of <cite><a href="bibliography.html#htmlbook" name="C4">The HTML Handbook</a></cite> and <cite><a href="bibliography.html#sgmltools" name="C5">Understanding SGML and XML Tools</a></cite>, and editor of <cite><a href="http://www.ucc.ie/xml/" name="C6">The XML FAQ</a></cite>.
                  </p>
               </p>
            </td>
            <td class="legal">
               <p>
                  <p>This document is Copyright &copy; 1999&#8211;2005 by
                     Silmaril Consultants under the terms of what is now the GNU
                     Free Documentation License (copyleft).
                  </p>
                  <p>Permission is granted to copy, distribute and/or modify
                     this document under the terms of the GNU Free Documentation
                     License, Version 1.2 or any later version published by the
                     Free Software Foundation; with no Invariant Sections, no
                     Front-Cover Texts, and no Back-Cover Texts. A copy of the
                     license is included in the section entitled <cite><a href="http://www.fsf.org/copyleft/fdl.html" name="C1">The GNU Free Documentation License</a></cite>.
                  </p>
                  <p>You are allowed to distribute, reproduce, and modify it
                     without fee or further requirement for consent subject to the
                     conditions in <a href="appendixD.html#gfdl-4">section D.5</a>. The author has
                     asserted his right to be identified as the author of this
                     document. If you make useful modifications you are asked to
                     inform the author so that the master copy can be updated. See
                     the full text of the License in <a href="appendixD.html#gfdl">Appendix D</a>.
                     
                  </p>
               </p>
            </td>
         </tr>
      </table>
      <div class="chapter">
         <table width="100%">
            <tr>
               <td align="center"><small><i class="chaphead"><b><a name="basic">CHAPTER</a></b></i></small><br><table border="1">
                     <tr>
                        <td class="chapno">3</td>
                     </tr>
                  </table>
               </td>
               <td><pre class="spacing"></pre></td>
               <td>
                  <p>&nbsp;</p>
                  <h1>Basic document structures</h1>
               </td>
               <td class="toc">
                  <p>&nbsp;</p>
                  <ol>
                     <li><a href="#docdecl">The Document Class Declaration</a></li>
                     <li><a href="#docenv">The document environment</a></li>
                     <li><a href="#titling">Titling</a></li>
                     <li><a href="#abstracts">Abstracts and summaries</a></li>
                     <li><a href="#sections">Sections</a></li>
                     <li><a href="#paragraphs">Ordinary paragraphs</a></li>
                     <li><a href="#toc">Table of contents</a></li>
                  </ol>
               </td>
               <td align="right"><a href="#doctoc"><img src="top.png" title="Table of Contents" width="32" alt="ToC" align="right" border="0"></a></td>
            </tr>
         </table><a name="I48"></a><p><span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s approach to formatting is to aim for
            consistency. This means that as long as you identify each
            <b><i><a name="element">element</a></i></b> of your document
            correctly, it will be typeset in the same way as all the other
            elements like it, so that you achieve a consistent finish with
            minimum effort. Consistency helps make documents easier to read
            and understand.
         </p>
         <p>Elements are the component parts of a document, all the
            pieces which make up the whole. Almost everyone who reads books,
            newspapers, magazines, reports, articles, and other classes of
            documents will be familiar with the popular structure of
            chapters, sections, subsections, subsubsections, paragraphs,
            lists, tables, figures, and so on, even if they don't
            consciously think about it.
         </p>
         <p>Consistency is also what publishers look for. They have a
            house style, and often a reputation to keep, so they rightly
            insist that if you do something a certain way once, you should
            do it the same way each time.
         </p>
         <p>To help achieve this consistency, every <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> document
            starts by declaring what <b><i><a name="documentclass">document
                     	class</a></i></b> it belongs to.
         </p>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1 <a name="docdecl">The Document Class Declaration</a></h2><a name="I49"></a><p>To tell <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> what class of document you are going to
               	create, you type a special first line into your file which
               	identifies it.<sup><a href="#F21">1</a></sup> To start a report, for
               	example, you would type the <code class="command"><a name="c43">\documentclass</a></code>
               	command like this as your first line:
            </p>
            <blockquote><pre>
\documentclass{report}
      </pre></blockquote>
            <p>There are four built-in classes provided, and many others
               	that you can download (some may already be installed for
               	you):
            </p>
            <blockquote>
               <dl>
                  <dt><b><span class="package"><a name="m13">report</a></span></b></dt>
                  <dd>
                     <p>for business, technical, legal, academic, or
                        	      scientific reports;
                     </p>
                  </dd>
                  <dt><b><span class="package"><a name="m14">article</a></span></b></dt>
                  <dd>
                     <p>for white papers, magazine or journal articles,
                        	      reviews, conference papers, or research notes;
                     </p>
                  </dd>
                  <dt><b><span class="package"><a name="m15">book</a></span></b></dt>
                  <dd>
                     <p>for books and theses;</p>
                  </dd>
                  <dt><b><span class="package"><a name="m16">letter</a></span></b></dt>
                  <dd>
                     <p>for letters.<sup><a href="#F22">2</a></sup></p>
                  </dd>
               </dl>
            </blockquote>
            <p>The <span class="package"><a name="m20">article</a></span> class in particular
               	can be used (some would say &#8216;abused&#8217;) for almost
               	any short piece of typesetting by simply omitting the titling
               	and layout (see below).
            </p>
            <p>The built-in classes are intended as starting-points,
               	especially for drafts and for compatibility when exchanging
               	documents with other <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> users, as they come with every
               	copy of <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> and are therefore guaranteed to format
               	identically everywhere. <em>They are <strong>not</strong> intended as final-format
                  	  publication-quality layouts.</em> For most other
               	purposes, especially for publication, you use 
               	add-in <a href="chapter5.html#packages" title="sect1">packages</a> to extend
               	these classes to do what you need:
            </p>
            <ul>
               <li>
                  <p>The <span class="package"><a name="m21">memoir</a></span> and
                     	    <span class="package"><a name="m22">komascript</a></span> packages contain
                     	    more sophisticated replacements for all the built-in
                     	    classes;
                  </p>
               </li>
               <li>
                  <p>Many academic and scientific publishers provide their
                     	    own special class files for articles and books (often on
                     	    their Web sites for download);
                  </p>
               </li>
               <li>
                  <p>Conference organisers may also provide class files for
                     	    authors to write papers for presentation;
                  </p>
               </li>
               <li>
                  <p>Many universities provide their own thesis document
                     	    class files in order to ensure exact fulfillment of their
                     	    formatting requirements;
                  </p>
               </li>
               <li>
                  <p>Businesses and other organizations can provide their
                     	    users with corporate classes on a central server and
                     	    configure <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> installations to look there first for
                     	    packages, fonts, etc.
                  </p>
               </li>
            </ul>
            <p>Books and journals are not usually printed on office-size
               	paper. Although <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>'s layouts are designed to fit on
               	standard A4 or Letter stationery for draft purposes, it makes
               	them look odd: the margins are too wide, or the positioning is
               	unusual, or the font size is too small, because the finished
               	job will normally be trimmed to a different size
               	entirely&nbsp;&#8212; try trimming the margins of the <small><a href="chapter4.html#PDF" class="acroref" name="A84" title="Portable Document Format">PDF</a></small> version of this book to 185mm by 235mm
               	(the same as <cite><a href="bibliography.html#companion" name="C26">The <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> Companion</a></cite> series)
               	and you'll be amazed at how it changes the appearance!
               	
            </p>
            <ol class="footnotes" start="1">
               <li><a name="F21">Readers familiar with <small><a href="chapter10.html#SGML" class="acroref" name="A81" title="Standard Generalized Markup Language">SGML</a></small>,
                     	    <small><a href="chapter10.html#HTML" class="acroref" name="A82" title="HyperText Markup Language">HTML</a></small>, or <small><a href="chapter10.html#XML" class="acroref" name="A83" title="Extensible Markup Language">XML</a></small> will recognize the concept as
                     	    similar to the Document Type
                     	    Declaration.</a></li>
            </ol>
            <ol class="footnotes" start="2">
               <li><a name="F22">The built-in <span class="package"><a name="m17">letter</a></span>
                     		  class is rather idiosyncratic: there are much better
                     		  ones you can download, such as
                     		  the <span class="package"><a name="m18">memoir</a></span> and
                     		  <span class="package"><a name="m19">komascript</a></span> packages.</a></li>
            </ol>
            <div class="sect2">
               <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.1.1 <a name="doclayout">Document class options</a></h3><a name="I50"></a><p>The default layouts are designed to fit as drafts on US
                  	  Letter size paper.<sup><a href="#F23">3</a></sup> To create documents with the correct proportions
                  	  for standard A4 paper, you need to specify the paper size in
                  	  an optional argument in square brackets before the document
                  	  class name, e.g.
               </p>
               <blockquote><pre>
\documentclass[a4paper]{report}
        </pre></blockquote>
               <p>The two most common options are <span class="option"><a name="o1">a4paper</a></span>
                  	  and <span class="option"><a name="o2">letterpaper</a></span>. However, many European
                  	  distributions of <span class="TEX">T<span class="E">E</span>X</span> now come preset for A4, not Letter, and
                  	  this is also true of all distributions of
                  	  <i><a name="p117">pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span></a></i>.
               </p>
               <p>The other default settings are for:  <i>a</i>)&nbsp;10pt type (all document classes);  <i>b</i>)&nbsp;two-sided printing (books and reports) or
                  		one-sided (articles and letters);  and <i>c</i>)&nbsp;separate title page (books and reports
                  		only). These can be modified with the following
                  	  document class options which you can add in the same set of
                  	  square brackets, separated by commas:
               </p><a name="I51"></a><blockquote>
                  <dl>
                     <dt><b><span class="option"><a name="o3">11pt</a></span></b></dt>
                     <dd>
                        <p>to specify 11pt type (headings, footnotes,
                           		etc.&nbsp;get scaled up or down in
                           		proportion);
                        </p>
                     </dd>
                     <dt><b><span class="option"><a name="o4">12pt</a></span></b></dt>
                     <dd>
                        <p>to specify 12pt type (again, headings
                           		scale);
                        </p>
                     </dd>
                     <dt><b><span class="option"><a name="o5">oneside</a></span></b></dt>
                     <dd>
                        <p>to format one-sided printing for books and
                           		reports;
                        </p>
                     </dd>
                     <dt><b><span class="option"><a name="o6">twoside</a></span></b></dt>
                     <dd>
                        <p>to format articles for two-sided printing;</p>
                     </dd>
                     <dt><b><span class="option"><a name="o7">titlepage</a></span></b></dt>
                     <dd>
                        <p>to force articles to have a separate title
                           		page;
                        </p>
                     </dd>
                     <dt><b><span class="option"><a name="o8">draft</a></span></b></dt>
                     <dd>
                        <p>makes <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> indicate hyphenation and
                           		justification problems with a small square in the
                           		right-hand margin of the problem line so they can be
                           		located quickly by a human.
                        </p>
                     </dd>
                  </dl>
               </blockquote>
               <p>If you were using pdf<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> for a report to be in 12pt
                  type on Letter paper, but printed one-sided in draft mode, you
                  would use:
               </p>
               <blockquote><pre>
\documentclass[12pt,letterpaper,oneside,draft]{report}
	</pre></blockquote>
               <p>There are extra preset options for other type sizes
                  	  which can be downloaded separately, but 10pt, 11pt, and 12pt
                  	  between them cover probably 99% of all document
                  	  typesetting. In addition there are the hundreds of add-in
                  	  packages which can automate other layout and formatting
                  	  variants without you having to program anything by hand or
                  	  even change your text.
               </p>
               <blockquote class="exercise"><a name="firstline"></a><hr>
                  <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 1</i>. Create a new document
                  </h4>
                  <ol type="1">
                     <li>
                        <p>Use your editor to create a new document.</p>
                     </li>
                     <li>
                        <p>Type in a Document Class Declaration as shown
                           		above.
                        </p>
                     </li>
                     <li>
                        <p>Add a font size option if you wish.</p>
                     </li>
                     <li>
                        <p>In North America, omit the
                           		<span class="option"><a name="o9">a4paper</a></span> option or change it to
                           		<span class="option"><a name="o10">letterpaper</a></span>.
                        </p>
                     </li>
                     <li>
                        <p>Save the file (make up a name) ensuring the name
                           		ends with <code>.tex</code></p>
                     </li>
                  </ol>
                  <hr>
               </blockquote>
               <ol class="footnotes" start="3">
                  <li><a name="F23">Letter size is 8&frac12;&#8243;&times;11&#8243;, which is the
                        	      trimmed size of the old Demi Quarto, still in use in
                        	      North America. The other common US office size is
                        	      &#8216;Legal&#8217;, which is
                        	      8&frac12;&#8243;&times;14&#8243;, a bastard cutting close to
                        	      the old Foolscap (8&frac14;&#8243;&times;13&frac14;&#8243;). ISO
                        	      standard &#8216;A&#8217;,
                        	      &#8216;B&#8217;, and
                        	      &#8216;C&#8217; paper sizes are still
                        	      virtually unknown in many parts of North America.</a></li>
               </ol>
            </div>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.2 <a name="docenv">The document environment</a></h2>
            <p>After the Document Class Declaration, the text of your
               	document is enclosed between two commands which identify the
               	beginning and end of the actual document:
            </p>
            <blockquote><pre>
\documentclass[11pt,a4paper,oneside]{report}

\begin{document}
...
\end{document}
      </pre></blockquote>
            <p>(You would put your text where the dots are.) The reason
               	for marking off the beginning of your text is that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>
               	allows you to insert extra setup specifications before it
               	(where the blank line is in the example above: we'll be
               	using this soon). The reason for marking off the end of your
               	text is to provide a place for <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> to be programmed to do
               	extra stuff automatically at the end of the document, like
               	making an index.
            </p>
            <p>A useful side-effect of marking the end of the document
               	text is that you can store comments or temporary text
               	underneath the <code class="literal">\end{document}</code> in the
               	knowledge that <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will never try to typeset them.
            </p>
            <blockquote><pre>
...
\end{document}
Don't forget to get the extra chapter from Jim!
      </pre></blockquote>
            <p><a name="environments"></a>This
               	<code class="command"><a name="c44">\begin</a></code>&#8201;...<code class="command"><a name="c45">\end</a></code>
               	pair of commands is an example of a common <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> structure called an
               	<b><i><a name="environment">environment</a></i></b>.
               	Environments enclose text which is to be handled in a particular
               	way. All environments start with
               	<code class="literal">\begin{...}</code> and end with
               	<code class="literal">\end{...}</code> (putting the name of the
               	environment in the curly braces).
            </p>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 2</i>. Adding the document environment
               </h4>
               <ol type="1">
                  <li>
                     <p>Add the <span class="environment"><a name="e6">document</a></span> environment to
                        	      your file.
                     </p>
                  </li>
                  <li>
                     <p>Leave a blank line between the Document Class
                        	      Declaration and the <code class="literal">\begin{document}</code>
                        	      (you'll see why later).
                     </p>
                  </li>
                  <li>
                     <p>Save the file.</p>
                  </li>
               </ol>
               <hr>
            </blockquote>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.3 <a name="titling">Titling</a></h2><a name="I52"></a><p>The first thing you put in the
               	<span class="environment"><a name="e7">document</a></span> environment is almost always the
               	document title, the author's name, and the date (except
               	in letters, which have a special set of commands for
               	addressing which we'll look at later). The title, author,
               	and date are all examples of <b><i><a name="metadata">metadata</a></i></b> or <b><i><a name="metainformation">metainformation</a></i></b> (information
               	<em>about</em> information).
            </p>
            <blockquote><pre>
\documentclass[11pt,a4paper,oneside]{report}

\begin{document}

\title{Practical Typesetting}
\author{Peter Flynn\\Silmaril Consultants}
\date{December 2004}
\maketitle

\end{document}
      </pre></blockquote>
            <p>The <code class="command"><a name="c46">\title</a></code>, <code class="command"><a name="c47">\author</a></code>,
               	and <code class="command"><a name="c48">\date</a></code> commands are
               	self-explanatory. You put the title, author name, and date in
               	curly braces after the relevant command.  The title and author
               	are usually compulsory; if you omit the
               	<code class="command"><a name="c49">\date</a></code> command, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> uses today's
               	date by default.
            </p>
            <p>You always finish the metadata with the
               	<code class="command"><a name="c50">\maketitle</a></code> command, which tells
               	<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> that it's complete and it can typeset the titling
               	information at this point. If you omit
               	<code class="command"><a name="c51">\maketitle</a></code>, the titling will never be
               	typeset. This command is reprogrammable so you can alter the
               	appearance of titles (like I did for the printed version of
               	this document).
            </p>
            <p>The double backslash (<code class="literal">\\</code>) is the
               	<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> command for forced linebreak. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> normally decides by
               	itself where to break lines, and it's usually right, but
               	sometimes you need to cut a line short, like here, and start a
               	new one. I could have left it out and just used a comma, so my
               	name and my company would all appear on the one line, but I
               	just decided that I wanted my company name on a separate line.
               	In some publishers' document classes, they provide a special
               	<code class="command"><a name="c52">\affiliation</a></code> command to put your company
               	or institution name in instead.
            </p>
            <p>When this file is typeset, you get something like this
               	(I've cheated and <a href="chapter5.html#colorpkg" title="sect2">done it in
                  	  colour</a> for fun&nbsp;&#8212; yours will be in black and white
               	for the moment):
            </p>
            <div align="center" style="margin:12px"><img src="title.png" style="border:thin solid black;" width="80%"></div>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 3</i>. Adding the metadata
               </h4>
               <ol type="1">
                  <li>
                     <p>Add the <code class="command"><a name="c53">\title</a></code>,
                        	      <code class="command"><a name="c54">\author</a></code>, <code class="command"><a name="c55">\date</a></code>, and
                        	      <code class="command"><a name="c56">\maketitle</a></code> commands to your
                        	      file.
                     </p>
                  </li>
                  <li>
                     <p>Use your own name, make up a title, and give a
                        	      date.
                     </p>
                  </li>
               </ol>
               <p>The order of the first three commands is not important,
                  	  but the <code class="command"><a name="c57">\maketitle</a></code> command must come
                  	  last.
               </p>
               <hr>
            </blockquote>
            <p>The document isn't really ready for printing like this,
               	but if you're really impatient, look at <a href="chapter4.html#process">Chapter 4</a> to see how to typeset and display
               	it.
            </p>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.4 <a name="abstracts">Abstracts and summaries</a></h2><a name="I53"></a><a name="I54"></a><p>In reports and articles it is normal for the author 
               	to provide an Summary or Abstract, in which you describe
               	briefly what you have written about and explain its
               	importance. Abstracts in articles are usually only a few
               	paragraphs long. Summaries in reports can run to several
               	pages, depending on the length and complexity of the report
               	and the readership it's aimed at.
            </p>
            <p>In both cases (reports and articles) the Abstract or
               	Summary is optional (that is, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> doesn't force you
               	to have one), but it's rare to omit it because readers want
               	and expect it. In practice, of course, you go back and type
               	the Abstract or Summary <em>after</em> having
               	written the rest of the document, but for the sake of the
               	example we'll jump the gun and type it now.
            </p>
            <blockquote><pre>
\documentclass[11pt,a4paper,oneside]{report}
\usepackage[latin1]{inputenc}
\renewcommand{\abstractname}{Summary}
\begin{document}

\title{Practical Typesetting}
\author{Peter Flynn\\Silmaril Consultants}
\date{December 2004}
\maketitle

\begin{abstract}
This document presents the basic concepts of 
typesetting in a form usable by non-specialists. It 
is aimed at those who find themselves (willingly or 
unwillingly) asked to undertake work previously sent 
out to a professional printer, and who are concerned 
that the quality of work (and thus their corporate 
&aelig;sthetic) does not suffer unduly.
\end{abstract}

\end{document}
      </pre></blockquote>
            <p>After the <code class="command"><a name="c58">\maketitle</a></code> you use the
               	<span class="environment"><a name="e8">abstract</a></span> environment, in which you simply
               	type your Abstract or Summary, leaving a blank line between
               	paragraphs if there's more than one (see <a href="chapter3.html#paragraphs">section 3.6</a> for this convention).
            </p>
            <p>In business and technical documents, the Abstract is often
               	called a Management Summary, or Executive Summary, or Business
               	Preview, or some similar phrase. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> lets you change the
               	name associated with the <span class="environment"><a name="e9">abstract</a></span>
               	environment to any kind of title you want, using the
               	<code class="command"><a name="c59">\renewcommand</a></code> command to give the command
               	<code class="command"><a name="c60">\abstractname</a></code> a new value:
            </p>
            <blockquote><pre>
\renewcommand{\abstractname}{Executive Summary}
      </pre></blockquote>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 4</i>. Using an Abstract or Summary
               </h4>
               <ol type="1">
                  <li>
                     <p>Add the <code class="command"><a name="c61">\renewcommand</a></code> as shown
                        	      above to your Preamble.
                     </p>
                     <p>The Preamble is at the start of the document, in
                        	      that gap <em>after</em> the
                        	      <code class="command"><a name="c62">\documentclass</a></code> line but
                        	      <em>before</em> the
                        	      <code class="literal">\begin{document}</code> (remember I said
                        	      we'd see what we left it blank for: see <a href="chapter3.html#preamble">the panel &#8216;The Preamble&#8217; in section 3.4</a>).
                     </p>
                  </li>
                  <li>
                     <p>Add an <span class="environment"><a name="e10">abstract</a></span> environment
                        	      after the <code class="command"><a name="c63">\maketitle</a></code> and type in a
                        	      paragraph or two of text.
                     </p>
                  </li>
                  <li>
                     <p>Save the file (no, I'm not paranoid, just
                        	      careful).
                     </p>
                  </li>
               </ol>
               <hr>
            </blockquote>
            <p>Notice how the name of the command you are renewing (here,
               	<code class="command"><a name="c64">\abstractname</a></code>) goes in the first set of
               	curly braces, and the new value you want it to have goes in
               	the second set of curly braces (this is an example of a
               	command with two arguments). The environment you use is still
               	called <span class="environment"><a name="e11">abstract</a></span> (that is, you still type
               	<code class="literal">\begin{abstract}</code>...<code class="literal">\end{abstract}</code>). 
               	What the <code class="command"><a name="c65">\abstractname</a></code> does is change the
               	name that gets displayed and printed, not the name of the
               	environment you store the text in.
            </p>
            <p>If you look carefully at the example document, you'll
               	see I sneakily added an extra command to the Preamble.
               	We'll see later what this means (Brownie points for
               	guessing it, though, if you read <a href="chapter2.html#accents">section 2.7</a>).
            </p>
            <div align="center" class="sidebar">
               <table width="75%">
                  <tr>
                     <td align="left" class="sidebar">
                        <h3><img src="ktip.png" align="middle"> &nbsp; <a name="preamble">The Preamble</a></h3>
                        <p>Modifications which you want to affect a whole document
                           	  go at the start of your <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> file, immediately
                           	  after the <code class="command"><a name="c66">\documentclass</a></code> line and before
                           	  the <code class="literal">\begin{document}</code> line:
                        </p>
                        <blockquote><pre>
\documentclass[11pt,a4paper,oneside]{report}
\renewcommand{\abstractname}{Sneak Preview}
\begin{document}
...
\end{document}
        </pre></blockquote>
                        <p>This position, between the Document Class Declaration
                           	  and the beginning of the <span class="environment"><a name="e12">document</a></span>
                           	  environment, is called the <b><i><a name="pre">preamble</a></i></b>, and it is used for small or
                           	  temporary modifications to the style and behaviour of the
                           	  document. Major or permanent modifications should go in a
                           	  <code>.sty</code> file and be invoked with a
                           	  <code class="command"><a name="c67">\usepackage</a></code> command.
                        </p>
                     </td>
                  </tr>
               </table>
            </div>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5 <a name="sections">Sections</a></h2><a name="I55"></a><p>In the body of your document, <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> provides seven
               	levels of division or sectioning for you to use in structuring
               	your text. They are all optional: it is perfectly possible to
               	write a document consisting solely of paragraphs of
               	unstructured text. But even novels are normally divided into
               	chapters, although short stories are often made up solely of
               	paragraphs.
            </p>
            <p>Chapters are only
               	available in the <span class="package"><a name="m23">book</a></span> and
               	<span class="package"><a name="m24">report</a></span> document classes, because they
               	don't have any meaning in articles and letters. Parts are
               	also undefined in letters.<sup><a href="#repchap">4</a></sup></p>
            <div align="center"><a name="secdepths"></a><table>
                  <tr class="headfoot">
                     <th valign="bottom" align="center">Depth</th>
                     <th valign="bottom" align="left">Division</th>
                     <th valign="bottom" align="left">Command</th>
                     <th valign="bottom" align="left">Notes</th>
                  </tr>
                  <tr>
                     <td valign="top" align="center"><span class="math">&#8722;1</span></td>
                     <td valign="top" align="left">Part</td>
                     <td valign="top" align="left"><code class="command"><a name="c68">\part</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">0</td>
                     <td valign="top" align="left">Chapter</td>
                     <td valign="top" align="left"><code class="command"><a name="c69">\chapter</a></code></td>
                     <td valign="top" align="left">Books and reports</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">1</td>
                     <td valign="top" align="left">Section</td>
                     <td valign="top" align="left"><code class="command"><a name="c70">\section</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">2</td>
                     <td valign="top" align="left">Subsection</td>
                     <td valign="top" align="left"><code class="command"><a name="c71">\subsection</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">3</td>
                     <td valign="top" align="left">Subsubsection</td>
                     <td valign="top" align="left"><code class="command"><a name="c72">\subsubsection</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">4</td>
                     <td valign="top" align="left">Titled paragraph</td>
                     <td valign="top" align="left"><code class="command"><a name="c73">\paragraph</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
                  <tr>
                     <td valign="top" align="center">5</td>
                     <td valign="top" align="left">Titled subparagraph</td>
                     <td valign="top" align="left"><code class="command"><a name="c74">\subparagraph</a></code></td>
                     <td valign="top" align="left">Not in letters</td>
                  </tr>
               </table>
            </div>
            <p>In each case the title of the part, chapter, section,
               	etc. goes in curly braces after the command. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>
               	automatically calculates the correct numbering and prints the
               	title in bold. You can turn section numbering off at a
               	specific depth: details in <a href="chapter3.html#secnum">section 3.5.1</a>.
            </p>
            <blockquote><pre>
\section{New recruitment policies}
...
\subsection{Effect on staff turnover}
...
\chapter{Business plan 2005--2007}
      </pre></blockquote>
            <p>There are packages<sup><a href="#F25">5</a></sup>  to let you control the typeface, style, spacing,
               	and appearance of section headings: it's much easier to
               	use them than to try and reprogram the headings manually. Two
               	of the most popular are the <span class="package"><a name="m25">ssection</a></span>
               	and <span class="package"><a name="m26">sectsty</a></span> packages.
            </p>
            <p>Headings also get put automatically into the Table of
               	Contents, if you specify one (it's optional). But if you
               	make manual styling changes to your heading, for example a
               	very long title, or some special line-breaks or unusual
               	font-play, this would appear in the Table of Contents as well,
               	which you almost certainly <em>don't</em>
               	want. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> allows you to give an optional extra version of
               	the heading text which only gets used in the Table of Contents
               	and any running heads, if they are in effect <a href="chapter8.html#runningheads" title="sect2"></a>. This optional alternative
               	heading goes in [square brackets] before the curly
               	braces:
            </p>
            <blockquote><pre>
\section[Effect on staff turnover]{An analysis of the 
effect of the revised recruitment policies on staff 
turnover at divisional headquarters}
      </pre></blockquote>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 5</i>. Start your document text
               </h4>
               <ol type="1">
                  <li>
                     <p>Add a <code class="command"><a name="c75">\chapter</a></code> command after your
                        	      Abstract or Summary, giving the title of your first
                        	      chapter.
                     </p>
                  </li>
                  <li>
                     <p>If you're planning ahead, add a few more
                        	      <code class="command"><a name="c76">\chapter</a></code> commands for
                        	      subsequent chapters. Leave a few blank lines between
                        	      them to make it easier to add paragraphs of text
                        	      later.
                     </p>
                  </li>
                  <li>
                     <p>By now I shouldn't need to tell you what to do
                        	      after making significant changes to your document
                        	      file.
                     </p>
                  </li>
               </ol>
               <hr>
            </blockquote>
            <ol class="footnotes" start="4">
               <li><a name="F24">It is arguable that chapters also have no place in
                     	    reports, either, as these are conventionally divided into
                     	    sections as the top-level division. <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span>, however,
                     	    assumes your reports have chapters, but this is only the
                     	    default, and can be changed very simply (see
                     <a href="chapter9.html#reprog">section 9.6</a>).</a></li>
            </ol>
            <ol class="footnotes" start="5">
               <li><a name="F25">Details of how to use <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> packages are in <a href="chapter5.html#packages">section 5.1</a>.</a></li>
            </ol>
            <div class="sect2">
               <h3><a href="#doctoc"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.5.1 <a name="secnum">Section numbering</a></h3><a name="I56"></a><p>All document divisions get numbered automatically.  Parts
                  	  get Roman numerals (Part&nbsp;I, Part&nbsp;II, etc.);
                  	  chapters and sections get decimal numbering like this
                  	  document, and Appendixes (which are just a special case of
                  	  chapters, and share the same structure) are lettered (A, B,
                  	  C, etc.).
               </p>
               <p>You can change the depth to which section numbering
                  	  occurs, so you can turn it off selectively. In this document
                  	  it is set
                  	  to&nbsp;3.
                  	  If you only want parts, chapters, and sections numbered, not
                  	  subsections or subsubsections etc., you can change the
                  	  value of the <tt><i><a name="l9">secnumdepth</a></i></tt>
                  	  counter using the the <code class="command"><a name="c77">\setcounter</a></code> command,
                  	  giving the depth value from <a href="chapter3.html#secdepths">the table  in section 3.5</a>:
               </p>
               <blockquote><pre>
\setcounter{secnumdepth}{1}
        </pre></blockquote>
               <p>A related counter is <tt><i><a name="l10">tocdepth</a></i></tt>, which specifies what
                  	  depth to take the Table of Contents to. It can be reset in
                  	  exactly the same way as <tt><i><a name="l11">secnumdepth</a></i></tt>. The current setting
                  	  for this document is&nbsp;2.
               </p>
               <blockquote><pre>
\setcounter{tocdepth}{3}
	</pre></blockquote>
               <p>To get an <em>unnumbered</em> section
                  	  heading which does <em>not</em> go into the
                  	  Table of Contents, follow the command name with an asterisk
                  	  before the opening curly brace:
               </p>
               <blockquote><pre>
\subsection*{Shopping List}
        </pre></blockquote>
               <p>All the divisional commands from
                  	  <code class="command"><a name="c78">\part*</a></code> to <code class="command"><a name="c79">\subparagraph*</a></code>
                  	  have this &#8216;starred&#8217; version which can
                  	  be used on special occasions for an unnumbered heading when
                  	  the setting of <tt><i><a name="l12">secnumdepth</a></i></tt>
                  	  would normally mean it would be numbered.
               </p>
            </div>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.6 <a name="paragraphs">Ordinary paragraphs</a></h2>
            <p>After section headings comes your text. Just type it and
               	leave a blank line between paragraphs. That's all
               	<span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> needs.
            </p>
            <p>The blank line means &#8216;start a new paragraph
               	  here&#8217;: it does <em>not</em> (repeat:
               	<strong>not</strong>) mean you get a blank
               	line in the typeset output. Now read this paragraph
               	again and again until that sinks in.
            </p>
            <p>The spacing between paragraphs is a separately definable
               	quantity, a <b><i><a name="dimension">dimension</a></i></b> or
               	<b><i><a name="length">length</a></i></b> called <tt>\<a name="d13">parskip</a></tt>. This is normally zero
               	(no space between paragraphs, because that's how books
               	are normally typeset), but you can easily set it to any size
               	you want with the <code class="command"><a name="c80">\setlength</a></code> command in the
               	Preamble:
            </p>
            <blockquote><pre>
\setlength{\parskip}{1cm}
      </pre></blockquote>
            <p><a name="paraspace"></a>This will set the space between paragraphs
               	to 1cm. See <a href="chapter2.html#dimensions">section 2.8.1</a> for details of the
               	various size units <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can use. <em>Leaving
                  	  multiple blank lines between paragraphs in your source
                  	  document achieves nothing</em>: all extra blank lines
               	get ignored by <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> because the space between paragraphs
               	is
               	controlled only by the value of <tt>\<a name="d14">parskip</a></tt>.
            </p>
            <p>White-space in <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> can also be made flexible (what
               	Lamport calls
               	&#8216;rubber&#8217; lengths). This means that
               	values such as <tt>\<a name="d15">parskip</a></tt> can
               	have a default dimension plus an amount of expansion minus an
               	amount of contraction. This is useful on pages in complex
               	documents where not every page may be an exact number of
               	fixed-height lines long, so some give-and-take in vertical
               	space is useful. You specify this in a
               	<code class="command"><a name="c81">\setlength</a></code> command like this:
            </p>
            <blockquote><pre>
\setlength{\parskip}{1cm plus4mm minus3mm}
      </pre></blockquote>
            <p>Paragraph indentation can also be set with the
               	<code class="command"><a name="c82">\setlength</a></code> command, although you would
               	always make it a fixed size, never a flexible one, otherwise
               	you would have very ragged-looking paragraphs.
            </p>
            <blockquote><pre>
\setlength{\parindent}{6mm}
      </pre></blockquote>
            <p>By default, the first paragraph after a heading follows
               	the standard Anglo-American publishers' practice of
               	<em>no</em> indentation. Subsequent paragraphs are
               	indented by the value of <tt>\<a name="d16">parindent</a></tt> (default
               	18pt).<sup><a href="#F26">6</a></sup> You can change this in the same way as any other
               	length.
            </p>
            <p>In the printed copy of this document, the paragraph
               	indentation is set to 12pt and the space
               	between paragraphs is set to 0pt. These values do not
               	apply in the Web (<small><a href="chapter10.html#HTML" class="acroref" name="A85" title="HyperText Markup Language">HTML</a></small>) version because not all browsers are
               	capable of that fine a level of control, and because users can
               	apply their own stylesheets regardless of what this document
               	proposes.
            </p>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 6</i>. Start typing!
               </h4>
               <ol type="1">
                  <li>
                     <p>Type some paragraphs of text. Leave a blank line
                        	      between each. Don't bother about line-wrapping or
                        	      formatting&nbsp;&#8212; <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> will take care of all
                        	      that.
                     </p>
                  </li>
                  <li>
                     <p>If you're feeling adventurous, add a
                        	      <code class="command"><a name="c83">\section</a></code> command with the title of a
                        	      section within your first chapter, and continue typing
                        	      paragraphs of text below that.
                     </p>
                  </li>
                  <li>
                     <p>Add one or more <code class="command"><a name="c84">\setlength</a></code>
                        	      commands to your Preamble if you want to experiment with
                        	      changing paragraph spacing and indentation.
                     </p>
                  </li>
               </ol>
               <hr>
            </blockquote>
            <p>To turn off indentation completely, set it to zero (but
               	you still have to provide units: it's still a
               	measure!).
            </p>
            <blockquote><pre>
\setlength{\parindent}{0in}
      </pre></blockquote>
            <p>If you do this, though, and leave <tt>\<a name="d17">parskip</a></tt> set to zero, your readers
               	won't be able to tell easily where each paragraph begins!
               	If you want to use the style of having no indentation with a
               	space between paragraphs, use the
               	<span class="package"><a name="m28">parskip</a></span> package, which does it for
               	you (and makes adjustments to the spacing of lists and other
               	structures which use paragraph spacing, so they don't get
               	too far apart).
            </p>
            <ol class="footnotes" start="6">
               <li><a name="F26">Paragraph spacing and indentation are cultural
                     	    settings. If you are typesetting in a language other than
                     	    English, you should use the <span class="package"><a name="m27">babel</a></span>
                     	    package, which alters many things, including the spacing
                     	    and the naming of sections, to conform with the standards
                     	    of different countries and languages.</a></li>
            </ol>
         </div>
         <div class="sect1">
            <h2><a href="#basic"><img src="up.png" title="Chapter Contents" width="32" alt="ToC" align="right" border="0"></a>3.7 <a name="toc">Table of contents</a></h2><a name="I57"></a><p>All auto-numbered headings get entered in the Table of
               	Contents (ToC) automatically. You don't have to print a
               	ToC, but if you want to, just add the command
               	<code class="command"><a name="c85">\tableofcontents</a></code> at the point where you want
               	it printed (usually after the Abstract or Summary).
            </p>
            <p>Entries for the ToC are recorded each time you process
               	your document, and reproduced the <em>next</em>
               	time you process it, so you need to re-run <span class="LATEX">L<span class="A">A</span><span class="TEX">T<span class="E">E</span>X</span></span> one extra
               	time to ensure that all ToC page-number references
               	are correctly calculated.
            </p>
            <p>We've already seen in <a href="chapter3.html#sections">section 3.5</a> how
               	to use the optional argument to the sectioning commands to add
               	text to the ToC which is slightly different from the one
               	printed in the body of the document. It is also possible to
               	add extra lines to the ToC, to force extra or unnumbered
               	section headings to be included.
            </p>
            <blockquote class="exercise">
               <hr>
               <h4><img src="kwrite.png" align="middle"> &nbsp; <i>Exercise 7</i>. Inserting the table of contents
               </h4>
               <ol type="1">
                  <li>
                     <p>Go back and add a <code class="command"><a name="c86">\tableofcontents</a></code>
                        	      command after the <code class="literal">\end{abstract}</code> command
                        	      in your document.
                     </p>
                  </li>
                  <li>
                     <p>You guessed.</p>
                  </li>
               </ol>
               <hr>
            </blockquote>
            <p><a name="loflot"></a>The commands <code class="command"><a name="c87">\listoffigures</a></code>
               	and <code class="command"><a name="c88">\listoftables</a></code> work in exactly the same
               	way as <code class="command"><a name="c89">\tableofcontents</a></code> to automatically
               	list all your tables and figures. If you use them, they
               	normally go after the <code class="command"><a name="c90">\tableofcontents</a></code>
               	command.
            </p>
            <p>The <code class="command"><a name="c91">\tableofcontents</a></code> command normally
               	shows only numbered section headings, and only down to the
               	level defined by the <tt><i><a name="l18">tocdepth</a></i></tt> counter (see <a href="chapter3.html#secnum">section 3.5.1</a>), but you can add extra entries with the
               	<code class="command"><a name="c92">\addcontentsline</a></code> command. For example if you
               	use an unnumbered section heading command to start a
               	preliminary piece of text like a Foreword or Preface, you can
               	write:<a name="I58"></a></p>
            <blockquote><pre>
\subsection*{Preface}
\addcontentsline{toc}{subsection}{Preface}
      </pre></blockquote>
            <p>This will format an unnumbered ToC entry for
               	&#8216;Preface&#8217; in the
               	&#8216;subsection&#8217; style. You can use
               	the same mechanism to add lines to the List of Figures or List
               	of Tables by substituting <code>lof</code> or
               	<code>lot</code> for <code>toc</code>.
            </p>
         </div>
      </div>
      <hr>
      <table width="100%">
         <tr>
            <td align="left"><a href="chapter2.html"><img src="previous.png" alt="Previous" border="0"></a></td>
            <td align="center"><a href="#doctoc"><img src="top.png" alt="Top" border="0"></a></td>
            <td align="right"><a href="chapter4.html"><img src="next.png" alt="Next" border="0"></a></td>
         </tr>
      </table>
   </body>
</html>