summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/html/FAQ-secthead.html
blob: fd1d5e8428882407f24bd49d40b380d179e5c28c (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 are not useful to users unless they are willing to do
their own LaTeX programming.
<dl>
<dt><tt><i>anonchap.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/misc/anonchap.sty">macros/latex/contrib/misc/anonchap.sty</a>
<dt><tt><i>fncychap.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/fncychap.zip">macros/latex/contrib/fncychap</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/fncychap.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/fncychap/">browse</a>)
<dt><tt><i>KOMA script bundle</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.zip">macros/latex/contrib/koma-script</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/koma-script/">browse</a>)
<dt><tt><i>memoir.cls</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/memoir/">browse</a>)
<dt><tt><i>sectsty.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/sectsty.zip">macros/latex/contrib/sectsty</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/sectsty.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/sectsty/">browse</a>)
<dt><tt><i>titlesec.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/titlesec.zip">macros/latex/contrib/titlesec</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/titlesec.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/titlesec/">browse</a>)
<dt><tt><i>tocbibind.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/tocbibind.zip">macros/latex/contrib/tocbibind</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/tocbibind.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/tocbibind/">browse</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>