/usr/share/doc/texinfo/html/Custom-Headings.html is in texinfo-doc-nonfree 4.13a-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 | <html lang="en">
<head>
<title>Custom Headings - GNU Texinfo 4.13</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Texinfo 4.13">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Headings.html#Headings" title="Headings">
<link rel="prev" href="Heading-Choice.html#Heading-Choice" title="Heading Choice">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for GNU Texinfo (version 4.13, 18 September 2008),
a documentation system that can produce both online information and a
printed manual from a single source.
Copyright (C) 1988, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
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.2 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 are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Custom-Headings"></a>
<p>
Previous: <a rel="previous" accesskey="p" href="Heading-Choice.html#Heading-Choice">Heading Choice</a>,
Up: <a rel="up" accesskey="u" href="Headings.html#Headings">Headings</a>
<hr>
</div>
<!-- node-name, next, previous, up -->
<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>Texinfo provides six commands for specifying headings and
footings:
<ul>
<li><code>@everyheading</code> <code>@everyfooting</code> generate page headers and
footers that are the same for both even- and odd-numbered pages.
<li><code>@evenheading</code> and <code>@evenfooting</code> command generate headers
and footers for even-numbered (left-hand) pages.
<li><code>@oddheading</code> and <code>@oddfooting</code> generate headers and footers
for odd-numbered (right-hand) pages.
</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>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:
<pre class="example"> @headings off
@everyheading @thischapter @| @thispage @| @today{}
</pre>
<p class="noindent">You need to divide the left part from the central part and the central
part from the right part by inserting ‘<samp><span class="samp">@|</span></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>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>Here are the six heading and footing commands:
<dl>
<dt><code>@everyheading </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dt><code>@everyfooting </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dd><a name="index-everyheading-1430"></a><a name="index-everyfooting-1431"></a>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.
<br><dt><code>@evenheading </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dt><code>@oddheading </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dt><code>@evenfooting </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dt><code>@oddfooting </code><var>left</var><code> @| </code><var>center</var><code> @| </code><var>right</var><dd><a name="index-evenheading-1432"></a><a name="index-evenfooting-1433"></a><a name="index-oddheading-1434"></a><a name="index-oddfooting-1435"></a>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.
</dl>
<p>Use the ‘<samp><span class="samp">@this...</span></samp>’ series of @-commands to
provide the names of chapters
and sections and the page number. You can use the
‘<samp><span class="samp">@this...</span></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>Here are the ‘<samp><span class="samp">@this...</span></samp>’ commands:
<dl>
<dt><code>@thispage</code><dd><a name="index-thispage-1436"></a>Expands to the current page number.
<br><dt><code>@thissectionname</code><dd><a name="index-thissectionname-1437"></a>Expands to the name of the current section.
<br><dt><code>@thissectionnum</code><dd><a name="index-thissectionnum-1438"></a>Expands to the number of the current section.
<br><dt><code>@thissection</code><dd><a name="index-thissection-1439"></a>Expands to the number and name of the current section, in the format
`Section 1: Title'.
<br><dt><code>@thischaptername</code><dd><a name="index-thischaptername-1440"></a>Expands to the name of the current chapter.
<br><dt><code>@thischapternum</code><dd><a name="index-thischapternum-1441"></a>Expands to the number of the current chapter, or letter of the current
appendix.
<br><dt><code>@thischapter</code><dd><a name="index-thischapter-1442"></a>Expands to the number and name of the current
chapter, in the format `Chapter 1: Title'.
<br><dt><code>@thistitle</code><dd><a name="index-thistitle-1443"></a>Expands to the name of the document, as specified by the
<code>@settitle</code> command.
<br><dt><code>@thisfile</code><dd><a name="index-thisfile-1444"></a>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.)
</dl>
<p class="noindent">You can also use the <code>@today{}</code> command, which expands to the
current date, in `1 Jan 1900' format.
<a name="index-today-1445"></a>
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:
<pre class="example"> @headings off
@everyheading @emph{Draft!} @| @thispage @| @thischapter
@everyfooting @| @| Version: 0.27: @today{}
</pre>
<p>Beware of overlong titles: they may overlap another part of the
header or footer and blot it out.
<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:
<dl>
<dt><code>@everyheadingmarks </code><var>ref</var><dt><code>@everyfootingmarks </code><var>ref</var><dd><a name="index-everyheadingmarks-1446"></a><a name="index-everyfootingmarks-1447"></a>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><span class="samp">@every...</span></samp>’ commands specify what to do on
both even- and odd-numbered pages.
<br><dt><code>@evenheadingmarks </code><var>ref</var><dt><code>@oddheadingmarks </code><var>ref</var><dt><code>@evenfootingmarks </code><var>ref</var><dt><code>@oddfootingmarks </code><var>ref</var><dd><a name="index-evenheadingmarks-1448"></a><a name="index-oddheadingmarks-1449"></a><a name="index-evenfootingmarks-1450"></a><a name="index-oddfootingmarks-1451"></a>These ‘<samp><span class="samp">@even...</span></samp>’ and ‘<samp><span class="samp">@odd...</span></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><span class="samp">@every...</span></samp>’ commands.
</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>By default the <code>@this...</code> commands reflect the situation at the
bottom of a page both in headings and in footings.
</body></html>
|