[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Mon Jul 9 16:53:01 EDT 2007)
From: |
Karl Berry |
Subject: |
texinfo update (Mon Jul 9 16:53:01 EDT 2007) |
Date: |
Mon, 09 Jul 2007 16:53:03 -0400 |
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.727
retrieving revision 1.728
diff -u -r1.727 -r1.728
--- ChangeLog 8 Jul 2007 13:11:48 -0000 1.727
+++ ChangeLog 9 Jul 2007 20:34:30 -0000 1.728
@@ -1,3 +1,16 @@
+2007-07-09 Oleg Katsitadze <address@hidden>
+
+ * doc/texinfo.tex (\thissection): renamed to \lastsection.
+ (\thissectionname, \thissectionnum, \evenheadingmarks,
\oddheadingmarks, \evenfootingmarks, \oddfootingmarks, \everyheadingmarks,
\everyfootingmarks):
+ new macros.
+ (\thischapter, \thischaptername, \thischapternum, \thissection,
\thissectionname, \thissectionnum):
+ defined these using marks.
+ (\chapoddpage): omit heading and footing on blank filler pages.
+ * doc/texinfo.txi (Page headings): documented
+ \thissection{,name,num} and \{even,odd,every}{head,foot}ingmarks.
+ * makeinfo/cmds.c (command_table): added
+ {even,odd,every}{head,foot}ingmarks.
+
2007-07-08 Karl Berry <address@hidden>
* makeinfo/node.c (validate_file): don't check for warning limit,
@@ -534,7 +547,7 @@
(\quoteexpand): rename to \rquoteexpand.
(\codequoteleft): new def, to look for @set codequotebacktick.
(\lquoteexpand, \quoteexpand): new defs.
- (\lquoteChar, \rquoteChar, \dashChar, \underChar: new \chardef's.
+ (\lquoteChar, \rquoteChar, \dashChar, \underChar): new \chardef's.
(\code): must use new \...Char values, since now ` is active.
2006-10-01 Karl Berry <address@hidden>
Index: doc/texinfo.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -r1.249 -r1.250
--- doc/texinfo.tex 5 Jul 2007 17:13:42 -0000 1.249
+++ doc/texinfo.tex 9 Jul 2007 20:34:30 -0000 1.250
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2007-07-05.10}
+\def\texinfoversion{2007-07-09.23}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -277,6 +277,50 @@
\newdimen\cornerthick \cornerthick=.3pt
\newdimen\topandbottommargin \topandbottommargin=.75in
+% Output a mark which sets \thischapter, \thissection and \thiscolor.
+% We dump everything together because we only have one kind of mark.
+% This works because we only use \botmark / \topmark, not \firstmark.
+%
+% A mark contains a subexpression of the \ifcase ... \fi construct.
+% \get*marks macros below extract the needed part using \ifcase.
+%
+% Another complication is to let the user choose whether \thischapter
+% (\thissection) refers to the chapter (section) in effect at the top
+% of a page, or that at the bottom of a page. The solution is
+% described on page 260 of The TeXbook. It involves outputting two
+% marks for the sectioning macros, one before the section break, and
+% one after. I won't pretend I can describe this better than DEK...
+\def\domark{%
+ \toks0=\expandafter{\lastchapterdefs}%
+ \toks2=\expandafter{\lastsectiondefs}%
+ \toks4=\expandafter{\prevchapterdefs}%
+ \toks6=\expandafter{\prevsectiondefs}%
+ \toks8=\expandafter{\lastcolordefs}%
+ \mark{%
+ \the\toks0 \the\toks2
+ \noexpand\or \the\toks4 \the\toks6
+ \noexpand\else \the\toks8
+ }%
+}
+% \topmark doesn't work for the very first chapter (after the title
+% page or the contents), so we use \firstmark there -- this gets us
+% the mark with the chapter defs, unless the user sneaks in, e.g.,
+% @setcolor (or @url, or @link, etc.) between @contents and the very
+% first @chapter.
+\def\gettopheadingmarks{%
+ \ifcase0\topmark\fi
+ \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
+}
+\def\getbottomheadingmarks{\ifcase1\botmark\fi}
+\def\getcolormarks{\ifcase2\topmark\fi}
+
+% Avoid "undefined control sequence" errors.
+\def\lastchapterdefs{}
+\def\lastsectiondefs{}
+\def\prevchapterdefs{}
+\def\prevsectiondefs{}
+\def\lastcolordefs{}
+
% Main output routine.
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
@@ -294,7 +338,9 @@
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
\setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
%
{%
@@ -1261,27 +1307,43 @@
\ifpdf
%
- % Color manipulation macros from pdfcolor.tex.
+ % Color manipulation macros based on pdfcolor.tex.
\def\cmykDarkRed{0.28 1 1 0.35}
\def\cmykBlack{0 0 0 1}
%
\def\pdfsetcolor#1{\pdfliteral{#1 k}}
- \def\setcolor#1{\mark{#1}\pdfsetcolor{#1}}
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
%
\def\maincolor{\cmykBlack}
\pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
%
- \def\makefootline{
- \baselineskip24pt
- \line{\pdfsetcolor{\maincolor}\the\footline}}
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
%
\def\makeheadline{%
- \edef\M{\topmark}
- \ifx\M\empty\let\M=\maincolor\fi
- \vbox to 0pt{\vskip-22.5pt
- \line{\vbox to8.5pt{}%
- \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\M}}\vss}%
- \nointerlineskip}
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
%
%
\pdfcatalog{/PageMode /UseOutlines}
@@ -2817,6 +2879,33 @@
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+% @evenheadingmarks top \thischapter <- chapter at the top of a page
+% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
+%
+% The same set of arguments for:
+%
+% @oddheadingmarks
+% @evenfootingmarks
+% @oddfootingmarks
+% @everyheadingmarks
+% @everyfootingmarks
+
+\def\evenheadingmarks{\headingmarks{even}{heading}}
+\def\oddheadingmarks{\headingmarks{odd}{heading}}
+\def\evenfootingmarks{\headingmarks{even}{footing}}
+\def\oddfootingmarks{\headingmarks{odd}{footing}}
+\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+ \headingmarks{odd}{heading}{#1} }
+\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+ \headingmarks{odd}{footing}{#1} }
+% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
+\def\headingmarks#1#2#3 {%
+ \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
+ \global\expandafter\let\csname get#1#2marks\endcsname \temp
+}
+
+\everyheadingmarks bottom
+\everyfootingmarks bottom
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
@@ -4596,11 +4685,15 @@
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-% Each @chapter defines this as the name of the chapter.
-% page headings and footings can use it. @section does likewise.
-% However, they are not reliable, because we don't use marks.
+% Each @chapter defines these (using marks) as the number+name, number
+% and name of the chapter. Page headings and footings can use
+% these. @section does likewise.
\def\thischapter{}
+\def\thischapternum{}
+\def\thischaptername{}
\def\thissection{}
+\def\thissectionnum{}
+\def\thissectionname{}
\newcount\absseclevel % used to calculate proper heading level
\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
@@ -4901,7 +4994,20 @@
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
-\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+% Because \domark is called before \chapoddpage, the filler page will
+% get the headings for the next chapter, which is wrong. But we don't
+% care -- we just disable all headings on the filler page.
+\def\chapoddpage{%
+ \chappager
+ \ifodd\pageno \else
+ \begingroup
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+ \hbox to 0pt{}%
+ \chappager
+ \endgroup
+ \fi
+}
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
@@ -4935,45 +5041,72 @@
\def\Yappendixkeyword{Yappendix}
%
\def\chapmacro#1#2#3{%
+ % Insert the first mark before the heading break (see notes for \domark).
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+ \gdef\thissection{}}%
+ %
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{\thischaptername}}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{}}%
+ \else\ifx\temptype\Yappendixkeyword
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\appendixletter}%
+ \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \else
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\the\chapno}%
+ \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \fi\fi\fi
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert the chapter heading break.
\pchapsepmacro
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
{%
\chapfonts \rm
%
- % Have to define \thissection before calling \donoderef, because the
+ % Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
% after \pchapsepmacro, or the headline will change too soon.
- \gdef\thissection{#1}%
- \gdef\thischaptername{#1}%
+ \gdef\lastsection{#1}%
%
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
- \def\temptype{#2}%
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
- \gdef\thischapternum{}%
- \gdef\thischapter{#1}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
- \gdef\thischapternum{}%
- \gdef\thischapter{}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
- \xdef\thischapternum{\appendixletter}%
- % We don't substitute the actual chapter name into \thischapter
- % because we don't want its macros evaluated now. And we don't
- % use \thissection because that changes with each section.
- %
- \xdef\thischapter{\putwordAppendix{} \appendixletter:
- \noexpand\thischaptername}%
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
- \xdef\thischapternum{\the\chapno}%
- \xdef\thischapter{\putwordChapter{} \the\chapno:
- \noexpand\thischaptername}%
\fi\fi\fi
%
% Write the toc entry for this chapter. Must come before the
@@ -5052,36 +5185,78 @@
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
% section number.
%
+\def\seckeyword{sec}
+%
\def\sectionheading#1#2#3#4{%
{%
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rm
%
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ % Insert first mark before the heading break (see notes for \domark).
+ \let\prevsectiondefs=\lastsectiondefs
+ \ifx\temptype\Ynothingkeyword
+ \ifx\sectionlevel\seckeyword
+ \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+ \gdef\thissection{\thissectionname}}%
+ \fi
+ \else\ifx\temptype\Yomitfromtockeyword
+ % Don't redefine \thissection.
+ \else\ifx\temptype\Yappendixkeyword
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ \gdef\noexpand\thissection{\putwordSection{}
\noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \else
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ \gdef\noexpand\thissection{\putwordSection{}
\noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \fi\fi\fi
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
% Insert space above the heading.
\csname #2headingbreak\endcsname
%
- % Only insert the space after the number if we have a section number.
- \def\sectionlevel{#2}%
- \def\temptype{#3}%
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
%
+ % Only insert the space after the number if we have a section number.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
% for @headings -- no section number, don't include in toc,
- % and don't redefine \thissection.
+ % and don't redefine \lastsection.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chapmacro.
@@ -5215,7 +5390,6 @@
%
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
- \def\thischapter{}%
\chapmacro{#1}{Yomitfromtoc}{}%
%
\savepageno = \pageno
@@ -6634,7 +6808,7 @@
% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \thissection,
+% 1) NAME-title - the current sectioning name taken from \lastsection,
% or the anchor name.
% 2) NAME-snt - section number and type, passed as the SNT arg, or
% empty for anchors.
@@ -6653,7 +6827,7 @@
address@hidden #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
- \toks0 = \expandafter{\thissection}%
+ \toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
\safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during
\shipout
@@ -7254,13 +7428,13 @@
\global\advance\floatno by 1
%
{%
- % This magic value for \thissection is output by \setref as the
+ % This magic value for \lastsection is output by \setref as the
% XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
- \edef\thissection{\floatmagic=\safefloattype}%
+ \edef\lastsection{\floatmagic=\safefloattype}%
\setref{\floatlabel}{Yfloat}%
}%
\fi
@@ -7395,7 +7569,7 @@
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
-% \thissection value which we \setref above.
+% \lastsection value which we \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
Index: doc/texinfo.txi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -r1.199 -r1.200
--- doc/texinfo.txi 8 Jul 2007 13:11:48 -0000 1.199
+++ doc/texinfo.txi 9 Jul 2007 20:34:30 -0000 1.200
@@ -1,5 +1,5 @@
\input texinfo.tex @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.199 2007/07/08 13:11:48 karl Exp $
address@hidden $Id: texinfo.txi,v 1.200 2007/07/09 20:34:30 olegkat Exp $
@c Ordinarily, Texinfo files have the extension .texi. But texinfo.texi
@c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
@@ -18736,7 +18736,7 @@
(@url{http://www.gnu.org/software/rcs}) version control systems, which
expand it into a string such as:
@example
-$Id: texinfo.txi,v 1.199 2007/07/08 13:11:48 karl Exp $
+$Id: texinfo.txi,v 1.200 2007/07/09 20:34:30 olegkat Exp $
@end example
(This is useful in all sources that use version control, not just manuals.)
You may wish to include the @samp{$Id:} comment in the @code{@@copying}
@@ -18802,7 +18802,7 @@
@verbatim
\input texinfo @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.199 2007/07/08 13:11:48 karl Exp $
address@hidden $Id: texinfo.txi,v 1.200 2007/07/09 20:34:30 olegkat Exp $
@comment %**start of header
@setfilename sample.info
@include version.texi
@@ -19423,12 +19423,12 @@
after the @code{@@end titlepage} command.
You must cancel the predefined heading commands with the
@code{@@headings off} command before defining your own
address@hidden
+specifications.
@need 1000
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:@refill
+for both even- and odd-numbered pages:
@example
@group
@@ -19441,37 +19441,35 @@
You need to divide the left part from the central part and the central
part from the right part by inserting @samp{@@|} between parts.
Otherwise, the specification command will not be able to tell where
-the text for one part ends and the next part address@hidden
+the text for one part ends and the next part begins.
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
address@hidden
+whatever.
@need 950
-Here are the six heading and footing commands:@refill
+Here are the six heading and footing commands:
address@hidden everyheading
address@hidden everyfooting
@table @code
@item @@everyheading @var{left} @@| @var{center} @@| @var{right}
@itemx @@everyfooting @var{left} @@| @var{center} @@| @var{right}
-
address@hidden everyheading
address@hidden everyfooting
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 address@hidden
+headers or footers.
address@hidden evenheading
address@hidden evenfooting
address@hidden oddheading
address@hidden oddfooting
@item @@evenheading @var{left} @@| @var{center} @@| @var{right}
@itemx @@oddheading @var{left} @@| @var{center} @@| @var{right}
@itemx @@evenfooting @var{left} @@| @var{center} @@| @var{right}
@itemx @@oddfooting @var{left} @@| @var{center} @@| @var{right}
-
address@hidden evenheading
address@hidden evenfooting
address@hidden oddheading
address@hidden oddfooting
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.
@@ -19482,58 +19480,66 @@
and sections and the page number. You can use the
@samp{@@address@hidden 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} and @code{@@end iftex} address@hidden
+they are between @code{@@iftex} and @code{@@end iftex} commands.
@need 1000
-Here are the @samp{@@address@hidden commands:@refill
+Here are the @samp{@@address@hidden commands:
@table @code
address@hidden thispage
@item @@thispage
-Expands to the current page address@hidden
address@hidden !!! Karl Berry says that `thissection' can fail on page breaks.
address@hidden
address@hidden thispage
+Expands to the current page number.
+
address@hidden @@thissectionname
address@hidden thissectionname
+Expands to the name of the current section.
+
address@hidden @@thissectionnum
address@hidden thissectionnum
+Expands to the number of the current section.
+
@item @@thissection
-Expands to the name of the current address@hidden
address@hidden ignore
address@hidden thissection
+Expands to the number and name of the current section, in the format
+`Section 1: Title'.
address@hidden thischaptername
@item @@thischaptername
-Expands to the name of the current address@hidden
address@hidden thischaptername
+Expands to the name of the current chapter.
address@hidden thischapternum
@item @@thischapternum
address@hidden thischapternum
Expands to the number of the current chapter, or letter of the current
appendix.
address@hidden thischapter
@item @@thischapter
address@hidden thischapter
Expands to the number and name of the current
-chapter, in the format `Chapter 1: Title'address@hidden
+chapter, in the format `Chapter 1: Title'.
address@hidden thistitle
@item @@thistitle
address@hidden thistitle
Expands to the name of the document, as specified by the
address@hidden@@settitle} address@hidden
address@hidden@@settitle} command.
address@hidden thisfile
@item @@thisfile
address@hidden thisfile
For @code{@@include} files only: expands to the name of the current
@code{@@include} file. If the current Texinfo source file is not an
@code{@@include} file, this command has no effect. This command does
@emph{not} provide the name of the current Texinfo source file unless
it is an @code{@@include} file. (@xref{Include Files}, for more
-information about @code{@@include} files.)@refill
+information about @code{@@include} files.)
@end table
@noindent
You can also use the @code{@@address@hidden@}} command, which expands to the
-current date, in `1 Jan 1900' address@hidden
+current date, in `1 Jan 1900' format.
@findex today
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:@refill
+particularly when you are writing drafts:
@example
@group
@@ -19544,7 +19550,44 @@
@end example
Beware of overlong titles: they may overlap another part of the
-header or footer and blot it address@hidden
+header or footer and blot it out.
+
+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{@@thissection} and other such
+macros to refer to on such pages as follows:
+
address@hidden @code
address@hidden @@everyheadingmarks @var{ref}
address@hidden @@everyfootingmarks @var{ref}
address@hidden everyheadingmarks
address@hidden everyfootingmarks
+The @var{ref} argument can be either @code{top} (the @code{@@this...}
+commands will refer to the chapter/section at the top of a page) or
address@hidden (the commands will reflect the situation at the bottom
+of a page). These @samp{@@every...} commands specify what to do on
+both even- and odd-numbered pages.
+
address@hidden @@evenheadingmarks @var{ref}
address@hidden @@oddheadingmarks @var{ref}
address@hidden @@evenfootingmarks @var{ref}
address@hidden @@oddfootingmarks @var{ref}
address@hidden evenheadingmarks
address@hidden oddheadingmarks
address@hidden evenfootingmarks
address@hidden oddfootingmarks
+These @samp{@@even...} and @samp{@@odd...} commands specify what to do
+on only even- or odd-numbered pages, respectively. The @var{ref}
+argument is the same as with the @samp{@@every...} commands.
address@hidden table
+
+Write these commands immediately after the @code{@@...contents}
+commands, or after the @code{@@end titlepage} command if you don't
+have a table of contents or if it is printed at the end of your
+manual.
+
+By default the @code{@@this...} commands reflect the situation at the
+bottom of a page both in headings and in footings.
@node Catching Mistakes
Index: makeinfo/cmds.c
===================================================================
RCS file: /sources/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- makeinfo/cmds.c 1 Jul 2007 21:20:31 -0000 1.73
+++ makeinfo/cmds.c 9 Jul 2007 20:34:30 -0000 1.74
@@ -1,5 +1,5 @@
/* cmds.c -- Texinfo commands.
- $Id: cmds.c,v 1.73 2007/07/01 21:20:31 karl Exp $
+ $Id: cmds.c,v 1.74 2007/07/09 20:34:30 olegkat Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
@@ -188,9 +188,13 @@
{ "error", cm_error, BRACE_ARGS },
{ "euro", cm_special_char, BRACE_ARGS },
{ "evenfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "evenfootingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "evenheading", cm_ignore_line, NO_BRACE_ARGS },
+ { "evenheadingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "everyfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "everyfootingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "everyheading", cm_ignore_line, NO_BRACE_ARGS },
+ { "everyheadingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "example", cm_example, NO_BRACE_ARGS },
{ "exampleindent", cm_exampleindent, NO_BRACE_ARGS },
{ "exclamdown", cm_special_char, BRACE_ARGS },
@@ -262,7 +266,9 @@
{ "nwnode", cm_node, NO_BRACE_ARGS },
{ "o", cm_special_char, BRACE_ARGS },
{ "oddfooting", cm_ignore_line, NO_BRACE_ARGS },
+ { "oddfootingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "oddheading", cm_ignore_line, NO_BRACE_ARGS },
+ { "oddheadingmarks", cm_ignore_line, NO_BRACE_ARGS },
{ "oe", cm_special_char, BRACE_ARGS },
{ "option", cm_code, BRACE_ARGS },
{ "ordf", cm_special_char, BRACE_ARGS },
P ChangeLog
P doc/texinfo.tex
P doc/texinfo.txi
P makeinfo/cmds.c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Mon Jul 9 16:53:01 EDT 2007),
Karl Berry <=