summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-secthead.html
blob: eecfc7e25dfee7b088d3fc337385a774063d251c (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
<head>
<title>UK TeX FAQ -- question label secthead</title>
</head><body>
<h3>The style of section headings</h3>
<p/>Suppose that the editor of your favourite journal has specified that section
headings must be centred, in small capitals, and subsection headings ragged 
right in italic, but that you don&rsquo;t want to get involved in the sort of
programming described in section 2.2 of <em>The LaTeX Companion</em>

  (see <a href="FAQ-books.html">TeX-related books</a>; the
  <a href="FAQ-atsigns.html">programming</a> itself is discussed elsewhere in this
  FAQ).
The following hack will 
probably satisfy your editor. Define yourself new commands
<blockquote>
<pre>
\newcommand{\ssection}[1]{%
  \section[#1]{\centering\normalfont\scshape #1}}
\newcommand{\ssubsection}[1]{%
  \subsection[#1]{\raggedright\normalfont\itshape #1}}
</pre>

</blockquote><p>
and then use <code>\</code><code>ssection</code> and <code>\</code><code>ssubsection</code> in place of
<code>\</code><code>section</code> and <code>\</code><code>subsection</code>. This isn&rsquo;t perfect: section numbers
remain in bold, and starred forms need a separate redefinition.
<p/>The <i>titlesec</i> package offers a structured approach to the
problem, based on redefinition of the sectioning and chapter commands
themselves.  This approach allows it to offer radical adjustment: its
options provide (in effect) a toolbox for designing your own
sectioning commands&rsquo; output.
<p/>The <i>sectsty</i> package provides a more simply structured set of
tools; while it is less powerful than is <i>titlesec</i>, it is
perhaps preferable for minor adjustments, since you can use it after
having read a smaller proportion of the manual.
<p/>The <i>fncychap</i> package provides a nice collection of customised
chapter heading designs.  The <i>anonchap</i> package provides a
simple means of typesetting chapter headings &ldquo;like section headings&rdquo;
(i.e., without the &ldquo;Chapter&rdquo; part of the heading); the
<i>tocbibind</i> package provides the same commands, in pursuit of
another end.  Unfortunately, <i>fncychap</i> is not attuned to the
existence of front- and backmatter in <i>book</i> class documents.
<p/>The <i>memoir</i> class includes facilities that match
<i>sectsty</i> and <i>titlesec</i>, as well as a bundle of
chapter heading styles (including an <i>anonchap</i>-equivalent).
The <i>KOMA-script</i> classes also have sets of tools that provide
equivalent functionality, notably formatting specifications <code>\</code><code>partformat</code>,
<code>\</code><code>chapterformat</code>, <code>\</code><code>sectionformat</code>, ..., as well as several
useful overall formatting specifications defined in class options.
<p/>Finally, the indefatigable Vincent Zoonekynd supplies examples of how
to program alternative 
<a href="http://zoonek.free.fr/LaTeX/LaTeX_samples_chapter/0.html">chapter heading styles</a>
and
<a href="http://zoonek.free.fr/LaTeX/LaTeX_samples_section/0.html">section heading styles</a>.
The web pages provide programming examples, and expect users to adapt
them to their own LaTeX use.
<dl>
<dt><tt><i>anonchap.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archivemacros/latex/contrib/misc/anonchap.sty">macros/latex/contrib/misc/anonchap.sty</a>
<dt><tt><i>fncychap.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/fncychap.zip">macros/latex/contrib/fncychap</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/fncychap/">browse the directory</a>)
<dt><tt><i>KOMA script bundle</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/koma-script.zip">macros/latex/contrib/koma-script</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/koma-script/">browse the directory</a>)
<dt><tt><i>memoir.cls</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir/">browse the directory</a>)
<dt><tt><i>sectsty.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/sectsty.zip">macros/latex/contrib/sectsty</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/sectsty/">browse the directory</a>)
<dt><tt><i>titlesec.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/titlesec.zip">macros/latex/contrib/titlesec</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/titlesec/">browse the directory</a>)
<dt><tt><i>tocbibind.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/tocbibind.zip">macros/latex/contrib/tocbibind</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/tocbibind/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=secthead">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=secthead</a>
</body>