annotate man/texinfo.tex @ 65575:2b96746de758

Fixed spurious cross-ref
author J.D. Smith <jdsmith@as.arizona.edu>
date Sat, 17 Sep 2005 20:02:14 +0000
parents 3723093a21fd
children dc2d5a6655a3 2d92f5c9d6ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1 % texinfo.tex -- TeX macros to handle Texinfo files.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3 % Load plain if necessary, i.e., if running under initex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5 %
64890
3723093a21fd Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64083
diff changeset
6 \def\texinfoversion{2005-08-10.17}
3723093a21fd Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64083
diff changeset
7 %
3723093a21fd Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64083
diff changeset
8 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994,
3723093a21fd Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64083
diff changeset
9 % 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3723093a21fd Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64083
diff changeset
10 % 2005 Free Software Foundation, Inc.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 % This texinfo.tex file is free software; you can redistribute it and/or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
13 % modify it under the terms of the GNU General Public License as
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 % published by the Free Software Foundation; either version 2, or (at
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15 % your option) any later version.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 % This texinfo.tex file is distributed in the hope that it will be
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20 % General Public License for more details.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 % You should have received a copy of the GNU General Public License
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23 % along with this texinfo.tex file; see the file COPYING. If not, write
64083
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 59986
diff changeset
24 % to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23a17af379b1 Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 59986
diff changeset
25 % Boston, MA 02110-1301, USA.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27 % In other words, you are welcome to use, share and improve this program.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 % You are forbidden to forbid anyone else to use, share and improve
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29 % what you give them. Help stamp out software-hoarding!
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31 % Please try the latest version of texinfo.tex before submitting bug
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 % reports; you can get the latest version from:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 % ftp://ftp.gnu.org/gnu/texinfo.tex
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
34 % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
35 % ftp://texinfo.org/texinfo/texinfo.tex
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
36 % ftp://tug.org/tex/texinfo.tex
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
37 % (and all CTAN mirrors, see http://www.ctan.org),
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
38 % and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
39 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40 % The texinfo.tex in any given Texinfo distribution could well be out
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 % of date, so if that's what you're using, please check.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
42 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
43 % Texinfo has a small home page at http://texinfo.org/ and also
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
44 % http://www.gnu.org/software/texinfo.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
45 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
46 % Send bug reports to bug-texinfo@gnu.org. Please include including a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
47 % complete document in each bug report with which we can reproduce the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
48 % problem. Patches are, of course, greatly appreciated.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
50 % To process a Texinfo manual with TeX, it's most reliable to use the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
51 % texi2dvi shell script that comes with the distribution. For a simple
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
52 % manual foo.texi, however, you can get away with this:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 % tex foo.texi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
54 % texindex foo.??
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55 % tex foo.texi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
56 % tex foo.texi
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
57 % dvips foo.dvi -o # or whatever; this makes foo.ps.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
58 % The extra TeX runs get the cross-reference information correct.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
59 % Sometimes one run after texindex suffices, and sometimes you need more
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 % than two; texi2dvi does it as many times as necessary.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62 % It is possible to adapt texinfo.tex for other languages. You can get
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
63 % the existing language-specific files from the full Texinfo distribution.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
64
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 \message{Loading texinfo [version \texinfoversion]:}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
66
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 % If in a .fmt file, print the version number
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68 % and turn on active characters that we couldn't do earlier because
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
69 % they might have appeared in the input file name.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
70 \everyjob{\message{[Texinfo version \texinfoversion]}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
71 \catcode`+=\active \catcode`\_=\active}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
72
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
73 % Save some parts of plain tex whose names we will redefine.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74 \let\ptexb=\b
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 \let\ptexbullet=\bullet
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 \let\ptexc=\c
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 \let\ptexcomma=\,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 \let\ptexdot=\.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
79 \let\ptexdots=\dots
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
80 \let\ptexend=\end
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
81 \let\ptexequiv=\equiv
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
82 \let\ptexexclam=\!
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
83 \let\ptexi=\i
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
84 \let\ptexlbrace=\{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
85 \let\ptexrbrace=\}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
86 \let\ptexstar=\*
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
87 \let\ptext=\t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
88
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
89 % We never want plain's outer \+ definition in Texinfo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
90 % For @tex, we can use \tabalign.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
91 \let\+ = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
92
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 \message{Basics,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
94 \chardef\other=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 % If this character appears in an error message or help string, it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97 % starts a new line in the output.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 \newlinechar = `^^J
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 % Set up fixed words for English if not already set.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
103 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
104 \ifx\putwordin\undefined \gdef\putwordin{in}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
105 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
106 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
107 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111 \ifx\putwordof\undefined \gdef\putwordof{of}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
113 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
114 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
115 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
116 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
117 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
118 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
120 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
121 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
122 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
123 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
124 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
125 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
126 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
127 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
128 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
130 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
132 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
133 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
134 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
135 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
136 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
138 \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
139 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
141
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
142 % Ignore a token.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
143 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
144 \def\gobble#1{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
145
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
146 \hyphenation{ap-pen-dix}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
147 \hyphenation{mini-buf-fer mini-buf-fers}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
148 \hyphenation{eshell}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
149 \hyphenation{white-space}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
150
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
151 % Margin to add to right of even pages, to left of odd pages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
152 \newdimen \bindingoffset
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
153 \newdimen \normaloffset
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
154 \newdimen\pagewidth \newdimen\pageheight
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
155
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
156 % Sometimes it is convenient to have everything in the transcript file
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
157 % and nothing on the terminal. We don't just call \tracingall here,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
158 % since that produces some useless output on the terminal.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
159 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
160 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
161 \ifx\eTeXversion\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
162 \def\loggingall{\tracingcommands2 \tracingstats2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
163 \tracingpages1 \tracingoutput1 \tracinglostchars1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
164 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
165 \showboxbreadth\maxdimen\showboxdepth\maxdimen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
166 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
167 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
168 \def\loggingall{\tracingcommands3 \tracingstats2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
169 \tracingpages1 \tracingoutput1 \tracinglostchars1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
170 \tracingmacros2 \tracingparagraphs1 \tracingrestores1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
171 \tracingscantokens1 \tracingassigns1 \tracingifs1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
172 \tracinggroups1 \tracingnesting2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
173 \showboxbreadth\maxdimen\showboxdepth\maxdimen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
174 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
175 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
176
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
177 % add check for \lastpenalty to plain's definitions. If the last thing
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
178 % we did was a \nobreak, we don't want to insert more space.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
179 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
180 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
181 \removelastskip\penalty-50\smallskip\fi\fi}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
182 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
183 \removelastskip\penalty-100\medskip\fi\fi}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
184 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
185 \removelastskip\penalty-200\bigskip\fi\fi}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
186
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
187 % For @cropmarks command.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
188 % Do @cropmarks to get crop marks.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
189 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
190 \newif\ifcropmarks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
191 \let\cropmarks = \cropmarkstrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
192 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
193 % Dimensions to add cropmarks at corners.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
194 % Added by P. A. MacKay, 12 Nov. 1986
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
195 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
196 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
197 \newdimen\cornerlong \cornerlong=1pc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
198 \newdimen\cornerthick \cornerthick=.3pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
199 \newdimen\topandbottommargin \topandbottommargin=.75in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
200
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
201 % Main output routine.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
202 \chardef\PAGE = 255
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
203 \output = {\onepageout{\pagecontents\PAGE}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
204
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
205 \newbox\headlinebox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
206 \newbox\footlinebox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
207
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
208 % \onepageout takes a vbox as an argument. Note that \pagecontents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
209 % does insertions, but you have to call it yourself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
210 \def\onepageout#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
211 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
212 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
213 \ifodd\pageno \advance\hoffset by \bindingoffset
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
214 \else \advance\hoffset by -\bindingoffset\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
215 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
216 % Do this outside of the \shipout so @code etc. will be expanded in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
217 % the headline as they should be, not taken literally (outputting ''code).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
218 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
219 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
220 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
221 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
222 % Have to do this stuff outside the \shipout because we want it to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
223 % take effect in \write's, yet the group defined by the \vbox ends
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
224 % before the \shipout runs.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
225 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
226 \escapechar = `\\ % use backslash in output files.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
227 \indexdummies % don't expand commands in the output.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
228 \normalturnoffactive % \ in index entries must not stay \, e.g., if
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
229 % the page break happens to be in the middle of an example.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
230 \shipout\vbox{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
231 % Do this early so pdf references go to the beginning of the page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
232 \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
233 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
234 \ifcropmarks \vbox to \outervsize\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
235 \hsize = \outerhsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
236 \vskip-\topandbottommargin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
237 \vtop to0pt{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
238 \line{\ewtop\hfil\ewtop}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
239 \nointerlineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
240 \line{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
241 \vbox{\moveleft\cornerthick\nstop}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
242 \hfill
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
243 \vbox{\moveright\cornerthick\nstop}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
244 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
245 \vss}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
246 \vskip\topandbottommargin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
247 \line\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
248 \hfil % center the page within the outer (page) hsize.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
249 \ifodd\pageno\hskip\bindingoffset\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
250 \vbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
251 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
252 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
253 \unvbox\headlinebox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
254 \pagebody{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
255 \ifdim\ht\footlinebox > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
256 % Only leave this space if the footline is nonempty.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
257 % (We lessened \vsize for it in \oddfootingxxx.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
258 % The \baselineskip=24pt in plain's \makefootline has no effect.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
259 \vskip 2\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
260 \unvbox\footlinebox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
261 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
262 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
263 \ifcropmarks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
264 \egroup % end of \vbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
265 \hfil\egroup % end of (centering) \line\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
266 \vskip\topandbottommargin plus1fill minus1fill
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
267 \boxmaxdepth = \cornerthick
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
268 \vbox to0pt{\vss
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
269 \line{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
270 \vbox{\moveleft\cornerthick\nsbot}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
271 \hfill
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
272 \vbox{\moveright\cornerthick\nsbot}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
273 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
274 \nointerlineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
275 \line{\ewbot\hfil\ewbot}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
276 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
277 \egroup % \vbox from first cropmarks clause
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
278 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
279 }% end of \shipout\vbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
280 }% end of group with \turnoffactive
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
281 \advancepageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
282 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
283 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
284
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
285 \newinsert\margin \dimen\margin=\maxdimen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
286
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
287 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
288 {\catcode`\@ =11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
289 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
290 % marginal hacks, juha@viisa.uucp (Juha Takala)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
291 \ifvoid\margin\else % marginal info is present
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
292 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
293 \dimen@=\dp#1 \unvbox#1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
294 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
295 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
296 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
297
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
298 % Here are the rules for the cropmarks. Note that they are
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
299 % offset so that the space between them is truly \outerhsize or \outervsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
300 % (P. A. MacKay, 12 November, 1986)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
301 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
302 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
303 \def\nstop{\vbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
304 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
305 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
306 \def\nsbot{\vbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
307 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
308
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
309 % Parse an argument, then pass it to #1. The argument is the rest of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
310 % the input line (except we remove a trailing comment). #1 should be a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
311 % macro which expects an ordinary undelimited TeX argument.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
312 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
313 \def\parsearg#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
314 \let\next = #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
315 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
316 \obeylines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
317 \futurelet\temp\parseargx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
318 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
319
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
320 % If the next token is an obeyed space (from an @example environment or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
321 % the like), remove it and recurse. Otherwise, we're done.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
322 \def\parseargx{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
323 % \obeyedspace is defined far below, after the definition of \sepspaces.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
324 \ifx\obeyedspace\temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
325 \expandafter\parseargdiscardspace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
326 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
327 \expandafter\parseargline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
328 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
329 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
330
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
331 % Remove a single space (as the delimiter token to the macro call).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
332 {\obeyspaces %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
333 \gdef\parseargdiscardspace {\futurelet\temp\parseargx}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
334
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
335 {\obeylines %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
336 \gdef\parseargline#1^^M{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
337 \endgroup % End of the group started in \parsearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
338 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
339 % First remove any @c comment, then any @comment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
340 % Result of each macro is put in \toks0.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
341 \argremovec #1\c\relax %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
342 \expandafter\argremovecomment \the\toks0 \comment\relax %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
343 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
344 % Call the caller's macro, saved as \next in \parsearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
345 \expandafter\next\expandafter{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
346 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
347 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
348
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
349 % Since all \c{,omment} does is throw away the argument, we can let TeX
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
350 % do that for us. The \relax here is matched by the \relax in the call
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
351 % in \parseargline; it could be more or less anything, its purpose is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
352 % just to delimit the argument to the \c.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
353 \def\argremovec#1\c#2\relax{\toks0 = {#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
354 \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
355
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
356 % \argremovec{,omment} might leave us with trailing spaces, though; e.g.,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
357 % @end itemize @c foo
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
358 % will have two active spaces as part of the argument with the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
359 % `itemize'. Here we remove all active spaces from #1, and assign the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
360 % result to \toks0.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
361 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
362 % This loses if there are any *other* active characters besides spaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
363 % in the argument -- _ ^ +, for example -- since they get expanded.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
364 % Fortunately, Texinfo does not define any such commands. (If it ever
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
365 % does, the catcode of the characters in questionwill have to be changed
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
366 % here.) But this means we cannot call \removeactivespaces as part of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
367 % \argremovec{,omment}, since @c uses \parsearg, and thus the argument
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
368 % that \parsearg gets might well have any character at all in it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
369 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
370 \def\removeactivespaces#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
371 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
372 \ignoreactivespaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
373 \edef\temp{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
374 \global\toks0 = \expandafter{\temp}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
375 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
376 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
377
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
378 % Change the active space to expand to nothing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
379 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
380 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
381 \obeyspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
382 \gdef\ignoreactivespaces{\obeyspaces\let =\empty}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
383 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
384
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
385
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
386 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
387
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
388 %% These are used to keep @begin/@end levels from running away
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
389 %% Call \inENV within environments (after a \begingroup)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
390 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
391 \def\ENVcheck{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
392 \ifENV\errmessage{Still within an environment; press RETURN to continue}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
393 \endgroup\fi} % This is not perfect, but it should reduce lossage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
394
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
395 % @begin foo is the same as @foo, for now.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
396 \newhelp\EMsimple{Press RETURN to continue.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
397
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
398 \outer\def\begin{\parsearg\beginxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
399
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
400 \def\beginxxx #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
401 \expandafter\ifx\csname #1\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
402 {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
403 \csname #1\endcsname\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
404
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
405 % @end foo executes the definition of \Efoo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
406 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
407 \def\end{\parsearg\endxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
408 \def\endxxx #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
409 \removeactivespaces{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
410 \edef\endthing{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
411 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
412 \expandafter\ifx\csname E\endthing\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
413 \expandafter\ifx\csname \endthing\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
414 % There's no \foo, i.e., no ``environment'' foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
415 \errhelp = \EMsimple
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
416 \errmessage{Undefined command `@end \endthing'}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
417 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
418 \unmatchedenderror\endthing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
419 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
420 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
421 % Everything's ok; the right environment has been started.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
422 \csname E\endthing\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
423 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
424 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
425
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
426 % There is an environment #1, but it hasn't been started. Give an error.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
427 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
428 \def\unmatchedenderror#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
429 \errhelp = \EMsimple
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
430 \errmessage{This `@end #1' doesn't have a matching `@#1'}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
431 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
432
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
433 % Define the control sequence \E#1 to give an unmatched @end error.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
434 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
435 \def\defineunmatchedend#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
436 \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
437 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
438
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
439
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
440 % Single-spacing is done by various environments (specifically, in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
441 % \nonfillstart and \quotations).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
442 \newskip\singlespaceskip \singlespaceskip = 12.5pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
443 \def\singlespace{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
444 % Why was this kern here? It messes up equalizing space above and below
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
445 % environments. --karl, 6may93
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
446 %{\advance \baselineskip by -\singlespaceskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
447 %\kern \baselineskip}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
448 \setleading\singlespaceskip
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
449 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
450
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
451 %% Simple single-character @ commands
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
452
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
453 % @@ prints an @
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
454 % Kludge this until the fonts are right (grr).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
455 \def\@{{\tt\char64}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
456
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
457 % This is turned off because it was never documented
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
458 % and you can use @w{...} around a quote to suppress ligatures.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
459 %% Define @` and @' to be the same as ` and '
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
460 %% but suppressing ligatures.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
461 %\def\`{{`}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
462 %\def\'{{'}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
463
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
464 % Used to generate quoted braces.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
465 \def\mylbrace {{\tt\char123}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
466 \def\myrbrace {{\tt\char125}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
467 \let\{=\mylbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
468 \let\}=\myrbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
469 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
470 % Definitions to produce actual \{ & \} command in an index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
471 \catcode`\{ = 12 \catcode`\} = 12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
472 \catcode`\[ = 1 \catcode`\] = 2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
473 \catcode`\@ = 0 \catcode`\\ = 12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
474 @gdef@lbracecmd[\{]%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
475 @gdef@rbracecmd[\}]%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
476 @endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
477
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
478 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
479 % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
480 \let\, = \c
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
481 \let\dotaccent = \.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
482 \def\ringaccent#1{{\accent23 #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
483 \let\tieaccent = \t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
484 \let\ubaraccent = \b
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
485 \let\udotaccent = \d
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
486
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
487 % Other special characters: @questiondown @exclamdown
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
488 % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
489 \def\questiondown{?`}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
490 \def\exclamdown{!`}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
491
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
492 % Dotless i and dotless j, used for accents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
493 \def\imacro{i}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
494 \def\jmacro{j}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
495 \def\dotless#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
496 \def\temp{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
497 \ifx\temp\imacro \ptexi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
498 \else\ifx\temp\jmacro \j
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
499 \else \errmessage{@dotless can be used only with i or j}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
500 \fi\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
501 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
502
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
503 % Be sure we're in horizontal mode when doing a tie, since we make space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
504 % equivalent to this in @example-like environments. Otherwise, a space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
505 % at the beginning of a line will start with \penalty -- and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
506 % since \penalty is valid in vertical mode, we'd end up putting the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
507 % penalty on the vertical list instead of in the new paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
508 {\catcode`@ = 11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
509 % Avoid using \@M directly, because that causes trouble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
510 % if the definition is written into an index file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
511 \global\let\tiepenalty = \@M
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
512 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
513 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
514
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
515 % @: forces normal size whitespace following.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
516 \def\:{\spacefactor=1000 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
517
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
518 % @* forces a line break.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
519 \def\*{\hfil\break\hbox{}\ignorespaces}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
520
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
521 % @. is an end-of-sentence period.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
522 \def\.{.\spacefactor=3000 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
523
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
524 % @! is an end-of-sentence bang.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
525 \def\!{!\spacefactor=3000 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
526
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
527 % @? is an end-of-sentence query.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
528 \def\?{?\spacefactor=3000 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
529
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
530 % @w prevents a word break. Without the \leavevmode, @w at the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
531 % beginning of a paragraph, when TeX is still in vertical mode, would
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
532 % produce a whole line of output instead of starting the paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
533 \def\w#1{\leavevmode\hbox{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
534
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
535 % @group ... @end group forces ... to be all on one page, by enclosing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
536 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
537 % to keep its height that of a normal line. According to the rules for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
538 % \topskip (p.114 of the TeXbook), the glue inserted is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
539 % max (\topskip - \ht (first item), 0). If that height is large,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
540 % therefore, no glue is inserted, and the space between the headline and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
541 % the text is small, which looks bad.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
542 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
543 \def\group{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
544 \ifnum\catcode13=\active \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
545 \errhelp = \groupinvalidhelp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
546 \errmessage{@group invalid in context where filling is enabled}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
547 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
548 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
549 % The \vtop we start below produces a box with normal height and large
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
550 % depth; thus, TeX puts \baselineskip glue before it, and (when the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
551 % next line of text is done) \lineskip glue after it. (See p.82 of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
552 % the TeXbook.) Thus, space below is not quite equal to space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
553 % above. But it's pretty close.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
554 \def\Egroup{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
555 \egroup % End the \vtop.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
556 \endgroup % End the \group.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
557 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
558 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
559 \vtop\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
560 % We have to put a strut on the last line in case the @group is in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
561 % the midst of an example, rather than completely enclosing it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
562 % Otherwise, the interline space between the last line of the group
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
563 % and the first line afterwards is too small. But we can't put the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
564 % strut in \Egroup, since there it would be on a line by itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
565 % Hence this just inserts a strut at the beginning of each line.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
566 \everypar = {\strut}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
567 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
568 % Since we have a strut on every line, we don't need any of TeX's
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
569 % normal interline spacing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
570 \offinterlineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
571 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
572 % OK, but now we have to do something about blank
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
573 % lines in the input in @example-like environments, which normally
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
574 % just turn into \lisppar, which will insert no space now that we've
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
575 % turned off the interline space. Simplest is to make them be an
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
576 % empty paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
577 \ifx\par\lisppar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
578 \edef\par{\leavevmode \par}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
579 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
580 % Reset ^^M's definition to new definition of \par.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
581 \obeylines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
582 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
583 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
584 % Do @comment since we are called inside an environment such as
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
585 % @example, where each end-of-line in the input causes an
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
586 % end-of-line in the output. We don't want the end-of-line after
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
587 % the `@group' to put extra space in the output. Since @group
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
588 % should appear on a line by itself (according to the Texinfo
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
589 % manual), we don't worry about eating any user text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
590 \comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
591 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
592 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
593 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
594 % message, so this ends up printing `@group can only ...'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
595 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
596 \newhelp\groupinvalidhelp{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
597 group can only be used in environments such as @example,^^J%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
598 where each line of input produces a line of output.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
599
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
600 % @need space-in-mils
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
601 % forces a page break if there is not space-in-mils remaining.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
602
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
603 \newdimen\mil \mil=0.001in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
604
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
605 \def\need{\parsearg\needx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
606
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
607 % Old definition--didn't work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
608 %\def\needx #1{\par %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
609 %% This method tries to make TeX break the page naturally
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
610 %% if the depth of the box does not fit.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
611 %{\baselineskip=0pt%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
612 %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
613 %\prevdepth=-1000pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
614 %}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
615
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
616 \def\needx#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
617 % Ensure vertical mode, so we don't make a big box in the middle of a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
618 % paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
619 \par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
620 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
621 % If the @need value is less than one line space, it's useless.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
622 \dimen0 = #1\mil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
623 \dimen2 = \ht\strutbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
624 \advance\dimen2 by \dp\strutbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
625 \ifdim\dimen0 > \dimen2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
626 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
627 % Do a \strut just to make the height of this box be normal, so the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
628 % normal leading is inserted relative to the preceding line.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
629 % And a page break here is fine.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
630 \vtop to #1\mil{\strut\vfil}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
631 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
632 % TeX does not even consider page breaks if a penalty added to the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
633 % main vertical list is 10000 or more. But in order to see if the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
634 % empty box we just added fits on the page, we must make it consider
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
635 % page breaks. On the other hand, we don't want to actually break the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
636 % page after the empty box. So we use a penalty of 9999.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
637 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
638 % There is an extremely small chance that TeX will actually break the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
639 % page at this \penalty, if there are no other feasible breakpoints in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
640 % sight. (If the user is using lots of big @group commands, which
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
641 % almost-but-not-quite fill up a page, TeX will have a hard time doing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
642 % good page breaking, for example.) However, I could not construct an
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
643 % example where a page broke at this \penalty; if it happens in a real
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
644 % document, then we can reconsider our strategy.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
645 \penalty9999
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
646 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
647 % Back up by the size of the box, whether we did a page break or not.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
648 \kern -#1\mil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
649 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
650 % Do not allow a page break right after this kern.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
651 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
652 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
653 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
654
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
655 % @br forces paragraph break
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
656
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
657 \let\br = \par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
658
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
659 % @dots{} output an ellipsis using the current font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
660 % We do .5em per period so that it has the same spacing in a typewriter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
661 % font as three actual period characters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
662 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
663 \def\dots{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
664 \leavevmode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
665 \hbox to 1.5em{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
666 \hskip 0pt plus 0.25fil minus 0.25fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
667 .\hss.\hss.%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
668 \hskip 0pt plus 0.5fil minus 0.5fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
669 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
670 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
671
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
672 % @enddots{} is an end-of-sentence ellipsis.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
673 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
674 \def\enddots{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
675 \leavevmode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
676 \hbox to 2em{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
677 \hskip 0pt plus 0.25fil minus 0.25fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
678 .\hss.\hss.\hss.%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
679 \hskip 0pt plus 0.5fil minus 0.5fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
680 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
681 \spacefactor=3000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
682 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
683
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
684
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
685 % @page forces the start of a new page
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
686 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
687 \def\page{\par\vfill\supereject}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
688
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
689 % @exdent text....
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
690 % outputs text on separate line in roman font, starting at standard page margin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
691
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
692 % This records the amount of indent in the innermost environment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
693 % That's how much \exdent should take out.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
694 \newskip\exdentamount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
695
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
696 % This defn is used inside fill environments such as @defun.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
697 \def\exdent{\parsearg\exdentyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
698 \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
699
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
700 % This defn is used inside nofill environments such as @example.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
701 \def\nofillexdent{\parsearg\nofillexdentyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
702 \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
703 \leftline{\hskip\leftskip{\rm#1}}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
704
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
705 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
706 % paragraph. For more general purposes, use the \margin insertion
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
707 % class. WHICH is `l' or `r'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
708 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
709 \newskip\inmarginspacing \inmarginspacing=1cm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
710 \def\strutdepth{\dp\strutbox}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
711 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
712 \def\doinmargin#1#2{\strut\vadjust{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
713 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
714 \kern-\strutdepth
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
715 \vtop to \strutdepth{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
716 \baselineskip=\strutdepth
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
717 \vss
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
718 % if you have multiple lines of stuff to put here, you'll need to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
719 % make the vbox yourself of the appropriate size.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
720 \ifx#1l%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
721 \llap{\ignorespaces #2\hskip\inmarginspacing}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
722 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
723 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
724 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
725 \null
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
726 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
727 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
728 \def\inleftmargin{\doinmargin l}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
729 \def\inrightmargin{\doinmargin r}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
730 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
731 % @inmargin{TEXT [, RIGHT-TEXT]}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
732 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
733 % else use TEXT for both).
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
734 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
735 \def\inmargin#1{\parseinmargin #1,,\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
736 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
737 \setbox0 = \hbox{\ignorespaces #2}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
738 \ifdim\wd0 > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
739 \def\lefttext{#1}% have both texts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
740 \def\righttext{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
741 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
742 \def\lefttext{#1}% have only one text
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
743 \def\righttext{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
744 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
745 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
746 \ifodd\pageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
747 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
748 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
749 \def\temp{\inleftmargin\lefttext}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
750 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
751 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
752 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
753
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
754 % @include file insert text of that file as input.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
755 % Allow normal characters that we make active in the argument (a file name).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
756 \def\include{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
757 \catcode`\\=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
758 \catcode`~=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
759 \catcode`^=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
760 \catcode`_=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
761 \catcode`|=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
762 \catcode`<=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
763 \catcode`>=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
764 \catcode`+=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
765 \parsearg\includezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
766 % Restore active chars for included file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
767 \def\includezzz#1{\endgroup\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
768 % Read the included file in a group so nested @include's work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
769 \def\thisfile{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
770 \input\thisfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
771 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
772
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
773 \def\thisfile{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
774
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
775 % @center line outputs that line, centered
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
776
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
777 \def\center{\parsearg\centerzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
778 \def\centerzzz #1{{\advance\hsize by -\leftskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
779 \advance\hsize by -\rightskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
780 \centerline{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
781
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
782 % @sp n outputs n lines of vertical space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
783
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
784 \def\sp{\parsearg\spxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
785 \def\spxxx #1{\vskip #1\baselineskip}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
786
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
787 % @comment ...line which is ignored...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
788 % @c is the same as @comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
789 % @ignore ... @end ignore is another way to write a comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
790
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
791 \def\comment{\begingroup \catcode`\^^M=\other%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
792 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
793 \commentxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
794 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
795
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
796 \let\c=\comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
797
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
798 % @paragraphindent NCHARS
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
799 % We'll use ems for NCHARS, close enough.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
800 % We cannot implement @paragraphindent asis, though.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
801 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
802 \def\asisword{asis} % no translation, these are keywords
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
803 \def\noneword{none}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
804 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
805 \def\paragraphindent{\parsearg\doparagraphindent}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
806 \def\doparagraphindent#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
807 \def\temp{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
808 \ifx\temp\asisword
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
809 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
810 \ifx\temp\noneword
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
811 \defaultparindent = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
812 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
813 \defaultparindent = #1em
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
814 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
815 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
816 \parindent = \defaultparindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
817 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
818
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
819 % @exampleindent NCHARS
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
820 % We'll use ems for NCHARS like @paragraphindent.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
821 % It seems @exampleindent asis isn't necessary, but
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
822 % I preserve it to make it similar to @paragraphindent.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
823 \def\exampleindent{\parsearg\doexampleindent}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
824 \def\doexampleindent#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
825 \def\temp{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
826 \ifx\temp\asisword
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
827 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
828 \ifx\temp\noneword
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
829 \lispnarrowing = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
830 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
831 \lispnarrowing = #1em
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
832 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
833 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
834 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
835
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
836 % @asis just yields its argument. Used with @table, for example.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
837 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
838 \def\asis#1{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
839
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
840 % @math outputs its argument in math mode.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
841 % We don't use $'s directly in the definition of \math because we need
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
842 % to set catcodes according to plain TeX first, to allow for subscripts,
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
843 % superscripts, special math chars, etc.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
844 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
845 % @math does not do math typesetting in section titles, index
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
846 % entries, and other such contexts where the catcodes are set before
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
847 % @math gets a chance to work. This could perhaps be fixed, but for now
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
848 % at least we can have real math in the main text, where it's needed most.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
849 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
850 \let\implicitmath = $%$ font-lock fix
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
851 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
852 % One complication: _ usually means subscripts, but it could also mean
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
853 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
854 % _ within @math be active (mathcode "8000), and distinguish by seeing
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
855 % if the current family is \slfam, which is what @var uses.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
856 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
857 {\catcode95 = \active % 95 = _
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
858 \gdef\mathunderscore{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
859 \catcode95=\active
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
860 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
861 }}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
862 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
863 % Another complication: we want \\ (and @\) to output a \ character.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
864 % FYI, plain.tex uses \\ as a temporary control sequence (why?), but
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
865 % this is not advertised and we don't care. Texinfo does not
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
866 % otherwise define @\.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
867 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
868 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
869 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
870 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
871 \def\math{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
872 \tex
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
873 \mathcode`\_="8000 \mathunderscore
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
874 \let\\ = \mathbackslash
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
875 \implicitmath\finishmath}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
876 \def\finishmath#1{#1\implicitmath\Etex}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
877
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
878 % @bullet and @minus need the same treatment as @math, just above.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
879 \def\bullet{\implicitmath\ptexbullet\implicitmath}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
880 \def\minus{\implicitmath-\implicitmath}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
881
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
882 % @refill is a no-op.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
883 \let\refill=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
884
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
885 % If working on a large document in chapters, it is convenient to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
886 % be able to disable indexing, cross-referencing, and contents, for test runs.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
887 % This is done with @novalidate (before @setfilename).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
888 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
889 \newif\iflinks \linkstrue % by default we want the aux files.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
890 \let\novalidate = \linksfalse
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
891
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
892 % @setfilename is done at the beginning of every texinfo file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
893 % So open here the files we need to have open while reading the input.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
894 % This makes it possible to make a .fmt file for texinfo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
895 \def\setfilename{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
896 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
897 \readauxfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
898 \fi % \openindices needs to do some work in any case.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
899 \openindices
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
900 \fixbackslash % Turn off hack to swallow `\input texinfo'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
901 \global\let\setfilename=\comment % Ignore extra @setfilename cmds.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
902 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
903 % If texinfo.cnf is present on the system, read it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
904 % Useful for site-wide @afourpaper, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
905 % Just to be on the safe side, close the input stream before the \input.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
906 \openin 1 texinfo.cnf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
907 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
908 \closein1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
909 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
910 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
911 \comment % Ignore the actual filename.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
912 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
913
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
914 % Called from \setfilename.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
915 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
916 \def\openindices{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
917 \newindex{cp}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
918 \newcodeindex{fn}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
919 \newcodeindex{vr}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
920 \newcodeindex{tp}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
921 \newcodeindex{ky}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
922 \newcodeindex{pg}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
923 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
924
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
925 % @bye.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
926 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
927
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
928
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
929 \message{pdf,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
930 % adobe `portable' document format
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
931 \newcount\tempnum
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
932 \newcount\lnkcount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
933 \newtoks\filename
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
934 \newcount\filenamelength
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
935 \newcount\pgn
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
936 \newtoks\toksA
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
937 \newtoks\toksB
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
938 \newtoks\toksC
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
939 \newtoks\toksD
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
940 \newbox\boxA
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
941 \newcount\countA
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
942 \newif\ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
943 \newif\ifpdfmakepagedest
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
944
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
945 \ifx\pdfoutput\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
946 \pdffalse
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
947 \let\pdfmkdest = \gobble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
948 \let\pdfurl = \gobble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
949 \let\endlink = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
950 \let\linkcolor = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
951 \let\pdfmakeoutlines = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
952 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
953 \pdftrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
954 \pdfoutput = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
955 \input pdfcolor
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
956 \def\dopdfimage#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
957 \def\imagewidth{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
958 \def\imageheight{#3}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
959 % without \immediate, pdftex seg faults when the same image is
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
960 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
961 \ifnum\pdftexversion < 14
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
962 \immediate\pdfimage
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
963 \else
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
964 \immediate\pdfximage
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
965 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
966 \ifx\empty\imagewidth\else width \imagewidth \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
967 \ifx\empty\imageheight\else height \imageheight \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
968 \ifnum\pdftexversion<13
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
969 #1.pdf%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
970 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
971 {#1.pdf}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
972 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
973 \ifnum\pdftexversion < 14 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
974 \pdfrefximage \pdflastximage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
975 \fi}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
976 \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
977 \def\pdfmkpgn#1{#1}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
978 \let\linkcolor = \Blue % was Cyan, but that seems light?
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
979 \def\endlink{\Black\pdfendlink}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
980 % Adding outlines to PDF; macros for calculating structure of outlines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
981 % come from Petr Olsak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
982 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
983 \else \csname#1\endcsname \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
984 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
985 \advance\tempnum by1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
986 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
987 \def\pdfmakeoutlines{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
988 \openin 1 \jobname.toc
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
989 \ifeof 1\else\begingroup
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
990 \closein 1
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
991 \indexnofonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
992 \def\tt{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
993 \let\_ = \normalunderscore
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
994 % Thanh's hack / proper braces in bookmarks
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
995 \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
996 \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
997 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
998 \def\chapentry ##1##2##3{}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
999 \let\appendixentry = \chapentry
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1000 \def\unnumbchapentry ##1##2{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1001 \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1002 \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1003 \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1004 \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1005 \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1006 \def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1007 \input \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1008 \def\chapentry ##1##2##3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1009 \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1010 \let\appendixentry = \chapentry
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1011 \def\unnumbchapentry ##1##2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1012 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1013 \def\secentry ##1##2##3##4{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1014 \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1015 \def\unnumbsecentry ##1##2##3{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1016 \pdfoutline goto name{\pdfmkpgn{##3}}{##1}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1017 \def\subsecentry ##1##2##3##4##5{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1018 \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1019 \def\unnumbsubsecentry ##1##2##3##4{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1020 \pdfoutline goto name{\pdfmkpgn{##4}}{##1}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1021 \def\subsubsecentry ##1##2##3##4##5##6{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1022 \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1023 \def\unnumbsubsubsecentry ##1##2##3##4##5{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1024 \pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1025 \input \jobname.toc
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1026 \endgroup\fi
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1027 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1028 \def\makelinks #1,{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1029 \def\params{#1}\def\E{END}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1030 \ifx\params\E
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1031 \let\nextmakelinks=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1032 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1033 \let\nextmakelinks=\makelinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1034 \ifnum\lnkcount>0,\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1035 \picknum{#1}%
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
1036 \startlink attr{/Border [0 0 0]}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1037 goto name{\pdfmkpgn{\the\pgn}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1038 \linkcolor #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1039 \advance\lnkcount by 1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1040 \endlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1041 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1042 \nextmakelinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1043 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1044 \def\picknum#1{\expandafter\pn#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1045 \def\pn#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1046 \def\p{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1047 \ifx\p\lbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1048 \let\nextpn=\ppn
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1049 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1050 \let\nextpn=\ppnn
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1051 \def\first{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1052 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1053 \nextpn
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1054 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1055 \def\ppn#1{\pgn=#1\gobble}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1056 \def\ppnn{\pgn=\first}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1057 \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1058 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1059 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1060 \ifx\PP\D\let\nextsp\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1061 \else\let\nextsp\skipspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1062 \ifx\p\space\else\addtokens{\filename}{\PP}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1063 \advance\filenamelength by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1064 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1065 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1066 \nextsp}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1067 \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1068 \ifnum\pdftexversion < 14
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1069 \let \startlink \pdfannotlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1070 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1071 \let \startlink \pdfstartlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1072 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1073 \def\pdfurl#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1074 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1075 \normalturnoffactive\def\@{@}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1076 \let\value=\expandablevalue
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1077 \leavevmode\Red
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1078 \startlink attr{/Border [0 0 0]}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1079 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1080 % #1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1081 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1082 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1083 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1084 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1085 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1086 \def\maketoks{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1087 \expandafter\poptoks\the\toksA|ENDTOKS|
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1088 \ifx\first0\adn0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1089 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1090 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
1091 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1092 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1093 \ifnum0=\countA\else\makelink\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1094 \ifx\first.\let\next=\done\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1095 \let\next=\maketoks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1096 \addtokens{\toksB}{\the\toksD}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1097 \ifx\first,\addtokens{\toksB}{\space}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1098 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1099 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1100 \next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1101 \def\makelink{\addtokens{\toksB}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1102 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1103 \def\pdflink#1{%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1104 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1105 \linkcolor #1\endlink}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1106 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1107 \fi % \ifx\pdfoutput
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1108
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1109
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1110 \message{fonts,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1111 % Font-change commands.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1112
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1113 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1114 % So we set up a \sf analogous to plain's \rm, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1115 \newfam\sffam
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1116 \def\sf{\fam=\sffam \tensf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1117 \let\li = \sf % Sometimes we call it \li, not \sf.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1118
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1119 % We don't need math for this one.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1120 \def\ttsl{\tenttsl}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1121
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1122 % Default leading.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1123 \newdimen\textleading \textleading = 13.2pt
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1124
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1125 % Set the baselineskip to #1, and the lineskip and strut size
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1126 % correspondingly. There is no deep meaning behind these magic numbers
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1127 % used as factors; they just match (closely enough) what Knuth defined.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1128 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1129 \def\lineskipfactor{.08333}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1130 \def\strutheightpercent{.70833}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1131 \def\strutdepthpercent {.29167}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1132 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1133 \def\setleading#1{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1134 \normalbaselineskip = #1\relax
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1135 \normallineskip = \lineskipfactor\normalbaselineskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1136 \normalbaselines
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1137 \setbox\strutbox =\hbox{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1138 \vrule width0pt height\strutheightpercent\baselineskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1139 depth \strutdepthpercent \baselineskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1140 }%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1141 }
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1142
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1143 % Set the font macro #1 to the font named #2, adding on the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1144 % specified font prefix (normally `cm').
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1145 % #3 is the font's design size, #4 is a scale factor
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1146 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1147
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1148 % Use cm as the default font prefix.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1149 % To specify the font prefix, you must define \fontprefix
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1150 % before you read in texinfo.tex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1151 \ifx\fontprefix\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1152 \def\fontprefix{cm}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1153 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1154 % Support font families that don't use the same naming scheme as CM.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1155 \def\rmshape{r}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1156 \def\rmbshape{bx} %where the normal face is bold
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1157 \def\bfshape{b}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1158 \def\bxshape{bx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1159 \def\ttshape{tt}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1160 \def\ttbshape{tt}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1161 \def\ttslshape{sltt}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1162 \def\itshape{ti}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1163 \def\itbshape{bxti}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1164 \def\slshape{sl}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1165 \def\slbshape{bxsl}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1166 \def\sfshape{ss}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1167 \def\sfbshape{ss}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1168 \def\scshape{csc}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1169 \def\scbshape{csc}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1170
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1171 \newcount\mainmagstep
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1172 \ifx\bigger\relax
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1173 % not really supported.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1174 \let\mainmagstep=\magstep1
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1175 \setfont\textrm\rmshape{12}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1176 \setfont\texttt\ttshape{12}{1000}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1177 \else
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1178 \mainmagstep=\magstephalf
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1179 \setfont\textrm\rmshape{10}{\mainmagstep}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1180 \setfont\texttt\ttshape{10}{\mainmagstep}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1181 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1182 % Instead of cmb10, you many want to use cmbx10.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1183 % cmbx10 is a prettier font on its own, but cmb10
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1184 % looks better when embedded in a line with cmr10.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1185 \setfont\textbf\bfshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1186 \setfont\textit\itshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1187 \setfont\textsl\slshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1188 \setfont\textsf\sfshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1189 \setfont\textsc\scshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1190 \setfont\textttsl\ttslshape{10}{\mainmagstep}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1191 \font\texti=cmmi10 scaled \mainmagstep
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1192 \font\textsy=cmsy10 scaled \mainmagstep
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1193
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1194 % A few fonts for @defun, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1195 \setfont\defbf\bxshape{10}{\magstep1} %was 1314
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1196 \setfont\deftt\ttshape{10}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1197 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1198
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1199 % Fonts for indices, footnotes, small examples (9pt).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1200 \setfont\smallrm\rmshape{9}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1201 \setfont\smalltt\ttshape{9}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1202 \setfont\smallbf\bfshape{10}{900}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1203 \setfont\smallit\itshape{9}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1204 \setfont\smallsl\slshape{9}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1205 \setfont\smallsf\sfshape{9}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1206 \setfont\smallsc\scshape{10}{900}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1207 \setfont\smallttsl\ttslshape{10}{900}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1208 \font\smalli=cmmi9
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1209 \font\smallsy=cmsy9
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1210
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1211 % Fonts for small examples (8pt).
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1212 \setfont\smallerrm\rmshape{8}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1213 \setfont\smallertt\ttshape{8}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1214 \setfont\smallerbf\bfshape{10}{800}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1215 \setfont\smallerit\itshape{8}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1216 \setfont\smallersl\slshape{8}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1217 \setfont\smallersf\sfshape{8}{1000}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1218 \setfont\smallersc\scshape{10}{800}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1219 \setfont\smallerttsl\ttslshape{10}{800}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1220 \font\smalleri=cmmi8
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1221 \font\smallersy=cmsy8
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1222
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1223 % Fonts for title page:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1224 \setfont\titlerm\rmbshape{12}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1225 \setfont\titleit\itbshape{10}{\magstep4}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1226 \setfont\titlesl\slbshape{10}{\magstep4}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1227 \setfont\titlett\ttbshape{12}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1228 \setfont\titlettsl\ttslshape{10}{\magstep4}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1229 \setfont\titlesf\sfbshape{17}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1230 \let\titlebf=\titlerm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1231 \setfont\titlesc\scbshape{10}{\magstep4}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1232 \font\titlei=cmmi12 scaled \magstep3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1233 \font\titlesy=cmsy10 scaled \magstep4
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1234 \def\authorrm{\secrm}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1235
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1236 % Chapter (and unnumbered) fonts (17.28pt).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1237 \setfont\chaprm\rmbshape{12}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1238 \setfont\chapit\itbshape{10}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1239 \setfont\chapsl\slbshape{10}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1240 \setfont\chaptt\ttbshape{12}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1241 \setfont\chapttsl\ttslshape{10}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1242 \setfont\chapsf\sfbshape{17}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1243 \let\chapbf=\chaprm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1244 \setfont\chapsc\scbshape{10}{\magstep3}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1245 \font\chapi=cmmi12 scaled \magstep2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1246 \font\chapsy=cmsy10 scaled \magstep3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1247
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1248 % Section fonts (14.4pt).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1249 \setfont\secrm\rmbshape{12}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1250 \setfont\secit\itbshape{10}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1251 \setfont\secsl\slbshape{10}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1252 \setfont\sectt\ttbshape{12}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1253 \setfont\secttsl\ttslshape{10}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1254 \setfont\secsf\sfbshape{12}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1255 \let\secbf\secrm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1256 \setfont\secsc\scbshape{10}{\magstep2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1257 \font\seci=cmmi12 scaled \magstep1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1258 \font\secsy=cmsy10 scaled \magstep2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1259
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1260 % Subsection fonts (13.15pt).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1261 \setfont\ssecrm\rmbshape{12}{\magstephalf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1262 \setfont\ssecit\itbshape{10}{1315}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1263 \setfont\ssecsl\slbshape{10}{1315}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1264 \setfont\ssectt\ttbshape{12}{\magstephalf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1265 \setfont\ssecttsl\ttslshape{10}{1315}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1266 \setfont\ssecsf\sfbshape{12}{\magstephalf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1267 \let\ssecbf\ssecrm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1268 \setfont\ssecsc\scbshape{10}{\magstep1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1269 \font\sseci=cmmi12 scaled \magstephalf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1270 \font\ssecsy=cmsy10 scaled 1315
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1271 % The smallcaps and symbol fonts should actually be scaled \magstep1.5,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1272 % but that is not a standard magnification.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1273
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1274 % In order for the font changes to affect most math symbols and letters,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1275 % we have to define the \textfont of the standard families. Since
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1276 % texinfo doesn't allow for producing subscripts and superscripts except
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1277 % in the main text, we don't bother to reset \scriptfont and
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1278 % \scriptscriptfont (which would also require loading a lot more fonts).
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1279 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1280 \def\resetmathfonts{%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1281 \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1282 \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1283 \textfont\ttfam=\tentt \textfont\sffam=\tensf
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1284 }
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1285
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1286 % The font-changing commands redefine the meanings of \tenSTYLE, instead
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1287 % of just \STYLE. We do this so that font changes will continue to work
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1288 % in math mode, where it is the current \fam that is relevant in most
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1289 % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1290 % \tenbf}, for example. By redefining \tenbf, we obviate the need to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1291 % redefine \bf itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1292 \def\textfonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1293 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1294 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1295 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1296 \resetmathfonts \setleading{\textleading}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1297 \def\titlefonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1298 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1299 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1300 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1301 \let\tenttsl=\titlettsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1302 \resetmathfonts \setleading{25pt}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1303 \def\titlefont#1{{\titlefonts\rm #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1304 \def\chapfonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1305 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1306 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1307 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1308 \resetmathfonts \setleading{19pt}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1309 \def\secfonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1310 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1311 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1312 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1313 \resetmathfonts \setleading{16pt}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1314 \def\subsecfonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1315 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1316 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1317 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1318 \resetmathfonts \setleading{15pt}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1319 \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1320 \def\smallfonts{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1321 \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1322 \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1323 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1324 \let\tenttsl=\smallttsl
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1325 \resetmathfonts \setleading{10.5pt}}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1326 \def\smallerfonts{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1327 \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1328 \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1329 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1330 \let\tenttsl=\smallerttsl
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1331 \resetmathfonts \setleading{9.5pt}}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1332 \let\smallexamplefonts = \smallerfonts
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1333
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1334 % Set up the default fonts, so we can use them for creating boxes.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1335 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1336 \textfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1337
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1338 % Define these so they can be easily changed for other fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1339 \def\angleleft{$\langle$}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1340 \def\angleright{$\rangle$}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1341
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1342 % Count depth in font-changes, for error checks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1343 \newcount\fontdepth \fontdepth=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1344
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1345 % Fonts for short table of contents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1346 \setfont\shortcontrm\rmshape{12}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1347 \setfont\shortcontbf\bxshape{12}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1348 \setfont\shortcontsl\slshape{12}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1349
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1350 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1351 %% serif) and @ii for TeX italic
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1352
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1353 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1354 % unless the following character is such as not to need one.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1355 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1356 \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1357 \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1358
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1359 \let\i=\smartitalic
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1360 \let\var=\smartslanted
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1361 \let\dfn=\smartslanted
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1362 \let\emph=\smartitalic
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1363 \let\cite=\smartslanted
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1364
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1365 \def\b#1{{\bf #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1366 \let\strong=\b
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1367
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1368 % We can't just use \exhyphenpenalty, because that only has effect at
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1369 % the end of a paragraph. Restore normal hyphenation at the end of the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1370 % group within which \nohyphenation is presumably called.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1371 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1372 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1373 \def\restorehyphenation{\hyphenchar\font = `- }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1374
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1375 \def\t#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1376 {\tt \rawbackslash \frenchspacing #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1377 \null
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1378 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1379 \let\ttfont=\t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1380 \def\samp#1{`\tclose{#1}'\null}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1381 \setfont\keyrm\rmshape{8}{1000}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1382 \font\keysy=cmsy9
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1383 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1384 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1385 \vbox{\hrule\kern-0.4pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1386 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1387 \kern-0.4pt\hrule}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1388 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1389 % The old definition, with no lozenge:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1390 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1391 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1392
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1393 % @file, @option are the same as @samp.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1394 \let\file=\samp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1395 \let\option=\samp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1396
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1397 % @code is a modification of @t,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1398 % which makes spaces the same size as normal in the surrounding text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1399 \def\tclose#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1400 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1401 % Change normal interword space to be same as for the current font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1402 \spaceskip = \fontdimen2\font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1403 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1404 % Switch to typewriter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1405 \tt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1406 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1407 % But `\ ' produces the large typewriter interword space.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1408 \def\ {{\spaceskip = 0pt{} }}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1409 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1410 % Turn off hyphenation.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1411 \nohyphenation
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1412 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1413 \rawbackslash
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1414 \frenchspacing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1415 #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1416 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1417 \null
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1418 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1419
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1420 % We *must* turn on hyphenation at `-' and `_' in \code.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1421 % Otherwise, it is too hard to avoid overfull hboxes
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1422 % in the Emacs manual, the Library manual, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1423
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1424 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1425 % both hyphenation at - and hyphenation within words.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1426 % We must therefore turn them both off (\tclose does that)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1427 % and arrange explicitly to hyphenate at a dash.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1428 % -- rms.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1429 {
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1430 \catcode`\-=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1431 \catcode`\_=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1432 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1433 \global\def\code{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1434 \catcode`\-=\active \let-\codedash
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1435 \catcode`\_=\active \let_\codeunder
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1436 \codex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1437 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1438 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1439 % If we end up with any active - characters when handling the index,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1440 % just treat them as a normal -.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1441 \global\def\indexbreaks{\catcode`\-=\active \let-\realdash}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1442 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1443
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1444 \def\realdash{-}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1445 \def\codedash{-\discretionary{}{}{}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1446 \def\codeunder{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1447 % this is all so @math{@code{var_name}+1} can work. In math mode, _
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1448 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1449 % will therefore expand the active definition of _, which is us
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1450 % (inside @code that is), therefore an endless loop.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1451 \ifusingtt{\ifmmode
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1452 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1453 \else\normalunderscore \fi
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1454 \discretionary{}{}{}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1455 {\_}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1456 }
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1457 \def\codex #1{\tclose{#1}\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1458
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1459 % @kbd is like @code, except that if the argument is just one @key command,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1460 % then @kbd has no effect.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1461
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1462 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1463 % `example' (@kbd uses ttsl only inside of @example and friends),
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1464 % or `code' (@kbd uses normal tty font always).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1465 \def\kbdinputstyle{\parsearg\kbdinputstylexxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1466 \def\kbdinputstylexxx#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1467 \def\arg{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1468 \ifx\arg\worddistinct
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1469 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1470 \else\ifx\arg\wordexample
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1471 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1472 \else\ifx\arg\wordcode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1473 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1474 \fi\fi\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1475 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1476 \def\worddistinct{distinct}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1477 \def\wordexample{example}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1478 \def\wordcode{code}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1479
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1480 % Default is kbdinputdistinct. (Too much of a hassle to call the macro,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1481 % the catcodes are wrong for parsearg to work.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1482 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1483
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1484 \def\xkey{\key}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1485 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1486 \ifx\one\xkey\ifx\threex\three \key{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1487 \else{\tclose{\kbdfont\look}}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1488 \else{\tclose{\kbdfont\look}}\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1489
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1490 % For @url, @env, @command quotes seem unnecessary, so use \code.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1491 \let\url=\code
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1492 \let\env=\code
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1493 \let\command=\code
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1494
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1495 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1496 % second argument specifying the text to display and an optional third
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1497 % arg as text to display instead of (rather than in addition to) the url
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1498 % itself. First (mandatory) arg is the url. Perhaps eventually put in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1499 % a hypertex \special here.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1500 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1501 \def\uref#1{\douref #1,,,\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1502 \def\douref#1,#2,#3,#4\finish{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1503 \unsepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1504 \pdfurl{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1505 \setbox0 = \hbox{\ignorespaces #3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1506 \ifdim\wd0 > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1507 \unhbox0 % third arg given, show only that
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1508 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1509 \setbox0 = \hbox{\ignorespaces #2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1510 \ifdim\wd0 > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1511 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1512 \unhbox0 % PDF: 2nd arg given, show only it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1513 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1514 \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1515 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1516 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1517 \code{#1}% only url given, so show it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1518 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1519 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1520 \endlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1521 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1522
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1523 % rms does not like angle brackets --karl, 17may97.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1524 % So now @email is just like @uref, unless we are pdf.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
1525 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1526 %\def\email#1{\angleleft{\tt #1}\angleright}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1527 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1528 \def\email#1{\doemail#1,,\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1529 \def\doemail#1,#2,#3\finish{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1530 \unsepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1531 \pdfurl{mailto:#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1532 \setbox0 = \hbox{\ignorespaces #2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1533 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1534 \endlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1535 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1536 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1537 \let\email=\uref
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1538 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1539
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1540 % Check if we are currently using a typewriter font. Since all the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1541 % Computer Modern typewriter fonts have zero interword stretch (and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1542 % shrink), and it is reasonable to expect all typewriter fonts to have
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1543 % this property, we can check that font parameter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1544 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1545 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1546
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1547 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1548 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1549 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1550 \def\dmn#1{\thinspace #1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1551
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1552 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1553
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1554 % @l was never documented to mean ``switch to the Lisp font'',
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1555 % and it is not used as such in any manual I can find. We need it for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1556 % Polish suppressed-l. --karl, 22sep96.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1557 %\def\l#1{{\li #1}\null}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1558
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1559 % Explicit font changes: @r, @sc, undocumented @ii.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1560 \def\r#1{{\rm #1}} % roman font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1561 \def\sc#1{{\smallcaps#1}} % smallcaps font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1562 \def\ii#1{{\it #1}} % italic font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1563
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1564 % @acronym downcases the argument and prints in smallcaps.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1565 \def\acronym#1{{\smallcaps \lowercase{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1566
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1567 % @pounds{} is a sterling sign.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1568 \def\pounds{{\it\$}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1569
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1570
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1571 \message{page headings,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1572
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1573 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1574 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1575
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1576 % First the title page. Must do @settitle before @titlepage.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1577 \newif\ifseenauthor
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1578 \newif\iffinishedtitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1579
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1580 % Do an implicit @contents or @shortcontents after @end titlepage if the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1581 % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1582 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1583 \newif\ifsetcontentsaftertitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1584 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1585 \newif\ifsetshortcontentsaftertitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1586 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1587
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1588 \def\shorttitlepage{\parsearg\shorttitlepagezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1589 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1590 \endgroup\page\hbox{}\page}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1591
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1592 \def\titlepage{\begingroup \parindent=0pt \textfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1593 \let\subtitlerm=\tenrm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1594 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1595 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1596 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1597 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1598 % Leave some space at the very top of the page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1599 \vglue\titlepagetopglue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1600 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1601 % Now you can print the title using @title.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1602 \def\title{\parsearg\titlezzz}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1603 \def\titlezzz##1{\leftline{\titlefonts\rm ##1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1604 % print a rule at the page bottom also.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1605 \finishedtitlepagefalse
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1606 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1607 % No rule at page bottom unless we print one at the top with @title.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1608 \finishedtitlepagetrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1609 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1610 % Now you can put text using @subtitle.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1611 \def\subtitle{\parsearg\subtitlezzz}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1612 \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1613 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1614 % @author should come last, but may come many times.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1615 \def\author{\parsearg\authorzzz}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1616 \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1617 {\authorfont \leftline{##1}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1618 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1619 % Most title ``pages'' are actually two pages long, with space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1620 % at the top of the second. We don't want the ragged left on the second.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1621 \let\oldpage = \page
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1622 \def\page{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1623 \iffinishedtitlepage\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1624 \finishtitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1625 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1626 \oldpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1627 \let\page = \oldpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1628 \hbox{}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1629 % \def\page{\oldpage \hbox{}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1630 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1631
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1632 \def\Etitlepage{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1633 \iffinishedtitlepage\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1634 \finishtitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1635 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1636 % It is important to do the page break before ending the group,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1637 % because the headline and footline are only empty inside the group.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1638 % If we use the new definition of \page, we always get a blank page
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1639 % after the title page, which we certainly don't want.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1640 \oldpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1641 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1642 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1643 % Need this before the \...aftertitlepage checks so that if they are
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1644 % in effect the toc pages will come out with page numbers.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1645 \HEADINGSon
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
1646 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1647 % If they want short, they certainly want long too.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1648 \ifsetshortcontentsaftertitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1649 \shortcontents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1650 \contents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1651 \global\let\shortcontents = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1652 \global\let\contents = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1653 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1654 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1655 \ifsetcontentsaftertitlepage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1656 \contents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1657 \global\let\contents = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1658 \global\let\shortcontents = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1659 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1660 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1661
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1662 \def\finishtitlepage{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1663 \vskip4pt \hrule height 2pt width \hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1664 \vskip\titlepagebottomglue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1665 \finishedtitlepagetrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1666 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1667
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1668 %%% Set up page headings and footings.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1669
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1670 \let\thispage=\folio
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1671
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1672 \newtoks\evenheadline % headline on even pages
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1673 \newtoks\oddheadline % headline on odd pages
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1674 \newtoks\evenfootline % footline on even pages
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1675 \newtoks\oddfootline % footline on odd pages
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1676
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1677 % Now make Tex use those variables
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1678 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1679 \else \the\evenheadline \fi}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1680 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1681 \else \the\evenfootline \fi}\HEADINGShook}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1682 \let\HEADINGShook=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1683
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1684 % Commands to set those variables.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1685 % For example, this is what @headings on does
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1686 % @evenheading @thistitle|@thispage|@thischapter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1687 % @oddheading @thischapter|@thispage|@thistitle
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1688 % @evenfooting @thisfile||
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1689 % @oddfooting ||@thisfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1690
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1691 \def\evenheading{\parsearg\evenheadingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1692 \def\oddheading{\parsearg\oddheadingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1693 \def\everyheading{\parsearg\everyheadingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1694
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1695 \def\evenfooting{\parsearg\evenfootingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1696 \def\oddfooting{\parsearg\oddfootingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1697 \def\everyfooting{\parsearg\everyfootingxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1698
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1699 {\catcode`\@=0 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1700
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1701 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1702 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1703 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1704
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1705 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1706 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1707 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1708
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1709 \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1710
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1711 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1712 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1713 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1714
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1715 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1716 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1717 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1718 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1719 % Leave some space for the footline. Hopefully ok to assume
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1720 % @evenfooting will not be used by itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1721 \global\advance\pageheight by -\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1722 \global\advance\vsize by -\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1723 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1724
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1725 \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1726 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1727 }% unbind the catcode of @.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1728
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1729 % @headings double turns headings on for double-sided printing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1730 % @headings single turns headings on for single-sided printing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1731 % @headings off turns them off.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1732 % @headings on same as @headings double, retained for compatibility.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1733 % @headings after turns on double-sided headings after this page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1734 % @headings doubleafter turns on double-sided headings after this page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1735 % @headings singleafter turns on single-sided headings after this page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1736 % By default, they are off at the start of a document,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1737 % and turned `on' after @end titlepage.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1738
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1739 \def\headings #1 {\csname HEADINGS#1\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1740
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1741 \def\HEADINGSoff{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1742 \global\evenheadline={\hfil} \global\evenfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1743 \global\oddheadline={\hfil} \global\oddfootline={\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1744 \HEADINGSoff
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1745 % When we turn headings on, set the page number to 1.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1746 % For double-sided printing, put current file name in lower left corner,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1747 % chapter name on inside top of right hand pages, document
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1748 % title on inside top of left hand pages, and page numbers on outside top
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1749 % edge of all pages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1750 \def\HEADINGSdouble{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1751 \global\pageno=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1752 \global\evenfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1753 \global\oddfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1754 \global\evenheadline={\line{\folio\hfil\thistitle}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1755 \global\oddheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1756 \global\let\contentsalignmacro = \chapoddpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1757 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1758 \let\contentsalignmacro = \chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1759
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1760 % For single-sided printing, chapter title goes across top left of page,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1761 % page number on top right.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1762 \def\HEADINGSsingle{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1763 \global\pageno=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1764 \global\evenfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1765 \global\oddfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1766 \global\evenheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1767 \global\oddheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1768 \global\let\contentsalignmacro = \chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1769 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1770 \def\HEADINGSon{\HEADINGSdouble}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1771
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1772 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1773 \let\HEADINGSdoubleafter=\HEADINGSafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1774 \def\HEADINGSdoublex{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1775 \global\evenfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1776 \global\oddfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1777 \global\evenheadline={\line{\folio\hfil\thistitle}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1778 \global\oddheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1779 \global\let\contentsalignmacro = \chapoddpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1780 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1781
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1782 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1783 \def\HEADINGSsinglex{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1784 \global\evenfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1785 \global\oddfootline={\hfil}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1786 \global\evenheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1787 \global\oddheadline={\line{\thischapter\hfil\folio}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1788 \global\let\contentsalignmacro = \chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1789 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1790
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1791 % Subroutines used in generating headings
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1792 % This produces Day Month Year style of output.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1793 % Only define if not already defined, in case a txi-??.tex file has set
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1794 % up a different format (e.g., txi-cs.tex does this).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1795 \ifx\today\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1796 \def\today{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1797 \number\day\space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1798 \ifcase\month
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1799 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1800 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1801 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1802 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1803 \space\number\year}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1804 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1805
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1806 % @settitle line... specifies the title of the document, for headings.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1807 % It generates no output of its own.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1808 \def\thistitle{\putwordNoTitle}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1809 \def\settitle{\parsearg\settitlezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1810 \def\settitlezzz #1{\gdef\thistitle{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1811
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1812
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1813 \message{tables,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1814 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1815
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1816 % default indentation of table text
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1817 \newdimen\tableindent \tableindent=.8in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1818 % default indentation of @itemize and @enumerate text
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1819 \newdimen\itemindent \itemindent=.3in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1820 % margin between end of table item and start of table text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1821 \newdimen\itemmargin \itemmargin=.1in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1822
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1823 % used internally for \itemindent minus \itemmargin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1824 \newdimen\itemmax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1825
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1826 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1827 % these defs.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1828 % They also define \itemindex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1829 % to index the item name in whatever manner is desired (perhaps none).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1830
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1831 \newif\ifitemxneedsnegativevskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1832
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1833 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1834
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1835 \def\internalBitem{\smallbreak \parsearg\itemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1836 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1837
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1838 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1839 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1840
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1841 \def\internalBkitem{\smallbreak \parsearg\kitemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1842 \def\internalBkitemx{\itemxpar \parsearg\kitemzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1843
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1844 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1845 \itemzzz {#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1846
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1847 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1848 \itemzzz {#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1849
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1850 \def\itemzzz #1{\begingroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1851 \advance\hsize by -\rightskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1852 \advance\hsize by -\tableindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1853 \setbox0=\hbox{\itemfont{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1854 \itemindex{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1855 \nobreak % This prevents a break before @itemx.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1856 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1857 % If the item text does not fit in the space we have, put it on a line
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1858 % by itself, and do not allow a page break either before or after that
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1859 % line. We do not start a paragraph here because then if the next
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1860 % command is, e.g., @kindex, the whatsit would get put into the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1861 % horizontal list on a line by itself, resulting in extra blank space.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1862 \ifdim \wd0>\itemmax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1863 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1864 % Make this a paragraph so we get the \parskip glue and wrapping,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1865 % but leave it ragged-right.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1866 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1867 \advance\leftskip by-\tableindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1868 \advance\hsize by\tableindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1869 \advance\rightskip by0pt plus1fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1870 \leavevmode\unhbox0\par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1871 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1872 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1873 % We're going to be starting a paragraph, but we don't want the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1874 % \parskip glue -- logically it's part of the @item we just started.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1875 \nobreak \vskip-\parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1876 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1877 % Stop a page break at the \parskip glue coming up. Unfortunately
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1878 % we can't prevent a possible page break at the following
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1879 % \baselineskip glue.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1880 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1881 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1882 \itemxneedsnegativevskipfalse
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1883 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1884 % The item text fits into the space. Start a paragraph, so that the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1885 % following text (if any) will end up on the same line.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1886 \noindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1887 % Do this with kerns and \unhbox so that if there is a footnote in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1888 % the item text, it can migrate to the main vertical list and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1889 % eventually be printed.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1890 \nobreak\kern-\tableindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1891 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1892 \unhbox0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1893 \nobreak\kern\dimen0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1894 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1895 \itemxneedsnegativevskiptrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1896 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1897 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1898
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1899 \def\item{\errmessage{@item while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1900 \def\itemx{\errmessage{@itemx while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1901 \def\kitem{\errmessage{@kitem while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1902 \def\kitemx{\errmessage{@kitemx while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1903 \def\xitem{\errmessage{@xitem while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1904 \def\xitemx{\errmessage{@xitemx while not in a table}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1905
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1906 % Contains a kludge to get @end[description] to work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1907 \def\description{\tablez{\dontindex}{1}{}{}{}{}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1908
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1909 % @table, @ftable, @vtable.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1910 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1911 {\obeylines\obeyspaces%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1912 \gdef\tablex #1^^M{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1913 \tabley\dontindex#1 \endtabley}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1914
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1915 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1916 {\obeylines\obeyspaces%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1917 \gdef\ftablex #1^^M{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1918 \tabley\fnitemindex#1 \endtabley
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1919 \def\Eftable{\endgraf\afterenvbreak\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1920 \let\Etable=\relax}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1921
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1922 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1923 {\obeylines\obeyspaces%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1924 \gdef\vtablex #1^^M{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1925 \tabley\vritemindex#1 \endtabley
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1926 \def\Evtable{\endgraf\afterenvbreak\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1927 \let\Etable=\relax}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1928
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1929 \def\dontindex #1{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1930 \def\fnitemindex #1{\doind {fn}{\code{#1}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1931 \def\vritemindex #1{\doind {vr}{\code{#1}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1932
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1933 {\obeyspaces %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1934 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1935 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1936
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1937 \def\tablez #1#2#3#4#5#6{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1938 \aboveenvbreak %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1939 \begingroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1940 \def\Edescription{\Etable}% Necessary kludge.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1941 \let\itemindex=#1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1942 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1943 \ifnum 0#4>0 \tableindent=#4\mil \fi %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1944 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1945 \def\itemfont{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1946 \itemmax=\tableindent %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1947 \advance \itemmax by -\itemmargin %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1948 \advance \leftskip by \tableindent %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1949 \exdentamount=\tableindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1950 \parindent = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1951 \parskip = \smallskipamount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1952 \ifdim \parskip=0pt \parskip=2pt \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1953 \def\Etable{\endgraf\afterenvbreak\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1954 \let\item = \internalBitem %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1955 \let\itemx = \internalBitemx %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1956 \let\kitem = \internalBkitem %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1957 \let\kitemx = \internalBkitemx %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1958 \let\xitem = \internalBxitem %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1959 \let\xitemx = \internalBxitemx %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1960 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1961
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1962 % This is the counter used by @enumerate, which is really @itemize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1963
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1964 \newcount \itemno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1965
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1966 \def\itemize{\parsearg\itemizezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1967
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1968 \def\itemizezzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1969 \begingroup % ended by the @end itemize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1970 \itemizey {#1}{\Eitemize}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1971 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1972
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1973 \def\itemizey #1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1974 \aboveenvbreak %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1975 \itemmax=\itemindent %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1976 \advance \itemmax by -\itemmargin %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1977 \advance \leftskip by \itemindent %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1978 \exdentamount=\itemindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1979 \parindent = 0pt %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1980 \parskip = \smallskipamount %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1981 \ifdim \parskip=0pt \parskip=2pt \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1982 \def#2{\endgraf\afterenvbreak\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1983 \def\itemcontents{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1984 \let\item=\itemizeitem}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1985
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1986 % Set sfcode to normal for the chars that usually have another value.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1987 % These are `.?!:;,'
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1988 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1989 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1990
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1991 % \splitoff TOKENS\endmark defines \first to be the first token in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1992 % TOKENS, and \rest to be the remainder.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1993 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1994 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1995
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1996 % Allow an optional argument of an uppercase letter, lowercase letter,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1997 % or number, to specify the first label in the enumerated list. No
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1998 % argument is the same as `1'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
1999 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2000 \def\enumerate{\parsearg\enumeratezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2001 \def\enumeratezzz #1{\enumeratey #1 \endenumeratey}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2002 \def\enumeratey #1 #2\endenumeratey{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2003 \begingroup % ended by the @end enumerate
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2004 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2005 % If we were given no argument, pretend we were given `1'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2006 \def\thearg{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2007 \ifx\thearg\empty \def\thearg{1}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2008 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2009 % Detect if the argument is a single token. If so, it might be a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2010 % letter. Otherwise, the only valid thing it can be is a number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2011 % (We will always have one token, because of the test we just made.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2012 % This is a good thing, since \splitoff doesn't work given nothing at
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2013 % all -- the first parameter is undelimited.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2014 \expandafter\splitoff\thearg\endmark
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2015 \ifx\rest\empty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2016 % Only one token in the argument. It could still be anything.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2017 % A ``lowercase letter'' is one whose \lccode is nonzero.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2018 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2019 % not equal to itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2020 % Otherwise, we assume it's a number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2021 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2022 % We need the \relax at the end of the \ifnum lines to stop TeX from
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2023 % continuing to look for a <number>.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2024 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2025 \ifnum\lccode\expandafter`\thearg=0\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2026 \numericenumerate % a number (we hope)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2027 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2028 % It's a letter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2029 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2030 \lowercaseenumerate % lowercase letter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2031 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2032 \uppercaseenumerate % uppercase letter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2033 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2034 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2035 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2036 % Multiple tokens in the argument. We hope it's a number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2037 \numericenumerate
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2038 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2039 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2040
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2041 % An @enumerate whose labels are integers. The starting integer is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2042 % given in \thearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2043 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2044 \def\numericenumerate{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2045 \itemno = \thearg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2046 \startenumeration{\the\itemno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2047 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2048
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2049 % The starting (lowercase) letter is in \thearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2050 \def\lowercaseenumerate{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2051 \itemno = \expandafter`\thearg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2052 \startenumeration{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2053 % Be sure we're not beyond the end of the alphabet.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2054 \ifnum\itemno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2055 \errmessage{No more lowercase letters in @enumerate; get a bigger
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2056 alphabet}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2057 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2058 \char\lccode\itemno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2059 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2060 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2061
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2062 % The starting (uppercase) letter is in \thearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2063 \def\uppercaseenumerate{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2064 \itemno = \expandafter`\thearg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2065 \startenumeration{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2066 % Be sure we're not beyond the end of the alphabet.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2067 \ifnum\itemno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2068 \errmessage{No more uppercase letters in @enumerate; get a bigger
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2069 alphabet}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2070 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2071 \char\uccode\itemno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2072 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2073 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2074
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2075 % Call itemizey, adding a period to the first argument and supplying the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2076 % common last two arguments. Also subtract one from the initial value in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2077 % \itemno, since @item increments \itemno.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2078 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2079 \def\startenumeration#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2080 \advance\itemno by -1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2081 \itemizey{#1.}\Eenumerate\flushcr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2082 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2083
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2084 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2085 % to @enumerate.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2086 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2087 \def\alphaenumerate{\enumerate{a}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2088 \def\capsenumerate{\enumerate{A}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2089 \def\Ealphaenumerate{\Eenumerate}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2090 \def\Ecapsenumerate{\Eenumerate}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2091
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2092 % Definition of @item while inside @itemize.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2093
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2094 \def\itemizeitem{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2095 \advance\itemno by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2096 {\let\par=\endgraf \smallbreak}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2097 \ifhmode \errmessage{In hmode at itemizeitem}\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2098 {\parskip=0in \hskip 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2099 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2100 \vadjust{\penalty 1200}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2101 \flushcr}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2102
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2103 % @multitable macros
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2104 % Amy Hendrickson, 8/18/94, 3/6/96
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2105 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2106 % @multitable ... @end multitable will make as many columns as desired.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2107 % Contents of each column will wrap at width given in preamble. Width
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2108 % can be specified either with sample text given in a template line,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2109 % or in percent of \hsize, the current width of text on page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2110
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2111 % Table can continue over pages but will only break between lines.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2112
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2113 % To make preamble:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2114 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2115 % Either define widths of columns in terms of percent of \hsize:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2116 % @multitable @columnfractions .25 .3 .45
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2117 % @item ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2118 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2119 % Numbers following @columnfractions are the percent of the total
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2120 % current hsize to be used for each column. You may use as many
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2121 % columns as desired.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2122
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2123
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2124 % Or use a template:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2125 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2126 % @item ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2127 % using the widest term desired in each column.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2128 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2129 % For those who want to use more than one line's worth of words in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2130 % the preamble, break the line within one argument and it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2131 % will parse correctly, i.e.,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2132 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2133 % @multitable {Column 1 template} {Column 2 template} {Column 3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2134 % template}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2135 % Not:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2136 % @multitable {Column 1 template} {Column 2 template}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2137 % {Column 3 template}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2138
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2139 % Each new table line starts with @item, each subsequent new column
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2140 % starts with @tab. Empty columns may be produced by supplying @tab's
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2141 % with nothing between them for as many times as empty columns are needed,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2142 % ie, @tab@tab@tab will produce two empty columns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2143
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2144 % @item, @tab, @multitable or @end multitable do not need to be on their
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2145 % own lines, but it will not hurt if they are.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2146
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2147 % Sample multitable:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2148
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2149 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2150 % @item first col stuff @tab second col stuff @tab third col
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2151 % @item
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2152 % first col stuff
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2153 % @tab
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2154 % second col stuff
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2155 % @tab
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2156 % third col
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2157 % @item first col stuff @tab second col stuff
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2158 % @tab Many paragraphs of text may be used in any column.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2159 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2160 % They will wrap at the width determined by the template.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2161 % @item@tab@tab This will be in third column.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2162 % @end multitable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2163
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2164 % Default dimensions may be reset by user.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2165 % @multitableparskip is vertical space between paragraphs in table.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2166 % @multitableparindent is paragraph indent in table.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2167 % @multitablecolmargin is horizontal space to be left between columns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2168 % @multitablelinespace is space to leave between table items, baseline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2169 % to baseline.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2170 % 0pt means it depends on current normal line spacing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2171 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2172 \newskip\multitableparskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2173 \newskip\multitableparindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2174 \newdimen\multitablecolspace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2175 \newskip\multitablelinespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2176 \multitableparskip=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2177 \multitableparindent=6pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2178 \multitablecolspace=12pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2179 \multitablelinespace=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2180
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2181 % Macros used to set up halign preamble:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2182 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2183 \let\endsetuptable\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2184 \def\xendsetuptable{\endsetuptable}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2185 \let\columnfractions\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2186 \def\xcolumnfractions{\columnfractions}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2187 \newif\ifsetpercent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2188
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2189 % #1 is the part of the @columnfraction before the decimal point, which
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2190 % is presumably either 0 or the empty string (but we don't check, we
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2191 % just throw it away). #2 is the decimal part, which we use as the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2192 % percent of \hsize for this column.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2193 \def\pickupwholefraction#1.#2 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2194 \global\advance\colcount by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2195 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2196 \setuptable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2197 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2198
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2199 \newcount\colcount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2200 \def\setuptable#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2201 \def\firstarg{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2202 \ifx\firstarg\xendsetuptable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2203 \let\go = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2204 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2205 \ifx\firstarg\xcolumnfractions
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2206 \global\setpercenttrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2207 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2208 \ifsetpercent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2209 \let\go\pickupwholefraction
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2210 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2211 \global\advance\colcount by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2212 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator;
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2213 % typically that is always in the input, anyway.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2214 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2215 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2216 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2217 \ifx\go\pickupwholefraction
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2218 % Put the argument back for the \pickupwholefraction call, so
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2219 % we'll always have a period there to be parsed.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2220 \def\go{\pickupwholefraction#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2221 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2222 \let\go = \setuptable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2223 \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2224 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2225 \go
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2226 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2227
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2228 % This used to have \hskip1sp. But then the space in a template line is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2229 % not enough. That is bad. So let's go back to just & until we
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2230 % encounter the problem it was intended to solve again.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2231 % --karl, nathan@acm.org, 20apr99.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2232 \def\tab{&}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2233
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2234 % @multitable ... @end multitable definitions:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2235 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2236 \def\multitable{\parsearg\dotable}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2237 \def\dotable#1{\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2238 \vskip\parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2239 \let\item\crcr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2240 \tolerance=9500
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2241 \hbadness=9500
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2242 \setmultitablespacing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2243 \parskip=\multitableparskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2244 \parindent=\multitableparindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2245 \overfullrule=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2246 \global\colcount=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2247 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2248 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2249 % To parse everything between @multitable and @item:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2250 \setuptable#1 \endsetuptable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2251 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2252 % \everycr will reset column counter, \colcount, at the end of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2253 % each line. Every column entry will cause \colcount to advance by one.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2254 % The table preamble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2255 % looks at the current \colcount to find the correct column width.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2256 \everycr{\noalign{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2257 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2258 % \filbreak%% keeps underfull box messages off when table breaks over pages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2259 % Maybe so, but it also creates really weird page breaks when the table
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2260 % breaks over pages. Wouldn't \vfil be better? Wait until the problem
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2261 % manifests itself, so it can be fixed for real --karl.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2262 \global\colcount=0\relax}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2263 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2264 % This preamble sets up a generic column definition, which will
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2265 % be used as many times as user calls for columns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2266 % \vtop will set a single line and will also let text wrap and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2267 % continue for many paragraphs if desired.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2268 \halign\bgroup&\global\advance\colcount by 1\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2269 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2270 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2271 % In order to keep entries from bumping into each other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2272 % we will add a \leftskip of \multitablecolspace to all columns after
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2273 % the first one.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2274 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2275 % If a template has been used, we will add \multitablecolspace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2276 % to the width of each template entry.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2277 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2278 % If the user has set preamble in terms of percent of \hsize we will
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2279 % use that dimension as the width of the column, and the \leftskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2280 % will keep entries from bumping into each other. Table will start at
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2281 % left margin and final column will justify at right margin.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2282 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2283 % Make sure we don't inherit \rightskip from the outer environment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2284 \rightskip=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2285 \ifnum\colcount=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2286 % The first column will be indented with the surrounding text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2287 \advance\hsize by\leftskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2288 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2289 \ifsetpercent \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2290 % If user has not set preamble in terms of percent of \hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2291 % we will advance \hsize by \multitablecolspace.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2292 \advance\hsize by \multitablecolspace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2293 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2294 % In either case we will make \leftskip=\multitablecolspace:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2295 \leftskip=\multitablecolspace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2296 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2297 % Ignoring space at the beginning and end avoids an occasional spurious
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2298 % blank line, when TeX decides to break the line at the space before the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2299 % box from the multistrut, so the strut ends up on a line by itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2300 % For example:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2301 % @multitable @columnfractions .11 .89
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2302 % @item @code{#}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2303 % @tab Legal holiday which is valid in major parts of the whole country.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2304 % Is automatically provided with highlighting sequences respectively marking
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2305 % characters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2306 \noindent\ignorespaces##\unskip\multistrut}\cr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2307 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2308
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2309 \def\setmultitablespacing{% test to see if user has set \multitablelinespace.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2310 % If so, do nothing. If not, give it an appropriate dimension based on
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2311 % current baselineskip.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2312 \ifdim\multitablelinespace=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2313 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2314 \global\advance\multitablelinespace by-\ht0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2315 %% strut to put in table in case some entry doesn't have descenders,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2316 %% to keep lines equally spaced
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2317 \let\multistrut = \strut
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2318 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2319 %% FIXME: what is \box0 supposed to be?
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2320 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2321 width0pt\relax} \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2322 %% Test to see if parskip is larger than space between lines of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2323 %% table. If not, do nothing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2324 %% If so, set to same dimension as multitablelinespace.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2325 \ifdim\multitableparskip>\multitablelinespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2326 \global\multitableparskip=\multitablelinespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2327 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2328 %% than skip between lines in the table.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2329 \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2330 \ifdim\multitableparskip=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2331 \global\multitableparskip=\multitablelinespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2332 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2333 %% than skip between lines in the table.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2334 \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2335
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2336
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2337 \message{conditionals,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2338 % Prevent errors for section commands.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2339 % Used in @ignore and in failing conditionals.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2340 \def\ignoresections{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2341 \let\chapter=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2342 \let\unnumbered=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2343 \let\top=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2344 \let\unnumberedsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2345 \let\unnumberedsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2346 \let\unnumberedsubsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2347 \let\unnumberedsubsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2348 \let\unnumberedsubsubsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2349 \let\unnumberedsubsubsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2350 \let\section=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2351 \let\subsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2352 \let\subsubsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2353 \let\subsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2354 \let\subsubsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2355 \let\appendix=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2356 \let\appendixsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2357 \let\appendixsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2358 \let\appendixsubsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2359 \let\appendixsubsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2360 \let\appendixsubsubsec=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2361 \let\appendixsubsubsection=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2362 \let\contents=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2363 \let\smallbook=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2364 \let\titlepage=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2365 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2366
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2367 % Used in nested conditionals, where we have to parse the Texinfo source
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2368 % and so want to turn off most commands, in case they are used
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2369 % incorrectly.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2370 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2371 \def\ignoremorecommands{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2372 \let\defcodeindex = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2373 \let\defcv = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2374 \let\deffn = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2375 \let\deffnx = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2376 \let\defindex = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2377 \let\defivar = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2378 \let\defmac = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2379 \let\defmethod = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2380 \let\defop = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2381 \let\defopt = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2382 \let\defspec = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2383 \let\deftp = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2384 \let\deftypefn = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2385 \let\deftypefun = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2386 \let\deftypeivar = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2387 \let\deftypeop = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2388 \let\deftypevar = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2389 \let\deftypevr = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2390 \let\defun = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2391 \let\defvar = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2392 \let\defvr = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2393 \let\ref = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2394 \let\xref = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2395 \let\printindex = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2396 \let\pxref = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2397 \let\settitle = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2398 \let\setchapternewpage = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2399 \let\setchapterstyle = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2400 \let\everyheading = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2401 \let\evenheading = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2402 \let\oddheading = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2403 \let\everyfooting = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2404 \let\evenfooting = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2405 \let\oddfooting = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2406 \let\headings = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2407 \let\include = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2408 \let\lowersections = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2409 \let\down = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2410 \let\raisesections = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2411 \let\up = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2412 \let\set = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2413 \let\clear = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2414 \let\item = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2415 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2416
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2417 % Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu,
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2418 % @direntry, and @documentdescription.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2419 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2420 \def\ignore{\doignore{ignore}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2421 \def\ifhtml{\doignore{ifhtml}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2422 \def\ifinfo{\doignore{ifinfo}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2423 \def\ifplaintext{\doignore{ifplaintext}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2424 \def\ifnottex{\doignore{ifnottex}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2425 \def\html{\doignore{html}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2426 \def\menu{\doignore{menu}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2427 \def\direntry{\doignore{direntry}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2428 \def\documentdescription{\doignore{documentdescription}}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2429 \def\documentdescriptionword{documentdescription}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2430
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2431 % @dircategory CATEGORY -- specify a category of the dir file
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2432 % which this file should belong to. Ignore this in TeX.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2433 \let\dircategory = \comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2434
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2435 % Ignore text until a line `@end #1'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2436 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2437 \def\doignore#1{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2438 % Don't complain about control sequences we have declared \outer.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2439 \ignoresections
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2440 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2441 % Define a command to swallow text until we reach `@end #1'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2442 % This @ is a catcode 12 token (that is the normal catcode of @ in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2443 % this texinfo.tex file). We change the catcode of @ below to match.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2444 \long\def\doignoretext##1@end #1{\enddoignore}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2445 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2446 % Make sure that spaces turn into tokens that match what \doignoretext wants.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2447 \catcode32 = 10
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2448 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2449 % Ignore braces, too, so mismatched braces don't cause trouble.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2450 \catcode`\{ = 9
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2451 \catcode`\} = 9
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2452 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2453 % We must not have @c interpreted as a control sequence.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2454 \catcode`\@ = 12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2455 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2456 \def\ignoreword{#1}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2457 \ifx\ignoreword\documentdescriptionword
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2458 % The c kludge breaks documentdescription, since
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2459 % `documentdescription' contains a `c'. Means not everything will
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2460 % be ignored inside @documentdescription, but oh well...
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2461 \else
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2462 % Make the letter c a comment character so that the rest of the line
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2463 % will be ignored. This way, the document can have (for example)
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2464 % @c @end ifinfo
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2465 % and the @end ifinfo will be properly ignored.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2466 % (We've just changed @ to catcode 12.)
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2467 \catcode`\c = 14
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2468 \fi
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2469 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2470 % And now expand the command defined above.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2471 \doignoretext
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2472 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2473
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2474 % What we do to finish off ignored text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2475 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2476 \def\enddoignore{\endgroup\ignorespaces}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2477
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2478 \newif\ifwarnedobs\warnedobsfalse
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2479 \def\obstexwarn{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2480 \ifwarnedobs\relax\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2481 % We need to warn folks that they may have trouble with TeX 3.0.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2482 % This uses \immediate\write16 rather than \message to get newlines.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2483 \immediate\write16{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2484 \immediate\write16{WARNING: for users of Unix TeX 3.0!}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2485 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2486 \immediate\write16{If you are running another version of TeX, relax.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2487 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2488 \immediate\write16{ Then upgrade your TeX installation if you can.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2489 \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2490 \immediate\write16{If you are stuck with version 3.0, run the}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2491 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2492 \immediate\write16{ to use a workaround.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2493 \immediate\write16{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2494 \global\warnedobstrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2495 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2496 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2497
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2498 % **In TeX 3.0, setting text in \nullfont hangs tex. For a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2499 % workaround (which requires the file ``dummy.tfm'' to be installed),
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2500 % uncomment the following line:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2501 %%%%%\font\nullfont=dummy\let\obstexwarn=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2502
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2503 % Ignore text, except that we keep track of conditional commands for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2504 % purposes of nesting, up to an `@end #1' command.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2505 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2506 \def\nestedignore#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2507 \obstexwarn
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2508 % We must actually expand the ignored text to look for the @end
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2509 % command, so that nested ignore constructs work. Thus, we put the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2510 % text into a \vbox and then do nothing with the result. To minimize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2511 % the change of memory overflow, we follow the approach outlined on
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2512 % page 401 of the TeXbook: make the current font be a dummy font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2513 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2514 \setbox0 = \vbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2515 % Don't complain about control sequences we have declared \outer.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2516 \ignoresections
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2517 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2518 % Define `@end #1' to end the box, which will in turn undefine the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2519 % @end command again.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2520 \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2521 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2522 % We are going to be parsing Texinfo commands. Most cause no
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2523 % trouble when they are used incorrectly, but some commands do
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2524 % complicated argument parsing or otherwise get confused, so we
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2525 % undefine them.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2526 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2527 % We can't do anything about stray @-signs, unfortunately;
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2528 % they'll produce `undefined control sequence' errors.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2529 \ignoremorecommands
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2530 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2531 % Set the current font to be \nullfont, a TeX primitive, and define
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2532 % all the font commands to also use \nullfont. We don't use
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2533 % dummy.tfm, as suggested in the TeXbook, because not all sites
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2534 % might have that installed. Therefore, math mode will still
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2535 % produce output, but that should be an extremely small amount of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2536 % stuff compared to the main input.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2537 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2538 \nullfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2539 \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2540 \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2541 \let\tensf=\nullfont
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2542 % Similarly for index fonts.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2543 \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2544 \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2545 \let\smallsf=\nullfont
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2546 % Similarly for smallexample fonts.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2547 \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2548 \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2549 \let\smallersf=\nullfont
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2550 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2551 % Don't complain when characters are missing from the fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2552 \tracinglostchars = 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2553 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2554 % Don't bother to do space factor calculations.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2555 \frenchspacing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2556 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2557 % Don't report underfull hboxes.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2558 \hbadness = 10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2559 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2560 % Do minimal line-breaking.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2561 \pretolerance = 10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2562 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2563 % Do not execute instructions in @tex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2564 \def\tex{\doignore{tex}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2565 % Do not execute macro definitions.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2566 % `c' is a comment character, so the word `macro' will get cut off.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2567 \def\macro{\doignore{ma}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2568 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2569
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2570 % @set VAR sets the variable VAR to an empty value.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2571 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2572 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2573 % Since we want to separate VAR from REST-OF-LINE (which might be
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2574 % empty), we can't just use \parsearg; we have to insert a space of our
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2575 % own to delimit the rest of the line, and then take it out again if we
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2576 % didn't need it. Make sure the catcode of space is correct to avoid
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2577 % losing inside @example, for instance.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2578 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2579 \def\set{\begingroup\catcode` =10
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2580 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2581 \parsearg\setxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2582 \def\setxxx#1{\setyyy#1 \endsetyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2583 \def\setyyy#1 #2\endsetyyy{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2584 \def\temp{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2585 \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2586 \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2587 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2588 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2589 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2590 % Can't use \xdef to pre-expand #2 and save some time, since \temp or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2591 % \next or other control sequences that we've defined might get us into
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2592 % an infinite loop. Consider `@set foo @cite{bar}'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2593 \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2594
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2595 % @clear VAR clears (i.e., unsets) the variable VAR.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2596 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2597 \def\clear{\parsearg\clearxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2598 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2599
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2600 % @value{foo} gets the text saved in variable foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2601 {
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2602 \catcode`\_ = \active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2603 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2604 % We might end up with active _ or - characters in the argument if
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2605 % we're called from @code, as @code{@value{foo-bar_}}. So \let any
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2606 % such active characters to their normal equivalents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2607 \gdef\value{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2608 \catcode`\-=12 \catcode`\_=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2609 \indexbreaks \let_\normalunderscore
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2610 \valuexxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2611 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2612 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2613
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2614 % We have this subroutine so that we can handle at least some @value's
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2615 % properly in indexes (we \let\value to this in \indexdummies). Ones
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2616 % whose names contain - or _ still won't work, but we can't do anything
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2617 % about that. The command has to be fully expandable, since the result
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2618 % winds up in the index file. This means that if the variable's value
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2619 % contains other Texinfo commands, it's almost certain it will fail
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2620 % (although perhaps we could fix that with sufficient work to do a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2621 % one-level expansion on the result, instead of complete).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2622 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2623 \def\expandablevalue#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2624 \expandafter\ifx\csname SET#1\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2625 {[No value for ``#1'']}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2626 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2627 \csname SET#1\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2628 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2629 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2630
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2631 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2632 % with @set.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2633 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2634 \def\ifset{\parsearg\ifsetxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2635 \def\ifsetxxx #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2636 \expandafter\ifx\csname SET#1\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2637 \expandafter\ifsetfail
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2638 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2639 \expandafter\ifsetsucceed
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2640 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2641 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2642 \def\ifsetsucceed{\conditionalsucceed{ifset}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2643 \def\ifsetfail{\nestedignore{ifset}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2644 \defineunmatchedend{ifset}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2645
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2646 % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2647 % defined with @set, or has been undefined with @clear.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2648 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2649 \def\ifclear{\parsearg\ifclearxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2650 \def\ifclearxxx #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2651 \expandafter\ifx\csname SET#1\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2652 \expandafter\ifclearsucceed
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2653 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2654 \expandafter\ifclearfail
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2655 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2656 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2657 \def\ifclearsucceed{\conditionalsucceed{ifclear}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2658 \def\ifclearfail{\nestedignore{ifclear}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2659 \defineunmatchedend{ifclear}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2660
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2661 % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2662 % read the text following, through the first @end iftex (etc.). Make
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2663 % `@end iftex' (etc.) valid only after an @iftex.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2664 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2665 \def\iftex{\conditionalsucceed{iftex}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2666 \def\ifnothtml{\conditionalsucceed{ifnothtml}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2667 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2668 \def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2669 \defineunmatchedend{iftex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2670 \defineunmatchedend{ifnothtml}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2671 \defineunmatchedend{ifnotinfo}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2672 \defineunmatchedend{ifnotplaintext}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2673
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2674 % We can't just want to start a group at @iftex (etc.) and end it at
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2675 % @end iftex, since then @set commands inside the conditional have no
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2676 % effect (they'd get reverted at the end of the group). So we must
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2677 % define \Eiftex to redefine itself to be its previous value. (We can't
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2678 % just define it to fail again with an ``unmatched end'' error, since
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2679 % the @ifset might be nested.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2680 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2681 \def\conditionalsucceed#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2682 \edef\temp{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2683 % Remember the current value of \E#1.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2684 \let\nece{prevE#1} = \nece{E#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2685 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2686 % At the `@end #1', redefine \E#1 to be its previous value.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2687 \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2688 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2689 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2690 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2691
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2692 % We need to expand lots of \csname's, but we don't want to expand the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2693 % control sequences after we've constructed them.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2694 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2695 \def\nece#1{\expandafter\noexpand\csname#1\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2696
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2697 % @defininfoenclose.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2698 \let\definfoenclose=\comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2699
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2700
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2701 \message{indexing,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2702 % Index generation facilities
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2703
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2704 % Define \newwrite to be identical to plain tex's \newwrite
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2705 % except not \outer, so it can be used within \newindex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2706 {\catcode`\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2707 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2708
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2709 % \newindex {foo} defines an index named foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2710 % It automatically defines \fooindex such that
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2711 % \fooindex ...rest of line... puts an entry in the index foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2712 % It also defines \fooindfile to be the number of the output channel for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2713 % the file that accumulates this index. The file's extension is foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2714 % The name of an index should be no more than 2 characters long
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2715 % for the sake of vms.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2716 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2717 \def\newindex#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2718 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2719 \expandafter\newwrite \csname#1indfile\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2720 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2721 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2722 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2723 \noexpand\doindex{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2724 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2725
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2726 % @defindex foo == \newindex{foo}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2727 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2728 \def\defindex{\parsearg\newindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2729
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2730 % Define @defcodeindex, like @defindex except put all entries in @code.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2731 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2732 \def\defcodeindex{\parsearg\newcodeindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2733 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2734 \def\newcodeindex#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2735 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2736 \expandafter\newwrite \csname#1indfile\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2737 \openout \csname#1indfile\endcsname \jobname.#1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2738 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2739 \expandafter\xdef\csname#1index\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2740 \noexpand\docodeindex{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2741 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2742
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2743
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2744 % @synindex foo bar makes index foo feed into index bar.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2745 % Do this instead of @defindex foo if you don't want it as a separate index.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
2746 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2747 % @syncodeindex foo bar similar, but put all entries made for index foo
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2748 % inside @code.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
2749 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2750 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2751 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2752
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2753 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2754 % #3 the target index (bar).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2755 \def\dosynindex#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2756 % Only do \closeout if we haven't already done it, else we'll end up
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2757 % closing the target index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2758 \expandafter \ifx\csname donesynindex#2\endcsname \undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2759 % The \closeout helps reduce unnecessary open files; the limit on the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2760 % Acorn RISC OS is a mere 16 files.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2761 \expandafter\closeout\csname#2indfile\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2762 \expandafter\let\csname\donesynindex#2\endcsname = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2763 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2764 % redefine \fooindfile:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2765 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2766 \expandafter\let\csname#2indfile\endcsname=\temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2767 % redefine \fooindex:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2768 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2769 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2770
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2771 % Define \doindex, the driver for all \fooindex macros.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2772 % Argument #1 is generated by the calling \fooindex macro,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2773 % and it is "foo", the name of the index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2774
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2775 % \doindex just uses \parsearg; it calls \doind for the actual work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2776 % This is because \doind is more useful to call from other macros.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2777
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2778 % There is also \dosubind {index}{topic}{subtopic}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2779 % which makes an entry in a two-level index such as the operation index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2780
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2781 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2782 \def\singleindexer #1{\doind{\indexname}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2783
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2784 % like the previous two, but they put @code around the argument.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2785 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2786 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2787
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2788 % Take care of texinfo commands likely to appear in an index entry.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2789 % (Must be a way to avoid doing expansion at all, and thus not have to
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2790 % laboriously list every single command here.)
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
2791 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2792 \def\indexdummies{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2793 \def\ { }%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2794 \def\@{@}% change to @@ when we switch to @ as escape char in aux files.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2795 % Need these in case \tex is in effect and \{ is a \delimiter again.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2796 % But can't use \lbracecmd and \rbracecmd because texindex assumes
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
2797 % braces and backslashes are used only as delimiters.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2798 \let\{ = \mylbrace
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2799 \let\} = \myrbrace
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2800 \def\_{{\realbackslash _}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2801 \normalturnoffactive
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2802 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2803 % Take care of the plain tex accent commands.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2804 \def\,##1{\realbackslash ,{##1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2805 \def\"{\realbackslash "}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2806 \def\`{\realbackslash `}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2807 \def\'{\realbackslash '}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2808 \def\^{\realbackslash ^}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2809 \def\~{\realbackslash ~}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2810 \def\={\realbackslash =}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2811 \def\b{\realbackslash b}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2812 \def\c{\realbackslash c}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2813 \def\d{\realbackslash d}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2814 \def\u{\realbackslash u}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2815 \def\v{\realbackslash v}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2816 \def\H{\realbackslash H}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2817 \def\dotless##1{\realbackslash dotless {##1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2818 % Take care of the plain tex special European modified letters.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2819 \def\AA{\realbackslash AA}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2820 \def\AE{\realbackslash AE}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2821 \def\L{\realbackslash L}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2822 \def\OE{\realbackslash OE}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2823 \def\O{\realbackslash O}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2824 \def\aa{\realbackslash aa}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2825 \def\ae{\realbackslash ae}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2826 \def\l{\realbackslash l}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2827 \def\oe{\realbackslash oe}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2828 \def\o{\realbackslash o}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2829 \def\ss{\realbackslash ss}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2830 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2831 % Although these internals commands shouldn't show up, sometimes they do.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2832 \def\bf{\realbackslash bf }%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2833 \def\gtr{\realbackslash gtr}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2834 \def\hat{\realbackslash hat}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2835 \def\less{\realbackslash less}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2836 %\def\rm{\realbackslash rm }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2837 \def\sf{\realbackslash sf}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2838 \def\sl{\realbackslash sl }%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2839 \def\tclose##1{\realbackslash tclose {##1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2840 \def\tt{\realbackslash tt}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2841 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2842 \def\b##1{\realbackslash b {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2843 \def\i##1{\realbackslash i {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2844 \def\sc##1{\realbackslash sc {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2845 \def\t##1{\realbackslash t {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2846 \def\r##1{\realbackslash r {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2847 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2848 \def\TeX{\realbackslash TeX}%
59986
f164571769e0 (LaTex): Add def.
Kim F. Storm <storm@cua.dk>
parents: 52790
diff changeset
2849 \def\LaTeX{\realbackslash LaTeX}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2850 \def\acronym##1{\realbackslash acronym {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2851 \def\cite##1{\realbackslash cite {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2852 \def\code##1{\realbackslash code {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2853 \def\command##1{\realbackslash command {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2854 \def\dfn##1{\realbackslash dfn {##1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2855 \def\dots{\realbackslash dots }%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2856 \def\emph##1{\realbackslash emph {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2857 \def\env##1{\realbackslash env {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2858 \def\file##1{\realbackslash file {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2859 \def\kbd##1{\realbackslash kbd {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2860 \def\key##1{\realbackslash key {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2861 \def\math##1{\realbackslash math {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2862 \def\option##1{\realbackslash option {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2863 \def\samp##1{\realbackslash samp {##1}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2864 \def\strong##1{\realbackslash strong {##1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2865 \def\uref##1{\realbackslash uref {##1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2866 \def\url##1{\realbackslash url {##1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2867 \def\var##1{\realbackslash var {##1}}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2868 \def\w{\realbackslash w }%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2869 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2870 % These math commands don't seem likely to be used in index entries.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2871 \def\copyright{\realbackslash copyright}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2872 \def\equiv{\realbackslash equiv}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2873 \def\error{\realbackslash error}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2874 \def\expansion{\realbackslash expansion}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2875 \def\point{\realbackslash point}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2876 \def\print{\realbackslash print}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2877 \def\result{\realbackslash result}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2878 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2879 % Handle some cases of @value -- where the variable name does not
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2880 % contain - or _, and the value does not contain any
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2881 % (non-fully-expandable) commands.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2882 \let\value = \expandablevalue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2883 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2884 \unsepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2885 % Turn off macro expansion
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2886 \turnoffmacros
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2887 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2888
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2889 % If an index command is used in an @example environment, any spaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2890 % therein should become regular spaces in the raw index file, not the
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2891 % expansion of \tie (\leavevmode \penalty \@M \ ).
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2892 {\obeyspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2893 \gdef\unsepspaces{\obeyspaces\let =\space}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2894
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2895 % \indexnofonts no-ops all font-change commands.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2896 % This is used when outputting the strings to sort the index by.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2897 \def\indexdummyfont#1{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2898 \def\indexdummytex{TeX}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2899 \def\indexdummydots{...}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2900
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2901 \def\indexnofonts{%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2902 \def\@{@}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2903 % how to handle braces?
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2904 \def\_{\normalunderscore}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2905 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2906 \let\,=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2907 \let\"=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2908 \let\`=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2909 \let\'=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2910 \let\^=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2911 \let\~=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2912 \let\==\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2913 \let\b=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2914 \let\c=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2915 \let\d=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2916 \let\u=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2917 \let\v=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2918 \let\H=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2919 \let\dotless=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2920 % Take care of the plain tex special European modified letters.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2921 \def\AA{AA}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2922 \def\AE{AE}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2923 \def\L{L}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2924 \def\OE{OE}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2925 \def\O{O}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2926 \def\aa{aa}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2927 \def\ae{ae}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2928 \def\l{l}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2929 \def\oe{oe}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2930 \def\o{o}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2931 \def\ss{ss}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2932 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2933 % Don't no-op \tt, since it isn't a user-level command
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2934 % and is used in the definitions of the active chars like <, >, |, etc.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2935 % Likewise with the other plain tex font commands.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2936 %\let\tt=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2937 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2938 \let\b=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2939 \let\i=\indexdummyfont
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2940 \let\r=\indexdummyfont
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2941 \let\sc=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2942 \let\t=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2943 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2944 \let\TeX=\indexdummytex
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2945 \let\acronym=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2946 \let\cite=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2947 \let\code=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2948 \let\command=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2949 \let\dfn=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2950 \let\dots=\indexdummydots
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2951 \let\emph=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2952 \let\env=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2953 \let\file=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2954 \let\kbd=\indexdummyfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2955 \let\key=\indexdummyfont
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2956 \let\math=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2957 \let\option=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2958 \let\samp=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2959 \let\strong=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2960 \let\uref=\indexdummyfont
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2961 \let\url=\indexdummyfont
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2962 \let\var=\indexdummyfont
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
2963 \let\w=\indexdummyfont
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2964 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2965
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2966 % To define \realbackslash, we must make \ not be an escape.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2967 % We must first make another character (@) an escape
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2968 % so we do not become unable to do a definition.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2969
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2970 {\catcode`\@=0 \catcode`\\=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2971 @gdef@realbackslash{\}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2972
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2973 \let\indexbackslash=0 %overridden during \printindex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2974 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2975
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2976 % For \ifx comparisons.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2977 \def\emptymacro{\empty}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2978
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2979 % Most index entries go through here, but \dosubind is the general case.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2980 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2981 \def\doind#1#2{\dosubind{#1}{#2}\empty}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2982
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2983 % Workhorse for all \fooindexes.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2984 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2985 % \empty if called from \doind, as we usually are. The main exception
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2986 % is with defuns, which call us directly.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2987 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2988 \def\dosubind#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2989 % Put the index entry in the margin if desired.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2990 \ifx\SETmarginindex\relax\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2991 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2992 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2993 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2994 \count255=\lastpenalty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2995 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2996 \indexdummies % Must do this here, since \bf, etc expand at this stage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2997 \escapechar=`\\
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2998 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2999 \let\folio = 0% We will expand all macros now EXCEPT \folio.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3000 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3001 % so it will be output as is; and it will print as backslash.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3002 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3003 \def\thirdarg{#3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3004 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3005 % If third arg is present, precede it with space in sort key.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3006 \ifx\thirdarg\emptymacro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3007 \let\subentry = \empty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3008 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3009 \def\subentry{ #3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3010 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3011 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3012 % First process the index entry with all font commands turned
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3013 % off to get the string to sort by.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3014 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3015 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3016 % Now the real index entry with the fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3017 \toks0 = {#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3018 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3019 % If the third (subentry) arg is present, add it to the index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3020 % line to write.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3021 \ifx\thirdarg\emptymacro \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3022 \toks0 = \expandafter{\the\toks0{#3}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3023 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3024 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3025 % Set up the complete index entry, with both the sort key and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3026 % the original text, including any font commands. We write
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3027 % three arguments to \entry to the .?? file (four in the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3028 % subentry case), texindex reduces to two when writing the .??s
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3029 % sorted result.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3030 \edef\temp{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3031 \write\csname#1indfile\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3032 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3033 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3034 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3035 % If a skip is the last thing on the list now, preserve it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3036 % by backing up by \lastskip, doing the \write, then inserting
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3037 % the skip again. Otherwise, the whatsit generated by the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3038 % \write will make \lastskip zero. The result is that sequences
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3039 % like this:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3040 % @end defun
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3041 % @tindex whatever
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3042 % @defun ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3043 % will have extra space inserted, because the \medbreak in the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3044 % start of the @defun won't see the skip inserted by the @end of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3045 % the previous defun.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3046 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3047 % But don't do any of this if we're not in vertical mode. We
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3048 % don't want to do a \vskip and prematurely end a paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3049 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3050 % Avoid page breaks due to these extra skips, too.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3051 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3052 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3053 \ifvmode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3054 \skip0 = \lastskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3055 \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3056 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3057 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3058 \temp % do the write
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3059 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3060 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3061 \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3062 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3063 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3064 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3065 \penalty\count255
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3066 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3067 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3068
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3069 % The index entry written in the file actually looks like
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3070 % \entry {sortstring}{page}{topic}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3071 % or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3072 % \entry {sortstring}{page}{topic}{subtopic}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3073 % The texindex program reads in these files and writes files
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3074 % containing these kinds of lines:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3075 % \initial {c}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3076 % before the first topic whose initial is c
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3077 % \entry {topic}{pagelist}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3078 % for a topic that is used without subtopics
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3079 % \primary {topic}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3080 % for the beginning of a topic that is used with subtopics
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3081 % \secondary {subtopic}{pagelist}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3082 % for each subtopic.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3083
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3084 % Define the user-accessible indexing commands
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3085 % @findex, @vindex, @kindex, @cindex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3086
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3087 \def\findex {\fnindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3088 \def\kindex {\kyindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3089 \def\cindex {\cpindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3090 \def\vindex {\vrindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3091 \def\tindex {\tpindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3092 \def\pindex {\pgindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3093
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3094 \def\cindexsub {\begingroup\obeylines\cindexsub}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3095 {\obeylines %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3096 \gdef\cindexsub "#1" #2^^M{\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3097 \dosubind{cp}{#2}{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3098
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3099 % Define the macros used in formatting output of the sorted index material.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3100
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3101 % @printindex causes a particular index (the ??s file) to get printed.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3102 % It does not print any chapter heading (usually an @unnumbered).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3103 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3104 \def\printindex{\parsearg\doprintindex}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3105 \def\doprintindex#1{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3106 \dobreak \chapheadingskip{10000}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3107 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3108 \smallfonts \rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3109 \tolerance = 9500
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3110 \indexbreaks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3111 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3112 % See if the index file exists and is nonempty.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3113 % Change catcode of @ here so that if the index file contains
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3114 % \initial {@}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3115 % as its first line, TeX doesn't complain about mismatched braces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3116 % (because it thinks @} is a control sequence).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3117 \catcode`\@ = 11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3118 \openin 1 \jobname.#1s
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3119 \ifeof 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3120 % \enddoublecolumns gets confused if there is no text in the index,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3121 % and it loses the chapter title and the aux file entries for the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3122 % index. The easiest way to prevent this problem is to make sure
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3123 % there is some text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3124 \putwordIndexNonexistent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3125 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3126 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3127 % If the index file exists but is empty, then \openin leaves \ifeof
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3128 % false. We have to make TeX try to read something from the file, so
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3129 % it can discover if there is anything in it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3130 \read 1 to \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3131 \ifeof 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3132 \putwordIndexIsEmpty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3133 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3134 % Index files are almost Texinfo source, but we use \ as the escape
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3135 % character. It would be better to use @, but that's too big a change
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3136 % to make right now.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3137 \def\indexbackslash{\rawbackslashxx}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3138 \catcode`\\ = 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3139 \escapechar = `\\
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3140 \begindoublecolumns
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3141 \input \jobname.#1s
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3142 \enddoublecolumns
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3143 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3144 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3145 \closein 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3146 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3147
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3148 % These macros are used by the sorted index file itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3149 % Change them to control the appearance of the index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3150
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3151 \def\initial#1{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3152 % Some minor font changes for the special characters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3153 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3154 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3155 % Remove any glue we may have, we'll be inserting our own.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3156 \removelastskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3157 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3158 % We like breaks before the index initials, so insert a bonus.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3159 \penalty -300
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3160 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3161 % Typeset the initial. Making this add up to a whole number of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3162 % baselineskips increases the chance of the dots lining up from column
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3163 % to column. It still won't often be perfect, because of the stretch
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3164 % we need before each entry, but it's better.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3165 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3166 % No shrink because it confuses \balancecolumns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3167 \vskip 1.67\baselineskip plus .5\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3168 \leftline{\secbf #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3169 \vskip .33\baselineskip plus .1\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3170 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3171 % Do our best not to break after the initial.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3172 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3173 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3174
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3175 % This typesets a paragraph consisting of #1, dot leaders, and then #2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3176 % flush to the right margin. It is used for index and table of contents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3177 % entries. The paragraph is indented by \leftskip.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3178 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3179 \def\entry#1#2{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3180 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3181 % Start a new paragraph if necessary, so our assignments below can't
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3182 % affect previous text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3183 \par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3184 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3185 % Do not fill out the last line with white space.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3186 \parfillskip = 0in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3187 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3188 % No extra space above this paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3189 \parskip = 0in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3190 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3191 % Do not prefer a separate line ending with a hyphen to fewer lines.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3192 \finalhyphendemerits = 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3193 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3194 % \hangindent is only relevant when the entry text and page number
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3195 % don't both fit on one line. In that case, bob suggests starting the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3196 % dots pretty far over on the line. Unfortunately, a large
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3197 % indentation looks wrong when the entry text itself is broken across
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3198 % lines. So we use a small indentation and put up with long leaders.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3199 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3200 % \hangafter is reset to 1 (which is the value we want) at the start
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3201 % of each paragraph, so we need not do anything with that.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3202 \hangindent = 2em
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3203 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3204 % When the entry text needs to be broken, just fill out the first line
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3205 % with blank space.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3206 \rightskip = 0pt plus1fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3207 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3208 % A bit of stretch before each entry for the benefit of balancing columns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3209 \vskip 0pt plus1pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3210 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3211 % Start a ``paragraph'' for the index entry so the line breaking
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3212 % parameters we've set above will have an effect.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3213 \noindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3214 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3215 % Insert the text of the index entry. TeX will do line-breaking on it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3216 #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3217 % The following is kludged to not output a line of dots in the index if
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3218 % there are no page numbers. The next person who breaks this will be
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3219 % cursed by a Unix daemon.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3220 \def\tempa{{\rm }}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3221 \def\tempb{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3222 \edef\tempc{\tempa}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3223 \edef\tempd{\tempb}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3224 \ifx\tempc\tempd\ \else%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3225 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3226 % If we must, put the page number on a line of its own, and fill out
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3227 % this line with blank space. (The \hfil is overwhelmed with the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3228 % fill leaders glue in \indexdotfill if the page number does fit.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3229 \hfil\penalty50
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3230 \null\nobreak\indexdotfill % Have leaders before the page number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3231 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3232 % The `\ ' here is removed by the implicit \unskip that TeX does as
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3233 % part of (the primitive) \par. Without it, a spurious underfull
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3234 % \hbox ensues.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3235 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3236 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3237 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3238 \ #2% The page number ends the paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3239 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3240 \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3241 \par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3242 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3243
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3244 % Like \dotfill except takes at least 1 em.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3245 \def\indexdotfill{\cleaders
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3246 \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3247
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3248 \def\primary #1{\line{#1\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3249
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3250 \newskip\secondaryindent \secondaryindent=0.5cm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3251 \def\secondary#1#2{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3252 \parfillskip=0in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3253 \parskip=0in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3254 \hangindent=1in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3255 \hangafter=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3256 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3257 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3258 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3259 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3260 #2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3261 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3262 \par
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3263 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3264
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3265 % Define two-column mode, which we use to typeset indexes.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3266 % Adapted from the TeXbook, page 416, which is to say,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3267 % the manmac.tex format used to print the TeXbook itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3268 \catcode`\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3269
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3270 \newbox\partialpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3271 \newdimen\doublecolumnhsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3272
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3273 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3274 % Grab any single-column material above us.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3275 \output = {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3276 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3277 % Here is a possibility not foreseen in manmac: if we accumulate a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3278 % whole lot of material, we might end up calling this \output
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3279 % routine twice in a row (see the doublecol-lose test, which is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3280 % essentially a couple of indexes with @setchapternewpage off). In
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3281 % that case we just ship out what is in \partialpage with the normal
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3282 % output routine. Generally, \partialpage will be empty when this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3283 % runs and this will be a no-op. See the indexspread.tex test case.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3284 \ifvoid\partialpage \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3285 \onepageout{\pagecontents\partialpage}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3286 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3287 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3288 \global\setbox\partialpage = \vbox{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3289 % Unvbox the main output page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3290 \unvbox\PAGE
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3291 \kern-\topskip \kern\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3292 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3293 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3294 \eject % run that output routine to set \partialpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3295 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3296 % Use the double-column output routine for subsequent pages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3297 \output = {\doublecolumnout}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3298 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3299 % Change the page size parameters. We could do this once outside this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3300 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3301 % format, but then we repeat the same computation. Repeating a couple
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3302 % of assignments once per index is clearly meaningless for the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3303 % execution time, so we may as well do it in one place.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3304 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3305 % First we halve the line length, less a little for the gutter between
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3306 % the columns. We compute the gutter based on the line length, so it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3307 % changes automatically with the paper format. The magic constant
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3308 % below is chosen so that the gutter has the same value (well, +-<1pt)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3309 % as it did when we hard-coded it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3310 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3311 % We put the result in a separate register, \doublecolumhsize, so we
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3312 % can restore it in \pagesofar, after \hsize itself has (potentially)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3313 % been clobbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3314 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3315 \doublecolumnhsize = \hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3316 \advance\doublecolumnhsize by -.04154\hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3317 \divide\doublecolumnhsize by 2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3318 \hsize = \doublecolumnhsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3319 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3320 % Double the \vsize as well. (We don't need a separate register here,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3321 % since nobody clobbers \vsize.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3322 \vsize = 2\vsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3323 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3324
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3325 % The double-column output routine for all double-column pages except
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3326 % the last.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3327 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3328 \def\doublecolumnout{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3329 \splittopskip=\topskip \splitmaxdepth=\maxdepth
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3330 % Get the available space for the double columns -- the normal
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3331 % (undoubled) page height minus any material left over from the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3332 % previous page.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3333 \dimen@ = \vsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3334 \divide\dimen@ by 2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3335 \advance\dimen@ by -\ht\partialpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3336 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3337 % box0 will be the left-hand column, box2 the right.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3338 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3339 \onepageout\pagesofar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3340 \unvbox255
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3341 \penalty\outputpenalty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3342 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3343 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3344 % Re-output the contents of the output page -- any previous material,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3345 % followed by the two boxes we just split, in box0 and box2.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3346 \def\pagesofar{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3347 \unvbox\partialpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3348 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3349 \hsize = \doublecolumnhsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3350 \wd0=\hsize \wd2=\hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3351 \hbox to\pagewidth{\box0\hfil\box2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3352 }
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
3353 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3354 % All done with double columns.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3355 \def\enddoublecolumns{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3356 \output = {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3357 % Split the last of the double-column material. Leave it on the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3358 % current page, no automatic page break.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3359 \balancecolumns
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3360 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3361 % If we end up splitting too much material for the current page,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3362 % though, there will be another page break right after this \output
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3363 % invocation ends. Having called \balancecolumns once, we do not
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3364 % want to call it again. Therefore, reset \output to its normal
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3365 % definition right away. (We hope \balancecolumns will never be
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3366 % called on to balance too much material, but if it is, this makes
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3367 % the output somewhat more palatable.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3368 \global\output = {\onepageout{\pagecontents\PAGE}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3369 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3370 \eject
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3371 \endgroup % started in \begindoublecolumns
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3372 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3373 % \pagegoal was set to the doubled \vsize above, since we restarted
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3374 % the current page. We're now back to normal single-column
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3375 % typesetting, so reset \pagegoal to the normal \vsize (after the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3376 % \endgroup where \vsize got restored).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3377 \pagegoal = \vsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3378 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3379 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3380 % Called at the end of the double column material.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3381 \def\balancecolumns{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3382 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3383 \dimen@ = \ht0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3384 \advance\dimen@ by \topskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3385 \advance\dimen@ by-\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3386 \divide\dimen@ by 2 % target to split to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3387 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3388 \splittopskip = \topskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3389 % Loop until we get a decent breakpoint.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3390 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3391 \vbadness = 10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3392 \loop
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3393 \global\setbox3 = \copy0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3394 \global\setbox1 = \vsplit3 to \dimen@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3395 \ifdim\ht3>\dimen@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3396 \global\advance\dimen@ by 1pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3397 \repeat
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3398 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3399 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3400 \setbox0=\vbox to\dimen@{\unvbox1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3401 \setbox2=\vbox to\dimen@{\unvbox3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3402 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3403 \pagesofar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3404 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3405 \catcode`\@ = \other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3406
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3407
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3408 \message{sectioning,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3409 % Chapters, sections, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3410
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3411 \newcount\chapno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3412 \newcount\secno \secno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3413 \newcount\subsecno \subsecno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3414 \newcount\subsubsecno \subsubsecno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3415
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3416 % This counter is funny since it counts through charcodes of letters A, B, ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3417 \newcount\appendixno \appendixno = `\@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3418 % \def\appendixletter{\char\the\appendixno}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3419 % We do the following for the sake of pdftex, which needs the actual
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3420 % letter in the expansion, not just typeset.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3421 \def\appendixletter{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3422 \ifnum\appendixno=`A A%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3423 \else\ifnum\appendixno=`B B%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3424 \else\ifnum\appendixno=`C C%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3425 \else\ifnum\appendixno=`D D%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3426 \else\ifnum\appendixno=`E E%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3427 \else\ifnum\appendixno=`F F%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3428 \else\ifnum\appendixno=`G G%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3429 \else\ifnum\appendixno=`H H%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3430 \else\ifnum\appendixno=`I I%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3431 \else\ifnum\appendixno=`J J%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3432 \else\ifnum\appendixno=`K K%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3433 \else\ifnum\appendixno=`L L%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3434 \else\ifnum\appendixno=`M M%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3435 \else\ifnum\appendixno=`N N%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3436 \else\ifnum\appendixno=`O O%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3437 \else\ifnum\appendixno=`P P%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3438 \else\ifnum\appendixno=`Q Q%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3439 \else\ifnum\appendixno=`R R%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3440 \else\ifnum\appendixno=`S S%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3441 \else\ifnum\appendixno=`T T%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3442 \else\ifnum\appendixno=`U U%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3443 \else\ifnum\appendixno=`V V%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3444 \else\ifnum\appendixno=`W W%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3445 \else\ifnum\appendixno=`X X%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3446 \else\ifnum\appendixno=`Y Y%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3447 \else\ifnum\appendixno=`Z Z%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3448 % The \the is necessary, despite appearances, because \appendixletter is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3449 % expanded while writing the .toc file. \char\appendixno is not
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3450 % expandable, thus it is written literally, thus all appendixes come out
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3451 % with the same letter (or @) in the toc without it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3452 \else\char\the\appendixno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3453 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3454 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3455
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3456 % Each @chapter defines this as the name of the chapter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3457 % page headings and footings can use it. @section does likewise.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3458 \def\thischapter{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3459 \def\thissection{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3460
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3461 \newcount\absseclevel % used to calculate proper heading level
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3462 \newcount\secbase\secbase=0 % @raise/lowersections modify this count
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3463
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3464 % @raisesections: treat @section as chapter, @subsection as section, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3465 \def\raisesections{\global\advance\secbase by -1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3466 \let\up=\raisesections % original BFox name
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3467
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3468 % @lowersections: treat @chapter as section, @section as subsection, etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3469 \def\lowersections{\global\advance\secbase by 1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3470 \let\down=\lowersections % original BFox name
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3471
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3472 % Choose a numbered-heading macro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3473 % #1 is heading level if unmodified by @raisesections or @lowersections
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3474 % #2 is text for heading
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3475 \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3476 \ifcase\absseclevel
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3477 \chapterzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3478 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3479 \seczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3480 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3481 \numberedsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3482 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3483 \numberedsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3484 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3485 \ifnum \absseclevel<0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3486 \chapterzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3487 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3488 \numberedsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3489 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3490 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3491 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3492
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3493 % like \numhead, but chooses appendix heading levels
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3494 \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3495 \ifcase\absseclevel
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3496 \appendixzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3497 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3498 \appendixsectionzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3499 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3500 \appendixsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3501 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3502 \appendixsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3503 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3504 \ifnum \absseclevel<0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3505 \appendixzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3506 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3507 \appendixsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3508 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3509 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3510 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3511
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3512 % like \numhead, but chooses numberless heading levels
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3513 \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3514 \ifcase\absseclevel
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3515 \unnumberedzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3516 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3517 \unnumberedseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3518 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3519 \unnumberedsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3520 \or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3521 \unnumberedsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3522 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3523 \ifnum \absseclevel<0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3524 \unnumberedzzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3525 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3526 \unnumberedsubsubseczzz{#2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3527 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3528 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3529 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3530
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3531 % @chapter, @appendix, @unnumbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3532 \def\thischaptername{No Chapter Title}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3533 \outer\def\chapter{\parsearg\chapteryyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3534 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3535 \def\chapterzzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3536 \secno=0 \subsecno=0 \subsubsecno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3537 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3538 \chapmacro {#1}{\the\chapno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3539 \gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3540 \gdef\thischaptername{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3541 % We don't substitute the actual chapter name into \thischapter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3542 % because we don't want its macros evaluated now.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3543 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3544 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3545 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3546 {\the\chapno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3547 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3548 \donoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3549 \global\let\section = \numberedsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3550 \global\let\subsection = \numberedsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3551 \global\let\subsubsection = \numberedsubsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3552 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3553
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3554 \outer\def\appendix{\parsearg\appendixyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3555 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3556 \def\appendixzzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3557 \secno=0 \subsecno=0 \subsubsecno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3558 \global\advance \appendixno by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3559 \message{\putwordAppendix\space \appendixletter}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3560 \chapmacro {#1}{\putwordAppendix{} \appendixletter}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3561 \gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3562 \gdef\thischaptername{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3563 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3564 \toks0 = {#1}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3565 \edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3566 {\appendixletter}}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3567 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3568 \appendixnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3569 \global\let\section = \appendixsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3570 \global\let\subsection = \appendixsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3571 \global\let\subsubsection = \appendixsubsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3572 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3573
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3574 % @centerchap is like @unnumbered, but the heading is centered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3575 \outer\def\centerchap{\parsearg\centerchapyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3576 \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3577
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3578 % @top is like @unnumbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3579 \outer\def\top{\parsearg\unnumberedyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3580
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3581 \outer\def\unnumbered{\parsearg\unnumberedyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3582 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3583 \def\unnumberedzzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3584 \secno=0 \subsecno=0 \subsubsecno=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3585 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3586 % This used to be simply \message{#1}, but TeX fully expands the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3587 % argument to \message. Therefore, if #1 contained @-commands, TeX
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3588 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3589 % expanded @cite (which turns out to cause errors because \cite is meant
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3590 % to be executed, not expanded).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3591 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3592 % Anyway, we don't want the fully-expanded definition of @cite to appear
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3593 % as a result of the \message, we just want `@cite' itself. We use
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3594 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3595 % simply yielding the contents of <toks register>. (We also do this for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3596 % the toc entries.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3597 \toks0 = {#1}\message{(\the\toks0)}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3598 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3599 \unnumbchapmacro {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3600 \gdef\thischapter{#1}\gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3601 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3602 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3603 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3604 \unnumbnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3605 \global\let\section = \unnumberedsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3606 \global\let\subsection = \unnumberedsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3607 \global\let\subsubsection = \unnumberedsubsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3608 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3609
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3610 % Sections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3611 \outer\def\numberedsec{\parsearg\secyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3612 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3613 \def\seczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3614 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3615 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3616 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3617 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3618 {\the\chapno}{\the\secno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3619 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3620 \donoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3621 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3622 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3623
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3624 \outer\def\appendixsection{\parsearg\appendixsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3625 \outer\def\appendixsec{\parsearg\appendixsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3626 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3627 \def\appendixsectionzzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3628 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3629 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3630 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3631 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3632 {\appendixletter}{\the\secno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3633 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3634 \appendixnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3635 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3636 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3637
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3638 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3639 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3640 \def\unnumberedseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3641 \plainsecheading {#1}\gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3642 \toks0 = {#1}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3643 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3644 {\the\toks0}{\the\chapno}}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3645 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3646 \unnumbnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3647 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3648 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3649
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3650 % Subsections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3651 \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3652 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3653 \def\numberedsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3654 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3655 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3656 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3657 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3658 {\the\chapno}{\the\secno}{\the\subsecno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3659 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3660 \donoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3661 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3662 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3663
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3664 \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3665 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3666 \def\appendixsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3667 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3668 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3669 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3670 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3671 {\appendixletter}{\the\secno}{\the\subsecno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3672 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3673 \appendixnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3674 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3675 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3676
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3677 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3678 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3679 \def\unnumberedsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3680 \plainsubsecheading {#1}\gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3681 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3682 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3683 {\the\toks0}{\the\chapno}{\the\secno}}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3684 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3685 \unnumbnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3686 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3687 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3688
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3689 % Subsubsections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3690 \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3691 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3692 \def\numberedsubsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3693 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3694 \subsubsecheading {#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3695 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3696 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3697 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3698 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3699 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3700 \donoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3701 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3702 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3703
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3704 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3705 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3706 \def\appendixsubsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3707 \gdef\thissection{#1}\global\advance \subsubsecno by 1 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3708 \subsubsecheading {#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3709 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3710 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3711 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3712 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3713 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3714 \appendixnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3715 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3716 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3717
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3718 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3719 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3720 \def\unnumberedsubsubseczzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3721 \plainsubsubsecheading {#1}\gdef\thissection{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3722 \toks0 = {#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3723 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3724 {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3725 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3726 \unnumbnoderef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3727 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3728 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3729
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3730 % These are variants which are not "outer", so they can appear in @ifinfo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3731 % Actually, they should now be obsolete; ordinary section commands should work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3732 \def\infotop{\parsearg\unnumberedzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3733 \def\infounnumbered{\parsearg\unnumberedzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3734 \def\infounnumberedsec{\parsearg\unnumberedseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3735 \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3736 \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3737
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3738 \def\infoappendix{\parsearg\appendixzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3739 \def\infoappendixsec{\parsearg\appendixseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3740 \def\infoappendixsubsec{\parsearg\appendixsubseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3741 \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3742
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3743 \def\infochapter{\parsearg\chapterzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3744 \def\infosection{\parsearg\sectionzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3745 \def\infosubsection{\parsearg\subsectionzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3746 \def\infosubsubsection{\parsearg\subsubsectionzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3747
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3748 % These macros control what the section commands do, according
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3749 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3750 % Define them by default for a numbered chapter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3751 \global\let\section = \numberedsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3752 \global\let\subsection = \numberedsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3753 \global\let\subsubsection = \numberedsubsubsec
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3754
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3755 % Define @majorheading, @heading and @subheading
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3756
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3757 % NOTE on use of \vbox for chapter headings, section headings, and such:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3758 % 1) We use \vbox rather than the earlier \line to permit
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3759 % overlong headings to fold.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3760 % 2) \hyphenpenalty is set to 10000 because hyphenation in a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3761 % heading is obnoxious; this forbids it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3762 % 3) Likewise, headings look best if no \parindent is used, and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3763 % if justification is not attempted. Hence \raggedright.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3764
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3765
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3766 \def\majorheading{\parsearg\majorheadingzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3767 \def\majorheadingzzz #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3768 {\advance\chapheadingskip by 10pt \chapbreak }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3769 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3770 \parindent=0pt\raggedright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3771 \rm #1\hfill}}\bigskip \par\penalty 200}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3772
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3773 \def\chapheading{\parsearg\chapheadingzzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3774 \def\chapheadingzzz #1{\chapbreak %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3775 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3776 \parindent=0pt\raggedright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3777 \rm #1\hfill}}\bigskip \par\penalty 200}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3778
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3779 % @heading, @subheading, @subsubheading.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3780 \def\heading{\parsearg\plainsecheading}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3781 \def\subheading{\parsearg\plainsubsecheading}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3782 \def\subsubheading{\parsearg\plainsubsubsecheading}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3783
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3784 % These macros generate a chapter, section, etc. heading only
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3785 % (including whitespace, linebreaking, etc. around it),
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3786 % given all the information in convenient, parsed form.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3787
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3788 %%% Args are the skip and penalty (usually negative)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3789 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3790
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3791 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3792
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3793 %%% Define plain chapter starts, and page on/off switching for it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3794 % Parameter controlling skip before chapter headings (if needed)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3795
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3796 \newskip\chapheadingskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3797
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3798 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3799 \def\chappager{\par\vfill\supereject}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3800 \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3801
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3802 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3803
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3804 \def\CHAPPAGoff{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3805 \global\let\contentsalignmacro = \chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3806 \global\let\pchapsepmacro=\chapbreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3807 \global\let\pagealignmacro=\chappager}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3808
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3809 \def\CHAPPAGon{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3810 \global\let\contentsalignmacro = \chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3811 \global\let\pchapsepmacro=\chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3812 \global\let\pagealignmacro=\chappager
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3813 \global\def\HEADINGSon{\HEADINGSsingle}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3814
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3815 \def\CHAPPAGodd{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3816 \global\let\contentsalignmacro = \chapoddpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3817 \global\let\pchapsepmacro=\chapoddpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3818 \global\let\pagealignmacro=\chapoddpage
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3819 \global\def\HEADINGSon{\HEADINGSdouble}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3820
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3821 \CHAPPAGon
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3822
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3823 \def\CHAPFplain{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3824 \global\let\chapmacro=\chfplain
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3825 \global\let\unnumbchapmacro=\unnchfplain
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3826 \global\let\centerchapmacro=\centerchfplain}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3827
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3828 % Plain chapter opening.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3829 % #1 is the text, #2 the chapter number or empty if unnumbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3830 \def\chfplain#1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3831 \pchapsepmacro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3832 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3833 \chapfonts \rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3834 \def\chapnum{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3835 \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3836 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3837 \hangindent = \wd0 \centerparametersmaybe
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3838 \unhbox0 #1\par}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3839 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3840 \nobreak\bigskip % no page break after a chapter title
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3841 \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3842 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3843
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3844 % Plain opening for unnumbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3845 \def\unnchfplain#1{\chfplain{#1}{}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3846
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3847 % @centerchap -- centered and unnumbered.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3848 \let\centerparametersmaybe = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3849 \def\centerchfplain#1{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3850 \def\centerparametersmaybe{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3851 \advance\rightskip by 3\rightskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3852 \leftskip = \rightskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3853 \parfillskip = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3854 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3855 \chfplain{#1}{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3856 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3857
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3858 \CHAPFplain % The default
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3859
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3860 \def\unnchfopen #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3861 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3862 \parindent=0pt\raggedright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3863 \rm #1\hfill}}\bigskip \par\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3864 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3865
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3866 \def\chfopen #1#2{\chapoddpage {\chapfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3867 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3868 \par\penalty 5000 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3869 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3870
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3871 \def\centerchfopen #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3872 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3873 \parindent=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3874 \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3875 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3876
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3877 \def\CHAPFopen{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3878 \global\let\chapmacro=\chfopen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3879 \global\let\unnumbchapmacro=\unnchfopen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3880 \global\let\centerchapmacro=\centerchfopen}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3881
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3882
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3883 % Section titles.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3884 \newskip\secheadingskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3885 \def\secheadingbreak{\dobreak \secheadingskip {-1000}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3886 \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3887 \def\plainsecheading#1{\sectionheading{sec}{}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3888
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3889 % Subsection titles.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3890 \newskip \subsecheadingskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3891 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3892 \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3893 \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3894
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3895 % Subsubsection titles.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3896 \let\subsubsecheadingskip = \subsecheadingskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3897 \let\subsubsecheadingbreak = \subsecheadingbreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3898 \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3899 \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3900
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3901
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3902 % Print any size section title.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3903 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3904 % #1 is the section type (sec/subsec/subsubsec), #2 is the section
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3905 % number (maybe empty), #3 the text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3906 \def\sectionheading#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3907 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3908 \expandafter\advance\csname #1headingskip\endcsname by \parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3909 \csname #1headingbreak\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3910 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3911 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3912 % Switch to the right set of fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3913 \csname #1fonts\endcsname \rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3914 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3915 % Only insert the separating space if we have a section number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3916 \def\secnum{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3917 \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3918 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3919 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3920 \hangindent = \wd0 % zero if no section number
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3921 \unhbox0 #3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3922 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3923 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3924 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3925
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3926
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3927 \message{toc,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3928 % Table of contents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3929 \newwrite\tocfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3930
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3931 % Write an entry to the toc file, opening it if necessary.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3932 % Called from @chapter, etc. We supply {\folio} at the end of the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3933 % argument, which will end up as the last argument to the \...entry macro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3934 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3935 % We open the .toc file here instead of at @setfilename or any other
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3936 % fixed time so that @contents can be put in the document anywhere.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3937 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3938 \newif\iftocfileopened
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3939 \def\writetocentry#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3940 \iftocfileopened\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3941 \immediate\openout\tocfile = \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3942 \global\tocfileopenedtrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3943 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3944 \iflinks \write\tocfile{#1{\folio}}\fi
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3945 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3946 % Tell \shipout to create a page destination if we're doing pdf, which
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3947 % will be the target of the links in the table of contents. We can't
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3948 % just do it on every page because the title pages are numbered 1 and
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3949 % 2 (the page numbers aren't printed), and so are the first two pages
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3950 % of the document. Thus, we'd have two destinations named `1', and
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3951 % two named `2'.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
3952 \ifpdf \pdfmakepagedesttrue \fi
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3953 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3954
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3955 \newskip\contentsrightmargin \contentsrightmargin=1in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3956 \newcount\savepageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3957 \newcount\lastnegativepageno \lastnegativepageno = -1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3958
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3959 % Finish up the main text and prepare to read what we've written
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3960 % to \tocfile.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3961 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3962 \def\startcontents#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3963 % If @setchapternewpage on, and @headings double, the contents should
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3964 % start on an odd page, unlike chapters. Thus, we maintain
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3965 % \contentsalignmacro in parallel with \pagealignmacro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3966 % From: Torbjorn Granlund <tege@matematik.su.se>
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3967 \contentsalignmacro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3968 \immediate\closeout\tocfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3969 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3970 % Don't need to put `Contents' or `Short Contents' in the headline.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3971 % It is abundantly clear what they are.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3972 \unnumbchapmacro{#1}\def\thischapter{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3973 \savepageno = \pageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3974 \begingroup % Set up to handle contents files properly.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3975 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3976 % We can't do this, because then an actual ^ in a section
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3977 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3978 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3979 \raggedbottom % Worry more about breakpoints than the bottom.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3980 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3981 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3982 % Roman numerals for page numbers.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3983 \ifnum \pageno>0 \pageno = \lastnegativepageno \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3984 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3985
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3986
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3987 % Normal (long) toc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3988 \def\contents{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3989 \startcontents{\putwordTOC}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3990 \openin 1 \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3991 \ifeof 1 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3992 \closein 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3993 \input \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3994 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3995 \vfill \eject
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3996 \contentsalignmacro % in case @setchapternewpage odd is in effect
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3997 \pdfmakeoutlines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3998 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
3999 \lastnegativepageno = \pageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4000 \pageno = \savepageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4001 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4002
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4003 % And just the chapters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4004 \def\summarycontents{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4005 \startcontents{\putwordShortTOC}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4006 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4007 \let\chapentry = \shortchapentry
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4008 \let\appendixentry = \shortappendixentry
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4009 \let\unnumbchapentry = \shortunnumberedentry
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4010 % We want a true roman here for the page numbers.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4011 \secfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4012 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4013 \rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4014 \hyphenpenalty = 10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4015 \advance\baselineskip by 1pt % Open it up a little.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4016 \def\secentry ##1##2##3##4{}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4017 \def\unnumbsecentry ##1##2##3{}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4018 \def\subsecentry ##1##2##3##4##5{}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4019 \def\unnumbsubsecentry ##1##2##3##4{}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4020 \def\subsubsecentry ##1##2##3##4##5##6{}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4021 \def\unnumbsubsubsecentry ##1##2##3##4##5{}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4022 \openin 1 \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4023 \ifeof 1 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4024 \closein 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4025 \input \jobname.toc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4026 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4027 \vfill \eject
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4028 \contentsalignmacro % in case @setchapternewpage odd is in effect
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4029 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4030 \lastnegativepageno = \pageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4031 \pageno = \savepageno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4032 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4033 \let\shortcontents = \summarycontents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4034
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4035 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4036 \pdfcatalog{/PageMode /UseOutlines}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4037 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4038
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4039 % These macros generate individual entries in the table of contents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4040 % The first argument is the chapter or section name.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4041 % The last argument is the page number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4042 % The arguments in between are the chapter number, section number, ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4043
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4044 % Chapters, in the main contents.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4045 \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4046 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4047 % Chapters, in the short toc.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4048 % See comments in \dochapentry re vbox and related settings.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4049 \def\shortchapentry#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4050 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4051 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4052
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4053 % Appendices, in the main contents.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4054 \def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4055 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4056 % Appendices, in the short toc.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4057 \let\shortappendixentry = \shortchapentry
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4058
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4059 % Typeset the label for a chapter or appendix for the short contents.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4060 % The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4061 % We could simplify the code here by writing out an \appendixentry
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4062 % command in the toc file for appendices, instead of using \chapentry
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4063 % for both, but it doesn't seem worth it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4064 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4065 \newdimen\shortappendixwidth
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4066 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4067 \def\shortchaplabel#1{%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4068 % This space should be enough, since a single number is .5em, and the
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4069 % widest letter (M) is 1em, at least in the Computer Modern fonts.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4070 % But use \hss just in case.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4071 % (This space doesn't include the extra space that gets added after
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4072 % the label; that gets put in by \shortchapentry above.)
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4073 \dimen0 = 1em
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4074 \hbox to \dimen0{#1\hss}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4075 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4076
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4077 % Unnumbered chapters.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4078 \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4079 \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4080
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4081 % Sections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4082 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4083 \def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4084
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4085 % Subsections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4086 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4087 \def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4088
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4089 % And subsubsections.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4090 \def\subsubsecentry#1#2#3#4#5#6{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4091 \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4092 \def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4093
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4094 % This parameter controls the indentation of the various levels.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4095 \newdimen\tocindent \tocindent = 3pc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4096
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4097 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4098 % page number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4099 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4100 % If the toc has to be broken over pages, we want it to be at chapters
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4101 % if at all possible; hence the \penalty.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4102 \def\dochapentry#1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4103 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4104 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4105 \chapentryfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4106 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4107 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4108 \nobreak\vskip .25\baselineskip plus.1\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4109 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4110
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4111 \def\dosecentry#1#2{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4112 \secentryfonts \leftskip=\tocindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4113 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4114 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4115
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4116 \def\dosubsecentry#1#2{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4117 \subsecentryfonts \leftskip=2\tocindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4118 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4119 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4120
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4121 \def\dosubsubsecentry#1#2{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4122 \subsubsecentryfonts \leftskip=3\tocindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4123 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4124 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4125
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4126 % Final typesetting of a toc entry; we use the same \entry macro as for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4127 % the index entries, but we want to suppress hyphenation here. (We
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4128 % can't do that in the \entry macro, since index entries might consist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4129 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4130 \def\tocentry#1#2{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4131 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4132 % Do not use \turnoffactive in these arguments. Since the toc is
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4133 % typeset in cmr, characters such as _ would come out wrong; we
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4134 % have to do the usual translation tricks.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4135 \entry{#1}{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4136 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4137
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4138 % Space between chapter (or whatever) number and the title.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4139 \def\labelspace{\hskip1em \relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4140
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4141 \def\dopageno#1{{\rm #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4142 \def\doshortpageno#1{{\rm #1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4143
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4144 \def\chapentryfonts{\secfonts \rm}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4145 \def\secentryfonts{\textfonts}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4146 \let\subsecentryfonts = \textfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4147 \let\subsubsecentryfonts = \textfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4148
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4149
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4150 \message{environments,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4151 % @foo ... @end foo.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4152
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4153 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4154 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4155 % Since these characters are used in examples, it should be an even number of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4156 % \tt widths. Each \tt character is 1en, so two makes it 1em.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4157 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4158 \def\point{$\star$}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4159 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4160 \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4161 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4162 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4163
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4164 % The @error{} command.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4165 % Adapted from the TeXbook's \boxit.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4166 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4167 \newbox\errorbox
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4168 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4169 {\tentt \global\dimen0 = 3em}% Width of the box.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4170 \dimen2 = .55pt % Thickness of rules
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4171 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4172 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4173 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4174 \global\setbox\errorbox=\hbox to \dimen0{\hfil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4175 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4176 \advance\hsize by -2\dimen2 % Rules.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4177 \vbox{
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4178 \hrule height\dimen2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4179 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4180 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4181 \kern3pt\vrule width\dimen2}% Space to right.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4182 \hrule height\dimen2}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4183 \hfil}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4184 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4185 \def\error{\leavevmode\lower.7ex\copy\errorbox}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4186
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4187 % @tex ... @end tex escapes into raw Tex temporarily.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4188 % One exception: @ is still an escape character, so that @end tex works.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4189 % But \@ or @@ will get a plain tex @ character.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4190
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4191 \def\tex{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4192 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4193 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4194 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4195 \catcode `\%=14
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4196 \catcode 43=12 % plus
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4197 \catcode`\"=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4198 \catcode`\==12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4199 \catcode`\|=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4200 \catcode`\<=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4201 \catcode`\>=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4202 \escapechar=`\\
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4203 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4204 \let\b=\ptexb
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4205 \let\bullet=\ptexbullet
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4206 \let\c=\ptexc
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4207 \let\,=\ptexcomma
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4208 \let\.=\ptexdot
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4209 \let\dots=\ptexdots
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4210 \let\equiv=\ptexequiv
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4211 \let\!=\ptexexclam
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4212 \let\i=\ptexi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4213 \let\{=\ptexlbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4214 \let\+=\tabalign
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4215 \let\}=\ptexrbrace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4216 \let\*=\ptexstar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4217 \let\t=\ptext
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4218 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4219 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4220 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4221 \def\@{@}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4222 \let\Etex=\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4223
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4224 % Define @lisp ... @end lisp.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4225 % @lisp does a \begingroup so it can rebind things,
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4226 % including the definition of @end lisp (which normally is erroneous).
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4227
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4228 % Amount to narrow the margins by for @lisp.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4229 \newskip\lispnarrowing \lispnarrowing=0.4in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4230
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4231 % This is the definition that ^^M gets inside @lisp, @example, and other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4232 % such environments. \null is better than a space, since it doesn't
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4233 % have any width.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4234 \def\lisppar{\null\endgraf}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4235
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4236 % Make each space character in the input produce a normal interword
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4237 % space in the output. Don't allow a line break at this space, as this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4238 % is used only in environments like @example, where each line of input
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4239 % should produce a line of output anyway.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4240 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4241 {\obeyspaces %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4242 \gdef\sepspaces{\obeyspaces\let =\tie}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4243
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4244 % Define \obeyedspace to be our active space, whatever it is. This is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4245 % for use in \parsearg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4246 {\sepspaces%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4247 \global\let\obeyedspace= }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4248
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4249 % This space is always present above and below environments.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4250 \newskip\envskipamount \envskipamount = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4251
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4252 % Make spacing and below environment symmetrical. We use \parskip here
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4253 % to help in doing that, since in @example-like environments \parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4254 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4255 % start of the next paragraph will insert \parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4256 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4257 \def\aboveenvbreak{{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4258 \ifnum\lastpenalty < 10000
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4259 \advance\envskipamount by \parskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4260 \endgraf
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4261 \ifdim\lastskip<\envskipamount
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4262 \removelastskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4263 \penalty-50
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4264 \vskip\envskipamount
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4265 \fi
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4266 \fi
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4267 }}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4268
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4269 \let\afterenvbreak = \aboveenvbreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4270
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4271 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4272 \let\nonarrowing=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4273
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4274 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4275 % environment contents.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4276 \font\circle=lcircle10
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4277 \newdimen\circthick
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4278 \newdimen\cartouter\newdimen\cartinner
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4279 \newskip\normbskip\newskip\normpskip\newskip\normlskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4280 \circthick=\fontdimen8\circle
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4281 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4282 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4283 \def\ctr{{\hskip 6pt\circle\char'010}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4284 \def\cbl{{\circle\char'012\hskip -6pt}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4285 \def\cbr{{\hskip 6pt\circle\char'011}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4286 \def\carttop{\hbox to \cartouter{\hskip\lskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4287 \ctl\leaders\hrule height\circthick\hfil\ctr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4288 \hskip\rskip}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4289 \def\cartbot{\hbox to \cartouter{\hskip\lskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4290 \cbl\leaders\hrule height\circthick\hfil\cbr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4291 \hskip\rskip}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4292 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4293 \newskip\lskip\newskip\rskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4294
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4295 \long\def\cartouche{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4296 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4297 \lskip=\leftskip \rskip=\rightskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4298 \leftskip=0pt\rightskip=0pt %we want these *outside*.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4299 \cartinner=\hsize \advance\cartinner by-\lskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4300 \advance\cartinner by-\rskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4301 \cartouter=\hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4302 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4303 % side, and for 6pt waste from
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4304 % each corner char, and rule thickness
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4305 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4306 % Flag to tell @lisp, etc., not to narrow margin.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4307 \let\nonarrowing=\comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4308 \vbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4309 \baselineskip=0pt\parskip=0pt\lineskip=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4310 \carttop
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4311 \hbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4312 \hskip\lskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4313 \vrule\kern3pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4314 \vbox\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4315 \hsize=\cartinner
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4316 \kern3pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4317 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4318 \baselineskip=\normbskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4319 \lineskip=\normlskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4320 \parskip=\normpskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4321 \vskip -\parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4322 \def\Ecartouche{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4323 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4324 \kern3pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4325 \egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4326 \kern3pt\vrule
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4327 \hskip\rskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4328 \egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4329 \cartbot
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4330 \egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4331 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4332 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4333
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4334
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4335 % This macro is called at the beginning of all the @example variants,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4336 % inside a group.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4337 \def\nonfillstart{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4338 \aboveenvbreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4339 \inENV % This group ends at the end of the body
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4340 \hfuzz = 12pt % Don't be fussy
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4341 \sepspaces % Make spaces be word-separators rather than space tokens.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4342 \singlespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4343 \let\par = \lisppar % don't ignore blank lines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4344 \obeylines % each line of input is a line of output
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4345 \parskip = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4346 \parindent = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4347 \emergencystretch = 0pt % don't try to avoid overfull boxes
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4348 % @cartouche defines \nonarrowing to inhibit narrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4349 % at next level down.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4350 \ifx\nonarrowing\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4351 \advance \leftskip by \lispnarrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4352 \exdentamount=\lispnarrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4353 \let\exdent=\nofillexdent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4354 \let\nonarrowing=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4355 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4356 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4357
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4358 % Define the \E... control sequence only if we are inside the particular
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4359 % environment, so the error checking in \end will work.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4360 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4361 % To end an @example-like environment, we first end the paragraph (via
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4362 % \afterenvbreak's vertical glue), and then the group. That way we keep
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4363 % the zero \parskip that the environments set -- \parskip glue will be
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4364 % inserted at the beginning of the next paragraph in the document, after
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4365 % the environment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4366 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4367 \def\nonfillfinish{\afterenvbreak\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4368
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4369 % @lisp: indented, narrowed, typewriter font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4370 \def\lisp{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4371 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4372 \let\Elisp = \nonfillfinish
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4373 \tt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4374 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4375 \gobble % eat return
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4376 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4377
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4378 % @example: Same as @lisp.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4379 \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4380
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4381 % @small... is usually equivalent to the non-small (@smallbook
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4382 % redefines). We must call \example (or whatever) last in the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4383 % definition, since it reads the return following the @example (or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4384 % whatever) command.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4385 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4386 % This actually allows (for example) @end display inside an
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4387 % @smalldisplay. Too bad, but makeinfo will catch the error anyway.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4388 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4389 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4390 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4391 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4392 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4393
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4394 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4395 % Originally contributed by Pavel@xerox.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4396 \def\smalllispx{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4397 \def\Esmalllisp{\nonfillfinish\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4398 \def\Esmallexample{\nonfillfinish\endgroup}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4399 \smallexamplefonts
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4400 \lisp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4401 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4402
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4403 % @display: same as @lisp except keep current font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4404 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4405 \def\display{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4406 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4407 \let\Edisplay = \nonfillfinish
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4408 \gobble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4409 }
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4410 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4411 % @smalldisplay (when @smallbook): @display plus smaller fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4412 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4413 \def\smalldisplayx{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4414 \def\Esmalldisplay{\nonfillfinish\endgroup}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4415 \smallexamplefonts \rm
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4416 \display
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4417 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4418
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4419 % @format: same as @display except don't narrow margins.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4420 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4421 \def\format{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4422 \let\nonarrowing = t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4423 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4424 \let\Eformat = \nonfillfinish
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4425 \gobble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4426 }
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4427 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4428 % @smallformat (when @smallbook): @format plus smaller fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4429 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4430 \def\smallformatx{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4431 \def\Esmallformat{\nonfillfinish\endgroup}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4432 \smallexamplefonts \rm
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4433 \format
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4434 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4435
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4436 % @flushleft (same as @format).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4437 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4438 \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4439
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4440 % @flushright.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4441 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4442 \def\flushright{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4443 \let\nonarrowing = t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4444 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4445 \let\Eflushright = \nonfillfinish
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4446 \advance\leftskip by 0pt plus 1fill
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4447 \gobble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4448 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4449
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4450
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4451 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4452 % and narrows the margins.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4453 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4454 \def\quotation{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4455 \begingroup\inENV %This group ends at the end of the @quotation body
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4456 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4457 \singlespace
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4458 \parindent=0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4459 % We have retained a nonzero parskip for the environment, since we're
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4460 % doing normal filling. So to avoid extra space below the environment...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4461 \def\Equotation{\parskip = 0pt \nonfillfinish}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4462 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4463 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4464 \ifx\nonarrowing\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4465 \advance\leftskip by \lispnarrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4466 \advance\rightskip by \lispnarrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4467 \exdentamount = \lispnarrowing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4468 \let\nonarrowing = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4469 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4470 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4471
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4472
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4473 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4474 % If we want to allow any <char> as delimiter,
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4475 % we need the curly braces so that makeinfo sees the @verb command, eg:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4476 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4477 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4478 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4479 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4480 % [Knuth] p. 344; only we need to do '@' too
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4481 \def\dospecials{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4482 \do\ \do\\\do\@\do\{\do\}\do\$\do\&%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4483 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4484 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4485 % [Knuth] p. 380
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4486 \def\uncatcodespecials{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4487 \def\do##1{\catcode`##1=12}\dospecials}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4488 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4489 % [Knuth] pp. 380,381,391
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4490 % Disable Spanish ligatures ?` and !` of \tt font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4491 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4492 \catcode`\`=\active\gdef`{\relax\lq}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4493 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4494 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4495 % Setup for the @verb command.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4496 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4497 % Eight spaces for a tab
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4498 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4499 \catcode`\^^I=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4500 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4501 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4502 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4503 \def\setupverb{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4504 \tt % easiest (and conventionally used) font for verbatim
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4505 \def\par{\leavevmode\endgraf}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4506 \catcode`\`=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4507 \tabeightspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4508 % Respect line breaks,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4509 % print special symbols as themselves, and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4510 % make each space count
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4511 % must do in this order:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4512 \obeylines \uncatcodespecials \sepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4513 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4514
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4515 % Setup for the @verbatim environment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4516 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4517 % Real tab expansion
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4518 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4519 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4520 \def\starttabbox{\setbox0=\hbox\bgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4521 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4522 \catcode`\^^I=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4523 \gdef\tabexpand{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4524 \catcode`\^^I=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4525 \def^^I{\leavevmode\egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4526 \dimen0=\wd0 % the width so far, or since the previous tab
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4527 \divide\dimen0 by\tabw
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4528 \multiply\dimen0 by\tabw % compute previous multiple of \tabw
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4529 \advance\dimen0 by\tabw % advance to next multiple of \tabw
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4530 \wd0=\dimen0 \box0 \starttabbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4531 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4532 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4533 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4534 \def\setupverbatim{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4535 % Easiest (and conventionally used) font for verbatim
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4536 \tt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4537 \def\par{\leavevmode\egroup\box0\endgraf}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4538 \catcode`\`=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4539 \tabexpand
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4540 % Respect line breaks,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4541 % print special symbols as themselves, and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4542 % make each space count
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4543 % must do in this order:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4544 \obeylines \uncatcodespecials \sepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4545 \everypar{\starttabbox}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4546 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4547
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4548 % Do the @verb magic: verbatim text is quoted by unique
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4549 % delimiter characters. Before first delimiter expect a
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4550 % right brace, after last delimiter expect closing brace:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4551 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4552 % \def\doverb'{'<char>#1<char>'}'{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4553 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4554 % [Knuth] p. 382; only eat outer {}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4555 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4556 \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4557 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4558 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4559 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4560 \def\verb{\begingroup\setupverb\doverb}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4561 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4562 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4563 % Do the @verbatim magic: define the macro \doverbatim so that
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4564 % the (first) argument ends when '@end verbatim' is reached, ie:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4565 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4566 % \def\doverbatim#1@end verbatim{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4567 %
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4568 % For Texinfo it's a lot easier than for LaTeX,
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4569 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4570 % we need not redefine '\', '{' and '}'
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4571 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4572 % Inspired by LaTeX's verbatim command set [latex.ltx]
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4573 %% Include LaTeX hack for completeness -- never know
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4574 %% \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4575 %% \catcode`|=0 \catcode`[=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4576 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4577 %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4578 %% #1|endgroup|def|Everbatim[]|end[verbatim]]
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4579 %% |endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4580 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4581 \catcode`\ =\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4582 \gdef\doverbatim#1@end verbatim{#1\end{verbatim}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4583 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4584 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4585 \def\verbatim{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4586 \def\Everbatim{\nonfillfinish\endgroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4587 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4588 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4589 \advance\leftskip by -\defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4590 \begingroup\setupverbatim\doverbatim
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4591 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4592
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4593 % @verbatiminclude FILE - insert text of file in verbatim environment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4594 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4595 % Allow normal characters that we make active in the argument (a file name).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4596 \def\verbatiminclude{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4597 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4598 \catcode`\\=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4599 \catcode`~=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4600 \catcode`^=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4601 \catcode`_=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4602 \catcode`|=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4603 \catcode`<=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4604 \catcode`>=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4605 \catcode`+=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4606 \parsearg\doverbatiminclude
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4607 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4608 \def\setupverbatiminclude{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4609 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4610 \nonfillstart
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4611 \advance\leftskip by -\defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4612 \begingroup\setupverbatim
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4613 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4614 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4615 \def\doverbatiminclude#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4616 % Restore active chars for included file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4617 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4618 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4619 \def\thisfile{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4620 \expandafter\expandafter\setupverbatiminclude\input\thisfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4621 \endgroup\nonfillfinish\endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4622 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4623
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4624 % @copying ... @end copying.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4625 % Save the text away for @insertcopying later.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4626 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4627 \newbox\copyingbox
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4628 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4629 \def\copying{\begingroup
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4630 \parindent = 0pt % looks wrong on title page
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4631 \def\Ecopying{\egroup\endgroup}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4632 \global\setbox\copyingbox = \vbox\bgroup
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4633 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4634
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4635 % @insertcopying.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4636 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4637 \def\insertcopying{\unvcopy\copyingbox}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4638
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4639
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4640 \message{defuns,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4641 % @defun etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4642
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4643 % Allow user to change definition object font (\df) internally
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4644 \def\setdeffont #1 {\csname DEF#1\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4645
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4646 \newskip\defbodyindent \defbodyindent=.4in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4647 \newskip\defargsindent \defargsindent=50pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4648 \newskip\deftypemargin \deftypemargin=12pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4649 \newskip\deflastargmargin \deflastargmargin=18pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4650
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4651 \newcount\parencount
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4652 % define \functionparens, which makes ( and ) and & do special things.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4653 % \functionparens affects the group it is contained in.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4654 \def\activeparens{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4655 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4656 \catcode`\[=\active \catcode`\]=\active}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4657
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4658 % Make control sequences which act like normal parenthesis chars.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4659 \let\lparen = ( \let\rparen = )
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4660
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4661 {\activeparens % Now, smart parens don't turn on until &foo (see \amprm)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4662
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4663 % Be sure that we always have a definition for `(', etc. For example,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4664 % if the fn name has parens in it, \boldbrax will not be in effect yet,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4665 % so TeX would otherwise complain about undefined control sequence.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4666 \global\let(=\lparen \global\let)=\rparen
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4667 \global\let[=\lbrack \global\let]=\rbrack
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4668
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4669 \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4670 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4671 % This is used to turn on special parens
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4672 % but make & act ordinary (given that it's active).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4673 \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4674
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4675 % Definitions of (, ) and & used in args for functions.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4676 % This is the definition of ( outside of all parentheses.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4677 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4678 \global\advance\parencount by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4679 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4680 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4681 % This is the definition of ( when already inside a level of parens.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4682 \gdef\opnested{\char`\(\global\advance\parencount by 1 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4683 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4684 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4685 % also in that case restore the outer-level definition of (.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4686 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4687 \global\advance \parencount by -1 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4688 % If we encounter &foo, then turn on ()-hacking afterwards
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4689 \gdef\amprm#1 {{\rm\&#1}\let(=\oprm \let)=\clrm\ }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4690 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4691 \gdef\normalparens{\boldbrax\let&=\ampnr}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4692 } % End of definition inside \activeparens
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4693 %% These parens (in \boldbrax) actually are a little bolder than the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4694 %% contained text. This is especially needed for [ and ]
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4695 \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4696 \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4697 \let\ampnr = \&
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4698 \def\lbrb{{\bf\char`\[}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4699 \def\rbrb{{\bf\char`\]}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4700
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4701 % Active &'s sneak into the index arguments, so make sure it's defined.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4702 {
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4703 \catcode`& = 13
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4704 \global\let& = \ampnr
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4705 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4706
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4707 % First, defname, which formats the header line itself.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4708 % #1 should be the function name.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4709 % #2 should be the type of definition, such as "Function".
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4710
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4711 \def\defname #1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4712 % Get the values of \leftskip and \rightskip as they were
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4713 % outside the @def...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4714 \dimen2=\leftskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4715 \advance\dimen2 by -\defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4716 \noindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4717 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4718 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4719 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4720 \parshape 2 0in \dimen0 \defargsindent \dimen1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4721 % Now output arg 2 ("Function" or some such)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4722 % ending at \deftypemargin from the right margin,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4723 % but stuck inside a box of width 0 so it does not interfere with linebreaking
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4724 {% Adjust \hsize to exclude the ambient margins,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4725 % so that \rightline will obey them.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4726 \advance \hsize by -\dimen2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4727 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4728 % Make all lines underfull and no complaints:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4729 \tolerance=10000 \hbadness=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4730 \advance\leftskip by -\defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4731 \exdentamount=\defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4732 {\df #1}\enskip % Generate function name
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4733 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4734
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4735 % Common pieces to start any @def...
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4736 % #1 is the \E... control sequence to end the definition (which we define).
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4737 % #2 is the \...x control sequence (which our caller defines).
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4738 % #3 is the control sequence to process the header, such as \defunheader.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4739 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4740 \def\parsebodycommon#1#2#3{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4741 \begingroup\inENV
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4742 % If there are two @def commands in a row, we'll have a \nobreak,
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4743 % which is there to keep the function description together with its
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4744 % header. But if there's nothing but headers, we want to allow a
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4745 % break after all.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4746 \ifnum\lastpenalty = 10000 \penalty0 \fi
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4747 \medbreak
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4748 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4749 % Define the \E... end token that this defining construct specifies
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4750 % so that it will exit this group.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4751 \def#1{\endgraf\endgroup\medbreak}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4752 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4753 \parindent=0in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4754 \advance\leftskip by \defbodyindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4755 \exdentamount=\defbodyindent
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4756 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4757
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4758 % Process body of @defun, @deffn, @defmac, etc.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4759 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4760 \def\defparsebody#1#2#3{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4761 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4762 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4763 \catcode61=\active % 61 is `='
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4764 \begingroup\obeylines\activeparens
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4765 \spacesplit#3%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4766 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4767
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4768 % #1, #2, #3 are the common arguments (see \defparsebody).
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4769 % #4, delimited by the space, is the class name.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4770 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4771 \def\defmethparsebody#1#2#3#4 {%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4772 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4773 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4774 \begingroup\obeylines\activeparens
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4775 \spacesplit{#3{#4}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4776 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4777
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4778 % Used for @deftypemethod and @deftypeivar.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4779 % #1, #2, #3 are the common arguments (see \defparsebody).
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4780 % #4, delimited by a space, is the class name.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4781 % #5 is the method's return type.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4782 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4783 \def\deftypemethparsebody#1#2#3#4 #5 {%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4784 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4785 \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4786 \begingroup\obeylines\activeparens
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4787 \spacesplit{#3{#4}{#5}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4788 }
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4789
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4790 % Used for @deftypeop. The change from \deftypemethparsebody is an
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4791 % extra argument at the beginning which is the `category', instead of it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4792 % being the hardwired string `Method' or `Instance Variable'. We have
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4793 % to account for this both in the \...x definition and in parsing the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4794 % input at hand. Thus also need a control sequence (passed as #5) for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4795 % the \E... definition to assign the category name to.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
4796 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4797 \def\deftypeopparsebody#1#2#3#4#5 #6 {%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4798 \parsebodycommon{#1}{#2}{#3}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4799 \def#2##1 ##2 ##3 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4800 \def#4{##1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4801 \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4802 \begingroup\obeylines\activeparens
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4803 \spacesplit{#3{#5}{#6}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4804 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4805
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4806 % For @defop.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4807 \def\defopparsebody #1#2#3#4#5 {%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4808 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4809 \def#2##1 ##2 {\def#4{##1}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4810 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4811 \begingroup\obeylines\activeparens
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4812 \spacesplit{#3{#5}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4813 }
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4814
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4815 % These parsing functions are similar to the preceding ones
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4816 % except that they do not make parens into active characters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4817 % These are used for "variables" since they have no arguments.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4818 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4819 \def\defvarparsebody #1#2#3{%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4820 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4821 \def#2{\begingroup\obeylines\spacesplit#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4822 \catcode61=\active %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4823 \begingroup\obeylines
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4824 \spacesplit#3%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4825 }
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4826
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4827 % @defopvar.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4828 \def\defopvarparsebody #1#2#3#4#5 {%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4829 \parsebodycommon{#1}{#2}{#3}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4830 \def#2##1 ##2 {\def#4{##1}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4831 \begingroup\obeylines\spacesplit{#3{##2}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4832 \begingroup\obeylines
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4833 \spacesplit{#3{#5}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4834 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4835
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4836 \def\defvrparsebody#1#2#3#4 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4837 \parsebodycommon{#1}{#2}{#3}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4838 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4839 \begingroup\obeylines
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4840 \spacesplit{#3{#4}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4841 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4842
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4843 % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4844 % type is just `struct', because we lose the braces in `{struct
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4845 % termios}' when \spacesplit reads its undelimited argument. Sigh.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4846 % \let\deftpparsebody=\defvrparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4847 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4848 % So, to get around this, we put \empty in with the type name. That
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4849 % way, TeX won't find exactly `{...}' as an undelimited argument, and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4850 % won't strip off the braces.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4851 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4852 \def\deftpparsebody #1#2#3#4 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4853 \parsebodycommon{#1}{#2}{#3}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4854 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4855 \begingroup\obeylines
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4856 \spacesplit{\parsetpheaderline{#3{#4}}}\empty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4857 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4858
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4859 % Fine, but then we have to eventually remove the \empty *and* the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4860 % braces (if any). That's what this does.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4861 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4862 \def\removeemptybraces\empty#1\relax{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4863
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4864 % After \spacesplit has done its work, this is called -- #1 is the final
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4865 % thing to call, #2 the type name (which starts with \empty), and #3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4866 % (which might be empty) the arguments.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4867 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4868 \def\parsetpheaderline#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4869 #1{\removeemptybraces#2\relax}{#3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4870 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4871
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4872 % Split up #2 at the first space token.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4873 % call #1 with two arguments:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4874 % the first is all of #2 before the space token,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4875 % the second is all of #2 after that space token.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4876 % If #2 contains no space token, all of it is passed as the first arg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4877 % and the second is passed as empty.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4878 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4879 {\obeylines
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4880 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4881 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4882 \ifx\relax #3%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4883 #1{#2}{}\else #1{#2}{#3#4}\fi}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4884
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4885 % Define @defun.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4886
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4887 % First, define the processing that is wanted for arguments of \defun
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4888 % Use this to expand the args and terminate the paragraph they make up
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4889
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4890 \def\defunargs#1{\functionparens \sl
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4891 % Expand, preventing hyphenation at `-' chars.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4892 % Note that groups don't affect changes in \hyphenchar.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4893 % Set the font temporarily and use \font in case \setfont made \tensl a macro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4894 {\tensl\hyphenchar\font=0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4895 #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4896 {\tensl\hyphenchar\font=45}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4897 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4898 \interlinepenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4899 \advance\rightskip by 0pt plus 1fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4900 \endgraf\nobreak\vskip -\parskip\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4901 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4902
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4903 \def\deftypefunargs #1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4904 % Expand, preventing hyphenation at `-' chars.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4905 % Note that groups don't affect changes in \hyphenchar.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4906 % Use \boldbraxnoamp, not \functionparens, so that & is not special.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4907 \boldbraxnoamp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4908 \tclose{#1}% avoid \code because of side effects on active chars
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4909 \interlinepenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4910 \advance\rightskip by 0pt plus 1fil
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4911 \endgraf\nobreak\vskip -\parskip\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4912 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4913
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4914 % Do complete processing of one @defun or @defunx line already parsed.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4915
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4916 % @deffn Command forward-char nchars
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4917
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4918 \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4919
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4920 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4921 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4922 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4923 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4924
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4925 % @defun == @deffn Function
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4926
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4927 \def\defun{\defparsebody\Edefun\defunx\defunheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4928
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4929 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4930 \begingroup\defname {#1}{\putwordDeffunc}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4931 \defunargs {#2}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4932 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4933 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4934
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4935 % @deftypefun int foobar (int @var{foo}, float @var{bar})
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4936
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4937 \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4938
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4939 % #1 is the data type. #2 is the name and args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4940 \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4941 % #1 is the data type, #2 the name, #3 the args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4942 \def\deftypefunheaderx #1#2 #3\relax{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4943 \doind {fn}{\code{#2}}% Make entry in function index
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4944 \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4945 \deftypefunargs {#3}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4946 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4947 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4948
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4949 % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar})
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4950
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4951 \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4952
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4953 % \defheaderxcond#1\relax$.$
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4954 % puts #1 in @code, followed by a space, but does nothing if #1 is null.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4955 \def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4956
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4957 % #1 is the classification. #2 is the data type. #3 is the name and args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4958 \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4959 % #1 is the classification, #2 the data type, #3 the name, #4 the args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4960 \def\deftypefnheaderx #1#2#3 #4\relax{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4961 \doind {fn}{\code{#3}}% Make entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4962 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4963 \normalparens % notably, turn off `&' magic, which prevents
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4964 % at least some C++ text from working
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
4965 \defname {\defheaderxcond#2\relax$.$#3}{#1}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4966 \deftypefunargs {#4}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4967 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4968 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4969
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4970 % @defmac == @deffn Macro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4971
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4972 \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4973
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4974 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4975 \begingroup\defname {#1}{\putwordDefmac}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4976 \defunargs {#2}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4977 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4978 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4979
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4980 % @defspec == @deffn Special Form
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4981
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4982 \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4983
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4984 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4985 \begingroup\defname {#1}{\putwordDefspec}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4986 \defunargs {#2}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4987 \catcode 61=\other % Turn off change made in \defparsebody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4988 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4989
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4990 % @defop CATEGORY CLASS OPERATION ARG...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4991 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4992 \def\defop #1 {\def\defoptype{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4993 \defopparsebody\Edefop\defopx\defopheader\defoptype}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4994 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4995 \def\defopheader#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4996 \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4997 \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4998 \defunargs {#3}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
4999 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5001 % @deftypeop CATEGORY CLASS TYPE OPERATION ARG...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5002 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5003 \def\deftypeop #1 {\def\deftypeopcategory{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5004 \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5005 \deftypeopcategory}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5006 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5007 % #1 is the class name, #2 the data type, #3 the operation name, #4 the args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5008 \def\deftypeopheader#1#2#3#4{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5009 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5010 \begingroup
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5011 \defname{\defheaderxcond#2\relax$.$#3}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5012 {\deftypeopcategory\ \putwordon\ \code{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5013 \deftypefunargs{#4}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5014 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5015 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5016
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5017 % @deftypemethod CLASS TYPE METHOD ARG...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5018 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5019 \def\deftypemethod{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5020 \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5021 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5022 % #1 is the class name, #2 the data type, #3 the method name, #4 the args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5023 \def\deftypemethodheader#1#2#3#4{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5024 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5025 \begingroup
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5026 \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5027 \deftypefunargs{#4}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5028 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5029 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5030
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5031 % @deftypeivar CLASS TYPE VARNAME
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5032 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5033 \def\deftypeivar{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5034 \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5035 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5036 % #1 is the class name, #2 the data type, #3 the variable name.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5037 \def\deftypeivarheader#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5038 \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5039 \begingroup
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5040 \defname{\defheaderxcond#2\relax$.$#3}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5041 {\putwordInstanceVariableof\ \code{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5042 \defvarargs{#3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5043 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5044 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5045
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5046 % @defmethod == @defop Method
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5047 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5048 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5049 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5050 % #1 is the class name, #2 the method name, #3 the args.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5051 \def\defmethodheader#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5052 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5053 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5054 \defname{#2}{\putwordMethodon\ \code{#1}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5055 \defunargs{#3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5056 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5057 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5058
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5059 % @defcv {Class Option} foo-class foo-flag
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5060
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5061 \def\defcv #1 {\def\defcvtype{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5062 \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5063
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5064 \def\defcvarheader #1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5065 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5066 \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5067 \defvarargs {#3}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5068 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5069
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5070 % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5071 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5072 \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5073 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5074 \def\defivarheader#1#2#3{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5075 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5076 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5077 \defname{#2}{\putwordInstanceVariableof\ #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5078 \defvarargs{#3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5079 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5080 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5081
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5082 % @defvar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5083 % First, define the processing that is wanted for arguments of @defvar.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5084 % This is actually simple: just print them in roman.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5085 % This must expand the args and terminate the paragraph they make up
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5086 \def\defvarargs #1{\normalparens #1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5087 \interlinepenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5088 \endgraf\nobreak\vskip -\parskip\nobreak}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5089
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5090 % @defvr Counter foo-count
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5091
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5092 \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5093
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5094 \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5095 \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5096
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5097 % @defvar == @defvr Variable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5098
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5099 \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5100
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5101 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5102 \begingroup\defname {#1}{\putwordDefvar}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5103 \defvarargs {#2}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5104 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5105
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5106 % @defopt == @defvr {User Option}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5107
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5108 \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5109
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5110 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5111 \begingroup\defname {#1}{\putwordDefopt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5112 \defvarargs {#2}\endgroup %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5113 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5114
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5115 % @deftypevar int foobar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5116
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5117 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5118
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5119 % #1 is the data type. #2 is the name, perhaps followed by text that
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5120 % is actually part of the data type, which should not be put into the index.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5121 \def\deftypevarheader #1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5122 \dovarind#2 \relax% Make entry in variables index
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5123 \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5124 \interlinepenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5125 \endgraf\nobreak\vskip -\parskip\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5126 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5127 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5128
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5129 % @deftypevr {Global Flag} int enable
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5130
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5131 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5132
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5133 \def\deftypevrheader #1#2#3{\dovarind#3 \relax%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5134 \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5135 \interlinepenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5136 \endgraf\nobreak\vskip -\parskip\nobreak
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5137 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5138
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5139 % Now define @deftp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5140 % Args are printed in bold, a slight difference from @defvar.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5141
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5142 \def\deftpargs #1{\bf \defvarargs{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5143
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5144 % @deftp Class window height width ...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5145
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5146 \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5147
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5148 \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5149 \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5150
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5151 % These definitions are used if you use @defunx (etc.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5152 % anywhere other than immediately after a @defun or @defunx.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
5153 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5154 \def\defcvx#1 {\errmessage{@defcvx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5155 \def\deffnx#1 {\errmessage{@deffnx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5156 \def\defivarx#1 {\errmessage{@defivarx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5157 \def\defmacx#1 {\errmessage{@defmacx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5158 \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5159 \def\defoptx #1 {\errmessage{@defoptx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5160 \def\defopx#1 {\errmessage{@defopx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5161 \def\defspecx#1 {\errmessage{@defspecx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5162 \def\deftpx#1 {\errmessage{@deftpx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5163 \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5164 \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5165 \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5166 \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5167 \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5168 \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5169 \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5170 \def\defunx#1 {\errmessage{@defunx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5171 \def\defvarx#1 {\errmessage{@defvarx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5172 \def\defvrx#1 {\errmessage{@defvrx in invalid context}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5173
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5174
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5175 \message{macros,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5176 % @macro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5177
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5178 % To do this right we need a feature of e-TeX, \scantokens,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5179 % which we arrange to emulate with a temporary file in ordinary TeX.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5180 \ifx\eTeXversion\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5181 \newwrite\macscribble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5182 \def\scanmacro#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5183 \begingroup \newlinechar`\^^M
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5184 % Undo catcode changes of \startcontents and \doprintindex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5185 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5186 % Append \endinput to make sure that TeX does not see the ending newline.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5187 \toks0={#1\endinput}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5188 \immediate\openout\macscribble=\jobname.tmp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5189 \immediate\write\macscribble{\the\toks0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5190 \immediate\closeout\macscribble
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5191 \let\xeatspaces\eatspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5192 \input \jobname.tmp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5193 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5194 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5195 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5196 \def\scanmacro#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5197 \begingroup \newlinechar`\^^M
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5198 % Undo catcode changes of \startcontents and \doprintindex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5199 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5200 \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5201 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5202
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5203 \newcount\paramno % Count of parameters
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5204 \newtoks\macname % Macro name
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5205 \newif\ifrecursive % Is it recursive?
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5206 \def\macrolist{} % List of all defined macros in the form
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5207 % \do\macro1\do\macro2...
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5208
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5209 % Utility routines.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5210 % Thisdoes \let #1 = #2, except with \csnames.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5211 \def\cslet#1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5212 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5213 \expandafter\let
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5214 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5215 \csname#1\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5216 \csname#2\endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5217
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5218 % Trim leading and trailing spaces off a string.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5219 % Concepts from aro-bend problem 15 (see CTAN).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5220 {\catcode`\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5221 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5222 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5223 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5224 \def\unbrace#1{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5225 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5226 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5227
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5228 % Trim a single trailing ^^M off a string.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5229 {\catcode`\^^M=12\catcode`\Q=3%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5230 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5231 \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5232 \gdef\eatcrb#1Q#2Q{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5233 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5234
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5235 % Macro bodies are absorbed as an argument in a context where
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5236 % all characters are catcode 10, 11 or 12, except \ which is active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5237 % (as in normal texinfo). It is necessary to change the definition of \.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5238
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5239 % It's necessary to have hard CRs when the macro is executed. This is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5240 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5241 % body, and then making it the \newlinechar in \scanmacro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5242
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5243 \def\macrobodyctxt{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5244 \catcode`\~=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5245 \catcode`\^=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5246 \catcode`\_=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5247 \catcode`\|=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5248 \catcode`\<=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5249 \catcode`\>=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5250 \catcode`\+=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5251 \catcode`\{=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5252 \catcode`\}=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5253 \catcode`\@=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5254 \catcode`\^^M=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5255 \usembodybackslash}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5256
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5257 \def\macroargctxt{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5258 \catcode`\~=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5259 \catcode`\^=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5260 \catcode`\_=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5261 \catcode`\|=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5262 \catcode`\<=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5263 \catcode`\>=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5264 \catcode`\+=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5265 \catcode`\@=12
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5266 \catcode`\\=12}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5267
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5268 % \mbodybackslash is the definition of \ in @macro bodies.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5269 % It maps \foo\ => \csname macarg.foo\endcsname => #N
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5270 % where N is the macro parameter number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5271 % We define \csname macarg.\endcsname to be \realbackslash, so
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5272 % \\ in macro replacement text gets you a backslash.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5273
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5274 {\catcode`@=0 @catcode`@\=@active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5275 @gdef@usembodybackslash{@let\=@mbodybackslash}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5276 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5277 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5278 \expandafter\def\csname macarg.\endcsname{\realbackslash}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5279
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5280 \def\macro{\recursivefalse\parsearg\macroxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5281 \def\rmacro{\recursivetrue\parsearg\macroxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5282
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5283 \def\macroxxx#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5284 \getargs{#1}% now \macname is the macname and \argl the arglist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5285 \ifx\argl\empty % no arguments
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5286 \paramno=0%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5287 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5288 \expandafter\parsemargdef \argl;%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5289 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5290 \if1\csname ismacro.\the\macname\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5291 \message{Warning: redefining \the\macname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5292 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5293 \expandafter\ifx\csname \the\macname\endcsname \relax
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5294 \else \errmessage{Macro name \the\macname\space already defined}\fi
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5295 \global\cslet{macsave.\the\macname}{\the\macname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5296 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5297 % Add the macroname to \macrolist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5298 \toks0 = \expandafter{\macrolist\do}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5299 \xdef\macrolist{\the\toks0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5300 \expandafter\noexpand\csname\the\macname\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5301 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5302 \begingroup \macrobodyctxt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5303 \ifrecursive \expandafter\parsermacbody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5304 \else \expandafter\parsemacbody
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5305 \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5306
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5307 \def\unmacro{\parsearg\unmacroxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5308 \def\unmacroxxx#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5309 \if1\csname ismacro.#1\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5310 \global\cslet{#1}{macsave.#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5311 \global\expandafter\let \csname ismacro.#1\endcsname=0%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5312 % Remove the macro name from \macrolist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5313 \begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5314 \edef\tempa{\expandafter\noexpand\csname#1\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5315 \def\do##1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5316 \def\tempb{##1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5317 \ifx\tempa\tempb
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5318 % remove this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5319 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5320 \toks0 = \expandafter{\newmacrolist\do}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5321 \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5322 \fi}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5323 \def\newmacrolist{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5324 % Execute macro list to define \newmacrolist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5325 \macrolist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5326 \global\let\macrolist\newmacrolist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5327 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5328 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5329 \errmessage{Macro #1 not defined}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5330 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5331 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5332
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5333 % This makes use of the obscure feature that if the last token of a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5334 % <parameter list> is #, then the preceding argument is delimited by
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5335 % an opening brace, and that opening brace is not consumed.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5336 \def\getargs#1{\getargsxxx#1{}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5337 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5338 \def\getmacname #1 #2\relax{\macname={#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5339 \def\getmacargs#1{\def\argl{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5340
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5341 % Parse the optional {params} list. Set up \paramno and \paramlist
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5342 % so \defmacro knows what to do. Define \macarg.blah for each blah
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5343 % in the params list, to be ##N where N is the position in that list.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5344 % That gets used by \mbodybackslash (above).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5345
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5346 % We need to get `macro parameter char #' into several definitions.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5347 % The technique used is stolen from LaTeX: let \hash be something
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5348 % unexpandable, insert that wherever you need a #, and then redefine
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5349 % it to # just before using the token list produced.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5350 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5351 % The same technique is used to protect \eatspaces till just before
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5352 % the macro is used.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5353
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5354 \def\parsemargdef#1;{\paramno=0\def\paramlist{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5355 \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5356 \def\parsemargdefxxx#1,{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5357 \if#1;\let\next=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5358 \else \let\next=\parsemargdefxxx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5359 \advance\paramno by 1%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5360 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5361 {\xeatspaces{\hash\the\paramno}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5362 \edef\paramlist{\paramlist\hash\the\paramno,}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5363 \fi\next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5364
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5365 % These two commands read recursive and nonrecursive macro bodies.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5366 % (They're different since rec and nonrec macros end differently.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5367
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5368 \long\def\parsemacbody#1@end macro%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5369 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5370 \long\def\parsermacbody#1@end rmacro%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5371 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5372
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5373 % This defines the macro itself. There are six cases: recursive and
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5374 % nonrecursive macros of zero, one, and many arguments.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5375 % Much magic with \expandafter here.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5376 % \xdef is used so that macro definitions will survive the file
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5377 % they're defined in; @include reads the file inside a group.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5378 \def\defmacro{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5379 \let\hash=##% convert placeholders to macro parameter chars
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5380 \ifrecursive
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5381 \ifcase\paramno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5382 % 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5383 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5384 \noexpand\scanmacro{\temp}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5385 \or % 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5386 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5387 \bgroup\noexpand\macroargctxt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5388 \noexpand\braceorline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5389 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5390 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5391 \egroup\noexpand\scanmacro{\temp}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5392 \else % many
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5393 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5394 \bgroup\noexpand\macroargctxt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5395 \noexpand\csname\the\macname xx\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5396 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5397 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5398 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5399 \expandafter\xdef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5400 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5401 \csname\the\macname xxx\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5402 \paramlist{\egroup\noexpand\scanmacro{\temp}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5403 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5404 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5405 \ifcase\paramno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5406 % 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5407 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5408 \noexpand\norecurse{\the\macname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5409 \noexpand\scanmacro{\temp}\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5410 \or % 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5411 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5412 \bgroup\noexpand\macroargctxt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5413 \noexpand\braceorline
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5414 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5415 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5416 \egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5417 \noexpand\norecurse{\the\macname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5418 \noexpand\scanmacro{\temp}\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5419 \else % many
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5420 \expandafter\xdef\csname\the\macname\endcsname{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5421 \bgroup\noexpand\macroargctxt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5422 \expandafter\noexpand\csname\the\macname xx\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5423 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5424 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5425 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5426 \expandafter\xdef
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5427 \expandafter\expandafter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5428 \csname\the\macname xxx\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5429 \paramlist{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5430 \egroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5431 \noexpand\norecurse{\the\macname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5432 \noexpand\scanmacro{\temp}\egroup}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5433 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5434 \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5435
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5436 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5437
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5438 % \braceorline decides whether the next nonwhitespace character is a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5439 % {. If so it reads up to the closing }, if not, it reads the whole
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5440 % line. Whatever was read is then fed to the next control sequence
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5441 % as an argument (by \parsebrace or \parsearg)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5442 \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5443 \def\braceorlinexxx{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5444 \ifx\nchar\bgroup\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5445 \expandafter\parsearg
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5446 \fi \next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5447
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5448 % We mant to disable all macros during \shipout so that they are not
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5449 % expanded by \write.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5450 \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5451 \edef\next{\macrolist}\expandafter\endgroup\next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5452
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5453
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5454 % @alias.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5455 % We need some trickery to remove the optional spaces around the equal
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5456 % sign. Just make them active and then expand them all to nothing.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5457 \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5458 \def\aliasxxx #1{\aliasyyy#1\relax}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5459 \def\aliasyyy #1=#2\relax{\ignoreactivespaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5460 \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5461 \expandafter\noexpand\csname#2\endcsname}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5462 \expandafter\endgroup\next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5463
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5464
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5465 \message{cross references,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5466 % @xref etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5467
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5468 \newwrite\auxfile
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5469
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5470 \newif\ifhavexrefs % True if xref values are known.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5471 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5472
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5473 % @inforef is relatively simple.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5474 \def\inforef #1{\inforefzzz #1,,,,**}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5475 \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5476 node \samp{\ignorespaces#1{}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5477
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5478 % @node's job is to define \lastnode.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5479 \def\node{\ENVcheck\parsearg\nodezzz}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5480 \def\nodezzz#1{\nodexxx [#1,]}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5481 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5482 \let\nwnode=\node
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5483 \let\lastnode=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5484
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5485 % The sectioning commands (@chapter, etc.) call these.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5486 \def\donoderef{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5487 \ifx\lastnode\relax\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5488 \expandafter\expandafter\expandafter\setref{\lastnode}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5489 {Ysectionnumberandtype}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5490 \global\let\lastnode=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5491 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5492 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5493 \def\unnumbnoderef{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5494 \ifx\lastnode\relax\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5495 \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5496 \global\let\lastnode=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5497 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5498 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5499 \def\appendixnoderef{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5500 \ifx\lastnode\relax\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5501 \expandafter\expandafter\expandafter\setref{\lastnode}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5502 {Yappendixletterandtype}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5503 \global\let\lastnode=\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5504 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5505 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5506
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5507
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5508 % @anchor{NAME} -- define xref target at arbitrary point.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5509 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5510 \newcount\savesfregister
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5511 \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5512 \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5513 \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5514
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5515 % \setref{NAME}{SNT} defines a cross-reference point NAME, namely
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5516 % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5517 % to set \indexdummies so commands such as @code in a section title
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5518 % aren't expanded. It would be nicer not to expand the titles in the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5519 % first place, but there's so many layers that that is hard to do.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5520 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5521 \def\setref#1#2{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5522 \indexdummies
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5523 \pdfmkdest{#1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5524 \dosetq{#1-title}{Ytitle}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5525 \dosetq{#1-pg}{Ypagenumber}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5526 \dosetq{#1-snt}{#2}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5527 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5528
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5529 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5530 % the node name, #2 the name of the Info cross-reference, #3 the printed
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5531 % node name, #4 the name of the Info file, #5 the name of the printed
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5532 % manual. All but the node name can be omitted.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5533 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5534 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5535 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5536 \def\ref#1{\xrefX[#1,,,,,,,]}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5537 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5538 \unsepspaces
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5539 \def\printedmanual{\ignorespaces #5}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5540 \def\printednodename{\ignorespaces #3}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5541 \setbox1=\hbox{\printedmanual}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5542 \setbox0=\hbox{\printednodename}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5543 \ifdim \wd0 = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5544 % No printed node name was explicitly given.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5545 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5546 % Use the node name inside the square brackets.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5547 \def\printednodename{\ignorespaces #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5548 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5549 % Use the actual chapter/section title appear inside
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5550 % the square brackets. Use the real section title if we have it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5551 \ifdim \wd1 > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5552 % It is in another manual, so we don't have it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5553 \def\printednodename{\ignorespaces #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5554 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5555 \ifhavexrefs
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5556 % We know the real title if we have the xref values.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5557 \def\printednodename{\refx{#1-title}{}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5558 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5559 % Otherwise just copy the Info node name.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5560 \def\printednodename{\ignorespaces #1}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5561 \fi%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5562 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5563 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5564 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5565 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5566 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5567 % insert empty discretionaries after hyphens, which means that it will
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5568 % not find a line break at a hyphen in a node names. Since some manuals
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5569 % are best written with fairly long node names, containing hyphens, this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5570 % is a loss. Therefore, we give the text of the node name again, so it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5571 % is as if TeX is seeing it for the first time.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5572 \ifpdf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5573 \leavevmode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5574 \getfilename{#4}%
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5575 {\normalturnoffactive
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5576 \ifnum\filenamelength>0
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5577 \startlink attr{/Border [0 0 0]}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5578 goto file{\the\filename.pdf} name{#1}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5579 \else
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5580 \startlink attr{/Border [0 0 0]}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5581 goto name{#1}%
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5582 \fi
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5583 }%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5584 \linkcolor
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5585 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5586 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5587 \ifdim \wd1 > 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5588 \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5589 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5590 % _ (for example) has to be the character _ for the purposes of the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5591 % control sequence corresponding to the node, but it has to expand
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5592 % into the usual \leavevmode...\vrule stuff for purposes of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5593 % printing. So we \turnoffactive for the \refx-snt, back on for the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5594 % printing, back off for the \refx-pg.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5595 {\normalturnoffactive
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5596 % Only output a following space if the -snt ref is nonempty; for
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5597 % @unnumbered and @anchor, it won't be.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5598 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5599 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5600 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5601 % [mynode],
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5602 [\printednodename],\space
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5603 % page 3
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5604 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5605 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5606 \endlink
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5607 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5608
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5609 % \dosetq is the interface for calls from other macros
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5610
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5611 % Use \normalturnoffactive so that punctuation chars such as underscore
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5612 % and backslash work in node names. (\turnoffactive doesn't do \.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5613 \def\dosetq#1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5614 {\let\folio=0%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5615 \normalturnoffactive
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5616 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5617 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5618 \next
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5619 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5620 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5621 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5622
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5623 % \internalsetq {foo}{page} expands into
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5624 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5625 % When the aux file is read, ' is the escape character
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5626
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5627 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5628
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5629 % Things to be expanded by \internalsetq
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5630
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5631 \def\Ypagenumber{\folio}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5632
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5633 \def\Ytitle{\thissection}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5634
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5635 \def\Ynothing{}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5636
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5637 \def\Ysectionnumberandtype{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5638 \ifnum\secno=0 \putwordChapter\xreftie\the\chapno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5639 \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5640 \else \ifnum \subsubsecno=0 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5641 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5642 \else %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5643 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5644 \fi \fi \fi }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5645
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5646 \def\Yappendixletterandtype{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5647 \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5648 \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5649 \else \ifnum \subsubsecno=0 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5650 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5651 \else %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5652 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5653 \fi \fi \fi }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5654
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5655 \gdef\xreftie{'tie}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5656
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5657 % Use TeX 3.0's \inputlineno to get the line number, for better error
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5658 % messages, but if we're using an old version of TeX, don't do anything.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5659 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5660 \ifx\inputlineno\thisisundefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5661 \let\linenumber = \empty % Non-3.0.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5662 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5663 \def\linenumber{\the\inputlineno:\space}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5664 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5665
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5666 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5667 % If its value is nonempty, SUFFIX is output afterward.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5668
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5669 \def\refx#1#2{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5670 \expandafter\ifx\csname X#1\endcsname\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5671 % If not defined, say something at least.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5672 \angleleft un\-de\-fined\angleright
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5673 \iflinks
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5674 \ifhavexrefs
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5675 \message{\linenumber Undefined cross reference `#1'.}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5676 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5677 \ifwarnedxrefs\else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5678 \global\warnedxrefstrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5679 \message{Cross reference values unknown; you must run TeX again.}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5680 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5681 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5682 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5683 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5684 % It's defined, so just use it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5685 \csname X#1\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5686 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5687 #2% Output the suffix in any case.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5688 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5689
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5690 % This is the macro invoked by entries in the aux file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5691 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5692 \def\xrdef#1{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5693 % Reenable \ as an escape while reading the second argument.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5694 \catcode`\\ = 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5695 \afterassignment\endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5696 \expandafter\gdef\csname X#1\endcsname
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5697 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5698
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5699 % Read the last existing aux file, if any. No error if none exists.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5700 \def\readauxfile{\begingroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5701 \catcode`\^^@=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5702 \catcode`\^^A=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5703 \catcode`\^^B=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5704 \catcode`\^^C=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5705 \catcode`\^^D=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5706 \catcode`\^^E=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5707 \catcode`\^^F=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5708 \catcode`\^^G=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5709 \catcode`\^^H=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5710 \catcode`\^^K=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5711 \catcode`\^^L=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5712 \catcode`\^^N=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5713 \catcode`\^^P=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5714 \catcode`\^^Q=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5715 \catcode`\^^R=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5716 \catcode`\^^S=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5717 \catcode`\^^T=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5718 \catcode`\^^U=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5719 \catcode`\^^V=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5720 \catcode`\^^W=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5721 \catcode`\^^X=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5722 \catcode`\^^Z=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5723 \catcode`\^^[=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5724 \catcode`\^^\=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5725 \catcode`\^^]=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5726 \catcode`\^^^=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5727 \catcode`\^^_=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5728 \catcode`\@=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5729 \catcode`\^=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5730 % It was suggested to define this as 7, which would allow ^^e4 etc.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5731 % in xref tags, i.e., node names. But since ^^e4 notation isn't
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5732 % supported in the main text, it doesn't seem desirable. Furthermore,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5733 % that is not enough: for node names that actually contain a ^
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5734 % character, we would end up writing a line like this: 'xrdef {'hat
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5735 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5736 % argument, and \hat is not an expandable control sequence. It could
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5737 % all be worked out, but why? Either we support ^^ or we don't.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5738 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5739 % The other change necessary for this was to define \auxhat:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5740 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5741 % and then to call \auxhat in \setq.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5742 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5743 \catcode`\~=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5744 \catcode`\[=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5745 \catcode`\]=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5746 \catcode`\"=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5747 \catcode`\_=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5748 \catcode`\|=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5749 \catcode`\<=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5750 \catcode`\>=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5751 \catcode`\$=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5752 \catcode`\#=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5753 \catcode`\&=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5754 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5755 % Make the characters 128-255 be printing characters
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5756 {%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5757 \count 1=128
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5758 \def\loop{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5759 \catcode\count 1=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5760 \advance\count 1 by 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5761 \ifnum \count 1<256 \loop \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5762 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5763 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5764 % The aux file uses ' as the escape (for now).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5765 % Turn off \ as an escape so we do not lose on
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5766 % entries which were dumped with control sequences in their names.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5767 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5768 % Reference to such entries still does not work the way one would wish,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5769 % but at least they do not bomb out when the aux file is read in.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5770 \catcode`\{=1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5771 \catcode`\}=2
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5772 \catcode`\%=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5773 \catcode`\'=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5774 \catcode`\\=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5775 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5776 \openin 1 \jobname.aux
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5777 \ifeof 1 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5778 \closein 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5779 \input \jobname.aux
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5780 \global\havexrefstrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5781 \global\warnedobstrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5782 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5783 % Open the new aux file. TeX will close it automatically at exit.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5784 \openout\auxfile=\jobname.aux
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5785 \endgroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5786
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5787
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5788 % Footnotes.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5789
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5790 \newcount \footnoteno
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5791
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5792 % The trailing space in the following definition for supereject is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5793 % vital for proper filling; pages come out unaligned when you do a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5794 % pagealignmacro call if that space before the closing brace is
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5795 % removed. (Generally, numeric constants should always be followed by a
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5796 % space to prevent strange expansion errors.)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5797 \def\supereject{\par\penalty -20000\footnoteno =0 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5798
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5799 % @footnotestyle is meaningful for info output only.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5800 \let\footnotestyle=\comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5801
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5802 \let\ptexfootnote=\footnote
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5803
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5804 {\catcode `\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5805 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5806 % Auto-number footnotes. Otherwise like plain.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5807 \gdef\footnote{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5808 \global\advance\footnoteno by \@ne
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5809 \edef\thisfootno{$^{\the\footnoteno}$}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5810 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5811 % In case the footnote comes at the end of a sentence, preserve the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5812 % extra spacing after we do the footnote number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5813 \let\@sf\empty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5814 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5815 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5816 % Remove inadvertent blank space before typesetting the footnote number.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5817 \unskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5818 \thisfootno\@sf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5819 \footnotezzz
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5820 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5821
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5822 % Don't bother with the trickery in plain.tex to not require the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5823 % footnote text as a parameter. Our footnotes don't need to be so general.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5824 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5825 % Oh yes, they do; otherwise, @ifset and anything else that uses
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5826 % \parseargline fail inside footnotes because the tokens are fixed when
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5827 % the footnote is read. --karl, 16nov96.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5828 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5829 \long\gdef\footnotezzz{\insert\footins\bgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5830 % We want to typeset this text as a normal paragraph, even if the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5831 % footnote reference occurs in (for example) a display environment.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5832 % So reset some parameters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5833 \interlinepenalty\interfootnotelinepenalty
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5834 \splittopskip\ht\strutbox % top baseline for broken footnotes
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5835 \splitmaxdepth\dp\strutbox
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5836 \floatingpenalty\@MM
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5837 \leftskip\z@skip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5838 \rightskip\z@skip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5839 \spaceskip\z@skip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5840 \xspaceskip\z@skip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5841 \parindent\defaultparindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5842 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5843 \smallfonts \rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5844 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5845 % Because we use hanging indentation in footnotes, a @noindent appears
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5846 % to exdent this text, so make it be a no-op. makeinfo does not use
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5847 % hanging indentation so @noindent can still be needed within footnote
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5848 % text after an @example or the like (not that this is good style).
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5849 \let\noindent = \relax
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5850 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5851 % Hang the footnote text off the number. Use \everypar in case the
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5852 % footnote extends for more than one paragraph.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5853 \everypar = {\hang}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5854 \textindent{\thisfootno}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5855 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5856 % Don't crash into the line above the footnote text. Since this
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5857 % expands into a box, it must come within the paragraph, lest it
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5858 % provide a place where TeX can split the footnote.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5859 \footstrut
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5860 \futurelet\next\fo@t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5861 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5862 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5863 \else\let\next\f@t\fi \next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5864 \def\f@@t{\bgroup\aftergroup\@foot\let\next}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5865 \def\f@t#1{#1\@foot}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5866 \def\@foot{\strut\par\egroup}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5867
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5868 }%end \catcode `\@=11
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5869
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5870 % @| inserts a changebar to the left of the current line. It should
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5871 % surround any changed text. This approach does *not* work if the
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5872 % change spans more than two lines of output. To handle that, we would
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5873 % have adopt a much more difficult approach (putting marks into the main
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5874 % vertical list for the beginning and end of each change).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5875 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5876 \def\|{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5877 % \vadjust can only be used in horizontal mode.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5878 \leavevmode
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5879 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5880 % Append this vertical mode material after the current line in the output.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5881 \vadjust{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5882 % We want to insert a rule with the height and depth of the current
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5883 % leading; that is exactly what \strutbox is supposed to record.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5884 \vskip-\baselineskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5885 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5886 % \vadjust-items are inserted at the left edge of the type. So
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5887 % the \llap here moves out into the left-hand margin.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5888 \llap{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5889 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5890 % For a thicker or thinner bar, change the `1pt'.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5891 \vrule height\baselineskip width1pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5892 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5893 % This is the space between the bar and the text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5894 \hskip 12pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5895 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5896 }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5897 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5898
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5899 % For a final copy, take out the rectangles
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5900 % that mark overfull boxes (in case you have decided
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5901 % that the text looks ok even though it passes the margin).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5902 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5903 \def\finalout{\overfullrule=0pt}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5904
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5905 % @image. We use the macros from epsf.tex to support this.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5906 % If epsf.tex is not installed and @image is used, we complain.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5907 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5908 % Check for and read epsf.tex up front. If we read it only at @image
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5909 % time, we might be inside a group, and then its definitions would get
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5910 % undone and the next image would fail.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5911 \openin 1 = epsf.tex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5912 \ifeof 1 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5913 \closein 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5914 % Do not bother showing banner with post-v2.7 epsf.tex (available in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5915 % doc/epsf.tex until it shows up on ctan).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5916 \def\epsfannounce{\toks0 = }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5917 \input epsf.tex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5918 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5919 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5920 % We will only complain once about lack of epsf.tex.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5921 \newif\ifwarnednoepsf
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5922 \newhelp\noepsfhelp{epsf.tex must be installed for images to
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5923 work. It is also included in the Texinfo distribution, or you can get
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5924 it from ftp://tug.org/tex/epsf.tex.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5925 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5926 \def\image#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5927 \ifx\epsfbox\undefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5928 \ifwarnednoepsf \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5929 \errhelp = \noepsfhelp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5930 \errmessage{epsf.tex not found, images will be ignored}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5931 \global\warnednoepsftrue
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5932 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5933 \else
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5934 \imagexxx #1,,,,,\finish
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5935 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5936 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5937 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5938 % Arguments to @image:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5939 % #1 is (mandatory) image filename; we tack on .eps extension.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5940 % #2 is (optional) width, #3 is (optional) height.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5941 % #4 is (ignored optional) html alt text.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5942 % #5 is (ignored optional) extension.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5943 % #6 is just the usual extra ignored arg for parsing this stuff.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5944 \newif\ifimagevmode
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5945 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5946 \catcode`\^^M = 5 % in case we're inside an example
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5947 \normalturnoffactive % allow _ et al. in names
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5948 % If the image is by itself, center it.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5949 \ifvmode
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5950 \imagevmodetrue
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5951 \nobreak\bigskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5952 % Usually we'll have text after the image which will insert
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5953 % \parskip glue, so insert it here too to equalize the space
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
5954 % above and below.
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5955 \nobreak\vskip\parskip
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5956 \nobreak
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5957 \line\bgroup\hss
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5958 \fi
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5959 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5960 % Output the image.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5961 \ifpdf
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5962 \dopdfimage{#1}{#2}{#3}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5963 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5964 % \epsfbox itself resets \epsf?size at each figure.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5965 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5966 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5967 \epsfbox{#1.eps}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5968 \fi
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5969 %
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5970 \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
5971 \endgroup}
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5972
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5973
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5974 \message{localization,}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5975 % and i18n.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5976
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5977 % @documentlanguage is usually given very early, just after
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5978 % @setfilename. If done too late, it may not override everything
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5979 % properly. Single argument is the language abbreviation.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5980 % It would be nice if we could set up a hyphenation file here.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5981 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5982 \def\documentlanguage{\parsearg\dodocumentlanguage}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5983 \def\dodocumentlanguage#1{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5984 \tex % read txi-??.tex file in plain TeX.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5985 % Read the file if it exists.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5986 \openin 1 txi-#1.tex
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5987 \ifeof1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5988 \errhelp = \nolanghelp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5989 \errmessage{Cannot read language file txi-#1.tex}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5990 \let\temp = \relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5991 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5992 \def\temp{\input txi-#1.tex }%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5993 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5994 \temp
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5995 \endgroup
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5996 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5997 \newhelp\nolanghelp{The given language definition file cannot be found or
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5998 is empty. Maybe you need to install it? In the current directory
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5999 should work if nowhere else does.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6001
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6002 % @documentencoding should change something in TeX eventually, most
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6003 % likely, but for now just recognize it.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6004 \let\documentencoding = \comment
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6005
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6006
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6007 % Page size parameters.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6008 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6009 \newdimen\defaultparindent \defaultparindent = 15pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6010
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6011 \chapheadingskip = 15pt plus 4pt minus 2pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6012 \secheadingskip = 12pt plus 3pt minus 2pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6013 \subsecheadingskip = 9pt plus 2pt minus 2pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6014
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6015 % Prevent underfull vbox error messages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6016 \vbadness = 10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6017
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6018 % Don't be so finicky about underfull hboxes, either.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6019 \hbadness = 2000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6020
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6021 % Following George Bush, just get rid of widows and orphans.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6022 \widowpenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6023 \clubpenalty=10000
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6024
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6025 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6026 % using an old version of TeX, don't do anything. We want the amount of
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6027 % stretch added to depend on the line length, hence the dependence on
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6028 % \hsize. We call this whenever the paper size is set.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6029 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6030 \def\setemergencystretch{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6031 \ifx\emergencystretch\thisisundefined
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6032 % Allow us to assign to \emergencystretch anyway.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6033 \def\emergencystretch{\dimen0}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6034 \else
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6035 \emergencystretch = .15\hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6036 \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6037 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6038
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6039 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6040 % 4) hoffset; 5) binding offset; 6) topskip. We also call
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6041 % \setleading{\textleading}, so the caller should define \textleading.
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6042 % The caller should also set \parskip.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6043 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6044 \def\internalpagesizes#1#2#3#4#5#6{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6045 \voffset = #3\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6046 \topskip = #6\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6047 \splittopskip = \topskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6048 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6049 \vsize = #1\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6050 \advance\vsize by \topskip
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6051 \outervsize = \vsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6052 \advance\outervsize by 2\topandbottommargin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6053 \pageheight = \vsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6054 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6055 \hsize = #2\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6056 \outerhsize = \hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6057 \advance\outerhsize by 0.5in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6058 \pagewidth = \hsize
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6059 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6060 \normaloffset = #4\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6061 \bindingoffset = #5\relax
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6062 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6063 \setleading{\textleading}
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6064 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6065 \parindent = \defaultparindent
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6066 \setemergencystretch
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6067 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6068
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6069 % Use `small' versions.
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
6070 %
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6071 \def\smallenvironments{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6072 \let\smalldisplay = \smalldisplayx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6073 \let\smallexample = \smalllispx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6074 \let\smallformat = \smallformatx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6075 \let\smalllisp = \smalllispx
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6076 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6077
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6078 % @letterpaper (the default).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6079 \def\letterpaper{{\globaldefs = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6080 \parskip = 3pt plus 2pt minus 1pt
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6081 \textleading = 13.2pt
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6082 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6083 % If page is nothing but text, make it come out even.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6084 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6085 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6086
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6087 % Use @smallbook to reset parameters for 7x9.5 (or so) format.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6088 \def\smallbook{{\globaldefs = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6089 \parskip = 2pt plus 1pt
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6090 \textleading = 12pt
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6091 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6092 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6093 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6094 \lispnarrowing = 0.3in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6095 \tolerance = 700
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6096 \hfuzz = 1pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6097 \contentsrightmargin = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6098 \deftypemargin = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6099 \defbodyindent = .5cm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6100 \smallenvironments
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6101 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6102
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6103 % Use @afourpaper to print on European A4 paper.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6104 \def\afourpaper{{\globaldefs = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6105 \parskip = 3pt plus 2pt minus 1pt
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6106 \textleading = 12pt
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6107 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6108 \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6109 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6110 \tolerance = 700
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6111 \hfuzz = 1pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6112 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6113
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6114 % Use @afivepaper to print on European A5 paper.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6115 % From romildo@urano.iceb.ufop.br, 2 July 2000.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6116 % He also recommends making @example and @lisp be small.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6117 \def\afivepaper{{\globaldefs = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6118 \parskip = 2pt plus 1pt minus 0.1pt
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6119 \textleading = 12.5pt
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6120 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6121 \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6122 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6123 \lispnarrowing = 0.2in
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6124 \tolerance = 800
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6125 \hfuzz = 1.2pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6126 \contentsrightmargin = 0mm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6127 \deftypemargin = 0pt
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6128 \defbodyindent = 2mm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6129 \tableindent = 12mm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6130 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6131 \smallenvironments
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6132 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6133
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6134 % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6135 % 29mm, hence bottom margin 28mm, nominal side margin 3cm.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6136 \def\afourlatex{{\globaldefs = 1
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6137 \textleading = 13.6pt
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6138 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6139 \afourpaper
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6140 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6141 %
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6142 % Must explicitly reset to 0 because we call \afourpaper, apparently,
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6143 % although this does not entirely make sense.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6144 \globaldefs = 0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6145 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6146
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6147 % Use @afourwide to print on European A4 paper in wide format.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6148 \def\afourwide{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6149 \afourpaper
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6150 \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6151 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6152
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6153 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6154 % Perhaps we should allow setting the margins, \topskip, \parskip,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6155 % and/or leading, also. Or perhaps we should compute them somehow.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6156 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6157 \def\pagesizes{\parsearg\pagesizesxxx}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6158 \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6159 \def\pagesizesyyy#1,#2,#3\finish{{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6160 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6161 \globaldefs = 1
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6162 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6163 \parskip = 3pt plus 2pt minus 1pt
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6164 \setleading{\textleading}%
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6165 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6166 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6167 }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6168
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6169 % Set default to letter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6170 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6171 \letterpaper
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6172
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6173
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6174 \message{and turning on texinfo input format.}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6175
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6176 % Define macros to output various characters with catcode for normal text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6177 \catcode`\"=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6178 \catcode`\~=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6179 \catcode`\^=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6180 \catcode`\_=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6181 \catcode`\|=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6182 \catcode`\<=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6183 \catcode`\>=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6184 \catcode`\+=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6185 \catcode`\$=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6186 \def\normaldoublequote{"}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6187 \def\normaltilde{~}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6188 \def\normalcaret{^}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6189 \def\normalunderscore{_}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6190 \def\normalverticalbar{|}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6191 \def\normalless{<}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6192 \def\normalgreater{>}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6193 \def\normalplus{+}
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6194 \def\normaldollar{$}%$ font-lock fix
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6195
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6196 % This macro is used to make a character print one way in ttfont
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6197 % where it can probably just be output, and another way in other fonts,
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6198 % where something hairier probably needs to be done.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6199 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6200 % #1 is what to print if we are indeed using \tt; #2 is what to print
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6201 % otherwise. Since all the Computer Modern typewriter fonts have zero
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6202 % interword stretch (and shrink), and it is reasonable to expect all
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6203 % typewriter fonts to have this, we can check that font parameter.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6204 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6205 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6206
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6207 % Same as above, but check for italic font. Actually this also catches
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6208 % non-italic slanted fonts since it is impossible to distinguish them from
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6209 % italic fonts. But since this is only used by $ and it uses \sl anyway
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6210 % this is not a problem.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6211 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6212
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6213 % Turn off all special characters except @
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6214 % (and those which the user can use as if they were ordinary).
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6215 % Most of these we simply print from the \tt font, but for some, we can
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6216 % use math or other variants that look better in normal text.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6217
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6218 \catcode`\"=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6219 \def\activedoublequote{{\tt\char34}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6220 \let"=\activedoublequote
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6221 \catcode`\~=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6222 \def~{{\tt\char126}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6223 \chardef\hat=`\^
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6224 \catcode`\^=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6225 \def^{{\tt \hat}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6226
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6227 \catcode`\_=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6228 \def_{\ifusingtt\normalunderscore\_}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6229 % Subroutine for the previous macro.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6230 \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6231
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6232 \catcode`\|=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6233 \def|{{\tt\char124}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6234 \chardef \less=`\<
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6235 \catcode`\<=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6236 \def<{{\tt \less}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6237 \chardef \gtr=`\>
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6238 \catcode`\>=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6239 \def>{{\tt \gtr}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6240 \catcode`\+=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6241 \def+{{\tt \char 43}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6242 \catcode`\$=\active
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6243 \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6244 %\catcode 27=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6245 %\def^^[{$\diamondsuit$}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6246
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6247 % Set up an active definition for =, but don't enable it most of the time.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6248 {\catcode`\==\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6249 \global\def={{\tt \char 61}}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6250
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6251 \catcode`+=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6252 \catcode`\_=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6253
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6254 % If a .fmt file is being used, characters that might appear in a file
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6255 % name cannot be active until we have parsed the command line.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6256 % So turn them off again, and have \everyjob (or @setfilename) turn them on.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6257 % \otherifyactive is called near the end of this file.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6258 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6259
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6260 \catcode`\@=0
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6261
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6262 % \rawbackslashxx output one backslash character in current font
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6263 \global\chardef\rawbackslashxx=`\\
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6264 %{\catcode`\\=\other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6265 %@gdef@rawbackslashxx{\}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6266
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6267 % \rawbackslash redefines \ as input to do \rawbackslashxx.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6268 {\catcode`\\=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6269 @gdef@rawbackslash{@let\=@rawbackslashxx }}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6270
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6271 % \normalbackslash outputs one backslash in fixed width font.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6272 \def\normalbackslash{{\tt\rawbackslashxx}}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6273
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6274 % \catcode 17=0 % Define control-q
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6275 \catcode`\\=\active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6276
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6277 % Used sometimes to turn off (effectively) the active characters
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6278 % even after parsing them.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6279 @def@turnoffactive{@let"=@normaldoublequote
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6280 @let\=@realbackslash
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6281 @let~=@normaltilde
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6282 @let^=@normalcaret
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6283 @let_=@normalunderscore
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6284 @let|=@normalverticalbar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6285 @let<=@normalless
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6286 @let>=@normalgreater
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6287 @let+=@normalplus
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6288 @let$=@normaldollar}%$ font-lock fix
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6289
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6290 @def@normalturnoffactive{@let"=@normaldoublequote
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6291 @let\=@normalbackslash
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6292 @let~=@normaltilde
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6293 @let^=@normalcaret
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6294 @let_=@normalunderscore
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6295 @let|=@normalverticalbar
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6296 @let<=@normalless
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6297 @let>=@normalgreater
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6298 @let+=@normalplus
47284
efec044efb3a Updated to texinfo 4.2.
Pavel Janík <Pavel@Janik.cz>
parents: 37713
diff changeset
6299 @let$=@normaldollar}%$ font-lock fix
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6300
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6301 % Make _ and + \other characters, temporarily.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6302 % This is canceled by @fixbackslash.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6303 @otherifyactive
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6304
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6305 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6306 % That is what \eatinput is for; after that, the `\' should revert to printing
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6307 % a backslash.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6308 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6309 @gdef@eatinput input texinfo{@fixbackslash}
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6310 @global@let\ = @eatinput
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6311
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6312 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6313 % the first `\{ in the file would cause an error. This macro tries to fix
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6314 % that, assuming it is called before the first `\' could plausibly occur.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6315 % Also back turn on active characters that might appear in the input
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6316 % file name, in case not using a pre-dumped format.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6317 %
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6318 @gdef@fixbackslash{%
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6319 @ifx\@eatinput @let\ = @normalbackslash @fi
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6320 @catcode`+=@active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6321 @catcode`@_=@active
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6322 }
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6323
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6324 % Say @foo, not \foo, in error messages.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6325 @escapechar = `@@
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6326
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 47284
diff changeset
6327 % These look ok in all fonts, so just make them not special.
37713
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6328 @catcode`@& = @other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6329 @catcode`@# = @other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6330 @catcode`@% = @other
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6331
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6332 @c Set initial fonts.
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6333 @textfonts
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6334 @rm
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6335
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6336
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6337 @c Local variables:
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6338 @c eval: (add-hook 'write-file-hooks 'time-stamp)
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6339 @c page-delimiter: "^\\\\message"
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6340 @c time-stamp-start: "def\\\\texinfoversion{"
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6341 @c time-stamp-format: "%:y-%02m-%02d.%02H"
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6342 @c time-stamp-end: "}"
d740bf4f6714 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6343 @c End:
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49600
diff changeset
6344
52790
a93f1f4e2e49 Replace `%' in arch tagline by @ignore.
Luc Teirlinck <teirllm@auburn.edu>
parents: 52401
diff changeset
6345 @ignore
a93f1f4e2e49 Replace `%' in arch tagline by @ignore.
Luc Teirlinck <teirllm@auburn.edu>
parents: 52401
diff changeset
6346 arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
a93f1f4e2e49 Replace `%' in arch tagline by @ignore.
Luc Teirlinck <teirllm@auburn.edu>
parents: 52401
diff changeset
6347 @end ignore