File: latex2e_6.html

package info (click to toggle)
setzer 65-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,372 kB
  • sloc: python: 13,320; xml: 3,660; makefile: 139; sh: 6
file content (1006 lines) | stat: -rw-r--r-- 47,737 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This document is an unofficial reference manual for LaTeX, a
document preparation system, version of October 2018.

This manual was originally translated from LATEX.HLP v1.0a in the
VMS Help Library.  The pre-translation version was written by
George D. Greenwade of Sam Houston State University.  The
LaTeX 2.09 version was written by Stephen Gilmore.  The
LaTeX2e version was adapted from this by Torsten Martinsen.  Karl
Berry made further updates and additions, and gratefully acknowledges
using Hypertext Help with LaTeX, by Sheldon Green, and
LaTeX Command Summary (for LaTeX 2.09) by
L. Botway and C. Biemesderfer (published by the TeX Users
Group as TeXniques number 10), as reference material.  We also
gratefully acknowledge additional material appearing in
latex2e-reference by Martin Herbert Dietze.  (From these references no
text was directly copied.)

Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013,
2014, 2015, 2016, 2017, 2018 Karl Berry.

Copyright 1988, 1994, 2007 Stephen Gilmore.

Copyright 1994, 1995, 1996 Torsten Martinsen.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.


Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sectioning (LaTeX2e unofficial reference manual (October 2018))</title>

<meta name="description" content="Sectioning (LaTeX2e unofficial reference manual (October 2018))">
<meta name="keywords" content="Sectioning (LaTeX2e unofficial reference manual (October 2018))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="latex2e_0.html#Top" rel="start" title="Top">
<link href="latex2e_30.html#Index" rel="index" title="Index">
<link href="latex2e_0.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="latex2e_0.html#Top" rel="up" title="Top">
<link href="latex2e_7.html#Cross-references" rel="next" title="Cross references">
<link href="latex2e_5.html#Floats" rel="prev" title="Floats">
<style type="text/css">
<!--
body {margin: 1em; margin-top: 0px; padding-top: 1px}
a.anchor {float: right}
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body id="top" lang="en">
<a name="Sectioning" class="anchor"></a>
<a name="Sectioning-1" class="anchor"></a>
<h2 class="chapter">Sectioning</h2>

<a name="index-sectioning-commands" class="anchor"></a>
<a name="index-part" class="anchor"></a>
<a name="index-chapter" class="anchor"></a>
<a name="index-section" class="anchor"></a>
<a name="index-subsection" class="anchor"></a>
<a name="index-paragraph" class="anchor"></a>
<a name="index-subparagraph" class="anchor"></a>
<a name="index-_005cpart" class="anchor"></a>
<a name="index-_005cchapter" class="anchor"></a>
<a name="index-_005csection" class="anchor"></a>
<a name="index-_005csubsection" class="anchor"></a>
<a name="index-_005cparagraph" class="anchor"></a>
<a name="index-_005csubparagraph" class="anchor"></a>

<p>Structure your text into divisions: parts, chapters, sections, etc.  All
sectioning commands have the same form, one of:
</p>
<div class="example">
<pre class="example"><var>sectioning-command</var>{<var>title</var>}
<var>sectioning-command</var>*{<var>title</var>}
<var>sectioning-command</var>[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>For instance, declare the start of a subsection as with
<code>\subsection{Motivation}</code>.
</p>
<p>The table has each <var>sectioning-command</var> in LaTeX.  All are
available in all of LaTeX&rsquo;s standard document classes <code>book</code>,
<code>report</code>, and&nbsp;<code>article</code>, except that <code>\chapter</code> is
not available in <code>article</code>.
</p>
<table>
<thead><tr><th width="25%">Sectioning unit</th><th width="25%">Command</th><th width="40%">Level</th></tr></thead>
<tr><td width="25%">Part</td><td width="25%"><code>\part</code></td><td width="40%">-1 (<code>book</code>, <code>report</code>), 0 (<code>article</code>)</td></tr>
<tr><td width="25%">Chapter</td><td width="25%"><code>\chapter</code></td><td width="40%">0</td></tr>
<tr><td width="25%">Section</td><td width="25%"><code>\section</code></td><td width="40%">1</td></tr>
<tr><td width="25%">Subsection</td><td width="25%"><code>\subsection</code></td><td width="40%">2</td></tr>
<tr><td width="25%">Subsubsection</td><td width="25%"><code>\subsubsection</code></td><td width="40%">3</td></tr>
<tr><td width="25%">Paragraph</td><td width="25%"><code>\paragraph</code></td><td width="40%">4</td></tr>
<tr><td width="25%">Subparagraph</td><td width="25%"><code>\subparagraph</code></td><td width="40%">5</td></tr>
</table>

<a name="index-_002a_002dform-of-sectioning-commands" class="anchor"></a>
<p>All these commands have a <code>*</code>-form that prints <var>title</var> as usual
but is not numbered and does not make an entry in the table of contents.
An example of using this is for an appendix in an <code>article</code> .  The
input <code>\appendix\section{Appendix}</code> gives the output &lsquo;<samp>A
Appendix</samp>&rsquo; (see <a href="#g_t_005cappendix">\appendix</a>).  You can lose the numbering&nbsp;&lsquo;<samp>A</samp>&rsquo;
by instead entering <code>\section*{Appendix}</code> (articles often omit a
table of contents and have simple page headers so the other differences
from the <code>\section</code> command may not matter).
</p>
<p>The section title <var>title</var> provides the heading in the main text, but
it may also appear in the table of contents and in the running head or
foot (see <a href="latex2e_18.html#Page-styles">Page styles</a>).  You may not want the same text in these
places as in the main text.  All of these commands have an optional
argument <var>toc-title</var> for these other places.
</p>
<p>The level number in the table above determines which sectional units are
numbered, and which appear in the table of contents.  If the sectioning
command&rsquo;s <var>level</var> is less than or equal to the value of the counter
<code>secnumdepth</code> then the titles for this sectioning command will be
numbered (see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a>).  And, if <var>level</var> is less
than or equal to the value of the counter <code>tocdepth</code> then the table
of contents will have an entry for this sectioning unit
(see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<p>LaTeX expects that before you have a <code>\subsection</code> you will have
a <code>\section</code> and, in a book, that before a <code>\section</code> you will
have a <code>\chapter</code>.  Otherwise you can get a something like a
subsection numbered &lsquo;<samp>3.0.1</samp>&rsquo;.
</p>
<p>Two counters relate to the appearance of sectioning commands.
</p>
<dl compact="compact">
<dt><code>secnumdepth</code>
<a name="index-secnumdepth" class="anchor"></a>
</dt>
<dd><a name="index-secnumdepth-counter" class="anchor"></a>
<a name="index-section-numbers_002c-printing" class="anchor"></a>
<a name="sectioning-secnumdepth" class="anchor"></a><a name="Sectioning_002fsecnumdepth" class="anchor"></a><p>Controls which sectioning commands are
numbered.  Suppress numbering of sectioning at any depth greater than
<var>level</var> <code>\setcounter{secnumdepth}{<var>level</var>}</code>
(see <a href="latex2e_13.html#g_t_005csetcounter">\setcounter</a>).  See the above table for the level numbers.  For
instance, if the <code>secnumdepth</code> is 1 in an <code>article</code> then a
<code>\section{Introduction}</code> command will produce output like &lsquo;<samp>1
Introduction</samp>&rsquo; while <code>\subsection{Discussion}</code> will produce output
like &lsquo;<samp>Discussion</samp>&rsquo;, without the number. LaTeX&rsquo;s default
<code>secnumdepth</code> is&nbsp;3 in <samp>article</samp> class and &nbsp;2 in the
<samp>book</samp> and <samp>report</samp> classes.
</p>
</dd>
<dt><code>tocdepth</code>
<a name="index-tocdepth" class="anchor"></a>
</dt>
<dd><a name="index-tocdepth-counter" class="anchor"></a>
<a name="index-table-of-contents_002c-sectioning-numbers-printed" class="anchor"></a>
<a name="sectioning-tocdepth" class="anchor"></a><a name="Sectioning_002ftocdepth" class="anchor"></a><p>Controls which sectioning units are listed in the table of contents.
The setting <code>\setcounter{tocdepth}{<var>level</var>}</code> makes the
sectioning units at <var>level</var> be the smallest ones listed
(see <a href="latex2e_13.html#g_t_005csetcounter">\setcounter</a>).  See the above table for the level numbers.  For
instance, if <code>tocdepth</code> is&nbsp;1 then the table of contents will
list sections but not subsections.  LaTeX&rsquo;s default
<code>secnumdepth</code> is&nbsp;3 in <samp>article</samp> class and &nbsp;2 in the
<samp>book</samp> and <samp>report</samp> classes.
</p>
</dd>
</dl>



<hr>
<a name="g_t_005cpart" class="anchor"></a>
<a name="g_t_005cpart-1" class="anchor"></a>
<h3 class="section"><code>\part</code></h3>

<a name="index-_005cpart-1" class="anchor"></a>
<a name="index-part-1" class="anchor"></a>
<a name="index-sectioning_002c-part" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\part{<var>title</var>}
\part*{<var>title</var>}
\part[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>Start a document part.  The standard LaTeX classes <code>book</code>,
<code>report</code>, and <code>article</code>, all have this command.
</p>
<p>This produces a document part, in a book.
</p>
<div class="example">
<pre class="example">\part{VOLUME I \\
       PERSONAL MEMOIRS OF  U.\ S.\ GRANT}
\chapter{ANCESTRY--BIRTH--BOYHOOD.}
My family is American, and has been for generations,
in all its branches, direct and collateral.
</pre></div>

<p>In each standard class the <code>\part</code> command outputs a part number
such as &lsquo;<samp>Part I</samp>&rsquo;, alone on its line, in boldface, and in large
type.  Then LaTeX outputs <var>title</var>, also alone on its line, in
bold and in even larger type.  In class <code>book</code>, the LaTeX
default puts each part alone on its own page. If the book is two-sided
then LaTeX will skip a page if needed to have the new part on an
odd-numbered page.  In <code>report</code> it is again alone on a page, but
LaTeX won&rsquo;t force it onto an odd-numbered page.  In an <code>article</code>
LaTeX does not put it on a fresh page, but instead outputs the part
number and part title onto the main document page.
</p>
<p>The <code>*</code>&nbsp;form shows <var>title</var> 
but it does not show the part number, does not increment the
<code>part</code> counter, and produces no table of contents entry.
</p>
<p>The optional argument <var>toc-title</var> will appear as the part title in
the table of contents (see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>) and in running
headers (see <a href="latex2e_18.html#Page-styles">Page styles</a>).  If it is not present then <var>title</var>
will be there.  This example puts a line break in <var>title</var> but leaves
out the break in the table of contents.
</p>
<div class="example">
<pre class="example">\part[Up from the bottom; my life]{Up from the bottom\\ my life}
</pre></div>

<p>For determining which sectional units are numbered and which appear in
the table of contents, the level number of a part is&nbsp;-1
(see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a> and see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<a name="index-package_002c-indentfirst" class="anchor"></a>
<a name="index-indentfirst-package" class="anchor"></a>

<p>In the class <code>article</code>, if a paragraph immediately follows the part
title then it is not indented.  To get an indent you can use the package
<samp>indentfirst</samp>.
</p>
<a name="index-package_002c-titlesec" class="anchor"></a>
<a name="index-titlesec-package" class="anchor"></a>

<p>One package to change the behavior of <code>\part</code> is <samp>titlesec</samp>.
See its documentation on CTAN.
</p>

<hr>
<a name="g_t_005cchapter" class="anchor"></a>
<a name="g_t_005cchapter-1" class="anchor"></a>
<h3 class="section"><code>\chapter</code></h3>

<a name="index-_005cchapter-1" class="anchor"></a>
<a name="index-chapter-1" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\chapter{<var>title</var>}
\chapter*{<var>title</var>}
\chapter[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>Start a chapter.  The standard LaTeX classes <code>book</code> and
<code>report</code> have this command but <code>article</code> does not.
</p>
<p>This produces a chapter.
</p>
<div class="example">
<pre class="example">\chapter{Loomings}
Call me Ishmael.
Some years ago---never mind how long precisely---having little or no
money in my purse, and nothing particular to interest me on shore, I
thought I would sail about a little and see the watery part of
the world.
</pre></div>

<p>The LaTeX default starts each chapter on a fresh page, an
odd-numbered page if the document is two-sided.  It produces a chapter
number such as &lsquo;<samp>Chapter 1</samp>&rsquo; in large boldface type (the size is
<code>\huge</code>).  It then puts <var>title</var> on a fresh line, in boldface
type that is still larger (size <code>\Huge</code>).  It also increments the
<code>chapter</code> counter, adds an entry to the table of contents
(see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>), and sets the running header
information (see <a href="latex2e_18.html#Page-styles">Page styles</a>).
</p>
<p>The <code>*</code>&nbsp;form shows <var>title</var> on a fresh line, in boldface.
But it does not show the chapter number, does not increment the
<code>chapter</code> counter, produces no table of contents entry, and does
not affect the running header.  (If you use the page style
<code>headings</code> in a two-sided document then the header will be from the
prior chapter.)  This example illustrates.
</p>
<div class="example">
<pre class="example">\chapter*{Preamble}
</pre></div>

<p>The optional argument <var>toc-title</var> will appear as the chapter title
in the table of contents (see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>) and in
running headers (see <a href="latex2e_18.html#Page-styles">Page styles</a>).  If it is not present then
<var>title</var> will be there.  This shows the full name in the chapter
title,
</p>
<div class="example">
<pre class="example">\chapter[Weyl]{Hermann Klaus Hugo (Peter) Weyl (1885--1955)}
</pre></div>

<p>but only &lsquo;<samp>Weyl</samp>&rsquo; on the contents page.  This puts a line break in
the title but that doesn&rsquo;t work well with running headers so it omits
the break in the contents
</p>
<div class="example">
<pre class="example">\chapter[Given it all\\ my story]{Given it all\\ my story}
</pre></div>

<p>For determining which sectional units are numbered and which appear in
the table of contents, the level number of a chapter is&nbsp;0
(see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a> and see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<a name="index-package_002c-indentfirst-1" class="anchor"></a>
<a name="index-indentfirst-package-1" class="anchor"></a>

<p>The paragraph that follows the chapter title is not indented, as is a
standard typographical practice.  To get an indent use the package
<samp>indentfirst</samp>.
</p>
<p>You can change what is shown for the chapter number.  To change it to
something like &lsquo;<samp>Lecture 1</samp>&rsquo;, put in the preamble either
<code>\renewcommand{\chaptername}{Lecture}</code> or this
(see <a href="latex2e_12.html#g_t_005cmakeatletter-_0026-_005cmakeatother">\makeatletter &amp; \makeatother</a>).
</p>
<div class="example">
<pre class="example">\makeatletter
\renewcommand{\@chapapp}{Lecture}
\makeatother
</pre></div>

<a name="index-package_002c-babel" class="anchor"></a>
<a name="index-babel-package" class="anchor"></a>

<p>To make this change because of the primary language for
the document, see the package <samp>babel</samp>.
</p>
<p>In a two-sided document LaTeX puts a chapter on odd-numbered page, if
necessary leaving an even-numbered page that is blank except for any
running headers.  To make that page completely blank,
see&nbsp;<a href="latex2e_10.html#g_t_005cclearpage-_0026-_005ccleardoublepage">\clearpage &amp; \cleardoublepage</a>.
</p>
<a name="index-package_002c-titlesec-1" class="anchor"></a>
<a name="index-titlesec-package-1" class="anchor"></a>

<p>To change the behavior of the <code>\chapter</code> command, you can copy its
definition from the LaTeX format file and make adjustments.  But
there are also many packages on CTAN that address this.  One is
<samp>titlesec</samp>.  See its documentation, but the example below gives a
sense of what it can do.
</p>
<div class="example">
<pre class="example">\usepackage{titlesec}   % in preamble
\titleformat{\chapter}
  {\Huge\bfseries}  % format of title
  {}                % label, such as 1.2 for a subsection
  {0pt}             % length of separation between label and title
  {}                % before-code hook
</pre></div>

<p>This omits the chapter number &lsquo;<samp>Chapter 1</samp>&rsquo; from the page but unlike
<code>\chapter*</code> it keeps the chapter in the table of contents and the
running headers.
</p>

<hr>
<a name="g_t_005csection" class="anchor"></a>
<a name="g_t_005csection-1" class="anchor"></a>
<h3 class="section"><code>\section</code></h3>

<a name="index-_005csection-1" class="anchor"></a>
<a name="index-section-1" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\section{<var>title</var>}
\section*{<var>title</var>}
\section[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>Start a section.  The standard LaTeX classes <code>article</code>,
<code>book</code>, and <code>report</code> all have this command.
</p>
<p>This produces a section.
</p>
<div class="example">
<pre class="example">In this Part we tend to be more interested in the function,
in the input-output behavior,
than in the details of implementing that behavior.

\section{Turing machines}
Despite this desire to downplay implementation,
we follow the approach of A~Turing that the
first step toward defining the set of computable functions
is to reflect on the details of what mechanisms can do.
</pre></div>

<p>For the standard LaTeX classes <code>book</code> and <code>report</code> the
default output is like &lsquo;<samp>1.2 <var>title</var></samp>&rsquo; (for chapter&nbsp;1,
section&nbsp;2), alone on its line and flush left, in boldface and a
larger type (the type size is <code>\Large</code>).  The same holds in
<code>article</code> except that there are no chapters in that class so it
looks like &lsquo;<samp>2 <var>title</var></samp>&rsquo;.
</p>
<p>The <code>*</code>&nbsp;form shows <var>title</var>.
But it does not show the section number, does not increment the
<code>section</code> counter, produces no table of contents entry, and does
not affect the running header.  (If you use the page style
<code>headings</code> in a two-sided document then the header will be from the
prior section.)
</p>
<p>The optional argument <var>toc-title</var> will appear as the section title
in the table of contents (see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>) and in
running headers (see <a href="latex2e_18.html#Page-styles">Page styles</a>).  If it is not present then
<var>title</var> will be there.  This shows the full name in the title of the
section,
</p>
<div class="example">
<pre class="example">\section[Elizabeth~II]{Elizabeth the Second,
  by the Grace of God of the United Kingdom,
  Canada and Her other Realms and Territories Queen,
  Head of the Commonwealth, Defender of the Faith.}
</pre></div>

<p>but only &lsquo;<samp>Elizabeth II</samp>&rsquo; on the contents page and in the headers.
This has a line break in <var>title</var> but that does not work with headers
so it is omitted from the contents and headers.
</p>
<div class="example">
<pre class="example">\section[Truth is, I cheated; my life story]{Truth is,
  I cheated\\my life story}
</pre></div>

<p>For determining which sectional units are numbered and which appear in
the table of contents, the level number of a section is&nbsp;1
(see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a> and see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<a name="index-package_002c-indentfirst-2" class="anchor"></a>
<a name="index-indentfirst-package-2" class="anchor"></a>

<p>The paragraph that follows the section title is not indented, as is a
standard typographical practice.  One way to get an indent is to use the
package <samp>indentfirst</samp>.
</p>
<a name="index-package_002c-titlesec-2" class="anchor"></a>
<a name="index-titlesec-package-2" class="anchor"></a>

<p>In general, to change the behavior of the <code>\section</code> command, there
are a number of options.  One is the <code>\@startsection</code> command
(see <a href="#g_t_005c_0040startsection">\@startsection</a>).  There are also many packages on CTAN that
address this, including <samp>titlesec</samp>.  See the documentation but the
example below gives a sense of what they can do.
</p>
<div class="example">
<pre class="example">\usepackage{titlesec}   % in preamble
\titleformat{\section}
  {\normalfont\Large\bfseries}  % format of title
  {\makebox[1pc][r]{\thesection\hspace{1pc}}} % label
  {0pt}                   % length of separation between label and title
  {}                      % before-code hook
\titlespacing*{\section}
  {-1pc}{18pt}{10pt}[10pc]
</pre></div>

<p>That puts the section number in the margin.
</p>

<hr>
<a name="g_t_005csubsection" class="anchor"></a>
<a name="g_t_005csubsection-1" class="anchor"></a>
<h3 class="section"><code>\subsection</code></h3>

<a name="index-_005csubsection-1" class="anchor"></a>
<a name="index-subsection-1" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\subsection{<var>title</var>}
\subsection*{<var>title</var>}
\subsection[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>Start a subsection.  The standard LaTeX classes <code>article</code>,
<code>book</code>, and <code>report</code> all have this command.
</p>
<p>This produces a subsection.
</p>
<div class="example">
<pre class="example">We will show that there are more functions than Turing machines and that
therefore some functions have no associated machine.

\subsection{Cardinality} We will begin with two paradoxes that
dramatize the challenge to our intuition posed by comparing the sizes of
infinite sets.
</pre></div>

<p>For the standard LaTeX classes <code>book</code> and <code>report</code> the
default output is like &lsquo;<samp>1.2.3 <var>title</var></samp>&rsquo; (for chapter&nbsp;1,
section&nbsp;2, subsection&nbsp;3), alone on its line and flush left, in
boldface and a larger type (the type size is <code>\large</code>).  The same
holds in <code>article</code> except that there are no chapters in that class
so it looks like &lsquo;<samp>2.3 <var>title</var></samp>&rsquo;.
</p>
<p>The <code>*</code>&nbsp;form shows <var>title</var>.
But it does not show the section number, does not increment the
<code>section</code> counter, and produces no table of contents entry.
</p>
<p>The optional argument <var>toc-title</var> will appear as the section title
in the table of contents (see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>).  If it is
not present then <var>title</var> will be there.  This shows the full name in
the title of the section,
</p>
<div class="example">
<pre class="example">\subsection[$\alpha,\beta,\gamma$ paper]{\textit{The Origin of
  Chemical Elements} by R.A.~Alpher, H.~Bethe, and G.~Gamow}
</pre></div>

<p>but only &lsquo;<samp>&#x03B1;,&#x03B2;,&#x03B3;
paper</samp>&rsquo; on the contents page.
</p>
<p>For determining which sectional units are numbered and which appear in
the table of contents, the level number of a subsection is&nbsp;2
(see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a> and see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<a name="index-package_002c-indentfirst-3" class="anchor"></a>
<a name="index-indentfirst-package-3" class="anchor"></a>

<p>The paragraph that follows the subsection title is not indented, as is a
standard typographical practice.  One way to get an indent is to use the
package <samp>indentfirst</samp>.
</p>
<a name="index-package_002c-titlesec-3" class="anchor"></a>
<a name="index-titlesec-package-3" class="anchor"></a>

<p>There are a number of ways to change the behavior of the
<code>\subsection</code> command.  One is the <code>\@startsection</code> command
(see <a href="#g_t_005c_0040startsection">\@startsection</a>).  There are also many packages on CTAN that
address this, including <samp>titlesec</samp>.  See the documentation but the
example below gives a sense of what they can do.
</p>
<div class="example">
<pre class="example">\usepackage{titlesec}   % in preamble
\titleformat{\subsection}[runin]
  {\normalfont\normalsize\bfseries}  % format of the title
  {\thesubsection}                   % label
  {0.6em}                            % space between label and title
  {}                                 % before-code hook
</pre></div>

<p>That puts the subsection number and <var>title</var> in the first line of
text.
</p>

<hr>
<a name="g_t_005csubsubsection-_0026-_005cparagraph-_0026-_005csubparagraph" class="anchor"></a>

<a name="g_t_005csubsubsection_002c-_005cparagraph_002c-_005csubparagraph" class="anchor"></a>
<h3 class="section"><code>\subsubsection</code>, <code>\paragraph</code>, <code>\subparagraph</code></h3>

<a name="index-_005csubsubsection" class="anchor"></a>
<a name="index-subsubsection" class="anchor"></a>
<a name="index-_005cparagraph-1" class="anchor"></a>
<a name="index-paragraph-1" class="anchor"></a>
<a name="index-_005csubparagraph-1" class="anchor"></a>
<a name="index-subparagraph-1" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\subsubsection{<var>title</var>}
\subsubsection*{<var>title</var>}
\subsubsection[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>or one of:
</p>
<div class="example">
<pre class="example">\paragraph{<var>title</var>}
\paragraph*{<var>title</var>}
\paragraph[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>or one of:
</p>
<div class="example">
<pre class="example">\subparagraph{<var>title</var>}
\subparagraph*{<var>title</var>}
\subparagraph[<var>toc-title</var>]{<var>title</var>}
</pre></div>

<p>Start a subsubsection, paragraph, or subparagraph.  The standard
LaTeX classes <code>article</code>, <code>book</code>, and <code>report</code> all have
these commands, although they are not commonly used.
</p>
<p>This produces a subsubsection.
</p>
<div class="example">
<pre class="example">\subsubsection{Piston ring compressors: structural performance}
Provide exterior/interior wall cladding assemblies
capable of withstanding the effects of load and stresses from 
consumer-grade gasoline engine piston rings.
</pre></div>

<p>The default output of each of the three does not change over the
standard LaTeX classes <code>article</code>, <code>book</code>, and
<code>report</code>.  For <code>\subsubsection</code> the <var>title</var> is alone on
its line, in boldface and normal size type.  For <code>\paragraph</code> the
<var>title</var> is inline with the text, not indented, in boldface and
normal size type.  For <code>\subparagraph</code> the <var>title</var> is inline
with the text, with a paragraph indent, in boldface and normal size type
(Because an <code>article</code> has no chapters its subsubsections are
numbered and so it looks like &lsquo;<samp>1.2.3 <var>title</var></samp>&rsquo;, for
section&nbsp;1, subsection&nbsp;2, and subsubsection&nbsp;3.  The other
two divisions are not numbered.)
</p>
<p>The <code>*</code>&nbsp;form shows <var>title</var>.  But it does not increment the
associated counter and produces no table of contents entry (and does not
show the number for <code>\subsubsection</code>).
</p>
<p>The optional argument <var>toc-title</var> will appear as the division title
in the table of contents (see <a href="latex2e_25.html#Table-of-contents-etc_002e">Table of contents etc.</a>).  If it is
not present then <var>title</var> will be there.
</p>
<p>For determining which sectional units are numbered and which appear in
the table of contents, the level number of a subsubsection is&nbsp;3, of
a paragraph is&nbsp;4, and of a subparagraph is&nbsp;5
(see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a> and see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).
</p>
<a name="index-package_002c-indentfirst-4" class="anchor"></a>
<a name="index-indentfirst-package-4" class="anchor"></a>

<p>The paragraph that follows the subsubsection title is not indented, as is a
standard typographical practice.  One way to get an indent is to use the
package <samp>indentfirst</samp>.
</p>
<a name="index-package_002c-titlesec-4" class="anchor"></a>
<a name="index-titlesec-package-4" class="anchor"></a>

<p>There are a number of ways to change the behavior of the these commands.
One is the <code>\@startsection</code> command (see <a href="#g_t_005c_0040startsection">\@startsection</a>).
There are also many packages on CTAN that address this, including
<samp>titlesec</samp>.  See the documentation on CTAN.
</p>

<hr>
<a name="g_t_005cappendix" class="anchor"></a>

<a name="g_t_005cappendix-1" class="anchor"></a>
<h3 class="section"><code>\appendix</code></h3>

<a name="index-_005cappendix" class="anchor"></a>
<a name="index-appendix" class="anchor"></a>
<a name="index-appendices" class="anchor"></a>

<p>Synopsis:
</p>
<div class="example">
<pre class="example">\appendix
</pre></div>

<p>This does not directly produce any output.  But in a book or report it
declares that subsequent <code>\chapter</code> commands start an appendix.  In
an article it does the same, for <code>\section</code> commands.  It also
resets the <code>chapter</code> and <code>section</code> counters to&nbsp;0 in a
book or report, and in an article resets the <code>section</code> and
<code>subsection</code> counters.
</p>
<p>In this book
</p>
<div class="example">
<pre class="example">\chapter{One}  ...
\chapter{Two}  ...
 ...
\appendix
\chapter{Three}  ...
\chapter{Four}  ...
</pre></div>

<p>the first two will generate output numbered &lsquo;<samp>Chapter 1</samp>&rsquo; and
&lsquo;<samp>Chapter 2</samp>&rsquo;.  After the <code>\appendix</code> the numbering will be
&lsquo;<samp>Appendix A</samp>&rsquo; and &lsquo;<samp>Appendix B</samp>&rsquo;.  See <a href="latex2e_29.html#Larger-book-template">Larger book template</a>
for another example.
</p>
<a name="index-package_002c-appendix" class="anchor"></a>
<a name="index-appendix-package" class="anchor"></a>
<p>The <samp>appendix</samp> package adds the command
<code>\appendixpage</code> to put a separate &lsquo;<samp>Appendices</samp>&rsquo; in the document
body before the first appendix, and the command <code>\addappheadtotoc</code>
to do the same in the table of contents.  You can reset the name
&lsquo;<samp>Appendix</samp>&rsquo; with a command like
<code>\renewcommand{\appendixname}{Specification}</code>, as well as a
number of other features.  See the documentation on CTAN.
</p>

<hr>
<a name="g_t_005cfrontmatter-_0026-_005cmainmatter-_0026-_005cbackmatter" class="anchor"></a>

<a name="g_t_005cfrontmatter_002c-_005cmainmatter_002c-_005cbackmatter" class="anchor"></a>
<h3 class="section"><code>\frontmatter</code>, <code>\mainmatter</code>, <code>\backmatter</code></h3>

<a name="index-_005cfrontmatter" class="anchor"></a>
<a name="index-book_002c-front-matter" class="anchor"></a>
<a name="index-_005cmainmatter" class="anchor"></a>
<a name="index-book_002c-main-matter" class="anchor"></a>
<a name="index-_005cbackmatter" class="anchor"></a>
<a name="index-book_002c-back-matter" class="anchor"></a>
<a name="index-book_002c-end-matter" class="anchor"></a>

<p>Synopsis, one of:
</p>
<div class="example">
<pre class="example">\frontmatter
\mainmatter
\backmatter
</pre></div>

<p>Format a <code>book</code> class document differently according to which part
of the document is being produced.  All three commands are optional.
</p>
<p>Traditionally, a book&rsquo;s front matter contains such things as the title
page, an abstract, a table of contents, a preface, a list of notations,
a list of figures, and a list of tables.  (Some of these front matter
pages, such as the title page, are traditionally not numbered.)  The
back matter may contain such things as a glossary, notes, a
bibliography, and an index.
</p>
<p>The <code>\frontmatter</code> declaration makes the pages numbered in
lowercase roman, and makes chapters not numbered, although each
chapter&rsquo;s title appears in the table of contents; if you use other
sectioning commands here, use the <code>*</code>-version (see <a href="#Sectioning">Sectioning</a>).
The <code>\mainmatter</code> changes the behavior back to the expected
version, and resets the page number.  The <code>\backmatter</code> leaves the
page numbering alone but switches the chapters back to being not
numbered.  See <a href="latex2e_29.html#Larger-book-template">Larger book template</a> for an example using the three.
</p>

<hr>
<a name="g_t_005c_0040startsection" class="anchor"></a>
<a name="g_t_005c_0040startsection-1" class="anchor"></a>
<h3 class="section"><code>\@startsection</code></h3>

<a name="index-_005c_0040startsection" class="anchor"></a>
<a name="index-section_002c-redefining" class="anchor"></a>

<p>Synopsis:
</p>
<div class="example">
<pre class="example">\@startsection{<var>name</var>}{<var>level</var>}{<var>indent</var>}{<var>beforeskip</var>}{<var>afterskip</var>}{<var>style</var>}
</pre></div>

<p>Used to help redefine the behavior of commands that start sectioning
divisions such as <code>\section</code> or <code>\subsection</code>.
</p>
<p>Note that the <samp>titlesec</samp> package makes manipulation of sectioning
easier.  Further, while most requirements for sectioning commands can be
satisfied with <code>\@startsection</code>, some cannot.  For instance, in
the standard LaTeX <code>book</code> and <code>report</code> classes the commands
<code>\chapter</code> and <code>\report</code> are not constructed in this way.  To
make such a command you may want to use the <code>\secdef</code> command.
</p>
<p>Technically, <code>\@startsection</code> has the form
</p>
<div class="example">
<pre class="example">\@startsection{<var>name</var>}
  {<var>level</var>}
  {<var>indent</var>}
  {<var>beforeskip</var>}
  {<var>afterskip</var>}
  {<var>style</var>}*[<var>toctitle</var>]{<var>title</var>}
</pre></div>

<p>so that issuing
</p>
<div class="example">
<pre class="example">\renewcommand{\section}{\@startsection{<var>name</var>}
  {<var>level</var>}
  {<var>indent</var>}
  {<var>beforeskip</var>}
  {<var>afterskip</var>}
  {<var>style</var>}}
</pre></div>

<p>redefines <code>\section</code> to have the form
<code>\section*[<var>toctitle</var>]{<var>title</var>}</code> (here too, the
star&nbsp;<code>*</code> is optional).  See <a href="#Sectioning">Sectioning</a>.  This implies that
when you write a command like <code>\renewcommand{section}{...}</code>,
the <code>\@startsection{...}</code> must come last in the definition.  See
the examples below.
</p>
<dl compact="compact">
<dt><var>name</var></dt>
<dd><a name="startsection-name" class="anchor"></a><a name="g_t_005c_0040startsection_002fname" class="anchor"></a><p>Name of the counter used to number the sectioning header.  This counter
must be defined separately.  Most commonly this is either
<code>section</code>, <code>subsection</code>, or <code>paragraph</code>.  Although in
those cases the counter name is the same as the sectioning command
itself, you don&rsquo;t have to use the same name.
</p>
<p>Then <code>\the</code><var>name</var> displays the title number and
<code>\</code><var>name</var><code>mark</code> is for the page headers.  See the third
example below.
</p>
</dd>
<dt><var>level</var></dt>
<dd><a name="startsection-level" class="anchor"></a><a name="g_t_005c_0040startsection_002flevel" class="anchor"></a><p>An integer giving the depth of the sectioning command.
See <a href="#Sectioning">Sectioning</a> for the list of standard level numbers.
</p>
<p>If <var>level</var> is less than or equal to the value of the counter
<code>secnumdepth</code> then titles for this sectioning command will be
numbered (see <a href="#Sectioning_002fsecnumdepth">Sectioning/secnumdepth</a>).  For instance, if
<code>secnumdepth</code> is 1 in an <code>article</code> then the command
<code>\section{Introduction}</code> will produce output like &ldquo;1
Introduction&rdquo; while <code>\subsection{Discussion}</code> will produce
output like &ldquo;Discussion&rdquo;, without the number prefix.
</p>
<p>If <var>level</var> is less than or equal to the value of the counter
<var>tocdepth</var> then the table of contents will have an entry for this
sectioning unit (see <a href="#Sectioning_002ftocdepth">Sectioning/tocdepth</a>).  For instance, in an
<code>article</code>, if <var>tocdepth</var> is 1 then the table of contents will
list sections but not subsections.
</p>
</dd>
<dt><var>indent</var></dt>
<dd><a name="startsection-indent" class="anchor"></a><a name="g_t_005c_0040startsection_002findent" class="anchor"></a><p>A length giving the indentation of all of the title lines with respect
to the left margin.  To have the title flush with the margin use
<code>0pt</code>.  A negative indentation such as <code>-\parindent</code> will move
the title into the left margin.
</p>
</dd>
<dt><var>beforeskip</var></dt>
<dd><a name="startsection-beforeskip" class="anchor"></a><a name="g_t_005c_0040startsection_002fbeforeskip" class="anchor"></a><p>The absolute value of this length is the amount of vertical space that
is inserted before this sectioning unit&rsquo;s title.  This space will be
discarded if the sectioning unit happens to start at the top of a fresh
page.  If this number is negative then the first paragraph following the
header is not indented, if it is non-negative then the first paragraph
is indented.  (Note that the negative of <code>1pt plus 2pt minus 3pt</code>
is <code>-1pt plus -2pt minus -3pt</code>.)
</p>
<p>For example, if <var>beforeskip</var> is <code>-3.5ex plus -1ex minus -0.2ex</code>
then to start the new sectioning unit, LaTeX will add about 3.5 times
the height of a letter x in vertical space, and the first paragraph in
the section will not be indented.  Using a rubber length, with
<code>plus</code> and <code>minus</code>, is good practice here since it gives
LaTeX more flexibility in making up the page (see <a href="latex2e_14.html#Lengths">Lengths</a>).
</p>
<p>The full accounting of the vertical space between the baseline of the
line prior to this sectioning unit&rsquo;s header and the baseline of the
header is that it is the sum of the <code>\parskip</code> of the text font,
the <code>\baselineskip</code> of the title font, and the absolute value of
the <var>beforeskip</var>.  This space is typically rubber so it may stretch
or shrink.  (If the sectioning unit starts on a fresh page so that the
vertical space is discarded then the baseline of the header text will be
where LaTeX would put the baseline of the first text line on that
page.)
</p>
</dd>
<dt><var>afterskip</var></dt>
<dd><a name="startsection-afterskip" class="anchor"></a><a name="g_t_005c_0040startsection_002fafterskip" class="anchor"></a><p>This is a length.  If <var>afterskip</var> is non-negative then this is the
vertical space inserted after the sectioning unit&rsquo;s title header.  If it
is negative then the title header becomes a run-in header, so that it
becomes part of the next paragraph.  In this case the absolute value of
the length gives the horizontal space between the end of the title and
the beginning of the following paragraph.  (Note that the negative of
<code>1pt plus 2pt minus 3pt</code> is <code>-1pt plus -2pt minus -3pt</code>.)
</p>
<p>As with <var>beforeskip</var>, using a rubber length, with <code>plus</code> and
<code>minus</code> components, is good practice here since it gives LaTeX
more flexibility in putting together the page.
</p>
<p>If <code>afterskip</code> is non-negative then the full accounting of the
vertical space between the baseline of the sectioning unit&rsquo;s header and
the baseline of the first line of the following paragraph is that it is
the sum of the <code>\parskip</code> of the title font, the
<code>\baselineskip</code> of the text font, and the value of <var>after</var>.
That space is typically rubber so it may stretch or shrink.  (Note that
because the sign of <code>afterskip</code> changes the sectioning unit
header&rsquo;s from standalone to run-in, you cannot use a negative
<code>afterskip</code> to cancel part of the <code>\parskip</code>.)
</p>
</dd>
<dt><var>style</var></dt>
<dd><a name="startsection-style" class="anchor"></a><a name="g_t_005c_0040startsection_002fstyle" class="anchor"></a><p>Controls the styling of the title.  See the examples below.  Typical
commands to use here are <code>\centering</code>, <code>\raggedright</code>,
<code>\normalfont</code>, <code>\hrule</code>, or <code>\newpage</code>.  The last command
in <var>style</var> may be one that takes one argument, such as
<code>\MakeUppercase</code> or <code>\fbox</code> that takes one argument.  The
section title will be supplied as the argument to this command. For
instance, setting <var>style</var> to <code>\bfseries\MakeUppercase</code> would
produce titles that are bold and uppercase.
</p></dd>
</dl>

<p>These are LaTeX&rsquo;s defaults for the first three sectioning units that
are defined with <code>\@startsection</code>, for the <samp>article</samp>,
<samp>book</samp>, and <samp>report</samp> classes.  For section, the <var>level</var> is
1, the <var>indent</var> is 0pt, the <var>beforeskip</var> is <code>-3.5ex
plus -1ex minus -0.2ex</code>, the <var>afterskip</var> is <code>2.3ex plus 0.2ex</code>,
and the <var>style</var> is <code>\normalfont\Large\bfseries</code>.  For
subsection, the <var>level</var> is 2, the <var>indent</var> is 0pt, the
<var>beforeskip</var> is <code>-3.25ex plus -1ex minus -0.2ex</code>, the
<var>afterskip</var> is <code>1.5ex plus 0.2ex</code>, and the <var>style</var> is
<code>\normalfont\large\bfseries</code>.  For subsubsection, the <var>level</var>
is 3, the <var>indent</var> is 0pt, the <var>beforeskip</var> is
<code>-3.25ex plus -1ex minus -0.2ex</code>, the <var>afterskip</var> is
<code>1.5ex plus 0.2ex</code>, and the <var>style</var> is
<code>\normalfont\normalsize\bfseries</code>.
</p>
<p>Here are examples.  They go either in a package or class file or in the
preamble of a LaTeX document.  If you put them in the preamble they
must go between a <code>\makeatletter</code> command and a
<code>\makeatother</code>.  (Probably the error message <code>You can't use
`\spacefactor' in vertical mode.</code>  means that you forgot this.)
See <a href="latex2e_12.html#g_t_005cmakeatletter-_0026-_005cmakeatother">\makeatletter &amp; \makeatother</a>.
</p>
<p>This will put section titles in large boldface type, centered.  It says
<code>\renewcommand</code> because LaTeX&rsquo;s standard classes have already
defined a <code>\section</code>.  For the same reason it does not define a
<code>section</code> counter, or the commands <code>\thesection</code> and
<code>\l@section</code>.
</p>
<div class="example">
<pre class="example">\renewcommand\section{%
  \@startsection{section}% <a href="#g_t_005c_0040startsection_002fname"><var>name</var></a>
    {1}% <a href="#g_t_005c_0040startsection_002flevel"><var>level</var></a>
    {0pt}% <a href="#g_t_005c_0040startsection_002findent"><var>indent</var></a>
    {-3.5ex plus -1ex minus -.2ex}% <a href="#g_t_005c_0040startsection_002fbeforeskip"><var>beforeskip</var></a>
    {2.3ex plus.2ex}% <a href="#g_t_005c_0040startsection_002fafterskip"><var>afterskip</var></a>
    {\centering\normalfont\Large\bfseries}% <a href="#g_t_005c_0040startsection_002fstyle"><var>style</var></a>
  }
</pre></div>

<p>This will put <code>subsection</code> titles in small caps type, inline with the paragraph.
</p>
<div class="example">
<pre class="example">\renewcommand\subsection{%
  \@startsection{subsection}%  <a href="#g_t_005c_0040startsection_002fname"><var>name</var></a>
    {2}% <a href="#g_t_005c_0040startsection_002flevel"><var>level</var></a>
    {0em}% <a href="#g_t_005c_0040startsection_002findent"><var>indent</var></a>
    {-1ex plus 0.1ex minus -0.05ex}% <a href="#g_t_005c_0040startsection_002fbeforeskip"><var>beforeskip</var></a>
    {-1em plus 0.2em}% <a href="#g_t_005c_0040startsection_002fafterskip"><var>afterskip</var></a>
    {\scshape}% <a href="#g_t_005c_0040startsection_002fstyle"><var>style</var></a>
  }
</pre></div>

<p>The prior examples redefined existing sectional unit title commands.
This defines a new one, illustrating the needed counter and macros to
display that counter.
</p>
<div class="example">
<pre class="example">\setcounter{secnumdepth}{6}% show counters this far down
\newcounter{subsubparagraph}[subparagraph]% counter for numbering
\renewcommand{\thesubsubparagraph}%               how to display 
  {\thesubparagraph.\@arabic\c@subsubparagraph}%  numbering
\newcommand{\subsubparagraph}{\@startsection
                         {subsubparagraph}%
                         {6}%
                         {0em}%
                         {\baselineskip}%
                         {0.5\baselineskip}%
                         {\normalfont\normalsize}}
\newcommand*\l@subsubparagraph{\@dottedtocline{6}{10em}{5em}}% for toc
\newcommand{\subsubparagraphmark}[1]{}% for page headers
</pre></div>





</body>
</html>