/usr/share/doc/texinfo/html/Custom-Headings.html is in texinfo-doc-nonfree 6.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual is for GNU Texinfo (version 6.5, 25 August 2017),
a documentation system that can produce both online information and a
printed manual from a single source using semantic markup.
Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
1998, 1999, 2001, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
2010, 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being "A GNU Manual",
and with the Back-Cover Texts as in (a) below. A copy of the license
is included in the section entitled "GNU Free Documentation
License".
(a) The FSF's Back-Cover Text is: "You have the freedom to copy and
modify this GNU manual. Buying copies from the FSF supports it in
developing GNU and promoting software freedom." -->
<!-- Created by GNU Texinfo 6.4.90, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Custom Headings (GNU Texinfo 6.5)</title>
<meta name="description" content="Custom Headings (GNU Texinfo 6.5)">
<meta name="keywords" content="Custom Headings (GNU Texinfo 6.5)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Command-and-Variable-Index.html#Command-and-Variable-Index" rel="index" title="Command and Variable Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Headings.html#Headings" rel="up" title="Headings">
<link href="Catching-Mistakes.html#Catching-Mistakes" rel="next" title="Catching Mistakes">
<link href="Heading-Choice.html#Heading-Choice" rel="prev" title="Heading Choice">
<style type="text/css">
<!--
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 lang="en">
<a name="Custom-Headings"></a>
<div class="header">
<p>
Previous: <a href="Heading-Choice.html#Heading-Choice" accesskey="p" rel="prev">Heading Choice</a>, Up: <a href="Headings.html#Headings" accesskey="u" rel="up">Headings</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html#Command-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="How-to-Make-Your-Own-Headings"></a>
<h3 class="section">E.4 How to Make Your Own Headings</h3>
<p>You can use the standard headings provided with Texinfo or specify
your own. By default, Texinfo has no footers, so if you specify them,
the available page size for the main text will be slightly reduced.
</p>
<p>Texinfo provides six commands for specifying headings and
footings:
</p><ul>
<li> <code>@everyheading</code> and <code>@everyfooting</code> generate page headers and
footers that are the same for both even- and odd-numbered pages.
</li><li> <code>@evenheading</code> and <code>@evenfooting</code> command generate headers
and footers for even-numbered (left-hand) pages.
</li><li> <code>@oddheading</code> and <code>@oddfooting</code> generate headers and footers
for odd-numbered (right-hand) pages.
</li></ul>
<p>Write custom heading specifications in the Texinfo file immediately
after the <code>@end titlepage</code> command. You must cancel the
predefined heading commands with the <code>@headings off</code> command
before defining your own specifications.
</p>
<p>Here is how to tell TeX to place the chapter name at the left, the
page number in the center, and the date at the right of every header
for both even- and odd-numbered pages:
</p>
<div class="example">
<pre class="example">@headings off
@everyheading @thischapter @| @thispage @| @today{}
</pre></div>
<p>You need to divide the left part from the central part and the central
part from the right part by inserting ‘<samp>@|</samp>’ between parts.
Otherwise, the specification command will not be able to tell where
the text for one part ends and the next part begins.
</p>
<p>Each part can contain text or @-commands. The text is printed as if
the part were within an ordinary paragraph in the body of the page.
The @-commands replace themselves with the page number, date, chapter
name, or whatever.
</p>
<p>Here are the six heading and footing commands:
</p>
<dl compact="compact">
<dt><code>@everyheading <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dt><code>@everyfooting <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dd><a name="index-everyheading"></a>
<a name="index-everyfooting"></a>
<p>The ‘every’ commands specify the format for both even- and odd-numbered
pages. These commands are for documents that are printed on one side
of each sheet of paper, or for documents in which you want symmetrical
headers or footers.
</p>
</dd>
<dt><code>@evenheading <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dt><code>@oddheading <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dt><code>@evenfooting <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dt><code>@oddfooting <var>left</var> @| <var>center</var> @| <var>right</var></code></dt>
<dd><a name="index-evenheading"></a>
<a name="index-evenfooting"></a>
<a name="index-oddheading"></a>
<a name="index-oddfooting"></a>
<p>The ‘even’ and ‘odd’ commands specify the format for even-numbered
pages and odd-numbered pages. These commands are for books and
manuals that are printed on both sides of each sheet of paper.
</p></dd>
</dl>
<p>Use the ‘<samp>@this…</samp>’ series of @-commands to
provide the names of chapters
and sections and the page number. You can use the
‘<samp>@this…</samp>’ commands in the left, center, or right portions
of headers and footers, or anywhere else in a Texinfo file so long as
they are between <code>@iftex</code> and <code>@end iftex</code> commands.
</p>
<p>Here are the ‘<samp>@this…</samp>’ commands:
</p>
<dl compact="compact">
<dt><code>@thispage</code></dt>
<dd><a name="index-thispage"></a>
<p>Expands to the current page number.
</p>
</dd>
<dt><code>@thissectionname</code></dt>
<dd><a name="index-thissectionname"></a>
<p>Expands to the name of the current section.
</p>
</dd>
<dt><code>@thissectionnum</code></dt>
<dd><a name="index-thissectionnum"></a>
<p>Expands to the number of the current section.
</p>
</dd>
<dt><code>@thissection</code></dt>
<dd><a name="index-thissection"></a>
<p>Expands to the number and name of the current section, in the format
‘Section 1: Title’.
</p>
</dd>
<dt><code>@thischaptername</code></dt>
<dd><a name="index-thischaptername"></a>
<p>Expands to the name of the current chapter.
</p>
</dd>
<dt><code>@thischapternum</code></dt>
<dd><a name="index-thischapternum"></a>
<p>Expands to the number of the current chapter, or letter of the current
appendix.
</p>
</dd>
<dt><code>@thischapter</code></dt>
<dd><a name="index-thischapter"></a>
<p>Expands to the number and name of the current
chapter, in the format ‘Chapter 1: Title’.
</p>
</dd>
<dt><code>@thistitle</code></dt>
<dd><a name="index-thistitle"></a>
<p>Expands to the name of the document, as specified by the
<code>@settitle</code> command.
</p>
</dd>
<dt><code>@thisfile</code></dt>
<dd><a name="index-thisfile"></a>
<p>For <code>@include</code> files only: expands to the name of the current
<code>@include</code> file. If the current Texinfo source file is not an
<code>@include</code> file, this command has no effect. This command does
<em>not</em> provide the name of the current Texinfo source file unless
it is an <code>@include</code> file. (See <a href="Include-Files.html#Include-Files">Include Files</a>, for more
information about <code>@include</code> files.)
</p></dd>
</dl>
<p>You can also use the <code>@today{}</code> command, which expands to the
current date, in ‘1 Jan 1900’ format.
<a name="index-today"></a>
</p>
<p>Other @-commands and text are printed in a header or footer just as
if they were in the body of a page. It is useful to incorporate text,
particularly when you are writing drafts:
</p>
<div class="example">
<pre class="example">@headings off
@everyheading @emph{Draft!} @| @thispage @| @thischapter
@everyfooting @| @| Version: 0.27: @today{}
</pre></div>
<p>Beware of overlong titles: they may overlap another part of the
header or footer and blot it out.
</p>
<p>If you have very short chapters and/or sections, several of them can
appear on a single page. You can specify which chapters and sections
you want <code>@thischapter</code>, <code>@thissection</code> and other such
macros to refer to on such pages as follows:
</p>
<dl compact="compact">
<dt><code>@everyheadingmarks <var>ref</var></code></dt>
<dt><code>@everyfootingmarks <var>ref</var></code></dt>
<dd><a name="index-everyheadingmarks"></a>
<a name="index-everyfootingmarks"></a>
<p>The <var>ref</var> argument can be either <code>top</code> (the <code>@this...</code>
commands will refer to the chapter/section at the top of a page) or
<code>bottom</code> (the commands will reflect the situation at the bottom
of a page). These ‘<samp>@every...</samp>’ commands specify what to do on
both even- and odd-numbered pages.
</p>
</dd>
<dt><code>@evenheadingmarks <var>ref</var></code></dt>
<dt><code>@oddheadingmarks <var>ref</var></code></dt>
<dt><code>@evenfootingmarks <var>ref</var></code></dt>
<dt><code>@oddfootingmarks <var>ref</var></code></dt>
<dd><a name="index-evenheadingmarks"></a>
<a name="index-oddheadingmarks"></a>
<a name="index-evenfootingmarks"></a>
<a name="index-oddfootingmarks"></a>
<p>These ‘<samp>@even...</samp>’ and ‘<samp>@odd...</samp>’ commands specify what to do
on only even- or odd-numbered pages, respectively. The <var>ref</var>
argument is the same as with the ‘<samp>@every...</samp>’ commands.
</p></dd>
</dl>
<p>Write these commands immediately after the <code>@...contents</code>
commands, or after the <code>@end titlepage</code> command if you don’t
have a table of contents or if it is printed at the end of your
manual.
</p>
<p>By default the <code>@this...</code> commands reflect the situation at the
bottom of a page both in headings and in footings.
</p>
<hr>
<div class="header">
<p>
Previous: <a href="Heading-Choice.html#Heading-Choice" accesskey="p" rel="prev">Heading Choice</a>, Up: <a href="Headings.html#Headings" accesskey="u" rel="up">Headings</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Command-and-Variable-Index.html#Command-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|