File: FAQ-secthead.html

package info (click to toggle)
tetex-base 3.0.dfsg.3-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 239,540 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (65 lines) | stat: -rw-r--r-- 5,204 bytes parent folder | download | duplicates (2)
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
<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'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\sc #1}}
\newcommand{\ssubsection}[1]{%
  \subsection[#1]{\raggedright\it #1}}
</pre>
</blockquote>
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't perfect: section numbers
remain in bold, and starred forms need a separate redefinition.
<p>The package <i>sectsty</i> provides an easy-to-use set of tools to
do this job, while the package <i>titlesec</i> has a structured
approach based on redefinition of the sectioning and chapter commands
themselves.  <i>Titlesec</i>'s approach allows it to offer far more
radical adjustment: its options provide (in effect) a toolbox for
designing your own sectioning commands' output.
<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 "like section headings"
(i.e., without the "Chapter" 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.
<p>The documentation of <i>fncychap</i> is distributed as a separate
PostScript file.
<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.tar.gz">macros/latex/contrib/fncychap</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/fncychap.zip">zip</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.tar.gz">macros/latex/contrib/koma-script</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/koma-script.zip">zip</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.tar.gz">macros/latex/contrib/memoir</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.zip">zip</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.tar.gz">macros/latex/contrib/sectsty</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/sectsty.zip">zip</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.tar.gz">macros/latex/contrib/titlesec</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/titlesec.zip">zip</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.tar.gz">macros/latex/contrib/tocbibind</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/tocbibind.zip">zip</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>