summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-runheadtoobig.html
blob: 598c6c22cb2fdb2377bf9f1adcf569bbfbf27b32 (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
<head>
<title>UK TeX FAQ -- question label runheadtoobig</title>
</head><body>
<h3>My section title is too wide for the page header</h3>
<p/>By default, LaTeX sectioning commands make the chapter or section
title available for use by page headers and the like.  Page headers
operate in a rather constrained area, and it&rsquo;s common for titles too
be too big to fit: the LaTeX sectioning commands therefore take an
optional argument:
<blockquote>
<pre>
\section[short title]{full title}
</pre>
</blockquote><p>
If the &lt;<i>short title</i>&gt; is present, it is used both for the table of
contents and for the page heading.  The usual answer to people who
complain that their title is too big for the running head is to
suggest that they the optional argument.
<p/>However, using the same text for the table of contents as for the
running head may also be unsatisfactory: if your chapter titles are
seriously long (like those of a Victorian novel), a valid and rational
scheme is to have a shortened table of contents entry, and a really
terse entry in the running head.
<p/>One of the problems is the tendency of page headings to be set in
capitals (which take up more space); so why not set headings as written
for &ldquo;ordinary&rdquo; reading?  It&rsquo;s not possible to do so with unmodified
LaTeX, but the <i>fancyhdr</i> package provides a command
<code>\</code><code>nouppercase</code> for use in its header (and footer) lines to suppress
LaTeX&rsquo;s uppercasing tendencies.  Classes in the <i>KOMA-script</i>
bundle don&rsquo;t uppercase in the first place.
<p/>In fact, the sectioning commands use &lsquo;mark&rsquo; commands to pass
information to the page headers.  For example, <code>\</code><code>chapter</code> uses
<code>\</code><code>chaptermark</code>, <code>\</code><code>section</code> uses <code>\</code><code>sectionmark</code>, and so on.  With
this knowledge, one can achieve a three-layer structure for chapters:
<blockquote>
<pre>
\chapter[middling version]{verbose version}
\chaptermark{terse version}
</pre>
</blockquote><p>
which should supply the needs of every taste.
<p/>Chapters, however, have it easy: hardly any book design puts a page
header on a chapter start page.  In the case of sections, one has
typically to take account of the nature of the <code>\</code><code>*mark</code> commands:
the thing that goes in the heading is the first mark on the page (or,
failing any mark, the last mark on any previous page).  As a result
the recipe for sections is more tiresome:
<blockquote>
<pre>
\section[middling version]{verbose version%
              \sectionmark{terse version}}
\sectionmark{terse version}
</pre>
</blockquote><p>
(the first <code>\</code><code>sectionmark</code> deals with the header of the page the
<code>\</code><code>section</code> command falls on, and the second deal with subsequent
pages; note that here, you need the optional argument to <code>\</code><code>section</code>,
even if &ldquo;<em>middling version</em>&rdquo; is in fact the same text as
&ldquo;<em>long version&rdquo;</em>.)
<p/>A similar arrangement is necessary even for chapters if the class
you&rsquo;re using is odd enough that it puts a page header on a chapter&rsquo;s
opening page.
<p/>Note that the <i>titlesec</i> package manages the running heads in
a completely different fashion; users of that package should refer to
the documentation.
<p/>The <i>memoir</i> class avoids all the silliness by providing an
extra optional argument for chapter and sectioning commands, for
example:
<blockquote>

<pre>
\section[middling version][terse version]{verbose version}
</pre>
</blockquote><p>
As a result, it is always possible for users of <i>memoir</i> to
tailor the header text to fit, with very little trouble.
<dl>
<dt><tt><i>fancyhdr.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/fancyhdr.zip">macros/latex/contrib/fancyhdr</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/fancyhdr/">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>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>)
</dl>
<p/>
<p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=runheadtoobig">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=runheadtoobig</a>
</body>