Mercurial > forge
annotate texinfo.tex @ 12684:29631e455f62 octave-forge
fix issue on OpenSuse's (v13.2) Octave (3.8.2)
author | schloegl |
---|---|
date | Sat, 12 Sep 2015 06:34:22 +0000 |
parents | 2de537641f94 |
children |
rev | line source |
---|---|
1325
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1 % texinfo.tex -- TeX macros to handle Texinfo files. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3 % Load plain if necessary, i.e., if running under initex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
6 \def\texinfoversion{1999-09-25.10} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
7 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
8 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
9 % Free Software Foundation, Inc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
10 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
11 % This texinfo.tex file is free software; you can redistribute it and/or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
12 % modify it under the terms of the GNU General Public License as |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
13 % published by the Free Software Foundation; either version 2, or (at |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
14 % your option) any later version. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
15 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
16 % This texinfo.tex file is distributed in the hope that it will be |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
17 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
18 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
19 % General Public License for more details. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
20 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
21 % You should have received a copy of the GNU General Public License |
4404 | 22 % along with this texinfo.tex file; see the file COPYING. If not, see |
23 % <http://www.gnu.org/licenses/>. | |
1325
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
24 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
25 % In other words, you are welcome to use, share and improve this program. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
26 % You are forbidden to forbid anyone else to use, share and improve |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
27 % what you give them. Help stamp out software-hoarding! |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
28 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
29 % Please try the latest version of texinfo.tex before submitting bug |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
30 % reports; you can get the latest version from: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
31 % ftp://ftp.gnu.org/gnu/texinfo.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
32 % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
33 % ftp://texinfo.org/tex/texinfo.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
34 % ftp://us.ctan.org/macros/texinfo/texinfo.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
35 % (and all CTAN mirrors, finger ctan@us.ctan.org for a list). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
36 % /home/gd/gnu/doc/texinfo.tex on the GNU machines. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
37 % The texinfo.tex in any given Texinfo distribution could well be out |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
38 % of date, so if that's what you're using, please check. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
39 % Texinfo has a small home page at http://texinfo.org/. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
40 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
41 % Send bug reports to bug-texinfo@gnu.org. Please include including a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
42 % complete document in each bug report with which we can reproduce the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
43 % problem. Patches are, of course, greatly appreciated. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
44 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
45 % To process a Texinfo manual with TeX, it's most reliable to use the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
46 % texi2dvi shell script that comes with the distribution. For a simple |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
47 % manual foo.texi, however, you can get away with this: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
48 % tex foo.texi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
49 % texindex foo.?? |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
50 % tex foo.texi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
51 % tex foo.texi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
52 % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
53 % The extra runs of TeX get the cross-reference information correct. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
54 % Sometimes one run after texindex suffices, and sometimes you need more |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
55 % than two; texi2dvi does it as many times as necessary. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
56 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
57 % It is possible to adapt texinfo.tex for other languages. You can get |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
58 % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
59 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
60 \message{Loading texinfo [version \texinfoversion]:} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
61 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
62 % If in a .fmt file, print the version number |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
63 % and turn on active characters that we couldn't do earlier because |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
64 % they might have appeared in the input file name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
65 \everyjob{\message{[Texinfo version \texinfoversion]}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
66 \catcode`+=\active \catcode`\_=\active} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
67 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
68 % Save some parts of plain tex whose names we will redefine. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
69 \let\ptexb=\b |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
70 \let\ptexbullet=\bullet |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
71 \let\ptexc=\c |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
72 \let\ptexcomma=\, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
73 \let\ptexdot=\. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
74 \let\ptexdots=\dots |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
75 \let\ptexend=\end |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
76 \let\ptexequiv=\equiv |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
77 \let\ptexexclam=\! |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
78 \let\ptexi=\i |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
79 \let\ptexlbrace=\{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
80 \let\ptexrbrace=\} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
81 \let\ptexstar=\* |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
82 \let\ptext=\t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
83 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
84 % We never want plain's outer \+ definition in Texinfo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
85 % For @tex, we can use \tabalign. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
86 \let\+ = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
87 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
88 \message{Basics,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
89 \chardef\other=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
90 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
91 % If this character appears in an error message or help string, it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
92 % starts a new line in the output. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
93 \newlinechar = `^^J |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
94 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
95 % Set up fixed words for English if not already set. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
96 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
97 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
98 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
99 \ifx\putwordin\undefined \gdef\putwordin{in}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
100 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
101 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
102 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
103 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
104 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
105 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
106 \ifx\putwordof\undefined \gdef\putwordof{of}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
107 \ifx\putwordon\undefined \gdef\putwordon{on}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
108 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
109 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
110 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
111 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
112 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
113 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
114 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
115 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
116 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
117 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
118 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
119 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
120 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
121 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
122 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
123 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
124 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
125 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
126 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
127 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
128 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
129 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
130 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
131 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
132 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
133 \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
134 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
135 \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
136 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
137 % Ignore a token. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
138 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
139 \def\gobble#1{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
140 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
141 \hyphenation{ap-pen-dix} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
142 \hyphenation{mini-buf-fer mini-buf-fers} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
143 \hyphenation{eshell} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
144 \hyphenation{white-space} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
145 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
146 % Margin to add to right of even pages, to left of odd pages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
147 \newdimen \bindingoffset |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
148 \newdimen \normaloffset |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
149 \newdimen\pagewidth \newdimen\pageheight |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
150 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
151 % Sometimes it is convenient to have everything in the transcript file |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
152 % and nothing on the terminal. We don't just call \tracingall here, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
153 % since that produces some useless output on the terminal. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
154 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
155 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
156 \ifx\eTeXversion\undefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
157 \def\loggingall{\tracingcommands2 \tracingstats2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
158 \tracingpages1 \tracingoutput1 \tracinglostchars1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
159 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
160 \showboxbreadth\maxdimen\showboxdepth\maxdimen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
161 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
162 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
163 \def\loggingall{\tracingcommands3 \tracingstats2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
164 \tracingpages1 \tracingoutput1 \tracinglostchars1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
165 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
166 \tracingscantokens1 \tracingassigns1 \tracingifs1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
167 \tracinggroups1 \tracingnesting2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
168 \showboxbreadth\maxdimen\showboxdepth\maxdimen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
169 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
170 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
171 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
172 % For @cropmarks command. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
173 % Do @cropmarks to get crop marks. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
174 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
175 \newif\ifcropmarks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
176 \let\cropmarks = \cropmarkstrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
177 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
178 % Dimensions to add cropmarks at corners. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
179 % Added by P. A. MacKay, 12 Nov. 1986 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
180 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
181 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
182 \newdimen\cornerlong \cornerlong=1pc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
183 \newdimen\cornerthick \cornerthick=.3pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
184 \newdimen\topandbottommargin \topandbottommargin=.75in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
185 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
186 % Main output routine. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
187 \chardef\PAGE = 255 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
188 \output = {\onepageout{\pagecontents\PAGE}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
189 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
190 \newbox\headlinebox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
191 \newbox\footlinebox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
192 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
193 % \onepageout takes a vbox as an argument. Note that \pagecontents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
194 % does insertions, but you have to call it yourself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
195 \def\onepageout#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
196 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
197 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
198 \ifodd\pageno \advance\hoffset by \bindingoffset |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
199 \else \advance\hoffset by -\bindingoffset\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
200 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
201 % Do this outside of the \shipout so @code etc. will be expanded in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
202 % the headline as they should be, not taken literally (outputting ''code). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
203 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
204 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
205 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
206 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
207 % Have to do this stuff outside the \shipout because we want it to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
208 % take effect in \write's, yet the group defined by the \vbox ends |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
209 % before the \shipout runs. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
210 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
211 \escapechar = `\\ % use backslash in output files. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
212 \indexdummies % don't expand commands in the output. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
213 \normalturnoffactive % \ in index entries must not stay \, e.g., if |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
214 % the page break happens to be in the middle of an example. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
215 \shipout\vbox{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
216 \ifcropmarks \vbox to \outervsize\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
217 \hsize = \outerhsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
218 \vskip-\topandbottommargin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
219 \vtop to0pt{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
220 \line{\ewtop\hfil\ewtop}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
221 \nointerlineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
222 \line{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
223 \vbox{\moveleft\cornerthick\nstop}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
224 \hfill |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
225 \vbox{\moveright\cornerthick\nstop}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
226 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
227 \vss}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
228 \vskip\topandbottommargin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
229 \line\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
230 \hfil % center the page within the outer (page) hsize. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
231 \ifodd\pageno\hskip\bindingoffset\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
232 \vbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
233 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
234 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
235 \unvbox\headlinebox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
236 \pagebody{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
237 \ifdim\ht\footlinebox > 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
238 % Only leave this space if the footline is nonempty. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
239 % (We lessened \vsize for it in \oddfootingxxx.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
240 % The \baselineskip=24pt in plain's \makefootline has no effect. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
241 \vskip 2\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
242 \unvbox\footlinebox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
243 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
244 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
245 \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
246 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
247 \ifcropmarks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
248 \egroup % end of \vbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
249 \hfil\egroup % end of (centering) \line\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
250 \vskip\topandbottommargin plus1fill minus1fill |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
251 \boxmaxdepth = \cornerthick |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
252 \vbox to0pt{\vss |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
253 \line{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
254 \vbox{\moveleft\cornerthick\nsbot}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
255 \hfill |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
256 \vbox{\moveright\cornerthick\nsbot}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
257 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
258 \nointerlineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
259 \line{\ewbot\hfil\ewbot}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
260 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
261 \egroup % \vbox from first cropmarks clause |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
262 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
263 }% end of \shipout\vbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
264 }% end of group with \turnoffactive |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
265 \advancepageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
266 \ifnum\outputpenalty>-20000 \else\dosupereject\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
267 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
268 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
269 \newinsert\margin \dimen\margin=\maxdimen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
270 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
271 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
272 {\catcode`\@ =11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
273 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
274 % marginal hacks, juha@viisa.uucp (Juha Takala) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
275 \ifvoid\margin\else % marginal info is present |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
276 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
277 \dimen@=\dp#1 \unvbox#1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
278 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
279 \ifr@ggedbottom \kern-\dimen@ \vfil \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
280 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
281 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
282 % Here are the rules for the cropmarks. Note that they are |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
283 % offset so that the space between them is truly \outerhsize or \outervsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
284 % (P. A. MacKay, 12 November, 1986) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
285 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
286 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
287 \def\nstop{\vbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
288 {\hrule height\cornerthick depth\cornerlong width\cornerthick}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
289 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
290 \def\nsbot{\vbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
291 {\hrule height\cornerlong depth\cornerthick width\cornerthick}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
292 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
293 % Parse an argument, then pass it to #1. The argument is the rest of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
294 % the input line (except we remove a trailing comment). #1 should be a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
295 % macro which expects an ordinary undelimited TeX argument. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
296 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
297 \def\parsearg#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
298 \let\next = #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
299 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
300 \obeylines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
301 \futurelet\temp\parseargx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
302 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
303 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
304 % If the next token is an obeyed space (from an @example environment or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
305 % the like), remove it and recurse. Otherwise, we're done. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
306 \def\parseargx{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
307 % \obeyedspace is defined far below, after the definition of \sepspaces. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
308 \ifx\obeyedspace\temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
309 \expandafter\parseargdiscardspace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
310 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
311 \expandafter\parseargline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
312 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
313 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
314 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
315 % Remove a single space (as the delimiter token to the macro call). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
316 {\obeyspaces % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
317 \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
318 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
319 {\obeylines % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
320 \gdef\parseargline#1^^M{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
321 \endgroup % End of the group started in \parsearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
322 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
323 % First remove any @c comment, then any @comment. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
324 % Result of each macro is put in \toks0. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
325 \argremovec #1\c\relax % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
326 \expandafter\argremovecomment \the\toks0 \comment\relax % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
327 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
328 % Call the caller's macro, saved as \next in \parsearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
329 \expandafter\next\expandafter{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
330 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
331 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
332 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
333 % Since all \c{,omment} does is throw away the argument, we can let TeX |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
334 % do that for us. The \relax here is matched by the \relax in the call |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
335 % in \parseargline; it could be more or less anything, its purpose is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
336 % just to delimit the argument to the \c. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
337 \def\argremovec#1\c#2\relax{\toks0 = {#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
338 \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
339 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
340 % \argremovec{,omment} might leave us with trailing spaces, though; e.g., |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
341 % @end itemize @c foo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
342 % will have two active spaces as part of the argument with the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
343 % `itemize'. Here we remove all active spaces from #1, and assign the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
344 % result to \toks0. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
345 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
346 % This loses if there are any *other* active characters besides spaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
347 % in the argument -- _ ^ +, for example -- since they get expanded. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
348 % Fortunately, Texinfo does not define any such commands. (If it ever |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
349 % does, the catcode of the characters in questionwill have to be changed |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
350 % here.) But this means we cannot call \removeactivespaces as part of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
351 % \argremovec{,omment}, since @c uses \parsearg, and thus the argument |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
352 % that \parsearg gets might well have any character at all in it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
353 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
354 \def\removeactivespaces#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
355 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
356 \ignoreactivespaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
357 \edef\temp{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
358 \global\toks0 = \expandafter{\temp}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
359 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
360 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
361 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
362 % Change the active space to expand to nothing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
363 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
364 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
365 \obeyspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
366 \gdef\ignoreactivespaces{\obeyspaces\let =\empty} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
367 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
368 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
369 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
370 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
371 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
372 %% These are used to keep @begin/@end levels from running away |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
373 %% Call \inENV within environments (after a \begingroup) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
374 \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
375 \def\ENVcheck{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
376 \ifENV\errmessage{Still within an environment; press RETURN to continue} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
377 \endgroup\fi} % This is not perfect, but it should reduce lossage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
378 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
379 % @begin foo is the same as @foo, for now. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
380 \newhelp\EMsimple{Press RETURN to continue.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
381 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
382 \outer\def\begin{\parsearg\beginxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
383 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
384 \def\beginxxx #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
385 \expandafter\ifx\csname #1\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
386 {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
387 \csname #1\endcsname\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
388 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
389 % @end foo executes the definition of \Efoo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
390 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
391 \def\end{\parsearg\endxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
392 \def\endxxx #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
393 \removeactivespaces{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
394 \edef\endthing{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
395 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
396 \expandafter\ifx\csname E\endthing\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
397 \expandafter\ifx\csname \endthing\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
398 % There's no \foo, i.e., no ``environment'' foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
399 \errhelp = \EMsimple |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
400 \errmessage{Undefined command `@end \endthing'}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
401 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
402 \unmatchedenderror\endthing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
403 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
404 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
405 % Everything's ok; the right environment has been started. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
406 \csname E\endthing\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
407 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
408 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
409 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
410 % There is an environment #1, but it hasn't been started. Give an error. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
411 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
412 \def\unmatchedenderror#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
413 \errhelp = \EMsimple |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
414 \errmessage{This `@end #1' doesn't have a matching `@#1'}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
415 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
416 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
417 % Define the control sequence \E#1 to give an unmatched @end error. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
418 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
419 \def\defineunmatchedend#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
420 \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
421 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
422 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
423 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
424 % Single-spacing is done by various environments (specifically, in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
425 % \nonfillstart and \quotations). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
426 \newskip\singlespaceskip \singlespaceskip = 12.5pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
427 \def\singlespace{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
428 % Why was this kern here? It messes up equalizing space above and below |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
429 % environments. --karl, 6may93 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
430 %{\advance \baselineskip by -\singlespaceskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
431 %\kern \baselineskip}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
432 \setleading \singlespaceskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
433 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
434 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
435 %% Simple single-character @ commands |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
436 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
437 % @@ prints an @ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
438 % Kludge this until the fonts are right (grr). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
439 \def\@{{\tt\char64}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
440 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
441 % This is turned off because it was never documented |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
442 % and you can use @w{...} around a quote to suppress ligatures. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
443 %% Define @` and @' to be the same as ` and ' |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
444 %% but suppressing ligatures. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
445 %\def\`{{`}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
446 %\def\'{{'}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
447 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
448 % Used to generate quoted braces. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
449 \def\mylbrace {{\tt\char123}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
450 \def\myrbrace {{\tt\char125}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
451 \let\{=\mylbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
452 \let\}=\myrbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
453 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
454 % Definitions to produce actual \{ & \} command in an index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
455 \catcode`\{ = 12 \catcode`\} = 12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
456 \catcode`\[ = 1 \catcode`\] = 2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
457 \catcode`\@ = 0 \catcode`\\ = 12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
458 @gdef@lbracecmd[\{]% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
459 @gdef@rbracecmd[\}]% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
460 @endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
461 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
462 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
463 % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
464 \let\, = \c |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
465 \let\dotaccent = \. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
466 \def\ringaccent#1{{\accent23 #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
467 \let\tieaccent = \t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
468 \let\ubaraccent = \b |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
469 \let\udotaccent = \d |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
470 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
471 % Other special characters: @questiondown @exclamdown |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
472 % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
473 \def\questiondown{?`} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
474 \def\exclamdown{!`} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
475 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
476 % Dotless i and dotless j, used for accents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
477 \def\imacro{i} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
478 \def\jmacro{j} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
479 \def\dotless#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
480 \def\temp{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
481 \ifx\temp\imacro \ptexi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
482 \else\ifx\temp\jmacro \j |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
483 \else \errmessage{@dotless can be used only with i or j}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
484 \fi\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
485 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
486 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
487 % Be sure we're in horizontal mode when doing a tie, since we make space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
488 % equivalent to this in @example-like environments. Otherwise, a space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
489 % at the beginning of a line will start with \penalty -- and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
490 % since \penalty is valid in vertical mode, we'd end up putting the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
491 % penalty on the vertical list instead of in the new paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
492 {\catcode`@ = 11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
493 % Avoid using \@M directly, because that causes trouble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
494 % if the definition is written into an index file. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
495 \global\let\tiepenalty = \@M |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
496 \gdef\tie{\leavevmode\penalty\tiepenalty\ } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
497 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
498 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
499 % @: forces normal size whitespace following. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
500 \def\:{\spacefactor=1000 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
501 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
502 % @* forces a line break. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
503 \def\*{\hfil\break\hbox{}\ignorespaces} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
504 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
505 % @. is an end-of-sentence period. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
506 \def\.{.\spacefactor=3000 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
507 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
508 % @! is an end-of-sentence bang. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
509 \def\!{!\spacefactor=3000 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
510 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
511 % @? is an end-of-sentence query. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
512 \def\?{?\spacefactor=3000 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
513 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
514 % @w prevents a word break. Without the \leavevmode, @w at the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
515 % beginning of a paragraph, when TeX is still in vertical mode, would |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
516 % produce a whole line of output instead of starting the paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
517 \def\w#1{\leavevmode\hbox{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
518 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
519 % @group ... @end group forces ... to be all on one page, by enclosing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
520 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
521 % to keep its height that of a normal line. According to the rules for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
522 % \topskip (p.114 of the TeXbook), the glue inserted is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
523 % max (\topskip - \ht (first item), 0). If that height is large, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
524 % therefore, no glue is inserted, and the space between the headline and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
525 % the text is small, which looks bad. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
526 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
527 \def\group{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
528 \ifnum\catcode13=\active \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
529 \errhelp = \groupinvalidhelp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
530 \errmessage{@group invalid in context where filling is enabled}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
531 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
532 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
533 % The \vtop we start below produces a box with normal height and large |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
534 % depth; thus, TeX puts \baselineskip glue before it, and (when the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
535 % next line of text is done) \lineskip glue after it. (See p.82 of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
536 % the TeXbook.) Thus, space below is not quite equal to space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
537 % above. But it's pretty close. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
538 \def\Egroup{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
539 \egroup % End the \vtop. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
540 \endgroup % End the \group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
541 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
542 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
543 \vtop\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
544 % We have to put a strut on the last line in case the @group is in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
545 % the midst of an example, rather than completely enclosing it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
546 % Otherwise, the interline space between the last line of the group |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
547 % and the first line afterwards is too small. But we can't put the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
548 % strut in \Egroup, since there it would be on a line by itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
549 % Hence this just inserts a strut at the beginning of each line. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
550 \everypar = {\strut}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
551 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
552 % Since we have a strut on every line, we don't need any of TeX's |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
553 % normal interline spacing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
554 \offinterlineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
555 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
556 % OK, but now we have to do something about blank |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
557 % lines in the input in @example-like environments, which normally |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
558 % just turn into \lisppar, which will insert no space now that we've |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
559 % turned off the interline space. Simplest is to make them be an |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
560 % empty paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
561 \ifx\par\lisppar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
562 \edef\par{\leavevmode \par}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
563 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
564 % Reset ^^M's definition to new definition of \par. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
565 \obeylines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
566 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
567 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
568 % Do @comment since we are called inside an environment such as |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
569 % @example, where each end-of-line in the input causes an |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
570 % end-of-line in the output. We don't want the end-of-line after |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
571 % the `@group' to put extra space in the output. Since @group |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
572 % should appear on a line by itself (according to the Texinfo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
573 % manual), we don't worry about eating any user text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
574 \comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
575 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
576 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
577 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
578 % message, so this ends up printing `@group can only ...'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
579 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
580 \newhelp\groupinvalidhelp{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
581 group can only be used in environments such as @example,^^J% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
582 where each line of input produces a line of output.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
583 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
584 % @need space-in-mils |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
585 % forces a page break if there is not space-in-mils remaining. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
586 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
587 \newdimen\mil \mil=0.001in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
588 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
589 \def\need{\parsearg\needx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
590 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
591 % Old definition--didn't work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
592 %\def\needx #1{\par % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
593 %% This method tries to make TeX break the page naturally |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
594 %% if the depth of the box does not fit. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
595 %{\baselineskip=0pt% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
596 %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
597 %\prevdepth=-1000pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
598 %}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
599 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
600 \def\needx#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
601 % Ensure vertical mode, so we don't make a big box in the middle of a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
602 % paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
603 \par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
604 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
605 % If the @need value is less than one line space, it's useless. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
606 \dimen0 = #1\mil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
607 \dimen2 = \ht\strutbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
608 \advance\dimen2 by \dp\strutbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
609 \ifdim\dimen0 > \dimen2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
610 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
611 % Do a \strut just to make the height of this box be normal, so the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
612 % normal leading is inserted relative to the preceding line. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
613 % And a page break here is fine. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
614 \vtop to #1\mil{\strut\vfil}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
615 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
616 % TeX does not even consider page breaks if a penalty added to the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
617 % main vertical list is 10000 or more. But in order to see if the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
618 % empty box we just added fits on the page, we must make it consider |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
619 % page breaks. On the other hand, we don't want to actually break the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
620 % page after the empty box. So we use a penalty of 9999. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
621 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
622 % There is an extremely small chance that TeX will actually break the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
623 % page at this \penalty, if there are no other feasible breakpoints in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
624 % sight. (If the user is using lots of big @group commands, which |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
625 % almost-but-not-quite fill up a page, TeX will have a hard time doing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
626 % good page breaking, for example.) However, I could not construct an |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
627 % example where a page broke at this \penalty; if it happens in a real |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
628 % document, then we can reconsider our strategy. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
629 \penalty9999 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
630 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
631 % Back up by the size of the box, whether we did a page break or not. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
632 \kern -#1\mil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
633 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
634 % Do not allow a page break right after this kern. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
635 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
636 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
637 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
638 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
639 % @br forces paragraph break |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
640 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
641 \let\br = \par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
642 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
643 % @dots{} output an ellipsis using the current font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
644 % We do .5em per period so that it has the same spacing in a typewriter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
645 % font as three actual period characters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
646 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
647 \def\dots{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
648 \leavevmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
649 \hbox to 1.5em{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
650 \hskip 0pt plus 0.25fil minus 0.25fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
651 .\hss.\hss.% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
652 \hskip 0pt plus 0.5fil minus 0.5fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
653 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
654 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
655 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
656 % @enddots{} is an end-of-sentence ellipsis. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
657 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
658 \def\enddots{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
659 \leavevmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
660 \hbox to 2em{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
661 \hskip 0pt plus 0.25fil minus 0.25fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
662 .\hss.\hss.\hss.% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
663 \hskip 0pt plus 0.5fil minus 0.5fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
664 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
665 \spacefactor=3000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
666 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
667 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
668 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
669 % @page forces the start of a new page |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
670 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
671 \def\page{\par\vfill\supereject} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
672 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
673 % @exdent text.... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
674 % outputs text on separate line in roman font, starting at standard page margin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
675 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
676 % This records the amount of indent in the innermost environment. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
677 % That's how much \exdent should take out. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
678 \newskip\exdentamount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
679 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
680 % This defn is used inside fill environments such as @defun. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
681 \def\exdent{\parsearg\exdentyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
682 \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
683 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
684 % This defn is used inside nofill environments such as @example. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
685 \def\nofillexdent{\parsearg\nofillexdentyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
686 \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
687 \leftline{\hskip\leftskip{\rm#1}}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
688 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
689 % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
690 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
691 \def\inmargin#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
692 \strut\vadjust{\nobreak\kern-\strutdepth |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
693 \vtop to \strutdepth{\baselineskip\strutdepth\vss |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
694 \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
695 \newskip\inmarginspacing \inmarginspacing=1cm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
696 \def\strutdepth{\dp\strutbox} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
697 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
698 %\hbox{{\rm#1}}\hfil\break}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
699 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
700 % @include file insert text of that file as input. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
701 % Allow normal characters that we make active in the argument (a file name). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
702 \def\include{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
703 \catcode`\\=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
704 \catcode`~=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
705 \catcode`^=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
706 \catcode`_=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
707 \catcode`|=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
708 \catcode`<=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
709 \catcode`>=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
710 \catcode`+=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
711 \parsearg\includezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
712 % Restore active chars for included file. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
713 \def\includezzz#1{\endgroup\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
714 % Read the included file in a group so nested @include's work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
715 \def\thisfile{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
716 \input\thisfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
717 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
718 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
719 \def\thisfile{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
720 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
721 % @center line outputs that line, centered |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
722 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
723 \def\center{\parsearg\centerzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
724 \def\centerzzz #1{{\advance\hsize by -\leftskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
725 \advance\hsize by -\rightskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
726 \centerline{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
727 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
728 % @sp n outputs n lines of vertical space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
729 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
730 \def\sp{\parsearg\spxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
731 \def\spxxx #1{\vskip #1\baselineskip} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
732 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
733 % @comment ...line which is ignored... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
734 % @c is the same as @comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
735 % @ignore ... @end ignore is another way to write a comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
736 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
737 \def\comment{\begingroup \catcode`\^^M=\other% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
738 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
739 \commentxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
740 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
741 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
742 \let\c=\comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
743 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
744 % @paragraphindent NCHARS |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
745 % We'll use ems for NCHARS, close enough. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
746 % We cannot implement @paragraphindent asis, though. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
747 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
748 \def\asisword{asis} % no translation, these are keywords |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
749 \def\noneword{none} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
750 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
751 \def\paragraphindent{\parsearg\doparagraphindent} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
752 \def\doparagraphindent#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
753 \def\temp{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
754 \ifx\temp\asisword |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
755 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
756 \ifx\temp\noneword |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
757 \defaultparindent = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
758 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
759 \defaultparindent = #1em |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
760 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
761 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
762 \parindent = \defaultparindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
763 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
764 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
765 % @exampleindent NCHARS |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
766 % We'll use ems for NCHARS like @paragraphindent. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
767 % It seems @exampleindent asis isn't necessary, but |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
768 % I preserve it to make it similar to @paragraphindent. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
769 \def\exampleindent{\parsearg\doexampleindent} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
770 \def\doexampleindent#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
771 \def\temp{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
772 \ifx\temp\asisword |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
773 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
774 \ifx\temp\noneword |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
775 \lispnarrowing = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
776 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
777 \lispnarrowing = #1em |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
778 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
779 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
780 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
781 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
782 % @asis just yields its argument. Used with @table, for example. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
783 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
784 \def\asis#1{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
785 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
786 % @math means output in math mode. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
787 % We don't use $'s directly in the definition of \math because control |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
788 % sequences like \math are expanded when the toc file is written. Then, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
789 % we read the toc file back, the $'s will be normal characters (as they |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
790 % should be, according to the definition of Texinfo). So we must use a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
791 % control sequence to switch into and out of math mode. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
792 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
793 % This isn't quite enough for @math to work properly in indices, but it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
794 % seems unlikely it will ever be needed there. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
795 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
796 \let\implicitmath = $ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
797 \def\math#1{\implicitmath #1\implicitmath} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
798 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
799 % @bullet and @minus need the same treatment as @math, just above. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
800 \def\bullet{\implicitmath\ptexbullet\implicitmath} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
801 \def\minus{\implicitmath-\implicitmath} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
802 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
803 % @refill is a no-op. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
804 \let\refill=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
805 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
806 % If working on a large document in chapters, it is convenient to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
807 % be able to disable indexing, cross-referencing, and contents, for test runs. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
808 % This is done with @novalidate (before @setfilename). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
809 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
810 \newif\iflinks \linkstrue % by default we want the aux files. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
811 \let\novalidate = \linksfalse |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
812 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
813 % @setfilename is done at the beginning of every texinfo file. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
814 % So open here the files we need to have open while reading the input. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
815 % This makes it possible to make a .fmt file for texinfo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
816 \def\setfilename{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
817 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
818 \readauxfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
819 \fi % \openindices needs to do some work in any case. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
820 \openindices |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
821 \fixbackslash % Turn off hack to swallow `\input texinfo'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
822 \global\let\setfilename=\comment % Ignore extra @setfilename cmds. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
823 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
824 % If texinfo.cnf is present on the system, read it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
825 % Useful for site-wide @afourpaper, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
826 % Just to be on the safe side, close the input stream before the \input. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
827 \openin 1 texinfo.cnf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
828 \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
829 \closein1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
830 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
831 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
832 \comment % Ignore the actual filename. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
833 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
834 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
835 % Called from \setfilename. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
836 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
837 \def\openindices{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
838 \newindex{cp}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
839 \newcodeindex{fn}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
840 \newcodeindex{vr}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
841 \newcodeindex{tp}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
842 \newcodeindex{ky}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
843 \newcodeindex{pg}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
844 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
845 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
846 % @bye. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
847 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
848 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
849 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
850 \message{pdf,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
851 % adobe `portable' document format |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
852 \newcount\tempnum |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
853 \newcount\lnkcount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
854 \newtoks\filename |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
855 \newcount\filenamelength |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
856 \newcount\pgn |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
857 \newtoks\toksA |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
858 \newtoks\toksB |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
859 \newtoks\toksC |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
860 \newtoks\toksD |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
861 \newbox\boxA |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
862 \newcount\countA |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
863 \newif\ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
864 \newif\ifpdfmakepagedest |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
865 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
866 \ifx\pdfoutput\undefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
867 \pdffalse |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
868 \let\pdfmkdest = \gobble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
869 \let\pdfurl = \gobble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
870 \let\endlink = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
871 \let\linkcolor = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
872 \let\pdfmakeoutlines = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
873 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
874 \pdftrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
875 \pdfoutput = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
876 \input pdfcolor |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
877 \def\dopdfimage#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
878 \def\imagewidth{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
879 \def\imageheight{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
880 \ifnum\pdftexversion < 14 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
881 \pdfimage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
882 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
883 \pdfximage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
884 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
885 \ifx\empty\imagewidth\else width \imagewidth \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
886 \ifx\empty\imageheight\else height \imageheight \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
887 {#1.pdf}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
888 \ifnum\pdftexversion < 14 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
889 \pdfrefximage \pdflastximage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
890 \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
891 \def\pdfmkdest#1{\pdfdest name{#1@} xyz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
892 \def\pdfmkpgn#1{#1@} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
893 \let\linkcolor = \Cyan |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
894 \def\endlink{\Black\pdfendlink} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
895 % Adding outlines to PDF; macros for calculating structure of outlines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
896 % come from Petr Olsak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
897 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
898 \else \csname#1\endcsname \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
899 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
900 \advance\tempnum by1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
901 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
902 \def\pdfmakeoutlines{{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
903 \openin 1 \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
904 \ifeof 1\else\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
905 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
906 \indexnofonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
907 \def\tt{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
908 % thanh's hack / proper braces in bookmarks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
909 \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
910 \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
911 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
912 \def\chapentry ##1##2##3{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
913 \def\unnumbchapentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
914 \def\secentry ##1##2##3##4{\advancenumber{chap##2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
915 \def\unnumbsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
916 \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
917 \def\unnumbsubsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
918 \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
919 \def\unnumbsubsubsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
920 \input \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
921 \def\chapentry ##1##2##3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
922 \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
923 \def\unnumbchapentry ##1##2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
924 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
925 \def\secentry ##1##2##3##4{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
926 \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
927 \def\unnumbsecentry ##1##2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
928 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
929 \def\subsecentry ##1##2##3##4##5{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
930 \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
931 \def\unnumbsubsecentry ##1##2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
932 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
933 \def\subsubsecentry ##1##2##3##4##5##6{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
934 \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
935 \def\unnumbsubsubsecentry ##1##2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
936 \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
937 \input \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
938 \egroup\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
939 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
940 \def\makelinks #1,{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
941 \def\params{#1}\def\E{END}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
942 \ifx\params\E |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
943 \let\nextmakelinks=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
944 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
945 \let\nextmakelinks=\makelinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
946 \ifnum\lnkcount>0,\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
947 \picknum{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
948 \startlink attr{/Border [0 0 0]} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
949 goto name{\pdfmkpgn{\the\pgn}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
950 \linkcolor #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
951 \advance\lnkcount by 1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
952 \endlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
953 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
954 \nextmakelinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
955 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
956 \def\picknum#1{\expandafter\pn#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
957 \def\pn#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
958 \def\p{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
959 \ifx\p\lbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
960 \let\nextpn=\ppn |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
961 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
962 \let\nextpn=\ppnn |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
963 \def\first{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
964 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
965 \nextpn |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
966 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
967 \def\ppn#1{\pgn=#1\gobble} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
968 \def\ppnn{\pgn=\first} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
969 \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
970 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
971 \def\skipspaces#1{\def\PP{#1}\def\D{|}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
972 \ifx\PP\D\let\nextsp\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
973 \else\let\nextsp\skipspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
974 \ifx\p\space\else\addtokens{\filename}{\PP}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
975 \advance\filenamelength by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
976 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
977 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
978 \nextsp} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
979 \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
980 \ifnum\pdftexversion < 14 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
981 \let \startlink \pdfannotlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
982 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
983 \let \startlink \pdfstartlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
984 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
985 \def\pdfurl#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
986 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
987 \normalturnoffactive\def\@{@}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
988 \leavevmode\Red |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
989 \startlink attr{/Border [0 0 0]}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
990 user{/Subtype /Link /A << /S /URI /URI (#1) >>}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
991 % #1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
992 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
993 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
994 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
995 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
996 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
997 \def\maketoks{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
998 \expandafter\poptoks\the\toksA|ENDTOKS| |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
999 \ifx\first0\adn0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1000 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1001 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1002 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1003 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1004 \ifnum0=\countA\else\makelink\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1005 \ifx\first.\let\next=\done\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1006 \let\next=\maketoks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1007 \addtokens{\toksB}{\the\toksD} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1008 \ifx\first,\addtokens{\toksB}{\space}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1009 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1010 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1011 \next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1012 \def\makelink{\addtokens{\toksB}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1013 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1014 \def\pdflink#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1015 \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1016 \linkcolor #1\endlink} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1017 \def\mkpgn#1{#1@} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1018 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1019 \fi % \ifx\pdfoutput |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1020 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1021 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1022 \message{fonts,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1023 % Font-change commands. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1024 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1025 % Texinfo sort of supports the sans serif font style, which plain TeX does not. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1026 % So we set up a \sf analogous to plain's \rm, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1027 \newfam\sffam |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1028 \def\sf{\fam=\sffam \tensf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1029 \let\li = \sf % Sometimes we call it \li, not \sf. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1030 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1031 % We don't need math for this one. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1032 \def\ttsl{\tenttsl} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1033 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1034 % Use Computer Modern fonts at \magstephalf (11pt). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1035 \newcount\mainmagstep |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1036 \mainmagstep=\magstephalf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1037 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1038 % Set the font macro #1 to the font named #2, adding on the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1039 % specified font prefix (normally `cm'). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1040 % #3 is the font's design size, #4 is a scale factor |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1041 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1042 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1043 % Use cm as the default font prefix. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1044 % To specify the font prefix, you must define \fontprefix |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1045 % before you read in texinfo.tex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1046 \ifx\fontprefix\undefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1047 \def\fontprefix{cm} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1048 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1049 % Support font families that don't use the same naming scheme as CM. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1050 \def\rmshape{r} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1051 \def\rmbshape{bx} %where the normal face is bold |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1052 \def\bfshape{b} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1053 \def\bxshape{bx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1054 \def\ttshape{tt} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1055 \def\ttbshape{tt} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1056 \def\ttslshape{sltt} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1057 \def\itshape{ti} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1058 \def\itbshape{bxti} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1059 \def\slshape{sl} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1060 \def\slbshape{bxsl} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1061 \def\sfshape{ss} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1062 \def\sfbshape{ss} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1063 \def\scshape{csc} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1064 \def\scbshape{csc} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1065 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1066 \ifx\bigger\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1067 \let\mainmagstep=\magstep1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1068 \setfont\textrm\rmshape{12}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1069 \setfont\texttt\ttshape{12}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1070 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1071 \setfont\textrm\rmshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1072 \setfont\texttt\ttshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1073 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1074 % Instead of cmb10, you many want to use cmbx10. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1075 % cmbx10 is a prettier font on its own, but cmb10 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1076 % looks better when embedded in a line with cmr10. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1077 \setfont\textbf\bfshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1078 \setfont\textit\itshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1079 \setfont\textsl\slshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1080 \setfont\textsf\sfshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1081 \setfont\textsc\scshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1082 \setfont\textttsl\ttslshape{10}{\mainmagstep} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1083 \font\texti=cmmi10 scaled \mainmagstep |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1084 \font\textsy=cmsy10 scaled \mainmagstep |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1085 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1086 % A few fonts for @defun, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1087 \setfont\defbf\bxshape{10}{\magstep1} %was 1314 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1088 \setfont\deftt\ttshape{10}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1089 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1090 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1091 % Fonts for indices, footnotes, small examples (9pt). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1092 \setfont\smallrm\rmshape{9}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1093 \setfont\smalltt\ttshape{9}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1094 \setfont\smallbf\bfshape{10}{900} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1095 \setfont\smallit\itshape{9}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1096 \setfont\smallsl\slshape{9}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1097 \setfont\smallsf\sfshape{9}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1098 \setfont\smallsc\scshape{10}{900} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1099 \setfont\smallttsl\ttslshape{10}{900} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1100 \font\smalli=cmmi9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1101 \font\smallsy=cmsy9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1102 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1103 % Fonts for title page: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1104 \setfont\titlerm\rmbshape{12}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1105 \setfont\titleit\itbshape{10}{\magstep4} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1106 \setfont\titlesl\slbshape{10}{\magstep4} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1107 \setfont\titlett\ttbshape{12}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1108 \setfont\titlettsl\ttslshape{10}{\magstep4} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1109 \setfont\titlesf\sfbshape{17}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1110 \let\titlebf=\titlerm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1111 \setfont\titlesc\scbshape{10}{\magstep4} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1112 \font\titlei=cmmi12 scaled \magstep3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1113 \font\titlesy=cmsy10 scaled \magstep4 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1114 \def\authorrm{\secrm} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1115 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1116 % Chapter (and unnumbered) fonts (17.28pt). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1117 \setfont\chaprm\rmbshape{12}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1118 \setfont\chapit\itbshape{10}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1119 \setfont\chapsl\slbshape{10}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1120 \setfont\chaptt\ttbshape{12}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1121 \setfont\chapttsl\ttslshape{10}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1122 \setfont\chapsf\sfbshape{17}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1123 \let\chapbf=\chaprm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1124 \setfont\chapsc\scbshape{10}{\magstep3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1125 \font\chapi=cmmi12 scaled \magstep2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1126 \font\chapsy=cmsy10 scaled \magstep3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1127 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1128 % Section fonts (14.4pt). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1129 \setfont\secrm\rmbshape{12}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1130 \setfont\secit\itbshape{10}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1131 \setfont\secsl\slbshape{10}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1132 \setfont\sectt\ttbshape{12}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1133 \setfont\secttsl\ttslshape{10}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1134 \setfont\secsf\sfbshape{12}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1135 \let\secbf\secrm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1136 \setfont\secsc\scbshape{10}{\magstep2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1137 \font\seci=cmmi12 scaled \magstep1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1138 \font\secsy=cmsy10 scaled \magstep2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1139 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1140 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1141 % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1142 % \setfont\ssecsl\slshape{10}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1143 % \setfont\ssectt\ttshape{10}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1144 % \setfont\ssecsf\sfshape{10}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1145 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1146 %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1147 %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1148 %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1149 %\setfont\ssectt\ttshape{10}{1315} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1150 %\setfont\ssecsf\sfshape{10}{1315} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1151 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1152 %\let\ssecbf=\ssecrm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1153 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1154 % Subsection fonts (13.15pt). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1155 \setfont\ssecrm\rmbshape{12}{\magstephalf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1156 \setfont\ssecit\itbshape{10}{1315} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1157 \setfont\ssecsl\slbshape{10}{1315} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1158 \setfont\ssectt\ttbshape{12}{\magstephalf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1159 \setfont\ssecttsl\ttslshape{10}{1315} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1160 \setfont\ssecsf\sfbshape{12}{\magstephalf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1161 \let\ssecbf\ssecrm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1162 \setfont\ssecsc\scbshape{10}{\magstep1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1163 \font\sseci=cmmi12 scaled \magstephalf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1164 \font\ssecsy=cmsy10 scaled 1315 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1165 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1166 % but that is not a standard magnification. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1167 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1168 % In order for the font changes to affect most math symbols and letters, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1169 % we have to define the \textfont of the standard families. Since |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1170 % texinfo doesn't allow for producing subscripts and superscripts, we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1171 % don't bother to reset \scriptfont and \scriptscriptfont (which would |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1172 % also require loading a lot more fonts). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1173 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1174 \def\resetmathfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1175 \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1176 \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1177 \textfont\ttfam = \tentt \textfont\sffam = \tensf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1178 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1179 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1180 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1181 % The font-changing commands redefine the meanings of \tenSTYLE, instead |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1182 % of just \STYLE. We do this so that font changes will continue to work |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1183 % in math mode, where it is the current \fam that is relevant in most |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1184 % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1185 % \tenbf}, for example. By redefining \tenbf, we obviate the need to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1186 % redefine \bf itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1187 \def\textfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1188 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1189 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1190 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1191 \resetmathfonts} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1192 \def\titlefonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1193 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1194 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1195 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1196 \let\tenttsl=\titlettsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1197 \resetmathfonts \setleading{25pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1198 \def\titlefont#1{{\titlefonts\rm #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1199 \def\chapfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1200 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1201 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1202 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1203 \resetmathfonts \setleading{19pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1204 \def\secfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1205 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1206 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1207 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1208 \resetmathfonts \setleading{16pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1209 \def\subsecfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1210 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1211 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1212 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1213 \resetmathfonts \setleading{15pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1214 \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1215 \def\smallfonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1216 \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1217 \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1218 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1219 \let\tenttsl=\smallttsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1220 \resetmathfonts \setleading{11pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1221 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1222 % Set up the default fonts, so we can use them for creating boxes. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1223 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1224 \textfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1225 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1226 % Define these so they can be easily changed for other fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1227 \def\angleleft{$\langle$} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1228 \def\angleright{$\rangle$} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1229 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1230 % Count depth in font-changes, for error checks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1231 \newcount\fontdepth \fontdepth=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1232 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1233 % Fonts for short table of contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1234 \setfont\shortcontrm\rmshape{12}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1235 \setfont\shortcontbf\bxshape{12}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1236 \setfont\shortcontsl\slshape{12}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1237 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1238 %% Add scribe-like font environments, plus @l for inline lisp (usually sans |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1239 %% serif) and @ii for TeX italic |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1240 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1241 % \smartitalic{ARG} outputs arg in italics, followed by an italic correction |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1242 % unless the following character is such as not to need one. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1243 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1244 \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1245 \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1246 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1247 \let\i=\smartitalic |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1248 \let\var=\smartslanted |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1249 \let\dfn=\smartslanted |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1250 \let\emph=\smartitalic |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1251 \let\cite=\smartslanted |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1252 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1253 \def\b#1{{\bf #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1254 \let\strong=\b |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1255 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1256 % We can't just use \exhyphenpenalty, because that only has effect at |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1257 % the end of a paragraph. Restore normal hyphenation at the end of the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1258 % group within which \nohyphenation is presumably called. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1259 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1260 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1261 \def\restorehyphenation{\hyphenchar\font = `- } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1262 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1263 \def\t#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1264 {\tt \rawbackslash \frenchspacing #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1265 \null |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1266 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1267 \let\ttfont=\t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1268 \def\samp#1{`\tclose{#1}'\null} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1269 \setfont\keyrm\rmshape{8}{1000} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1270 \font\keysy=cmsy9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1271 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1272 \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1273 \vbox{\hrule\kern-0.4pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1274 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1275 \kern-0.4pt\hrule}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1276 \kern-.06em\raise0.4pt\hbox{\angleright}}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1277 % The old definition, with no lozenge: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1278 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1279 \def\ctrl #1{{\tt \rawbackslash \hat}#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1280 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1281 % @file, @option are the same as @samp. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1282 \let\file=\samp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1283 \let\option=\samp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1284 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1285 % @code is a modification of @t, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1286 % which makes spaces the same size as normal in the surrounding text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1287 \def\tclose#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1288 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1289 % Change normal interword space to be same as for the current font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1290 \spaceskip = \fontdimen2\font |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1291 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1292 % Switch to typewriter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1293 \tt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1294 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1295 % But `\ ' produces the large typewriter interword space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1296 \def\ {{\spaceskip = 0pt{} }}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1297 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1298 % Turn off hyphenation. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1299 \nohyphenation |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1300 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1301 \rawbackslash |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1302 \frenchspacing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1303 #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1304 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1305 \null |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1306 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1307 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1308 % We *must* turn on hyphenation at `-' and `_' in \code. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1309 % Otherwise, it is too hard to avoid overfull hboxes |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1310 % in the Emacs manual, the Library manual, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1311 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1312 % Unfortunately, TeX uses one parameter (\hyphenchar) to control |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1313 % both hyphenation at - and hyphenation within words. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1314 % We must therefore turn them both off (\tclose does that) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1315 % and arrange explicitly to hyphenate at a dash. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1316 % -- rms. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1317 { |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1318 \catcode`\-=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1319 \catcode`\_=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1320 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1321 \global\def\code{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1322 \catcode`\-=\active \let-\codedash |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1323 \catcode`\_=\active \let_\codeunder |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1324 \codex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1325 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1326 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1327 % If we end up with any active - characters when handling the index, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1328 % just treat them as a normal -. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1329 \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1330 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1331 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1332 \def\realdash{-} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1333 \def\codedash{-\discretionary{}{}{}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1334 \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1335 \def\codex #1{\tclose{#1}\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1336 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1337 %\let\exp=\tclose %Was temporary |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1338 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1339 % @kbd is like @code, except that if the argument is just one @key command, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1340 % then @kbd has no effect. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1341 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1342 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1343 % `example' (@kbd uses ttsl only inside of @example and friends), |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1344 % or `code' (@kbd uses normal tty font always). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1345 \def\kbdinputstyle{\parsearg\kbdinputstylexxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1346 \def\kbdinputstylexxx#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1347 \def\arg{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1348 \ifx\arg\worddistinct |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1349 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1350 \else\ifx\arg\wordexample |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1351 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1352 \else\ifx\arg\wordcode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1353 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1354 \fi\fi\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1355 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1356 \def\worddistinct{distinct} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1357 \def\wordexample{example} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1358 \def\wordcode{code} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1359 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1360 % Default is kbdinputdistinct. (Too much of a hassle to call the macro, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1361 % the catcodes are wrong for parsearg to work.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1362 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1363 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1364 \def\xkey{\key} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1365 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1366 \ifx\one\xkey\ifx\threex\three \key{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1367 \else{\tclose{\kbdfont\look}}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1368 \else{\tclose{\kbdfont\look}}\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1369 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1370 % For @url, @env, @command quotes seem unnecessary, so use \code. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1371 \let\url=\code |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1372 \let\env=\code |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1373 \let\command=\code |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1374 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1375 % @uref (abbreviation for `urlref') takes an optional (comma-separated) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1376 % second argument specifying the text to display and an optional third |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1377 % arg as text to display instead of (rather than in addition to) the url |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1378 % itself. First (mandatory) arg is the url. Perhaps eventually put in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1379 % a hypertex \special here. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1380 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1381 \def\uref#1{\douref #1,,,\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1382 \def\douref#1,#2,#3,#4\finish{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1383 \unsepspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1384 \pdfurl{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1385 \setbox0 = \hbox{\ignorespaces #3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1386 \ifdim\wd0 > 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1387 \unhbox0 % third arg given, show only that |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1388 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1389 \setbox0 = \hbox{\ignorespaces #2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1390 \ifdim\wd0 > 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1391 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1392 \unhbox0 % PDF: 2nd arg given, show only it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1393 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1394 \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1395 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1396 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1397 \code{#1}% only url given, so show it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1398 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1399 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1400 \endlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1401 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1402 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1403 % rms does not like angle brackets --karl, 17may97. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1404 % So now @email is just like @uref, unless we are pdf. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1405 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1406 %\def\email#1{\angleleft{\tt #1}\angleright} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1407 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1408 \def\email#1{\doemail#1,,\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1409 \def\doemail#1,#2,#3\finish{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1410 \unsepspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1411 \pdfurl{mailto:#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1412 \setbox0 = \hbox{\ignorespaces #2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1413 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1414 \endlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1415 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1416 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1417 \let\email=\uref |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1418 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1419 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1420 % Check if we are currently using a typewriter font. Since all the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1421 % Computer Modern typewriter fonts have zero interword stretch (and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1422 % shrink), and it is reasonable to expect all typewriter fonts to have |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1423 % this property, we can check that font parameter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1424 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1425 \def\ifmonospace{\ifdim\fontdimen3\font=0pt } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1426 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1427 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1428 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1429 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1430 \def\dmn#1{\thinspace #1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1431 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1432 \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1433 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1434 % @l was never documented to mean ``switch to the Lisp font'', |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1435 % and it is not used as such in any manual I can find. We need it for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1436 % Polish suppressed-l. --karl, 22sep96. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1437 %\def\l#1{{\li #1}\null} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1438 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1439 % Explicit font changes: @r, @sc, undocumented @ii. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1440 \def\r#1{{\rm #1}} % roman font |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1441 \def\sc#1{{\smallcaps#1}} % smallcaps font |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1442 \def\ii#1{{\it #1}} % italic font |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1443 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1444 % @acronym downcases the argument and prints in smallcaps. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1445 \def\acronym#1{{\smallcaps \lowercase{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1446 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1447 % @pounds{} is a sterling sign. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1448 \def\pounds{{\it\$}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1449 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1450 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1451 \message{page headings,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1452 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1453 \newskip\titlepagetopglue \titlepagetopglue = 1.5in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1454 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1455 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1456 % First the title page. Must do @settitle before @titlepage. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1457 \newif\ifseenauthor |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1458 \newif\iffinishedtitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1459 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1460 % Do an implicit @contents or @shortcontents after @end titlepage if the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1461 % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1462 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1463 \newif\ifsetcontentsaftertitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1464 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1465 \newif\ifsetshortcontentsaftertitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1466 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1467 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1468 \def\shorttitlepage{\parsearg\shorttitlepagezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1469 \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1470 \endgroup\page\hbox{}\page} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1471 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1472 \def\titlepage{\begingroup \parindent=0pt \textfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1473 \let\subtitlerm=\tenrm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1474 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1475 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1476 \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1477 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1478 % Leave some space at the very top of the page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1479 \vglue\titlepagetopglue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1480 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1481 % Now you can print the title using @title. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1482 \def\title{\parsearg\titlezzz}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1483 \def\titlezzz##1{\leftline{\titlefonts\rm ##1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1484 % print a rule at the page bottom also. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1485 \finishedtitlepagefalse |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1486 \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1487 % No rule at page bottom unless we print one at the top with @title. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1488 \finishedtitlepagetrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1489 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1490 % Now you can put text using @subtitle. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1491 \def\subtitle{\parsearg\subtitlezzz}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1492 \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1493 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1494 % @author should come last, but may come many times. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1495 \def\author{\parsearg\authorzzz}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1496 \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1497 {\authorfont \leftline{##1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1498 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1499 % Most title ``pages'' are actually two pages long, with space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1500 % at the top of the second. We don't want the ragged left on the second. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1501 \let\oldpage = \page |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1502 \def\page{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1503 \iffinishedtitlepage\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1504 \finishtitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1505 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1506 \oldpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1507 \let\page = \oldpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1508 \hbox{}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1509 % \def\page{\oldpage \hbox{}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1510 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1511 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1512 \def\Etitlepage{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1513 \iffinishedtitlepage\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1514 \finishtitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1515 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1516 % It is important to do the page break before ending the group, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1517 % because the headline and footline are only empty inside the group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1518 % If we use the new definition of \page, we always get a blank page |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1519 % after the title page, which we certainly don't want. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1520 \oldpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1521 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1522 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1523 % If they want short, they certainly want long too. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1524 \ifsetshortcontentsaftertitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1525 \shortcontents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1526 \contents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1527 \global\let\shortcontents = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1528 \global\let\contents = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1529 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1530 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1531 \ifsetcontentsaftertitlepage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1532 \contents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1533 \global\let\contents = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1534 \global\let\shortcontents = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1535 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1536 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1537 \ifpdf \pdfmakepagedesttrue \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1538 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1539 \HEADINGSon |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1540 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1541 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1542 \def\finishtitlepage{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1543 \vskip4pt \hrule height 2pt width \hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1544 \vskip\titlepagebottomglue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1545 \finishedtitlepagetrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1546 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1547 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1548 %%% Set up page headings and footings. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1549 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1550 \let\thispage=\folio |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1551 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1552 \newtoks\evenheadline % headline on even pages |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1553 \newtoks\oddheadline % headline on odd pages |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1554 \newtoks\evenfootline % footline on even pages |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1555 \newtoks\oddfootline % footline on odd pages |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1556 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1557 % Now make Tex use those variables |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1558 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1559 \else \the\evenheadline \fi}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1560 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1561 \else \the\evenfootline \fi}\HEADINGShook} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1562 \let\HEADINGShook=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1563 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1564 % Commands to set those variables. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1565 % For example, this is what @headings on does |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1566 % @evenheading @thistitle|@thispage|@thischapter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1567 % @oddheading @thischapter|@thispage|@thistitle |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1568 % @evenfooting @thisfile|| |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1569 % @oddfooting ||@thisfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1570 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1571 \def\evenheading{\parsearg\evenheadingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1572 \def\oddheading{\parsearg\oddheadingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1573 \def\everyheading{\parsearg\everyheadingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1574 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1575 \def\evenfooting{\parsearg\evenfootingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1576 \def\oddfooting{\parsearg\oddfootingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1577 \def\everyfooting{\parsearg\everyfootingxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1578 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1579 {\catcode`\@=0 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1580 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1581 \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1582 \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1583 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1584 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1585 \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1586 \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1587 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1588 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1589 \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1590 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1591 \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1592 \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1593 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1594 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1595 \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1596 \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1597 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1598 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1599 % Leave some space for the footline. Hopefully ok to assume |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1600 % @evenfooting will not be used by itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1601 \global\advance\pageheight by -\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1602 \global\advance\vsize by -\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1603 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1604 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1605 \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1606 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1607 }% unbind the catcode of @. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1608 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1609 % @headings double turns headings on for double-sided printing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1610 % @headings single turns headings on for single-sided printing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1611 % @headings off turns them off. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1612 % @headings on same as @headings double, retained for compatibility. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1613 % @headings after turns on double-sided headings after this page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1614 % @headings doubleafter turns on double-sided headings after this page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1615 % @headings singleafter turns on single-sided headings after this page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1616 % By default, they are off at the start of a document, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1617 % and turned `on' after @end titlepage. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1618 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1619 \def\headings #1 {\csname HEADINGS#1\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1620 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1621 \def\HEADINGSoff{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1622 \global\evenheadline={\hfil} \global\evenfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1623 \global\oddheadline={\hfil} \global\oddfootline={\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1624 \HEADINGSoff |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1625 % When we turn headings on, set the page number to 1. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1626 % For double-sided printing, put current file name in lower left corner, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1627 % chapter name on inside top of right hand pages, document |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1628 % title on inside top of left hand pages, and page numbers on outside top |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1629 % edge of all pages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1630 \def\HEADINGSdouble{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1631 \global\pageno=1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1632 \global\evenfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1633 \global\oddfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1634 \global\evenheadline={\line{\folio\hfil\thistitle}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1635 \global\oddheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1636 \global\let\contentsalignmacro = \chapoddpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1637 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1638 \let\contentsalignmacro = \chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1639 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1640 % For single-sided printing, chapter title goes across top left of page, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1641 % page number on top right. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1642 \def\HEADINGSsingle{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1643 \global\pageno=1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1644 \global\evenfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1645 \global\oddfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1646 \global\evenheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1647 \global\oddheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1648 \global\let\contentsalignmacro = \chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1649 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1650 \def\HEADINGSon{\HEADINGSdouble} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1651 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1652 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1653 \let\HEADINGSdoubleafter=\HEADINGSafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1654 \def\HEADINGSdoublex{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1655 \global\evenfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1656 \global\oddfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1657 \global\evenheadline={\line{\folio\hfil\thistitle}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1658 \global\oddheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1659 \global\let\contentsalignmacro = \chapoddpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1660 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1661 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1662 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1663 \def\HEADINGSsinglex{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1664 \global\evenfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1665 \global\oddfootline={\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1666 \global\evenheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1667 \global\oddheadline={\line{\thischapter\hfil\folio}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1668 \global\let\contentsalignmacro = \chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1669 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1670 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1671 % Subroutines used in generating headings |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1672 % Produces Day Month Year style of output. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1673 \def\today{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1674 \number\day\space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1675 \ifcase\month |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1676 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1677 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1678 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1679 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1680 \space\number\year} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1681 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1682 % @settitle line... specifies the title of the document, for headings. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1683 % It generates no output of its own. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1684 \def\thistitle{\putwordNoTitle} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1685 \def\settitle{\parsearg\settitlezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1686 \def\settitlezzz #1{\gdef\thistitle{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1687 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1688 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1689 \message{tables,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1690 % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1691 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1692 % default indentation of table text |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1693 \newdimen\tableindent \tableindent=.8in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1694 % default indentation of @itemize and @enumerate text |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1695 \newdimen\itemindent \itemindent=.3in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1696 % margin between end of table item and start of table text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1697 \newdimen\itemmargin \itemmargin=.1in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1698 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1699 % used internally for \itemindent minus \itemmargin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1700 \newdimen\itemmax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1701 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1702 % Note @table, @vtable, and @vtable define @item, @itemx, etc., with |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1703 % these defs. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1704 % They also define \itemindex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1705 % to index the item name in whatever manner is desired (perhaps none). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1706 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1707 \newif\ifitemxneedsnegativevskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1708 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1709 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1710 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1711 \def\internalBitem{\smallbreak \parsearg\itemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1712 \def\internalBitemx{\itemxpar \parsearg\itemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1713 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1714 \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1715 \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1716 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1717 \def\internalBkitem{\smallbreak \parsearg\kitemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1718 \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1719 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1720 \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1721 \itemzzz {#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1722 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1723 \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1724 \itemzzz {#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1725 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1726 \def\itemzzz #1{\begingroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1727 \advance\hsize by -\rightskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1728 \advance\hsize by -\tableindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1729 \setbox0=\hbox{\itemfont{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1730 \itemindex{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1731 \nobreak % This prevents a break before @itemx. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1732 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1733 % If the item text does not fit in the space we have, put it on a line |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1734 % by itself, and do not allow a page break either before or after that |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1735 % line. We do not start a paragraph here because then if the next |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1736 % command is, e.g., @kindex, the whatsit would get put into the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1737 % horizontal list on a line by itself, resulting in extra blank space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1738 \ifdim \wd0>\itemmax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1739 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1740 % Make this a paragraph so we get the \parskip glue and wrapping, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1741 % but leave it ragged-right. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1742 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1743 \advance\leftskip by-\tableindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1744 \advance\hsize by\tableindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1745 \advance\rightskip by0pt plus1fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1746 \leavevmode\unhbox0\par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1747 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1748 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1749 % We're going to be starting a paragraph, but we don't want the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1750 % \parskip glue -- logically it's part of the @item we just started. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1751 \nobreak \vskip-\parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1752 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1753 % Stop a page break at the \parskip glue coming up. Unfortunately |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1754 % we can't prevent a possible page break at the following |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1755 % \baselineskip glue. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1756 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1757 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1758 \itemxneedsnegativevskipfalse |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1759 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1760 % The item text fits into the space. Start a paragraph, so that the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1761 % following text (if any) will end up on the same line. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1762 \noindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1763 % Do this with kerns and \unhbox so that if there is a footnote in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1764 % the item text, it can migrate to the main vertical list and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1765 % eventually be printed. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1766 \nobreak\kern-\tableindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1767 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1768 \unhbox0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1769 \nobreak\kern\dimen0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1770 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1771 \itemxneedsnegativevskiptrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1772 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1773 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1774 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1775 \def\item{\errmessage{@item while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1776 \def\itemx{\errmessage{@itemx while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1777 \def\kitem{\errmessage{@kitem while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1778 \def\kitemx{\errmessage{@kitemx while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1779 \def\xitem{\errmessage{@xitem while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1780 \def\xitemx{\errmessage{@xitemx while not in a table}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1781 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1782 % Contains a kludge to get @end[description] to work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1783 \def\description{\tablez{\dontindex}{1}{}{}{}{}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1784 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1785 % @table, @ftable, @vtable. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1786 \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1787 {\obeylines\obeyspaces% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1788 \gdef\tablex #1^^M{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1789 \tabley\dontindex#1 \endtabley}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1790 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1791 \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1792 {\obeylines\obeyspaces% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1793 \gdef\ftablex #1^^M{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1794 \tabley\fnitemindex#1 \endtabley |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1795 \def\Eftable{\endgraf\afterenvbreak\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1796 \let\Etable=\relax}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1797 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1798 \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1799 {\obeylines\obeyspaces% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1800 \gdef\vtablex #1^^M{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1801 \tabley\vritemindex#1 \endtabley |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1802 \def\Evtable{\endgraf\afterenvbreak\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1803 \let\Etable=\relax}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1804 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1805 \def\dontindex #1{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1806 \def\fnitemindex #1{\doind {fn}{\code{#1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1807 \def\vritemindex #1{\doind {vr}{\code{#1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1808 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1809 {\obeyspaces % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1810 \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1811 \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1812 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1813 \def\tablez #1#2#3#4#5#6{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1814 \aboveenvbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1815 \begingroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1816 \def\Edescription{\Etable}% Necessary kludge. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1817 \let\itemindex=#1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1818 \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1819 \ifnum 0#4>0 \tableindent=#4\mil \fi % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1820 \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1821 \def\itemfont{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1822 \itemmax=\tableindent % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1823 \advance \itemmax by -\itemmargin % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1824 \advance \leftskip by \tableindent % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1825 \exdentamount=\tableindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1826 \parindent = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1827 \parskip = \smallskipamount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1828 \ifdim \parskip=0pt \parskip=2pt \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1829 \def\Etable{\endgraf\afterenvbreak\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1830 \let\item = \internalBitem % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1831 \let\itemx = \internalBitemx % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1832 \let\kitem = \internalBkitem % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1833 \let\kitemx = \internalBkitemx % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1834 \let\xitem = \internalBxitem % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1835 \let\xitemx = \internalBxitemx % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1836 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1837 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1838 % This is the counter used by @enumerate, which is really @itemize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1839 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1840 \newcount \itemno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1841 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1842 \def\itemize{\parsearg\itemizezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1843 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1844 \def\itemizezzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1845 \begingroup % ended by the @end itemize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1846 \itemizey {#1}{\Eitemize} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1847 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1848 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1849 \def\itemizey #1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1850 \aboveenvbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1851 \itemmax=\itemindent % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1852 \advance \itemmax by -\itemmargin % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1853 \advance \leftskip by \itemindent % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1854 \exdentamount=\itemindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1855 \parindent = 0pt % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1856 \parskip = \smallskipamount % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1857 \ifdim \parskip=0pt \parskip=2pt \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1858 \def#2{\endgraf\afterenvbreak\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1859 \def\itemcontents{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1860 \let\item=\itemizeitem} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1861 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1862 % Set sfcode to normal for the chars that usually have another value. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1863 % These are `.?!:;,' |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1864 \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1865 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1866 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1867 % \splitoff TOKENS\endmark defines \first to be the first token in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1868 % TOKENS, and \rest to be the remainder. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1869 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1870 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1871 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1872 % Allow an optional argument of an uppercase letter, lowercase letter, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1873 % or number, to specify the first label in the enumerated list. No |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1874 % argument is the same as `1'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1875 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1876 \def\enumerate{\parsearg\enumeratezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1877 \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1878 \def\enumeratey #1 #2\endenumeratey{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1879 \begingroup % ended by the @end enumerate |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1880 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1881 % If we were given no argument, pretend we were given `1'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1882 \def\thearg{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1883 \ifx\thearg\empty \def\thearg{1}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1884 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1885 % Detect if the argument is a single token. If so, it might be a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1886 % letter. Otherwise, the only valid thing it can be is a number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1887 % (We will always have one token, because of the test we just made. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1888 % This is a good thing, since \splitoff doesn't work given nothing at |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1889 % all -- the first parameter is undelimited.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1890 \expandafter\splitoff\thearg\endmark |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1891 \ifx\rest\empty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1892 % Only one token in the argument. It could still be anything. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1893 % A ``lowercase letter'' is one whose \lccode is nonzero. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1894 % An ``uppercase letter'' is one whose \lccode is both nonzero, and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1895 % not equal to itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1896 % Otherwise, we assume it's a number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1897 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1898 % We need the \relax at the end of the \ifnum lines to stop TeX from |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1899 % continuing to look for a <number>. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1900 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1901 \ifnum\lccode\expandafter`\thearg=0\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1902 \numericenumerate % a number (we hope) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1903 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1904 % It's a letter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1905 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1906 \lowercaseenumerate % lowercase letter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1907 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1908 \uppercaseenumerate % uppercase letter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1909 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1910 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1911 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1912 % Multiple tokens in the argument. We hope it's a number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1913 \numericenumerate |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1914 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1915 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1916 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1917 % An @enumerate whose labels are integers. The starting integer is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1918 % given in \thearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1919 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1920 \def\numericenumerate{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1921 \itemno = \thearg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1922 \startenumeration{\the\itemno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1923 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1924 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1925 % The starting (lowercase) letter is in \thearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1926 \def\lowercaseenumerate{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1927 \itemno = \expandafter`\thearg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1928 \startenumeration{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1929 % Be sure we're not beyond the end of the alphabet. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1930 \ifnum\itemno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1931 \errmessage{No more lowercase letters in @enumerate; get a bigger |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1932 alphabet}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1933 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1934 \char\lccode\itemno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1935 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1936 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1937 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1938 % The starting (uppercase) letter is in \thearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1939 \def\uppercaseenumerate{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1940 \itemno = \expandafter`\thearg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1941 \startenumeration{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1942 % Be sure we're not beyond the end of the alphabet. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1943 \ifnum\itemno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1944 \errmessage{No more uppercase letters in @enumerate; get a bigger |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1945 alphabet} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1946 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1947 \char\uccode\itemno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1948 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1949 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1950 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1951 % Call itemizey, adding a period to the first argument and supplying the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1952 % common last two arguments. Also subtract one from the initial value in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1953 % \itemno, since @item increments \itemno. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1954 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1955 \def\startenumeration#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1956 \advance\itemno by -1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1957 \itemizey{#1.}\Eenumerate\flushcr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1958 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1959 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1960 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1961 % to @enumerate. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1962 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1963 \def\alphaenumerate{\enumerate{a}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1964 \def\capsenumerate{\enumerate{A}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1965 \def\Ealphaenumerate{\Eenumerate} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1966 \def\Ecapsenumerate{\Eenumerate} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1967 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1968 % Definition of @item while inside @itemize. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1969 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1970 \def\itemizeitem{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1971 \advance\itemno by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1972 {\let\par=\endgraf \smallbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1973 \ifhmode \errmessage{In hmode at itemizeitem}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1974 {\parskip=0in \hskip 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1975 \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1976 \vadjust{\penalty 1200}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1977 \flushcr} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1978 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1979 % @multitable macros |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1980 % Amy Hendrickson, 8/18/94, 3/6/96 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1981 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1982 % @multitable ... @end multitable will make as many columns as desired. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1983 % Contents of each column will wrap at width given in preamble. Width |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1984 % can be specified either with sample text given in a template line, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1985 % or in percent of \hsize, the current width of text on page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1986 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1987 % Table can continue over pages but will only break between lines. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1988 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1989 % To make preamble: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1990 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1991 % Either define widths of columns in terms of percent of \hsize: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1992 % @multitable @columnfractions .25 .3 .45 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1993 % @item ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1994 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1995 % Numbers following @columnfractions are the percent of the total |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1996 % current hsize to be used for each column. You may use as many |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1997 % columns as desired. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1998 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
1999 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2000 % Or use a template: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2001 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2002 % @item ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2003 % using the widest term desired in each column. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2004 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2005 % For those who want to use more than one line's worth of words in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2006 % the preamble, break the line within one argument and it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2007 % will parse correctly, i.e., |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2008 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2009 % @multitable {Column 1 template} {Column 2 template} {Column 3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2010 % template} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2011 % Not: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2012 % @multitable {Column 1 template} {Column 2 template} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2013 % {Column 3 template} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2014 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2015 % Each new table line starts with @item, each subsequent new column |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2016 % starts with @tab. Empty columns may be produced by supplying @tab's |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2017 % with nothing between them for as many times as empty columns are needed, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2018 % ie, @tab@tab@tab will produce two empty columns. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2019 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2020 % @item, @tab, @multitable or @end multitable do not need to be on their |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2021 % own lines, but it will not hurt if they are. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2022 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2023 % Sample multitable: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2024 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2025 % @multitable {Column 1 template} {Column 2 template} {Column 3 template} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2026 % @item first col stuff @tab second col stuff @tab third col |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2027 % @item |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2028 % first col stuff |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2029 % @tab |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2030 % second col stuff |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2031 % @tab |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2032 % third col |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2033 % @item first col stuff @tab second col stuff |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2034 % @tab Many paragraphs of text may be used in any column. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2035 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2036 % They will wrap at the width determined by the template. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2037 % @item@tab@tab This will be in third column. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2038 % @end multitable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2039 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2040 % Default dimensions may be reset by user. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2041 % @multitableparskip is vertical space between paragraphs in table. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2042 % @multitableparindent is paragraph indent in table. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2043 % @multitablecolmargin is horizontal space to be left between columns. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2044 % @multitablelinespace is space to leave between table items, baseline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2045 % to baseline. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2046 % 0pt means it depends on current normal line spacing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2047 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2048 \newskip\multitableparskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2049 \newskip\multitableparindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2050 \newdimen\multitablecolspace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2051 \newskip\multitablelinespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2052 \multitableparskip=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2053 \multitableparindent=6pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2054 \multitablecolspace=12pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2055 \multitablelinespace=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2056 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2057 % Macros used to set up halign preamble: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2058 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2059 \let\endsetuptable\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2060 \def\xendsetuptable{\endsetuptable} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2061 \let\columnfractions\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2062 \def\xcolumnfractions{\columnfractions} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2063 \newif\ifsetpercent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2064 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2065 % #1 is the part of the @columnfraction before the decimal point, which |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2066 % is presumably either 0 or the empty string (but we don't check, we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2067 % just throw it away). #2 is the decimal part, which we use as the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2068 % percent of \hsize for this column. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2069 \def\pickupwholefraction#1.#2 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2070 \global\advance\colcount by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2071 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2072 \setuptable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2073 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2074 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2075 \newcount\colcount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2076 \def\setuptable#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2077 \def\firstarg{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2078 \ifx\firstarg\xendsetuptable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2079 \let\go = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2080 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2081 \ifx\firstarg\xcolumnfractions |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2082 \global\setpercenttrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2083 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2084 \ifsetpercent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2085 \let\go\pickupwholefraction |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2086 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2087 \global\advance\colcount by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2088 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2089 % typically that is always in the input, anyway. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2090 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2091 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2092 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2093 \ifx\go\pickupwholefraction |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2094 % Put the argument back for the \pickupwholefraction call, so |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2095 % we'll always have a period there to be parsed. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2096 \def\go{\pickupwholefraction#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2097 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2098 \let\go = \setuptable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2099 \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2100 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2101 \go |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2102 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2103 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2104 % This used to have \hskip1sp. But then the space in a template line is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2105 % not enough. That is bad. So let's go back to just & until we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2106 % encounter the problem it was intended to solve again. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2107 % --karl, nathan@acm.org, 20apr99. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2108 \def\tab{&} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2109 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2110 % @multitable ... @end multitable definitions: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2111 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2112 \def\multitable{\parsearg\dotable} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2113 \def\dotable#1{\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2114 \vskip\parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2115 \let\item\crcr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2116 \tolerance=9500 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2117 \hbadness=9500 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2118 \setmultitablespacing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2119 \parskip=\multitableparskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2120 \parindent=\multitableparindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2121 \overfullrule=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2122 \global\colcount=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2123 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2124 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2125 % To parse everything between @multitable and @item: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2126 \setuptable#1 \endsetuptable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2127 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2128 % \everycr will reset column counter, \colcount, at the end of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2129 % each line. Every column entry will cause \colcount to advance by one. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2130 % The table preamble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2131 % looks at the current \colcount to find the correct column width. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2132 \everycr{\noalign{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2133 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2134 % \filbreak%% keeps underfull box messages off when table breaks over pages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2135 % Maybe so, but it also creates really weird page breaks when the table |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2136 % breaks over pages. Wouldn't \vfil be better? Wait until the problem |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2137 % manifests itself, so it can be fixed for real --karl. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2138 \global\colcount=0\relax}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2139 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2140 % This preamble sets up a generic column definition, which will |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2141 % be used as many times as user calls for columns. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2142 % \vtop will set a single line and will also let text wrap and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2143 % continue for many paragraphs if desired. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2144 \halign\bgroup&\global\advance\colcount by 1\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2145 \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2146 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2147 % In order to keep entries from bumping into each other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2148 % we will add a \leftskip of \multitablecolspace to all columns after |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2149 % the first one. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2150 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2151 % If a template has been used, we will add \multitablecolspace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2152 % to the width of each template entry. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2153 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2154 % If the user has set preamble in terms of percent of \hsize we will |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2155 % use that dimension as the width of the column, and the \leftskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2156 % will keep entries from bumping into each other. Table will start at |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2157 % left margin and final column will justify at right margin. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2158 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2159 % Make sure we don't inherit \rightskip from the outer environment. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2160 \rightskip=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2161 \ifnum\colcount=1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2162 % The first column will be indented with the surrounding text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2163 \advance\hsize by\leftskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2164 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2165 \ifsetpercent \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2166 % If user has not set preamble in terms of percent of \hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2167 % we will advance \hsize by \multitablecolspace. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2168 \advance\hsize by \multitablecolspace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2169 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2170 % In either case we will make \leftskip=\multitablecolspace: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2171 \leftskip=\multitablecolspace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2172 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2173 % Ignoring space at the beginning and end avoids an occasional spurious |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2174 % blank line, when TeX decides to break the line at the space before the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2175 % box from the multistrut, so the strut ends up on a line by itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2176 % For example: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2177 % @multitable @columnfractions .11 .89 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2178 % @item @code{#} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2179 % @tab Legal holiday which is valid in major parts of the whole country. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2180 % Is automatically provided with highlighting sequences respectively marking |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2181 % characters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2182 \noindent\ignorespaces##\unskip\multistrut}\cr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2183 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2184 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2185 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2186 % If so, do nothing. If not, give it an appropriate dimension based on |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2187 % current baselineskip. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2188 \ifdim\multitablelinespace=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2189 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2190 \global\advance\multitablelinespace by-\ht0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2191 %% strut to put in table in case some entry doesn't have descenders, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2192 %% to keep lines equally spaced |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2193 \let\multistrut = \strut |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2194 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2195 %% FIXME: what is \box0 supposed to be? |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2196 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2197 width0pt\relax} \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2198 %% Test to see if parskip is larger than space between lines of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2199 %% table. If not, do nothing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2200 %% If so, set to same dimension as multitablelinespace. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2201 \ifdim\multitableparskip>\multitablelinespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2202 \global\multitableparskip=\multitablelinespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2203 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2204 %% than skip between lines in the table. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2205 \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2206 \ifdim\multitableparskip=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2207 \global\multitableparskip=\multitablelinespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2208 \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2209 %% than skip between lines in the table. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2210 \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2211 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2212 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2213 \message{conditionals,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2214 % Prevent errors for section commands. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2215 % Used in @ignore and in failing conditionals. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2216 \def\ignoresections{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2217 \let\chapter=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2218 \let\unnumbered=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2219 \let\top=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2220 \let\unnumberedsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2221 \let\unnumberedsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2222 \let\unnumberedsubsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2223 \let\unnumberedsubsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2224 \let\unnumberedsubsubsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2225 \let\unnumberedsubsubsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2226 \let\section=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2227 \let\subsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2228 \let\subsubsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2229 \let\subsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2230 \let\subsubsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2231 \let\appendix=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2232 \let\appendixsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2233 \let\appendixsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2234 \let\appendixsubsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2235 \let\appendixsubsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2236 \let\appendixsubsubsec=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2237 \let\appendixsubsubsection=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2238 \let\contents=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2239 \let\smallbook=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2240 \let\titlepage=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2241 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2242 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2243 % Used in nested conditionals, where we have to parse the Texinfo source |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2244 % and so want to turn off most commands, in case they are used |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2245 % incorrectly. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2246 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2247 \def\ignoremorecommands{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2248 \let\defcodeindex = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2249 \let\defcv = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2250 \let\deffn = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2251 \let\deffnx = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2252 \let\defindex = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2253 \let\defivar = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2254 \let\defmac = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2255 \let\defmethod = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2256 \let\defop = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2257 \let\defopt = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2258 \let\defspec = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2259 \let\deftp = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2260 \let\deftypefn = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2261 \let\deftypefun = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2262 \let\deftypeivar = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2263 \let\deftypeop = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2264 \let\deftypevar = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2265 \let\deftypevr = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2266 \let\defun = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2267 \let\defvar = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2268 \let\defvr = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2269 \let\ref = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2270 \let\xref = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2271 \let\printindex = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2272 \let\pxref = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2273 \let\settitle = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2274 \let\setchapternewpage = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2275 \let\setchapterstyle = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2276 \let\everyheading = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2277 \let\evenheading = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2278 \let\oddheading = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2279 \let\everyfooting = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2280 \let\evenfooting = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2281 \let\oddfooting = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2282 \let\headings = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2283 \let\include = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2284 \let\lowersections = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2285 \let\down = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2286 \let\raisesections = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2287 \let\up = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2288 \let\set = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2289 \let\clear = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2290 \let\item = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2291 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2292 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2293 % Ignore @ignore ... @end ignore. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2294 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2295 \def\ignore{\doignore{ignore}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2296 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2297 % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2298 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2299 \def\ifinfo{\doignore{ifinfo}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2300 \def\ifhtml{\doignore{ifhtml}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2301 \def\ifnottex{\doignore{ifnottex}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2302 \def\html{\doignore{html}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2303 \def\menu{\doignore{menu}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2304 \def\direntry{\doignore{direntry}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2305 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2306 % @dircategory CATEGORY -- specify a category of the dir file |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2307 % which this file should belong to. Ignore this in TeX. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2308 \let\dircategory = \comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2309 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2310 % Ignore text until a line `@end #1'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2311 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2312 \def\doignore#1{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2313 % Don't complain about control sequences we have declared \outer. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2314 \ignoresections |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2315 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2316 % Define a command to swallow text until we reach `@end #1'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2317 % This @ is a catcode 12 token (that is the normal catcode of @ in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2318 % this texinfo.tex file). We change the catcode of @ below to match. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2319 \long\def\doignoretext##1@end #1{\enddoignore}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2320 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2321 % Make sure that spaces turn into tokens that match what \doignoretext wants. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2322 \catcode32 = 10 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2323 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2324 % Ignore braces, too, so mismatched braces don't cause trouble. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2325 \catcode`\{ = 9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2326 \catcode`\} = 9 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2327 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2328 % We must not have @c interpreted as a control sequence. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2329 \catcode`\@ = 12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2330 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2331 % Make the letter c a comment character so that the rest of the line |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2332 % will be ignored. This way, the document can have (for example) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2333 % @c @end ifinfo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2334 % and the @end ifinfo will be properly ignored. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2335 % (We've just changed @ to catcode 12.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2336 \catcode`\c = 14 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2337 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2338 % And now expand that command. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2339 \doignoretext |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2340 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2341 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2342 % What we do to finish off ignored text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2343 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2344 \def\enddoignore{\endgroup\ignorespaces}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2345 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2346 \newif\ifwarnedobs\warnedobsfalse |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2347 \def\obstexwarn{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2348 \ifwarnedobs\relax\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2349 % We need to warn folks that they may have trouble with TeX 3.0. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2350 % This uses \immediate\write16 rather than \message to get newlines. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2351 \immediate\write16{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2352 \immediate\write16{WARNING: for users of Unix TeX 3.0!} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2353 \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2354 \immediate\write16{If you are running another version of TeX, relax.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2355 \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2356 \immediate\write16{ Then upgrade your TeX installation if you can.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2357 \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2358 \immediate\write16{If you are stuck with version 3.0, run the} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2359 \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2360 \immediate\write16{ to use a workaround.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2361 \immediate\write16{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2362 \global\warnedobstrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2363 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2364 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2365 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2366 % **In TeX 3.0, setting text in \nullfont hangs tex. For a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2367 % workaround (which requires the file ``dummy.tfm'' to be installed), |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2368 % uncomment the following line: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2369 %%%%%\font\nullfont=dummy\let\obstexwarn=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2370 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2371 % Ignore text, except that we keep track of conditional commands for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2372 % purposes of nesting, up to an `@end #1' command. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2373 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2374 \def\nestedignore#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2375 \obstexwarn |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2376 % We must actually expand the ignored text to look for the @end |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2377 % command, so that nested ignore constructs work. Thus, we put the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2378 % text into a \vbox and then do nothing with the result. To minimize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2379 % the change of memory overflow, we follow the approach outlined on |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2380 % page 401 of the TeXbook: make the current font be a dummy font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2381 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2382 \setbox0 = \vbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2383 % Don't complain about control sequences we have declared \outer. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2384 \ignoresections |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2385 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2386 % Define `@end #1' to end the box, which will in turn undefine the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2387 % @end command again. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2388 \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2389 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2390 % We are going to be parsing Texinfo commands. Most cause no |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2391 % trouble when they are used incorrectly, but some commands do |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2392 % complicated argument parsing or otherwise get confused, so we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2393 % undefine them. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2394 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2395 % We can't do anything about stray @-signs, unfortunately; |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2396 % they'll produce `undefined control sequence' errors. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2397 \ignoremorecommands |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2398 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2399 % Set the current font to be \nullfont, a TeX primitive, and define |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2400 % all the font commands to also use \nullfont. We don't use |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2401 % dummy.tfm, as suggested in the TeXbook, because not all sites |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2402 % might have that installed. Therefore, math mode will still |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2403 % produce output, but that should be an extremely small amount of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2404 % stuff compared to the main input. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2405 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2406 \nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2407 \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2408 \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2409 \let\tensf=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2410 % Similarly for index fonts (mostly for their use in smallexample). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2411 \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2412 \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2413 \let\smallsf=\nullfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2414 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2415 % Don't complain when characters are missing from the fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2416 \tracinglostchars = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2417 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2418 % Don't bother to do space factor calculations. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2419 \frenchspacing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2420 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2421 % Don't report underfull hboxes. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2422 \hbadness = 10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2423 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2424 % Do minimal line-breaking. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2425 \pretolerance = 10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2426 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2427 % Do not execute instructions in @tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2428 \def\tex{\doignore{tex}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2429 % Do not execute macro definitions. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2430 % `c' is a comment character, so the word `macro' will get cut off. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2431 \def\macro{\doignore{ma}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2432 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2433 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2434 % @set VAR sets the variable VAR to an empty value. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2435 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2436 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2437 % Since we want to separate VAR from REST-OF-LINE (which might be |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2438 % empty), we can't just use \parsearg; we have to insert a space of our |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2439 % own to delimit the rest of the line, and then take it out again if we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2440 % didn't need it. Make sure the catcode of space is correct to avoid |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2441 % losing inside @example, for instance. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2442 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2443 \def\set{\begingroup\catcode` =10 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2444 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2445 \parsearg\setxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2446 \def\setxxx#1{\setyyy#1 \endsetyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2447 \def\setyyy#1 #2\endsetyyy{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2448 \def\temp{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2449 \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2450 \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2451 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2452 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2453 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2454 % Can't use \xdef to pre-expand #2 and save some time, since \temp or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2455 % \next or other control sequences that we've defined might get us into |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2456 % an infinite loop. Consider `@set foo @cite{bar}'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2457 \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2458 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2459 % @clear VAR clears (i.e., unsets) the variable VAR. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2460 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2461 \def\clear{\parsearg\clearxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2462 \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2463 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2464 % @value{foo} gets the text saved in variable foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2465 { |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2466 \catcode`\_ = \active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2467 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2468 % We might end up with active _ or - characters in the argument if |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2469 % we're called from @code, as @code{@value{foo-bar_}}. So \let any |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2470 % such active characters to their normal equivalents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2471 \gdef\value{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2472 \catcode`\-=12 \catcode`\_=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2473 \indexbreaks \let_\normalunderscore |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2474 \valuexxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2475 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2476 \def\valuexxx#1{\expandablevalue{#1}\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2477 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2478 % We have this subroutine so that we can handle at least some @value's |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2479 % properly in indexes (we \let\value to this in \indexdummies). Ones |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2480 % whose names contain - or _ still won't work, but we can't do anything |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2481 % about that. The command has to be fully expandable, since the result |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2482 % winds up in the index file. This means that if the variable's value |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2483 % contains other Texinfo commands, it's almost certain it will fail |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2484 % (although perhaps we could fix that with sufficient work to do a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2485 % one-level expansion on the result, instead of complete). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2486 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2487 \def\expandablevalue#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2488 \expandafter\ifx\csname SET#1\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2489 {[No value for ``#1'']}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2490 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2491 \csname SET#1\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2492 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2493 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2494 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2495 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2496 % with @set. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2497 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2498 \def\ifset{\parsearg\ifsetxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2499 \def\ifsetxxx #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2500 \expandafter\ifx\csname SET#1\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2501 \expandafter\ifsetfail |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2502 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2503 \expandafter\ifsetsucceed |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2504 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2505 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2506 \def\ifsetsucceed{\conditionalsucceed{ifset}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2507 \def\ifsetfail{\nestedignore{ifset}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2508 \defineunmatchedend{ifset} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2509 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2510 % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2511 % defined with @set, or has been undefined with @clear. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2512 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2513 \def\ifclear{\parsearg\ifclearxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2514 \def\ifclearxxx #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2515 \expandafter\ifx\csname SET#1\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2516 \expandafter\ifclearsucceed |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2517 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2518 \expandafter\ifclearfail |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2519 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2520 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2521 \def\ifclearsucceed{\conditionalsucceed{ifclear}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2522 \def\ifclearfail{\nestedignore{ifclear}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2523 \defineunmatchedend{ifclear} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2524 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2525 % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2526 % following, through the first @end iftex (etc.). Make `@end iftex' |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2527 % (etc.) valid only after an @iftex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2528 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2529 \def\iftex{\conditionalsucceed{iftex}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2530 \def\ifnothtml{\conditionalsucceed{ifnothtml}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2531 \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2532 \defineunmatchedend{iftex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2533 \defineunmatchedend{ifnothtml} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2534 \defineunmatchedend{ifnotinfo} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2535 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2536 % We can't just want to start a group at @iftex (for example) and end it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2537 % at @end iftex, since then @set commands inside the conditional have no |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2538 % effect (they'd get reverted at the end of the group). So we must |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2539 % define \Eiftex to redefine itself to be its previous value. (We can't |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2540 % just define it to fail again with an ``unmatched end'' error, since |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2541 % the @ifset might be nested.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2542 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2543 \def\conditionalsucceed#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2544 \edef\temp{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2545 % Remember the current value of \E#1. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2546 \let\nece{prevE#1} = \nece{E#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2547 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2548 % At the `@end #1', redefine \E#1 to be its previous value. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2549 \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2550 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2551 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2552 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2553 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2554 % We need to expand lots of \csname's, but we don't want to expand the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2555 % control sequences after we've constructed them. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2556 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2557 \def\nece#1{\expandafter\noexpand\csname#1\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2558 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2559 % @defininfoenclose. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2560 \let\definfoenclose=\comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2561 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2562 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2563 \message{indexing,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2564 % Index generation facilities |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2565 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2566 % Define \newwrite to be identical to plain tex's \newwrite |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2567 % except not \outer, so it can be used within \newindex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2568 {\catcode`\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2569 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2570 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2571 % \newindex {foo} defines an index named foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2572 % It automatically defines \fooindex such that |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2573 % \fooindex ...rest of line... puts an entry in the index foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2574 % It also defines \fooindfile to be the number of the output channel for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2575 % the file that accumulates this index. The file's extension is foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2576 % The name of an index should be no more than 2 characters long |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2577 % for the sake of vms. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2578 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2579 \def\newindex#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2580 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2581 \expandafter\newwrite \csname#1indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2582 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2583 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2584 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2585 \noexpand\doindex{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2586 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2587 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2588 % @defindex foo == \newindex{foo} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2589 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2590 \def\defindex{\parsearg\newindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2591 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2592 % Define @defcodeindex, like @defindex except put all entries in @code. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2593 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2594 \def\newcodeindex#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2595 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2596 \expandafter\newwrite \csname#1indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2597 \openout \csname#1indfile\endcsname \jobname.#1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2598 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2599 \expandafter\xdef\csname#1index\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2600 \noexpand\docodeindex{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2601 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2602 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2603 \def\defcodeindex{\parsearg\newcodeindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2604 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2605 % @synindex foo bar makes index foo feed into index bar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2606 % Do this instead of @defindex foo if you don't want it as a separate index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2607 % The \closeout helps reduce unnecessary open files; the limit on the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2608 % Acorn RISC OS is a mere 16 files. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2609 \def\synindex#1 #2 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2610 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2611 \expandafter\closeout\csname#1indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2612 \expandafter\let\csname#1indfile\endcsname=\synindexfoo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2613 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2614 \noexpand\doindex{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2615 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2616 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2617 % @syncodeindex foo bar similar, but put all entries made for index foo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2618 % inside @code. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2619 \def\syncodeindex#1 #2 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2620 \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2621 \expandafter\closeout\csname#1indfile\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2622 \expandafter\let\csname#1indfile\endcsname=\synindexfoo |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2623 \expandafter\xdef\csname#1index\endcsname{% define \xxxindex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2624 \noexpand\docodeindex{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2625 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2626 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2627 % Define \doindex, the driver for all \fooindex macros. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2628 % Argument #1 is generated by the calling \fooindex macro, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2629 % and it is "foo", the name of the index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2630 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2631 % \doindex just uses \parsearg; it calls \doind for the actual work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2632 % This is because \doind is more useful to call from other macros. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2633 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2634 % There is also \dosubind {index}{topic}{subtopic} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2635 % which makes an entry in a two-level index such as the operation index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2636 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2637 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2638 \def\singleindexer #1{\doind{\indexname}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2639 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2640 % like the previous two, but they put @code around the argument. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2641 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2642 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2643 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2644 \def\indexdummies{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2645 \def\ { }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2646 % Take care of the plain tex accent commands. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2647 \def\"{\realbackslash "}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2648 \def\`{\realbackslash `}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2649 \def\'{\realbackslash '}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2650 \def\^{\realbackslash ^}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2651 \def\~{\realbackslash ~}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2652 \def\={\realbackslash =}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2653 \def\b{\realbackslash b}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2654 \def\c{\realbackslash c}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2655 \def\d{\realbackslash d}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2656 \def\u{\realbackslash u}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2657 \def\v{\realbackslash v}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2658 \def\H{\realbackslash H}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2659 % Take care of the plain tex special European modified letters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2660 \def\oe{\realbackslash oe}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2661 \def\ae{\realbackslash ae}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2662 \def\aa{\realbackslash aa}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2663 \def\OE{\realbackslash OE}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2664 \def\AE{\realbackslash AE}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2665 \def\AA{\realbackslash AA}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2666 \def\o{\realbackslash o}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2667 \def\O{\realbackslash O}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2668 \def\l{\realbackslash l}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2669 \def\L{\realbackslash L}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2670 \def\ss{\realbackslash ss}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2671 % Take care of texinfo commands likely to appear in an index entry. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2672 % (Must be a way to avoid doing expansion at all, and thus not have to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2673 % laboriously list every single command here.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2674 \def\@{@}% will be @@ when we switch to @ as escape char. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2675 % Need these in case \tex is in effect and \{ is a \delimiter again. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2676 % But can't use \lbracecmd and \rbracecmd because texindex assumes |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2677 % braces and backslashes are used only as delimiters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2678 \let\{ = \mylbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2679 \let\} = \myrbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2680 \def\_{{\realbackslash _}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2681 \def\w{\realbackslash w }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2682 \def\bf{\realbackslash bf }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2683 %\def\rm{\realbackslash rm }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2684 \def\sl{\realbackslash sl }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2685 \def\sf{\realbackslash sf}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2686 \def\tt{\realbackslash tt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2687 \def\gtr{\realbackslash gtr}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2688 \def\less{\realbackslash less}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2689 \def\hat{\realbackslash hat}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2690 \def\TeX{\realbackslash TeX}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2691 \def\dots{\realbackslash dots }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2692 \def\result{\realbackslash result}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2693 \def\equiv{\realbackslash equiv}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2694 \def\expansion{\realbackslash expansion}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2695 \def\print{\realbackslash print}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2696 \def\error{\realbackslash error}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2697 \def\point{\realbackslash point}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2698 \def\copyright{\realbackslash copyright}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2699 \def\tclose##1{\realbackslash tclose {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2700 \def\code##1{\realbackslash code {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2701 \def\uref##1{\realbackslash uref {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2702 \def\url##1{\realbackslash url {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2703 \def\env##1{\realbackslash env {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2704 \def\command##1{\realbackslash command {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2705 \def\option##1{\realbackslash option {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2706 \def\dotless##1{\realbackslash dotless {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2707 \def\samp##1{\realbackslash samp {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2708 \def\,##1{\realbackslash ,{##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2709 \def\t##1{\realbackslash t {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2710 \def\r##1{\realbackslash r {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2711 \def\i##1{\realbackslash i {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2712 \def\b##1{\realbackslash b {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2713 \def\sc##1{\realbackslash sc {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2714 \def\cite##1{\realbackslash cite {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2715 \def\key##1{\realbackslash key {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2716 \def\file##1{\realbackslash file {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2717 \def\var##1{\realbackslash var {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2718 \def\kbd##1{\realbackslash kbd {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2719 \def\dfn##1{\realbackslash dfn {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2720 \def\emph##1{\realbackslash emph {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2721 \def\acronym##1{\realbackslash acronym {##1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2722 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2723 % Handle some cases of @value -- where the variable name does not |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2724 % contain - or _, and the value does not contain any |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2725 % (non-fully-expandable) commands. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2726 \let\value = \expandablevalue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2727 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2728 \unsepspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2729 % Turn off macro expansion |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2730 \turnoffmacros |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2731 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2732 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2733 % If an index command is used in an @example environment, any spaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2734 % therein should become regular spaces in the raw index file, not the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2735 % expansion of \tie (\\leavevmode \penalty \@M \ ). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2736 {\obeyspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2737 \gdef\unsepspaces{\obeyspaces\let =\space}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2738 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2739 % \indexnofonts no-ops all font-change commands. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2740 % This is used when outputting the strings to sort the index by. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2741 \def\indexdummyfont#1{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2742 \def\indexdummytex{TeX} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2743 \def\indexdummydots{...} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2744 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2745 \def\indexnofonts{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2746 % Just ignore accents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2747 \let\,=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2748 \let\"=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2749 \let\`=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2750 \let\'=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2751 \let\^=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2752 \let\~=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2753 \let\==\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2754 \let\b=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2755 \let\c=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2756 \let\d=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2757 \let\u=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2758 \let\v=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2759 \let\H=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2760 \let\dotless=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2761 % Take care of the plain tex special European modified letters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2762 \def\oe{oe}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2763 \def\ae{ae}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2764 \def\aa{aa}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2765 \def\OE{OE}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2766 \def\AE{AE}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2767 \def\AA{AA}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2768 \def\o{o}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2769 \def\O{O}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2770 \def\l{l}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2771 \def\L{L}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2772 \def\ss{ss}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2773 \let\w=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2774 \let\t=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2775 \let\r=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2776 \let\i=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2777 \let\b=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2778 \let\emph=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2779 \let\strong=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2780 \let\cite=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2781 \let\sc=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2782 %Don't no-op \tt, since it isn't a user-level command |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2783 % and is used in the definitions of the active chars like <, >, |... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2784 %\let\tt=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2785 \let\tclose=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2786 \let\code=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2787 \let\url=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2788 \let\uref=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2789 \let\env=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2790 \let\acronym=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2791 \let\command=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2792 \let\option=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2793 \let\file=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2794 \let\samp=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2795 \let\kbd=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2796 \let\key=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2797 \let\var=\indexdummyfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2798 \let\TeX=\indexdummytex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2799 \let\dots=\indexdummydots |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2800 \def\@{@}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2801 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2802 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2803 % To define \realbackslash, we must make \ not be an escape. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2804 % We must first make another character (@) an escape |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2805 % so we do not become unable to do a definition. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2806 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2807 {\catcode`\@=0 \catcode`\\=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2808 @gdef@realbackslash{\}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2809 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2810 \let\indexbackslash=0 %overridden during \printindex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2811 \let\SETmarginindex=\relax % put index entries in margin (undocumented)? |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2812 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2813 % For \ifx comparisons. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2814 \def\emptymacro{\empty} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2815 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2816 % Most index entries go through here, but \dosubind is the general case. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2817 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2818 \def\doind#1#2{\dosubind{#1}{#2}\empty} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2819 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2820 % Workhorse for all \fooindexes. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2821 % #1 is name of index, #2 is stuff to put there, #3 is subentry -- |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2822 % \empty if called from \doind, as we usually are. The main exception |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2823 % is with defuns, which call us directly. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2824 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2825 \def\dosubind#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2826 % Put the index entry in the margin if desired. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2827 \ifx\SETmarginindex\relax\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2828 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2829 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2830 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2831 \count255=\lastpenalty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2832 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2833 \indexdummies % Must do this here, since \bf, etc expand at this stage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2834 \escapechar=`\\ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2835 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2836 \let\folio = 0% We will expand all macros now EXCEPT \folio. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2837 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2838 % so it will be output as is; and it will print as backslash. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2839 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2840 \def\thirdarg{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2841 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2842 % If third arg is present, precede it with space in sort key. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2843 \ifx\thirdarg\emptymacro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2844 \let\subentry = \empty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2845 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2846 \def\subentry{ #3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2847 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2848 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2849 % First process the index entry with all font commands turned |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2850 % off to get the string to sort by. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2851 {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2852 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2853 % Now the real index entry with the fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2854 \toks0 = {#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2855 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2856 % If third (subentry) arg is present, add it to the index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2857 % string. And include a space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2858 \ifx\thirdarg\emptymacro \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2859 \toks0 = \expandafter{\the\toks0 \space #3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2860 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2861 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2862 % Set up the complete index entry, with both the sort key |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2863 % and the original text, including any font commands. We write |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2864 % three arguments to \entry to the .?? file, texindex reduces to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2865 % two when writing the .??s sorted result. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2866 \edef\temp{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2867 \write\csname#1indfile\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2868 \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2869 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2870 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2871 % If a skip is the last thing on the list now, preserve it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2872 % by backing up by \lastskip, doing the \write, then inserting |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2873 % the skip again. Otherwise, the whatsit generated by the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2874 % \write will make \lastskip zero. The result is that sequences |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2875 % like this: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2876 % @end defun |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2877 % @tindex whatever |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2878 % @defun ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2879 % will have extra space inserted, because the \medbreak in the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2880 % start of the @defun won't see the skip inserted by the @end of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2881 % the previous defun. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2882 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2883 % But don't do any of this if we're not in vertical mode. We |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2884 % don't want to do a \vskip and prematurely end a paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2885 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2886 % Avoid page breaks due to these extra skips, too. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2887 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2888 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2889 \ifvmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2890 \skip0 = \lastskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2891 \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2892 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2893 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2894 \temp % do the write |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2895 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2896 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2897 \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2898 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2899 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2900 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2901 \penalty\count255 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2902 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2903 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2904 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2905 % The index entry written in the file actually looks like |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2906 % \entry {sortstring}{page}{topic} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2907 % or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2908 % \entry {sortstring}{page}{topic}{subtopic} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2909 % The texindex program reads in these files and writes files |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2910 % containing these kinds of lines: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2911 % \initial {c} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2912 % before the first topic whose initial is c |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2913 % \entry {topic}{pagelist} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2914 % for a topic that is used without subtopics |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2915 % \primary {topic} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2916 % for the beginning of a topic that is used with subtopics |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2917 % \secondary {subtopic}{pagelist} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2918 % for each subtopic. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2919 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2920 % Define the user-accessible indexing commands |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2921 % @findex, @vindex, @kindex, @cindex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2922 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2923 \def\findex {\fnindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2924 \def\kindex {\kyindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2925 \def\cindex {\cpindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2926 \def\vindex {\vrindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2927 \def\tindex {\tpindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2928 \def\pindex {\pgindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2929 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2930 \def\cindexsub {\begingroup\obeylines\cindexsub} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2931 {\obeylines % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2932 \gdef\cindexsub "#1" #2^^M{\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2933 \dosubind{cp}{#2}{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2934 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2935 % Define the macros used in formatting output of the sorted index material. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2936 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2937 % @printindex causes a particular index (the ??s file) to get printed. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2938 % It does not print any chapter heading (usually an @unnumbered). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2939 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2940 \def\printindex{\parsearg\doprintindex} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2941 \def\doprintindex#1{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2942 \dobreak \chapheadingskip{10000}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2943 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2944 \smallfonts \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2945 \tolerance = 9500 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2946 \indexbreaks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2947 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2948 % See if the index file exists and is nonempty. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2949 % Change catcode of @ here so that if the index file contains |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2950 % \initial {@} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2951 % as its first line, TeX doesn't complain about mismatched braces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2952 % (because it thinks @} is a control sequence). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2953 \catcode`\@ = 11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2954 \openin 1 \jobname.#1s |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2955 \ifeof 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2956 % \enddoublecolumns gets confused if there is no text in the index, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2957 % and it loses the chapter title and the aux file entries for the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2958 % index. The easiest way to prevent this problem is to make sure |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2959 % there is some text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2960 \putwordIndexNonexistent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2961 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2962 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2963 % If the index file exists but is empty, then \openin leaves \ifeof |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2964 % false. We have to make TeX try to read something from the file, so |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2965 % it can discover if there is anything in it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2966 \read 1 to \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2967 \ifeof 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2968 \putwordIndexIsEmpty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2969 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2970 % Index files are almost Texinfo source, but we use \ as the escape |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2971 % character. It would be better to use @, but that's too big a change |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2972 % to make right now. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2973 \def\indexbackslash{\rawbackslashxx}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2974 \catcode`\\ = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2975 \escapechar = `\\ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2976 \begindoublecolumns |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2977 \input \jobname.#1s |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2978 \enddoublecolumns |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2979 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2980 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2981 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2982 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2983 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2984 % These macros are used by the sorted index file itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2985 % Change them to control the appearance of the index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2986 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2987 \def\initial#1{{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2988 % Some minor font changes for the special characters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2989 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2990 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2991 % Remove any glue we may have, we'll be inserting our own. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2992 \removelastskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2993 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2994 % We like breaks before the index initials, so insert a bonus. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2995 \penalty -300 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2996 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2997 % Typeset the initial. Making this add up to a whole number of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2998 % baselineskips increases the chance of the dots lining up from column |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
2999 % to column. It still won't often be perfect, because of the stretch |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3000 % we need before each entry, but it's better. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3001 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3002 % No shrink because it confuses \balancecolumns. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3003 \vskip 1.67\baselineskip plus .5\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3004 \leftline{\secbf #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3005 \vskip .33\baselineskip plus .1\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3006 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3007 % Do our best not to break after the initial. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3008 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3009 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3010 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3011 % This typesets a paragraph consisting of #1, dot leaders, and then #2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3012 % flush to the right margin. It is used for index and table of contents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3013 % entries. The paragraph is indented by \leftskip. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3014 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3015 \def\entry#1#2{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3016 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3017 % Start a new paragraph if necessary, so our assignments below can't |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3018 % affect previous text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3019 \par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3020 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3021 % Do not fill out the last line with white space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3022 \parfillskip = 0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3023 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3024 % No extra space above this paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3025 \parskip = 0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3026 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3027 % Do not prefer a separate line ending with a hyphen to fewer lines. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3028 \finalhyphendemerits = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3029 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3030 % \hangindent is only relevant when the entry text and page number |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3031 % don't both fit on one line. In that case, bob suggests starting the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3032 % dots pretty far over on the line. Unfortunately, a large |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3033 % indentation looks wrong when the entry text itself is broken across |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3034 % lines. So we use a small indentation and put up with long leaders. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3035 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3036 % \hangafter is reset to 1 (which is the value we want) at the start |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3037 % of each paragraph, so we need not do anything with that. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3038 \hangindent = 2em |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3039 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3040 % When the entry text needs to be broken, just fill out the first line |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3041 % with blank space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3042 \rightskip = 0pt plus1fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3043 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3044 % A bit of stretch before each entry for the benefit of balancing columns. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3045 \vskip 0pt plus1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3046 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3047 % Start a ``paragraph'' for the index entry so the line breaking |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3048 % parameters we've set above will have an effect. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3049 \noindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3050 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3051 % Insert the text of the index entry. TeX will do line-breaking on it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3052 #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3053 % The following is kludged to not output a line of dots in the index if |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3054 % there are no page numbers. The next person who breaks this will be |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3055 % cursed by a Unix daemon. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3056 \def\tempa{{\rm }}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3057 \def\tempb{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3058 \edef\tempc{\tempa}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3059 \edef\tempd{\tempb}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3060 \ifx\tempc\tempd\ \else% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3061 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3062 % If we must, put the page number on a line of its own, and fill out |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3063 % this line with blank space. (The \hfil is overwhelmed with the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3064 % fill leaders glue in \indexdotfill if the page number does fit.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3065 \hfil\penalty50 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3066 \null\nobreak\indexdotfill % Have leaders before the page number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3067 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3068 % The `\ ' here is removed by the implicit \unskip that TeX does as |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3069 % part of (the primitive) \par. Without it, a spurious underfull |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3070 % \hbox ensues. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3071 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3072 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3073 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3074 \ #2% The page number ends the paragraph. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3075 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3076 \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3077 \par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3078 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3079 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3080 % Like \dotfill except takes at least 1 em. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3081 \def\indexdotfill{\cleaders |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3082 \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3083 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3084 \def\primary #1{\line{#1\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3085 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3086 \newskip\secondaryindent \secondaryindent=0.5cm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3087 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3088 \def\secondary #1#2{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3089 {\parfillskip=0in \parskip=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3090 \hangindent =1in \hangafter=1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3091 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3092 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3093 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3094 % Define two-column mode, which we use to typeset indexes. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3095 % Adapted from the TeXbook, page 416, which is to say, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3096 % the manmac.tex format used to print the TeXbook itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3097 \catcode`\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3098 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3099 \newbox\partialpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3100 \newdimen\doublecolumnhsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3101 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3102 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3103 % Grab any single-column material above us. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3104 \output = {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3105 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3106 % Here is a possibility not foreseen in manmac: if we accumulate a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3107 % whole lot of material, we might end up calling this \output |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3108 % routine twice in a row (see the doublecol-lose test, which is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3109 % essentially a couple of indexes with @setchapternewpage off). In |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3110 % that case we just ship out what is in \partialpage with the normal |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3111 % output routine. Generally, \partialpage will be empty when this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3112 % runs and this will be a no-op. See the indexspread.tex test case. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3113 \ifvoid\partialpage \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3114 \onepageout{\pagecontents\partialpage}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3115 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3116 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3117 \global\setbox\partialpage = \vbox{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3118 % Unvbox the main output page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3119 \unvbox\PAGE |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3120 \kern-\topskip \kern\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3121 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3122 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3123 \eject % run that output routine to set \partialpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3124 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3125 % Use the double-column output routine for subsequent pages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3126 \output = {\doublecolumnout}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3127 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3128 % Change the page size parameters. We could do this once outside this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3129 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3130 % format, but then we repeat the same computation. Repeating a couple |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3131 % of assignments once per index is clearly meaningless for the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3132 % execution time, so we may as well do it in one place. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3133 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3134 % First we halve the line length, less a little for the gutter between |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3135 % the columns. We compute the gutter based on the line length, so it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3136 % changes automatically with the paper format. The magic constant |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3137 % below is chosen so that the gutter has the same value (well, +-<1pt) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3138 % as it did when we hard-coded it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3139 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3140 % We put the result in a separate register, \doublecolumhsize, so we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3141 % can restore it in \pagesofar, after \hsize itself has (potentially) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3142 % been clobbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3143 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3144 \doublecolumnhsize = \hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3145 \advance\doublecolumnhsize by -.04154\hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3146 \divide\doublecolumnhsize by 2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3147 \hsize = \doublecolumnhsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3148 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3149 % Double the \vsize as well. (We don't need a separate register here, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3150 % since nobody clobbers \vsize.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3151 \advance\vsize by -\ht\partialpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3152 \vsize = 2\vsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3153 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3154 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3155 % The double-column output routine for all double-column pages except |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3156 % the last. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3157 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3158 \def\doublecolumnout{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3159 \splittopskip=\topskip \splitmaxdepth=\maxdepth |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3160 % Get the available space for the double columns -- the normal |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3161 % (undoubled) page height minus any material left over from the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3162 % previous page. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3163 \dimen@ = \vsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3164 \divide\dimen@ by 2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3165 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3166 % box0 will be the left-hand column, box2 the right. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3167 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3168 \onepageout\pagesofar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3169 \unvbox255 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3170 \penalty\outputpenalty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3171 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3172 \def\pagesofar{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3173 % Re-output the contents of the output page -- any previous material, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3174 % followed by the two boxes we just split, in box0 and box2. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3175 \unvbox\partialpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3176 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3177 \hsize = \doublecolumnhsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3178 \wd0=\hsize \wd2=\hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3179 \hbox to\pagewidth{\box0\hfil\box2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3180 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3181 \def\enddoublecolumns{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3182 \output = {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3183 % Split the last of the double-column material. Leave it on the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3184 % current page, no automatic page break. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3185 \balancecolumns |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3186 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3187 % If we end up splitting too much material for the current page, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3188 % though, there will be another page break right after this \output |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3189 % invocation ends. Having called \balancecolumns once, we do not |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3190 % want to call it again. Therefore, reset \output to its normal |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3191 % definition right away. (We hope \balancecolumns will never be |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3192 % called on to balance too much material, but if it is, this makes |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3193 % the output somewhat more palatable.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3194 \global\output = {\onepageout{\pagecontents\PAGE}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3195 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3196 \eject |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3197 \endgroup % started in \begindoublecolumns |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3198 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3199 % \pagegoal was set to the doubled \vsize above, since we restarted |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3200 % the current page. We're now back to normal single-column |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3201 % typesetting, so reset \pagegoal to the normal \vsize (after the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3202 % \endgroup where \vsize got restored). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3203 \pagegoal = \vsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3204 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3205 \def\balancecolumns{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3206 % Called at the end of the double column material. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3207 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3208 \dimen@ = \ht0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3209 \advance\dimen@ by \topskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3210 \advance\dimen@ by-\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3211 \divide\dimen@ by 2 % target to split to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3212 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3213 \splittopskip = \topskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3214 % Loop until we get a decent breakpoint. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3215 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3216 \vbadness = 10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3217 \loop |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3218 \global\setbox3 = \copy0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3219 \global\setbox1 = \vsplit3 to \dimen@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3220 \ifdim\ht3>\dimen@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3221 \global\advance\dimen@ by 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3222 \repeat |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3223 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3224 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3225 \setbox0=\vbox to\dimen@{\unvbox1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3226 \setbox2=\vbox to\dimen@{\unvbox3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3227 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3228 \pagesofar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3229 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3230 \catcode`\@ = \other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3231 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3232 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3233 \message{sectioning,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3234 % Chapters, sections, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3235 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3236 \newcount\chapno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3237 \newcount\secno \secno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3238 \newcount\subsecno \subsecno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3239 \newcount\subsubsecno \subsubsecno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3240 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3241 % This counter is funny since it counts through charcodes of letters A, B, ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3242 \newcount\appendixno \appendixno = `\@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3243 % \def\appendixletter{\char\the\appendixno} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3244 % We do the following for the sake of pdftex, which needs the actual |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3245 % letter in the expansion, not just typeset. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3246 \def\appendixletter{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3247 \ifnum\appendixno=`A A% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3248 \else\ifnum\appendixno=`B B% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3249 \else\ifnum\appendixno=`C C% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3250 \else\ifnum\appendixno=`D D% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3251 \else\ifnum\appendixno=`E E% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3252 \else\ifnum\appendixno=`F F% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3253 \else\ifnum\appendixno=`G G% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3254 \else\ifnum\appendixno=`H H% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3255 \else\ifnum\appendixno=`I I% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3256 \else\ifnum\appendixno=`J J% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3257 \else\ifnum\appendixno=`K K% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3258 \else\ifnum\appendixno=`L L% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3259 \else\ifnum\appendixno=`M M% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3260 \else\ifnum\appendixno=`N N% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3261 \else\ifnum\appendixno=`O O% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3262 \else\ifnum\appendixno=`P P% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3263 \else\ifnum\appendixno=`Q Q% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3264 \else\ifnum\appendixno=`R R% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3265 \else\ifnum\appendixno=`S S% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3266 \else\ifnum\appendixno=`T T% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3267 \else\ifnum\appendixno=`U U% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3268 \else\ifnum\appendixno=`V V% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3269 \else\ifnum\appendixno=`W W% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3270 \else\ifnum\appendixno=`X X% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3271 \else\ifnum\appendixno=`Y Y% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3272 \else\ifnum\appendixno=`Z Z% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3273 % The \the is necessary, despite appearances, because \appendixletter is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3274 % expanded while writing the .toc file. \char\appendixno is not |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3275 % expandable, thus it is written literally, thus all appendixes come out |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3276 % with the same letter (or @) in the toc without it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3277 \else\char\the\appendixno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3278 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3279 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3280 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3281 % Each @chapter defines this as the name of the chapter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3282 % page headings and footings can use it. @section does likewise. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3283 \def\thischapter{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3284 \def\thissection{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3285 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3286 \newcount\absseclevel % used to calculate proper heading level |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3287 \newcount\secbase\secbase=0 % @raise/lowersections modify this count |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3288 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3289 % @raisesections: treat @section as chapter, @subsection as section, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3290 \def\raisesections{\global\advance\secbase by -1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3291 \let\up=\raisesections % original BFox name |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3292 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3293 % @lowersections: treat @chapter as section, @section as subsection, etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3294 \def\lowersections{\global\advance\secbase by 1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3295 \let\down=\lowersections % original BFox name |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3296 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3297 % Choose a numbered-heading macro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3298 % #1 is heading level if unmodified by @raisesections or @lowersections |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3299 % #2 is text for heading |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3300 \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3301 \ifcase\absseclevel |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3302 \chapterzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3303 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3304 \seczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3305 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3306 \numberedsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3307 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3308 \numberedsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3309 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3310 \ifnum \absseclevel<0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3311 \chapterzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3312 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3313 \numberedsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3314 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3315 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3316 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3317 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3318 % like \numhead, but chooses appendix heading levels |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3319 \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3320 \ifcase\absseclevel |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3321 \appendixzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3322 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3323 \appendixsectionzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3324 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3325 \appendixsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3326 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3327 \appendixsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3328 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3329 \ifnum \absseclevel<0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3330 \appendixzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3331 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3332 \appendixsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3333 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3334 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3335 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3336 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3337 % like \numhead, but chooses numberless heading levels |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3338 \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3339 \ifcase\absseclevel |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3340 \unnumberedzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3341 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3342 \unnumberedseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3343 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3344 \unnumberedsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3345 \or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3346 \unnumberedsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3347 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3348 \ifnum \absseclevel<0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3349 \unnumberedzzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3350 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3351 \unnumberedsubsubseczzz{#2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3352 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3353 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3354 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3355 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3356 % @chapter, @appendix, @unnumbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3357 \def\thischaptername{No Chapter Title} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3358 \outer\def\chapter{\parsearg\chapteryyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3359 \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3360 \def\chapterzzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3361 \secno=0 \subsecno=0 \subsubsecno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3362 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3363 \chapmacro {#1}{\the\chapno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3364 \gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3365 \gdef\thischaptername{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3366 % We don't substitute the actual chapter name into \thischapter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3367 % because we don't want its macros evaluated now. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3368 \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3369 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3370 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3371 {\the\chapno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3372 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3373 \donoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3374 \global\let\section = \numberedsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3375 \global\let\subsection = \numberedsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3376 \global\let\subsubsection = \numberedsubsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3377 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3378 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3379 \outer\def\appendix{\parsearg\appendixyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3380 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3381 \def\appendixzzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3382 \secno=0 \subsecno=0 \subsubsecno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3383 \global\advance \appendixno by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3384 \message{\putwordAppendix\space \appendixletter}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3385 \chapmacro {#1}{\putwordAppendix{} \appendixletter}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3386 \gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3387 \gdef\thischaptername{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3388 \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3389 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3390 \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3391 {\putwordAppendix{} \appendixletter}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3392 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3393 \appendixnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3394 \global\let\section = \appendixsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3395 \global\let\subsection = \appendixsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3396 \global\let\subsubsection = \appendixsubsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3397 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3398 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3399 % @centerchap is like @unnumbered, but the heading is centered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3400 \outer\def\centerchap{\parsearg\centerchapyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3401 \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3402 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3403 % @top is like @unnumbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3404 \outer\def\top{\parsearg\unnumberedyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3405 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3406 \outer\def\unnumbered{\parsearg\unnumberedyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3407 \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3408 \def\unnumberedzzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3409 \secno=0 \subsecno=0 \subsubsecno=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3410 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3411 % This used to be simply \message{#1}, but TeX fully expands the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3412 % argument to \message. Therefore, if #1 contained @-commands, TeX |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3413 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3414 % expanded @cite (which turns out to cause errors because \cite is meant |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3415 % to be executed, not expanded). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3416 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3417 % Anyway, we don't want the fully-expanded definition of @cite to appear |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3418 % as a result of the \message, we just want `@cite' itself. We use |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3419 % \the<toks register> to achieve this: TeX expands \the<toks> only once, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3420 % simply yielding the contents of <toks register>. (We also do this for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3421 % the toc entries.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3422 \toks0 = {#1}\message{(\the\toks0)}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3423 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3424 \unnumbchapmacro {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3425 \gdef\thischapter{#1}\gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3426 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3427 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3428 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3429 \unnumbnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3430 \global\let\section = \unnumberedsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3431 \global\let\subsection = \unnumberedsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3432 \global\let\subsubsection = \unnumberedsubsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3433 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3434 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3435 % Sections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3436 \outer\def\numberedsec{\parsearg\secyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3437 \def\secyyy #1{\numhead1{#1}} % normally calls seczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3438 \def\seczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3439 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3440 \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3441 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3442 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3443 {\the\chapno}{\the\secno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3444 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3445 \donoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3446 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3447 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3448 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3449 \outer\def\appendixsection{\parsearg\appendixsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3450 \outer\def\appendixsec{\parsearg\appendixsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3451 \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3452 \def\appendixsectionzzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3453 \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3454 \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3455 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3456 \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3457 {\appendixletter}{\the\secno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3458 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3459 \appendixnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3460 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3461 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3462 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3463 \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3464 \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3465 \def\unnumberedseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3466 \plainsecheading {#1}\gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3467 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3468 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3469 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3470 \unnumbnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3471 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3472 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3473 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3474 % Subsections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3475 \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3476 \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3477 \def\numberedsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3478 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3479 \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3480 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3481 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3482 {\the\chapno}{\the\secno}{\the\subsecno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3483 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3484 \donoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3485 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3486 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3487 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3488 \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3489 \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3490 \def\appendixsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3491 \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3492 \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3493 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3494 \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3495 {\appendixletter}{\the\secno}{\the\subsecno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3496 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3497 \appendixnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3498 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3499 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3500 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3501 \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3502 \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3503 \def\unnumberedsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3504 \plainsubsecheading {#1}\gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3505 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3506 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3507 {\the\toks0}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3508 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3509 \unnumbnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3510 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3511 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3512 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3513 % Subsubsections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3514 \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3515 \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3516 \def\numberedsubsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3517 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3518 \subsubsecheading {#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3519 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3520 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3521 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3522 {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3523 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3524 \donoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3525 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3526 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3527 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3528 \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3529 \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3530 \def\appendixsubsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3531 \gdef\thissection{#1}\global\advance \subsubsecno by 1 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3532 \subsubsecheading {#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3533 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3534 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3535 \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3536 {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3537 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3538 \appendixnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3539 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3540 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3541 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3542 \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3543 \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3544 \def\unnumberedsubsubseczzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3545 \plainsubsubsecheading {#1}\gdef\thissection{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3546 \toks0 = {#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3547 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3548 {\the\toks0}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3549 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3550 \unnumbnoderef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3551 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3552 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3553 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3554 % These are variants which are not "outer", so they can appear in @ifinfo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3555 % Actually, they should now be obsolete; ordinary section commands should work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3556 \def\infotop{\parsearg\unnumberedzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3557 \def\infounnumbered{\parsearg\unnumberedzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3558 \def\infounnumberedsec{\parsearg\unnumberedseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3559 \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3560 \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3561 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3562 \def\infoappendix{\parsearg\appendixzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3563 \def\infoappendixsec{\parsearg\appendixseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3564 \def\infoappendixsubsec{\parsearg\appendixsubseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3565 \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3566 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3567 \def\infochapter{\parsearg\chapterzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3568 \def\infosection{\parsearg\sectionzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3569 \def\infosubsection{\parsearg\subsectionzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3570 \def\infosubsubsection{\parsearg\subsubsectionzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3571 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3572 % These macros control what the section commands do, according |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3573 % to what kind of chapter we are in (ordinary, appendix, or unnumbered). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3574 % Define them by default for a numbered chapter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3575 \global\let\section = \numberedsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3576 \global\let\subsection = \numberedsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3577 \global\let\subsubsection = \numberedsubsubsec |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3578 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3579 % Define @majorheading, @heading and @subheading |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3580 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3581 % NOTE on use of \vbox for chapter headings, section headings, and such: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3582 % 1) We use \vbox rather than the earlier \line to permit |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3583 % overlong headings to fold. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3584 % 2) \hyphenpenalty is set to 10000 because hyphenation in a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3585 % heading is obnoxious; this forbids it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3586 % 3) Likewise, headings look best if no \parindent is used, and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3587 % if justification is not attempted. Hence \raggedright. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3588 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3589 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3590 \def\majorheading{\parsearg\majorheadingzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3591 \def\majorheadingzzz #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3592 {\advance\chapheadingskip by 10pt \chapbreak }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3593 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3594 \parindent=0pt\raggedright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3595 \rm #1\hfill}}\bigskip \par\penalty 200} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3596 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3597 \def\chapheading{\parsearg\chapheadingzzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3598 \def\chapheadingzzz #1{\chapbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3599 {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3600 \parindent=0pt\raggedright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3601 \rm #1\hfill}}\bigskip \par\penalty 200} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3602 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3603 % @heading, @subheading, @subsubheading. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3604 \def\heading{\parsearg\plainsecheading} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3605 \def\subheading{\parsearg\plainsubsecheading} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3606 \def\subsubheading{\parsearg\plainsubsubsecheading} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3607 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3608 % These macros generate a chapter, section, etc. heading only |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3609 % (including whitespace, linebreaking, etc. around it), |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3610 % given all the information in convenient, parsed form. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3611 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3612 %%% Args are the skip and penalty (usually negative) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3613 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3614 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3615 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3616 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3617 %%% Define plain chapter starts, and page on/off switching for it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3618 % Parameter controlling skip before chapter headings (if needed) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3619 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3620 \newskip\chapheadingskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3621 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3622 \def\chapbreak{\dobreak \chapheadingskip {-4000}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3623 \def\chappager{\par\vfill\supereject} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3624 \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3625 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3626 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3627 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3628 \def\CHAPPAGoff{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3629 \global\let\contentsalignmacro = \chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3630 \global\let\pchapsepmacro=\chapbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3631 \global\let\pagealignmacro=\chappager} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3632 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3633 \def\CHAPPAGon{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3634 \global\let\contentsalignmacro = \chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3635 \global\let\pchapsepmacro=\chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3636 \global\let\pagealignmacro=\chappager |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3637 \global\def\HEADINGSon{\HEADINGSsingle}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3638 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3639 \def\CHAPPAGodd{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3640 \global\let\contentsalignmacro = \chapoddpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3641 \global\let\pchapsepmacro=\chapoddpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3642 \global\let\pagealignmacro=\chapoddpage |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3643 \global\def\HEADINGSon{\HEADINGSdouble}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3644 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3645 \CHAPPAGon |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3646 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3647 \def\CHAPFplain{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3648 \global\let\chapmacro=\chfplain |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3649 \global\let\unnumbchapmacro=\unnchfplain |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3650 \global\let\centerchapmacro=\centerchfplain} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3651 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3652 % Plain chapter opening. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3653 % #1 is the text, #2 the chapter number or empty if unnumbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3654 \def\chfplain#1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3655 \pchapsepmacro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3656 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3657 \chapfonts \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3658 \def\chapnum{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3659 \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3660 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3661 \hangindent = \wd0 \centerparametersmaybe |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3662 \unhbox0 #1\par}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3663 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3664 \nobreak\bigskip % no page break after a chapter title |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3665 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3666 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3667 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3668 % Plain opening for unnumbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3669 \def\unnchfplain#1{\chfplain{#1}{}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3670 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3671 % @centerchap -- centered and unnumbered. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3672 \let\centerparametersmaybe = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3673 \def\centerchfplain#1{{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3674 \def\centerparametersmaybe{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3675 \advance\rightskip by 3\rightskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3676 \leftskip = \rightskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3677 \parfillskip = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3678 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3679 \chfplain{#1}{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3680 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3681 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3682 \CHAPFplain % The default |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3683 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3684 \def\unnchfopen #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3685 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3686 \parindent=0pt\raggedright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3687 \rm #1\hfill}}\bigskip \par\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3688 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3689 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3690 \def\chfopen #1#2{\chapoddpage {\chapfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3691 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3692 \par\penalty 5000 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3693 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3694 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3695 \def\centerchfopen #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3696 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3697 \parindent=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3698 \hfill {\rm #1}\hfill}}\bigskip \par\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3699 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3700 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3701 \def\CHAPFopen{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3702 \global\let\chapmacro=\chfopen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3703 \global\let\unnumbchapmacro=\unnchfopen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3704 \global\let\centerchapmacro=\centerchfopen} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3705 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3706 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3707 % Section titles. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3708 \newskip\secheadingskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3709 \def\secheadingbreak{\dobreak \secheadingskip {-1000}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3710 \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3711 \def\plainsecheading#1{\sectionheading{sec}{}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3712 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3713 % Subsection titles. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3714 \newskip \subsecheadingskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3715 \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3716 \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3717 \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3718 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3719 % Subsubsection titles. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3720 \let\subsubsecheadingskip = \subsecheadingskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3721 \let\subsubsecheadingbreak = \subsecheadingbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3722 \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3723 \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3724 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3725 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3726 % Print any size section title. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3727 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3728 % #1 is the section type (sec/subsec/subsubsec), #2 is the section |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3729 % number (maybe empty), #3 the text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3730 \def\sectionheading#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3731 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3732 \expandafter\advance\csname #1headingskip\endcsname by \parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3733 \csname #1headingbreak\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3734 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3735 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3736 % Switch to the right set of fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3737 \csname #1fonts\endcsname \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3738 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3739 % Only insert the separating space if we have a section number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3740 \def\secnum{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3741 \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3742 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3743 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3744 \hangindent = \wd0 % zero if no section number |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3745 \unhbox0 #3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3746 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3747 \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3748 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3749 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3750 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3751 \message{toc,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3752 % Table of contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3753 \newwrite\tocfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3754 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3755 % Write an entry to the toc file, opening it if necessary. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3756 % Called from @chapter, etc. We supply {\folio} at the end of the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3757 % argument, which will end up as the last argument to the \...entry macro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3758 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3759 % We open the .toc file here instead of at @setfilename or any other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3760 % given time so that @contents can be put in the document anywhere. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3761 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3762 \newif\iftocfileopened |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3763 \def\writetocentry#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3764 \iftocfileopened\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3765 \immediate\openout\tocfile = \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3766 \global\tocfileopenedtrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3767 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3768 \iflinks \write\tocfile{#1{\folio}}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3769 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3770 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3771 \newskip\contentsrightmargin \contentsrightmargin=1in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3772 \newcount\savepageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3773 \newcount\lastnegativepageno \lastnegativepageno = -1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3774 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3775 % Finish up the main text and prepare to read what we've written |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3776 % to \tocfile. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3777 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3778 \def\startcontents#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3779 % If @setchapternewpage on, and @headings double, the contents should |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3780 % start on an odd page, unlike chapters. Thus, we maintain |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3781 % \contentsalignmacro in parallel with \pagealignmacro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3782 % From: Torbjorn Granlund <tege@matematik.su.se> |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3783 \contentsalignmacro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3784 \immediate\closeout\tocfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3785 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3786 % Don't need to put `Contents' or `Short Contents' in the headline. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3787 % It is abundantly clear what they are. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3788 \unnumbchapmacro{#1}\def\thischapter{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3789 \savepageno = \pageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3790 \begingroup % Set up to handle contents files properly. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3791 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3792 % We can't do this, because then an actual ^ in a section |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3793 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3794 %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3795 \raggedbottom % Worry more about breakpoints than the bottom. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3796 \advance\hsize by -\contentsrightmargin % Don't use the full line length. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3797 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3798 % Roman numerals for page numbers. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3799 \ifnum \pageno>0 \pageno = \lastnegativepageno \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3800 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3801 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3802 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3803 % Normal (long) toc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3804 \def\contents{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3805 \startcontents{\putwordTOC}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3806 \openin 1 \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3807 \ifeof 1 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3808 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3809 \input \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3810 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3811 \vfill \eject |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3812 \contentsalignmacro % in case @setchapternewpage odd is in effect |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3813 \pdfmakeoutlines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3814 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3815 \lastnegativepageno = \pageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3816 \pageno = \savepageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3817 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3818 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3819 % And just the chapters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3820 \def\summarycontents{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3821 \startcontents{\putwordShortTOC}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3822 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3823 \let\chapentry = \shortchapentry |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3824 \let\unnumbchapentry = \shortunnumberedentry |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3825 % We want a true roman here for the page numbers. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3826 \secfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3827 \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3828 \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3829 \hyphenpenalty = 10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3830 \advance\baselineskip by 1pt % Open it up a little. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3831 \def\secentry ##1##2##3##4{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3832 \def\unnumbsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3833 \def\subsecentry ##1##2##3##4##5{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3834 \def\unnumbsubsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3835 \def\subsubsecentry ##1##2##3##4##5##6{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3836 \def\unnumbsubsubsecentry ##1##2{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3837 \openin 1 \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3838 \ifeof 1 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3839 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3840 \input \jobname.toc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3841 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3842 \vfill \eject |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3843 \contentsalignmacro % in case @setchapternewpage odd is in effect |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3844 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3845 \lastnegativepageno = \pageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3846 \pageno = \savepageno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3847 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3848 \let\shortcontents = \summarycontents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3849 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3850 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3851 \pdfcatalog{/PageMode /UseOutlines}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3852 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3853 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3854 % These macros generate individual entries in the table of contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3855 % The first argument is the chapter or section name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3856 % The last argument is the page number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3857 % The arguments in between are the chapter number, section number, ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3858 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3859 % Chapter-level things, for both the long and short contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3860 \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3861 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3862 % See comments in \dochapentry re vbox and related settings |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3863 \def\shortchapentry#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3864 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3865 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3866 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3867 % Typeset the label for a chapter or appendix for the short contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3868 % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3869 % We could simplify the code here by writing out an \appendixentry |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3870 % command in the toc file for appendices, instead of using \chapentry |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3871 % for both, but it doesn't seem worth it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3872 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3873 \newdimen\shortappendixwidth |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3874 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3875 \def\shortchaplabel#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3876 % Compute width of word "Appendix", may change with language. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3877 \setbox0 = \hbox{\shortcontrm \putwordAppendix}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3878 \shortappendixwidth = \wd0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3879 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3880 % We typeset #1 in a box of constant width, regardless of the text of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3881 % #1, so the chapter titles will come out aligned. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3882 \setbox0 = \hbox{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3883 \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3884 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3885 % This space should be plenty, since a single number is .5em, and the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3886 % widest letter (M) is 1em, at least in the Computer Modern fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3887 % (This space doesn't include the extra space that gets added after |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3888 % the label; that gets put in by \shortchapentry above.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3889 \advance\dimen0 by 1.1em |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3890 \hbox to \dimen0{#1\hfil}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3891 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3892 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3893 \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3894 \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3895 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3896 % Sections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3897 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3898 \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3899 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3900 % Subsections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3901 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3902 \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3903 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3904 % And subsubsections. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3905 \def\subsubsecentry#1#2#3#4#5#6{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3906 \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3907 \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3908 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3909 % This parameter controls the indentation of the various levels. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3910 \newdimen\tocindent \tocindent = 3pc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3911 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3912 % Now for the actual typesetting. In all these, #1 is the text and #2 is the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3913 % page number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3914 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3915 % If the toc has to be broken over pages, we want it to be at chapters |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3916 % if at all possible; hence the \penalty. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3917 \def\dochapentry#1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3918 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3919 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3920 \chapentryfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3921 \tocentry{#1}{\dopageno\bgroup#2\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3922 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3923 \nobreak\vskip .25\baselineskip plus.1\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3924 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3925 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3926 \def\dosecentry#1#2{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3927 \secentryfonts \leftskip=\tocindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3928 \tocentry{#1}{\dopageno\bgroup#2\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3929 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3930 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3931 \def\dosubsecentry#1#2{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3932 \subsecentryfonts \leftskip=2\tocindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3933 \tocentry{#1}{\dopageno\bgroup#2\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3934 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3935 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3936 \def\dosubsubsecentry#1#2{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3937 \subsubsecentryfonts \leftskip=3\tocindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3938 \tocentry{#1}{\dopageno\bgroup#2\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3939 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3940 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3941 % Final typesetting of a toc entry; we use the same \entry macro as for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3942 % the index entries, but we want to suppress hyphenation here. (We |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3943 % can't do that in the \entry macro, since index entries might consist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3944 % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3945 \def\tocentry#1#2{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3946 \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3947 % Do not use \turnoffactive in these arguments. Since the toc is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3948 % typeset in cmr, so characters such as _ would come out wrong; we |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3949 % have to do the usual translation tricks. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3950 \entry{#1}{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3951 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3952 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3953 % Space between chapter (or whatever) number and the title. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3954 \def\labelspace{\hskip1em \relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3955 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3956 \def\dopageno#1{{\rm #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3957 \def\doshortpageno#1{{\rm #1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3958 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3959 \def\chapentryfonts{\secfonts \rm} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3960 \def\secentryfonts{\textfonts} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3961 \let\subsecentryfonts = \textfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3962 \let\subsubsecentryfonts = \textfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3963 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3964 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3965 \message{environments,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3966 % @foo ... @end foo. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3967 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3968 % Since these characters are used in examples, it should be an even number of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3969 % \tt widths. Each \tt character is 1en, so two makes it 1em. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3970 % Furthermore, these definitions must come after we define our fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3971 \newbox\dblarrowbox \newbox\longdblarrowbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3972 \newbox\pushcharbox \newbox\bullbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3973 \newbox\equivbox \newbox\errorbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3974 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3975 %{\tentt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3976 %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3977 %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3978 %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3979 %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3980 % Adapted from the manmac format (p.420 of TeXbook) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3981 %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3982 % depth .1ex\hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3983 %} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3984 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3985 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3986 \def\point{$\star$} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3987 \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3988 \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3989 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3990 \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3991 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3992 % Adapted from the TeXbook's \boxit. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3993 {\tentt \global\dimen0 = 3em}% Width of the box. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3994 \dimen2 = .55pt % Thickness of rules |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3995 % The text. (`r' is open on the right, `e' somewhat less so on the left.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3996 \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3997 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3998 \global\setbox\errorbox=\hbox to \dimen0{\hfil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
3999 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4000 \advance\hsize by -2\dimen2 % Rules. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4001 \vbox{ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4002 \hrule height\dimen2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4003 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4004 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4005 \kern3pt\vrule width\dimen2}% Space to right. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4006 \hrule height\dimen2} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4007 \hfil} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4008 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4009 % The @error{} command. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4010 \def\error{\leavevmode\lower.7ex\copy\errorbox} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4011 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4012 % @tex ... @end tex escapes into raw Tex temporarily. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4013 % One exception: @ is still an escape character, so that @end tex works. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4014 % But \@ or @@ will get a plain tex @ character. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4015 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4016 \def\tex{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4017 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4018 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4019 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4020 \catcode `\%=14 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4021 \catcode 43=12 % plus |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4022 \catcode`\"=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4023 \catcode`\==12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4024 \catcode`\|=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4025 \catcode`\<=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4026 \catcode`\>=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4027 \escapechar=`\\ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4028 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4029 \let\b=\ptexb |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4030 \let\bullet=\ptexbullet |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4031 \let\c=\ptexc |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4032 \let\,=\ptexcomma |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4033 \let\.=\ptexdot |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4034 \let\dots=\ptexdots |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4035 \let\equiv=\ptexequiv |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4036 \let\!=\ptexexclam |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4037 \let\i=\ptexi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4038 \let\{=\ptexlbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4039 \let\+=\tabalign |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4040 \let\}=\ptexrbrace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4041 \let\*=\ptexstar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4042 \let\t=\ptext |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4043 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4044 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4045 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4046 \def\@{@}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4047 \let\Etex=\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4048 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4049 % Define @lisp ... @endlisp. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4050 % @lisp does a \begingroup so it can rebind things, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4051 % including the definition of @endlisp (which normally is erroneous). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4052 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4053 % Amount to narrow the margins by for @lisp. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4054 \newskip\lispnarrowing \lispnarrowing=0.4in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4055 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4056 % This is the definition that ^^M gets inside @lisp, @example, and other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4057 % such environments. \null is better than a space, since it doesn't |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4058 % have any width. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4059 \def\lisppar{\null\endgraf} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4060 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4061 % Make each space character in the input produce a normal interword |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4062 % space in the output. Don't allow a line break at this space, as this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4063 % is used only in environments like @example, where each line of input |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4064 % should produce a line of output anyway. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4065 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4066 {\obeyspaces % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4067 \gdef\sepspaces{\obeyspaces\let =\tie}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4068 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4069 % Define \obeyedspace to be our active space, whatever it is. This is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4070 % for use in \parsearg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4071 {\sepspaces% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4072 \global\let\obeyedspace= } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4073 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4074 % This space is always present above and below environments. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4075 \newskip\envskipamount \envskipamount = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4076 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4077 % Make spacing and below environment symmetrical. We use \parskip here |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4078 % to help in doing that, since in @example-like environments \parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4079 % is reset to zero; thus the \afterenvbreak inserts no space -- but the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4080 % start of the next paragraph will insert \parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4081 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4082 \def\aboveenvbreak{{\advance\envskipamount by \parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4083 \endgraf \ifdim\lastskip<\envskipamount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4084 \removelastskip \penalty-50 \vskip\envskipamount \fi}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4085 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4086 \let\afterenvbreak = \aboveenvbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4087 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4088 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4089 \let\nonarrowing=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4090 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4091 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4092 % environment contents. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4093 \font\circle=lcircle10 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4094 \newdimen\circthick |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4095 \newdimen\cartouter\newdimen\cartinner |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4096 \newskip\normbskip\newskip\normpskip\newskip\normlskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4097 \circthick=\fontdimen8\circle |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4098 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4099 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4100 \def\ctr{{\hskip 6pt\circle\char'010}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4101 \def\cbl{{\circle\char'012\hskip -6pt}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4102 \def\cbr{{\hskip 6pt\circle\char'011}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4103 \def\carttop{\hbox to \cartouter{\hskip\lskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4104 \ctl\leaders\hrule height\circthick\hfil\ctr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4105 \hskip\rskip}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4106 \def\cartbot{\hbox to \cartouter{\hskip\lskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4107 \cbl\leaders\hrule height\circthick\hfil\cbr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4108 \hskip\rskip}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4109 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4110 \newskip\lskip\newskip\rskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4111 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4112 \long\def\cartouche{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4113 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4114 \lskip=\leftskip \rskip=\rightskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4115 \leftskip=0pt\rightskip=0pt %we want these *outside*. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4116 \cartinner=\hsize \advance\cartinner by-\lskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4117 \advance\cartinner by-\rskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4118 \cartouter=\hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4119 \advance\cartouter by 18.4pt % allow for 3pt kerns on either |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4120 % side, and for 6pt waste from |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4121 % each corner char, and rule thickness |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4122 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4123 % Flag to tell @lisp, etc., not to narrow margin. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4124 \let\nonarrowing=\comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4125 \vbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4126 \baselineskip=0pt\parskip=0pt\lineskip=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4127 \carttop |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4128 \hbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4129 \hskip\lskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4130 \vrule\kern3pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4131 \vbox\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4132 \hsize=\cartinner |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4133 \kern3pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4134 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4135 \baselineskip=\normbskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4136 \lineskip=\normlskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4137 \parskip=\normpskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4138 \vskip -\parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4139 \def\Ecartouche{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4140 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4141 \kern3pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4142 \egroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4143 \kern3pt\vrule |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4144 \hskip\rskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4145 \egroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4146 \cartbot |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4147 \egroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4148 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4149 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4150 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4151 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4152 % This macro is called at the beginning of all the @example variants, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4153 % inside a group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4154 \def\nonfillstart{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4155 \aboveenvbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4156 \inENV % This group ends at the end of the body |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4157 \hfuzz = 12pt % Don't be fussy |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4158 \sepspaces % Make spaces be word-separators rather than space tokens. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4159 \singlespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4160 \let\par = \lisppar % don't ignore blank lines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4161 \obeylines % each line of input is a line of output |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4162 \parskip = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4163 \parindent = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4164 \emergencystretch = 0pt % don't try to avoid overfull boxes |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4165 % @cartouche defines \nonarrowing to inhibit narrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4166 % at next level down. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4167 \ifx\nonarrowing\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4168 \advance \leftskip by \lispnarrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4169 \exdentamount=\lispnarrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4170 \let\exdent=\nofillexdent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4171 \let\nonarrowing=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4172 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4173 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4174 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4175 % Define the \E... control sequence only if we are inside the particular |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4176 % environment, so the error checking in \end will work. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4177 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4178 % To end an @example-like environment, we first end the paragraph (via |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4179 % \afterenvbreak's vertical glue), and then the group. That way we keep |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4180 % the zero \parskip that the environments set -- \parskip glue will be |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4181 % inserted at the beginning of the next paragraph in the document, after |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4182 % the environment. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4183 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4184 \def\nonfillfinish{\afterenvbreak\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4185 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4186 % @lisp: indented, narrowed, typewriter font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4187 \def\lisp{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4188 \nonfillstart |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4189 \let\Elisp = \nonfillfinish |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4190 \tt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4191 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4192 \gobble % eat return |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4193 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4194 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4195 % @example: Same as @lisp. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4196 \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4197 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4198 % @small... is usually equivalent to the non-small (@smallbook |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4199 % redefines). We must call \example (or whatever) last in the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4200 % definition, since it reads the return following the @example (or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4201 % whatever) command. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4202 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4203 % This actually allows (for example) @end display inside an |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4204 % @smalldisplay. Too bad, but makeinfo will catch the error anyway. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4205 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4206 \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4207 \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4208 \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4209 \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4210 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4211 % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4212 % Originally contributed by Pavel@xerox. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4213 \def\smalllispx{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4214 \def\Esmalllisp{\nonfillfinish\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4215 \def\Esmallexample{\nonfillfinish\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4216 \smallfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4217 \lisp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4218 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4219 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4220 % @display: same as @lisp except keep current font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4221 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4222 \def\display{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4223 \nonfillstart |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4224 \let\Edisplay = \nonfillfinish |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4225 \gobble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4226 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4227 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4228 % @smalldisplay (when @smallbook): @display plus smaller fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4229 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4230 \def\smalldisplayx{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4231 \def\Esmalldisplay{\nonfillfinish\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4232 \smallfonts \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4233 \display |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4234 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4235 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4236 % @format: same as @display except don't narrow margins. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4237 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4238 \def\format{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4239 \let\nonarrowing = t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4240 \nonfillstart |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4241 \let\Eformat = \nonfillfinish |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4242 \gobble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4243 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4244 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4245 % @smallformat (when @smallbook): @format plus smaller fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4246 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4247 \def\smallformatx{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4248 \def\Esmallformat{\nonfillfinish\endgroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4249 \smallfonts \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4250 \format |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4251 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4252 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4253 % @flushleft (same as @format). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4254 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4255 \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4256 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4257 % @flushright. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4258 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4259 \def\flushright{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4260 \let\nonarrowing = t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4261 \nonfillstart |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4262 \let\Eflushright = \nonfillfinish |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4263 \advance\leftskip by 0pt plus 1fill |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4264 \gobble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4265 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4266 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4267 % @quotation does normal linebreaking (hence we can't use \nonfillstart) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4268 % and narrows the margins. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4269 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4270 \def\quotation{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4271 \begingroup\inENV %This group ends at the end of the @quotation body |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4272 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4273 \singlespace |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4274 \parindent=0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4275 % We have retained a nonzero parskip for the environment, since we're |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4276 % doing normal filling. So to avoid extra space below the environment... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4277 \def\Equotation{\parskip = 0pt \nonfillfinish}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4278 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4279 % @cartouche defines \nonarrowing to inhibit narrowing at next level down. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4280 \ifx\nonarrowing\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4281 \advance\leftskip by \lispnarrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4282 \advance\rightskip by \lispnarrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4283 \exdentamount = \lispnarrowing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4284 \let\nonarrowing = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4285 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4286 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4287 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4288 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4289 \message{defuns,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4290 % @defun etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4291 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4292 % Allow user to change definition object font (\df) internally |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4293 \def\setdeffont #1 {\csname DEF#1\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4294 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4295 \newskip\defbodyindent \defbodyindent=.4in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4296 \newskip\defargsindent \defargsindent=50pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4297 \newskip\deftypemargin \deftypemargin=12pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4298 \newskip\deflastargmargin \deflastargmargin=18pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4299 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4300 \newcount\parencount |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4301 % define \functionparens, which makes ( and ) and & do special things. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4302 % \functionparens affects the group it is contained in. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4303 \def\activeparens{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4304 \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4305 \catcode`\[=\active \catcode`\]=\active} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4306 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4307 % Make control sequences which act like normal parenthesis chars. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4308 \let\lparen = ( \let\rparen = ) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4309 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4310 {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4311 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4312 % Be sure that we always have a definition for `(', etc. For example, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4313 % if the fn name has parens in it, \boldbrax will not be in effect yet, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4314 % so TeX would otherwise complain about undefined control sequence. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4315 \global\let(=\lparen \global\let)=\rparen |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4316 \global\let[=\lbrack \global\let]=\rbrack |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4317 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4318 \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4319 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4320 % This is used to turn on special parens |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4321 % but make & act ordinary (given that it's active). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4322 \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4323 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4324 % Definitions of (, ) and & used in args for functions. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4325 % This is the definition of ( outside of all parentheses. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4326 \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4327 \global\advance\parencount by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4328 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4329 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4330 % This is the definition of ( when already inside a level of parens. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4331 \gdef\opnested{\char`\(\global\advance\parencount by 1 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4332 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4333 \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4334 % also in that case restore the outer-level definition of (. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4335 \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4336 \global\advance \parencount by -1 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4337 % If we encounter &foo, then turn on ()-hacking afterwards |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4338 \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4339 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4340 \gdef\normalparens{\boldbrax\let&=\ampnr} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4341 } % End of definition inside \activeparens |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4342 %% These parens (in \boldbrax) actually are a little bolder than the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4343 %% contained text. This is especially needed for [ and ] |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4344 \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4345 \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4346 \let\ampnr = \& |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4347 \def\lbrb{{\bf\char`\[}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4348 \def\rbrb{{\bf\char`\]}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4349 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4350 % Active &'s sneak into the index arguments, so make sure it's defined. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4351 { |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4352 \catcode`& = 13 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4353 \global\let& = \ampnr |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4354 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4355 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4356 % First, defname, which formats the header line itself. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4357 % #1 should be the function name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4358 % #2 should be the type of definition, such as "Function". |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4359 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4360 \def\defname #1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4361 % Get the values of \leftskip and \rightskip as they were |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4362 % outside the @def... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4363 \dimen2=\leftskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4364 \advance\dimen2 by -\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4365 \noindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4366 \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4367 \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4368 \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4369 \parshape 2 0in \dimen0 \defargsindent \dimen1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4370 % Now output arg 2 ("Function" or some such) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4371 % ending at \deftypemargin from the right margin, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4372 % but stuck inside a box of width 0 so it does not interfere with linebreaking |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4373 {% Adjust \hsize to exclude the ambient margins, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4374 % so that \rightline will obey them. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4375 \advance \hsize by -\dimen2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4376 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4377 % Make all lines underfull and no complaints: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4378 \tolerance=10000 \hbadness=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4379 \advance\leftskip by -\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4380 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4381 {\df #1}\enskip % Generate function name |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4382 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4383 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4384 % Actually process the body of a definition |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4385 % #1 should be the terminating control sequence, such as \Edefun. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4386 % #2 should be the "another name" control sequence, such as \defunx. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4387 % #3 should be the control sequence that actually processes the header, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4388 % such as \defunheader. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4389 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4390 \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4391 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4392 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4393 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4394 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4395 \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4396 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4397 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4398 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4399 \begingroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4400 \catcode 61=\active % 61 is `=' |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4401 \obeylines\activeparens\spacesplit#3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4402 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4403 % #1 is the \E... control sequence to end the definition (which we define). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4404 % #2 is the \...x control sequence for consecutive fns (which we define). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4405 % #3 is the control sequence to call to resume processing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4406 % #4, delimited by the space, is the class name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4407 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4408 \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4409 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4410 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4411 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4412 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4413 \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4414 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4415 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4416 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4417 \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4418 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4419 % Used for @deftypemethod and @deftypeivar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4420 % #1 is the \E... control sequence to end the definition (which we define). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4421 % #2 is the \...x control sequence for consecutive fns (which we define). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4422 % #3 is the control sequence to call to resume processing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4423 % #4, delimited by a space, is the class name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4424 % #5 is the method's return type. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4425 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4426 \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4427 \medbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4428 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4429 \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4430 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4431 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4432 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4433 \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4434 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4435 % Used for @deftypeop. The change from \deftypemethparsebody is an |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4436 % extra argument at the beginning which is the `category', instead of it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4437 % being the hardwired string `Method' or `Instance Variable'. We have |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4438 % to account for this both in the \...x definition and in parsing the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4439 % input at hand. Thus also need a control sequence (passed as #5) for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4440 % the \E... definition to assign the category name to. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4441 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4442 \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4443 \medbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4444 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4445 \def#2##1 ##2 ##3 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4446 \def#4{##1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4447 \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4448 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4449 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4450 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4451 \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4452 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4453 \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4454 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4455 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4456 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4457 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4458 \def#2##1 ##2 {\def#4{##1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4459 \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4460 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4461 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4462 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4463 \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4464 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4465 % These parsing functions are similar to the preceding ones |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4466 % except that they do not make parens into active characters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4467 % These are used for "variables" since they have no arguments. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4468 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4469 \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4470 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4471 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4472 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4473 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4474 \def#2{\begingroup\obeylines\spacesplit#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4475 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4476 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4477 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4478 \begingroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4479 \catcode 61=\active % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4480 \obeylines\spacesplit#3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4481 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4482 % This is used for \def{tp,vr}parsebody. It could probably be used for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4483 % some of the others, too, with some judicious conditionals. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4484 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4485 \def\parsebodycommon#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4486 \begingroup\inENV % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4487 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4488 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4489 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4490 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4491 \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4492 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4493 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4494 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4495 \begingroup\obeylines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4496 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4497 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4498 \def\defvrparsebody#1#2#3#4 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4499 \parsebodycommon{#1}{#2}{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4500 \spacesplit{#3{#4}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4501 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4502 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4503 % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4504 % type is just `struct', because we lose the braces in `{struct |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4505 % termios}' when \spacesplit reads its undelimited argument. Sigh. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4506 % \let\deftpparsebody=\defvrparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4507 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4508 % So, to get around this, we put \empty in with the type name. That |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4509 % way, TeX won't find exactly `{...}' as an undelimited argument, and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4510 % won't strip off the braces. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4511 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4512 \def\deftpparsebody #1#2#3#4 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4513 \parsebodycommon{#1}{#2}{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4514 \spacesplit{\parsetpheaderline{#3{#4}}}\empty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4515 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4516 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4517 % Fine, but then we have to eventually remove the \empty *and* the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4518 % braces (if any). That's what this does. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4519 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4520 \def\removeemptybraces\empty#1\relax{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4521 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4522 % After \spacesplit has done its work, this is called -- #1 is the final |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4523 % thing to call, #2 the type name (which starts with \empty), and #3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4524 % (which might be empty) the arguments. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4525 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4526 \def\parsetpheaderline#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4527 #1{\removeemptybraces#2\relax}{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4528 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4529 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4530 \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4531 \medbreak % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4532 % Define the end token that this defining construct specifies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4533 % so that it will exit this group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4534 \def#1{\endgraf\endgroup\medbreak}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4535 \def#2##1 ##2 {\def#4{##1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4536 \begingroup\obeylines\spacesplit{#3{##2}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4537 \parindent=0in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4538 \advance\leftskip by \defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4539 \exdentamount=\defbodyindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4540 \begingroup\obeylines\spacesplit{#3{#5}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4541 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4542 % Split up #2 at the first space token. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4543 % call #1 with two arguments: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4544 % the first is all of #2 before the space token, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4545 % the second is all of #2 after that space token. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4546 % If #2 contains no space token, all of it is passed as the first arg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4547 % and the second is passed as empty. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4548 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4549 {\obeylines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4550 \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4551 \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4552 \ifx\relax #3% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4553 #1{#2}{}\else #1{#2}{#3#4}\fi}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4554 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4555 % So much for the things common to all kinds of definitions. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4556 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4557 % Define @defun. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4558 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4559 % First, define the processing that is wanted for arguments of \defun |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4560 % Use this to expand the args and terminate the paragraph they make up |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4561 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4562 \def\defunargs#1{\functionparens \sl |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4563 % Expand, preventing hyphenation at `-' chars. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4564 % Note that groups don't affect changes in \hyphenchar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4565 % Set the font temporarily and use \font in case \setfont made \tensl a macro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4566 {\tensl\hyphenchar\font=0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4567 #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4568 {\tensl\hyphenchar\font=45}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4569 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4570 \interlinepenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4571 \advance\rightskip by 0pt plus 1fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4572 \endgraf\nobreak\vskip -\parskip\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4573 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4574 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4575 \def\deftypefunargs #1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4576 % Expand, preventing hyphenation at `-' chars. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4577 % Note that groups don't affect changes in \hyphenchar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4578 % Use \boldbraxnoamp, not \functionparens, so that & is not special. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4579 \boldbraxnoamp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4580 \tclose{#1}% avoid \code because of side effects on active chars |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4581 \interlinepenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4582 \advance\rightskip by 0pt plus 1fil |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4583 \endgraf\nobreak\vskip -\parskip\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4584 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4585 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4586 % Do complete processing of one @defun or @defunx line already parsed. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4587 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4588 % @deffn Command forward-char nchars |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4589 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4590 \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4591 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4592 \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4593 \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4594 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4595 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4596 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4597 % @defun == @deffn Function |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4598 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4599 \def\defun{\defparsebody\Edefun\defunx\defunheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4600 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4601 \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4602 \begingroup\defname {#1}{\putwordDeffunc}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4603 \defunargs {#2}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4604 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4605 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4606 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4607 % @deftypefun int foobar (int @var{foo}, float @var{bar}) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4608 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4609 \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4610 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4611 % #1 is the data type. #2 is the name and args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4612 \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4613 % #1 is the data type, #2 the name, #3 the args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4614 \def\deftypefunheaderx #1#2 #3\relax{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4615 \doind {fn}{\code{#2}}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4616 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4617 \deftypefunargs {#3}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4618 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4619 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4620 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4621 % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4622 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4623 \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4624 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4625 % \defheaderxcond#1\relax$$$ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4626 % puts #1 in @code, followed by a space, but does nothing if #1 is null. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4627 \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4628 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4629 % #1 is the classification. #2 is the data type. #3 is the name and args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4630 \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4631 % #1 is the classification, #2 the data type, #3 the name, #4 the args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4632 \def\deftypefnheaderx #1#2#3 #4\relax{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4633 \doind {fn}{\code{#3}}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4634 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4635 \normalparens % notably, turn off `&' magic, which prevents |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4636 % at least some C++ text from working |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4637 \defname {\defheaderxcond#2\relax$$$#3}{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4638 \deftypefunargs {#4}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4639 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4640 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4641 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4642 % @defmac == @deffn Macro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4643 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4644 \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4645 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4646 \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4647 \begingroup\defname {#1}{\putwordDefmac}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4648 \defunargs {#2}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4649 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4650 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4651 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4652 % @defspec == @deffn Special Form |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4653 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4654 \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4655 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4656 \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4657 \begingroup\defname {#1}{\putwordDefspec}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4658 \defunargs {#2}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4659 \catcode 61=\other % Turn off change made in \defparsebody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4660 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4661 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4662 % @defop CATEGORY CLASS OPERATION ARG... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4663 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4664 \def\defop #1 {\def\defoptype{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4665 \defopparsebody\Edefop\defopx\defopheader\defoptype} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4666 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4667 \def\defopheader#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4668 \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4669 \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4670 \defunargs {#3}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4671 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4672 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4673 % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4674 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4675 \def\deftypeop #1 {\def\deftypeopcategory{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4676 \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4677 \deftypeopcategory} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4678 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4679 % #1 is the class name, #2 the data type, #3 the operation name, #4 the args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4680 \def\deftypeopheader#1#2#3#4{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4681 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4682 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4683 \defname{\defheaderxcond#2\relax$$$#3} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4684 {\deftypeopcategory\ \putwordon\ \code{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4685 \deftypefunargs{#4}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4686 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4687 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4688 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4689 % @deftypemethod CLASS TYPE METHOD ARG... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4690 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4691 \def\deftypemethod{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4692 \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4693 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4694 % #1 is the class name, #2 the data type, #3 the method name, #4 the args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4695 \def\deftypemethodheader#1#2#3#4{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4696 \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4697 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4698 \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4699 \deftypefunargs{#4}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4700 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4701 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4702 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4703 % @deftypeivar CLASS TYPE VARNAME |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4704 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4705 \def\deftypeivar{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4706 \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4707 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4708 % #1 is the class name, #2 the data type, #3 the variable name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4709 \def\deftypeivarheader#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4710 \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4711 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4712 \defname{#3}{\putwordInstanceVariableof\ \code{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4713 \defvarargs{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4714 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4715 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4716 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4717 % @defmethod == @defop Method |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4718 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4719 \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4720 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4721 % #1 is the class name, #2 the method name, #3 the args. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4722 \def\defmethodheader#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4723 \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4724 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4725 \defname{#2}{\putwordMethodon\ \code{#1}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4726 \defunargs{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4727 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4728 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4729 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4730 % @defcv {Class Option} foo-class foo-flag |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4731 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4732 \def\defcv #1 {\def\defcvtype{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4733 \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4734 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4735 \def\defcvarheader #1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4736 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4737 \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4738 \defvarargs {#3}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4739 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4740 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4741 % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4742 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4743 \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4744 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4745 \def\defivarheader#1#2#3{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4746 \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4747 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4748 \defname{#2}{\putwordInstanceVariableof\ #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4749 \defvarargs{#3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4750 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4751 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4752 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4753 % @defvar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4754 % First, define the processing that is wanted for arguments of @defvar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4755 % This is actually simple: just print them in roman. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4756 % This must expand the args and terminate the paragraph they make up |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4757 \def\defvarargs #1{\normalparens #1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4758 \interlinepenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4759 \endgraf\nobreak\vskip -\parskip\nobreak} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4760 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4761 % @defvr Counter foo-count |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4762 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4763 \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4764 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4765 \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4766 \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4767 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4768 % @defvar == @defvr Variable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4769 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4770 \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4771 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4772 \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4773 \begingroup\defname {#1}{\putwordDefvar}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4774 \defvarargs {#2}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4775 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4776 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4777 % @defopt == @defvr {User Option} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4778 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4779 \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4780 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4781 \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4782 \begingroup\defname {#1}{\putwordDefopt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4783 \defvarargs {#2}\endgroup % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4784 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4785 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4786 % @deftypevar int foobar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4787 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4788 \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4789 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4790 % #1 is the data type. #2 is the name, perhaps followed by text that |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4791 % is actually part of the data type, which should not be put into the index. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4792 \def\deftypevarheader #1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4793 \dovarind#2 \relax% Make entry in variables index |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4794 \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4795 \interlinepenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4796 \endgraf\nobreak\vskip -\parskip\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4797 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4798 \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4799 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4800 % @deftypevr {Global Flag} int enable |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4801 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4802 \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4803 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4804 \def\deftypevrheader #1#2#3{\dovarind#3 \relax% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4805 \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4806 \interlinepenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4807 \endgraf\nobreak\vskip -\parskip\nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4808 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4809 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4810 % Now define @deftp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4811 % Args are printed in bold, a slight difference from @defvar. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4812 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4813 \def\deftpargs #1{\bf \defvarargs{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4814 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4815 % @deftp Class window height width ... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4816 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4817 \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4818 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4819 \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4820 \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4821 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4822 % These definitions are used if you use @defunx (etc.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4823 % anywhere other than immediately after a @defun or @defunx. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4824 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4825 \def\defcvx#1 {\errmessage{@defcvx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4826 \def\deffnx#1 {\errmessage{@deffnx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4827 \def\defivarx#1 {\errmessage{@defivarx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4828 \def\defmacx#1 {\errmessage{@defmacx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4829 \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4830 \def\defoptx #1 {\errmessage{@defoptx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4831 \def\defopx#1 {\errmessage{@defopx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4832 \def\defspecx#1 {\errmessage{@defspecx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4833 \def\deftpx#1 {\errmessage{@deftpx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4834 \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4835 \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4836 \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4837 \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4838 \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4839 \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4840 \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4841 \def\defunx#1 {\errmessage{@defunx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4842 \def\defvarx#1 {\errmessage{@defvarx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4843 \def\defvrx#1 {\errmessage{@defvrx in invalid context}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4844 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4845 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4846 \message{macros,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4847 % @macro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4848 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4849 % To do this right we need a feature of e-TeX, \scantokens, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4850 % which we arrange to emulate with a temporary file in ordinary TeX. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4851 \ifx\eTeXversion\undefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4852 \newwrite\macscribble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4853 \def\scanmacro#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4854 \begingroup \newlinechar`\^^M |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4855 % Undo catcode changes of \startcontents and \doprintindex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4856 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4857 % Append \endinput to make sure that TeX does not see the ending newline. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4858 \toks0={#1\endinput}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4859 \immediate\openout\macscribble=\jobname.tmp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4860 \immediate\write\macscribble{\the\toks0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4861 \immediate\closeout\macscribble |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4862 \let\xeatspaces\eatspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4863 \input \jobname.tmp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4864 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4865 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4866 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4867 \def\scanmacro#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4868 \begingroup \newlinechar`\^^M |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4869 % Undo catcode changes of \startcontents and \doprintindex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4870 \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4871 \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4872 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4873 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4874 \newcount\paramno % Count of parameters |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4875 \newtoks\macname % Macro name |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4876 \newif\ifrecursive % Is it recursive? |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4877 \def\macrolist{} % List of all defined macros in the form |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4878 % \do\macro1\do\macro2... |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4879 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4880 % Utility routines. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4881 % Thisdoes \let #1 = #2, except with \csnames. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4882 \def\cslet#1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4883 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4884 \expandafter\let |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4885 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4886 \csname#1\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4887 \csname#2\endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4888 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4889 % Trim leading and trailing spaces off a string. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4890 % Concepts from aro-bend problem 15 (see CTAN). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4891 {\catcode`\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4892 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4893 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4894 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4895 \def\unbrace#1{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4896 \unbrace{\gdef\trim@@@ #1 } #2@{#1} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4897 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4898 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4899 % Trim a single trailing ^^M off a string. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4900 {\catcode`\^^M=12\catcode`\Q=3% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4901 \gdef\eatcr #1{\eatcra #1Q^^MQ}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4902 \gdef\eatcra#1^^MQ{\eatcrb#1Q}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4903 \gdef\eatcrb#1Q#2Q{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4904 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4905 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4906 % Macro bodies are absorbed as an argument in a context where |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4907 % all characters are catcode 10, 11 or 12, except \ which is active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4908 % (as in normal texinfo). It is necessary to change the definition of \. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4909 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4910 % It's necessary to have hard CRs when the macro is executed. This is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4911 % done by making ^^M (\endlinechar) catcode 12 when reading the macro |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4912 % body, and then making it the \newlinechar in \scanmacro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4913 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4914 \def\macrobodyctxt{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4915 \catcode`\~=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4916 \catcode`\^=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4917 \catcode`\_=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4918 \catcode`\|=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4919 \catcode`\<=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4920 \catcode`\>=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4921 \catcode`\+=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4922 \catcode`\{=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4923 \catcode`\}=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4924 \catcode`\@=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4925 \catcode`\^^M=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4926 \usembodybackslash} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4927 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4928 \def\macroargctxt{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4929 \catcode`\~=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4930 \catcode`\^=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4931 \catcode`\_=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4932 \catcode`\|=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4933 \catcode`\<=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4934 \catcode`\>=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4935 \catcode`\+=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4936 \catcode`\@=12 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4937 \catcode`\\=12} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4938 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4939 % \mbodybackslash is the definition of \ in @macro bodies. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4940 % It maps \foo\ => \csname macarg.foo\endcsname => #N |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4941 % where N is the macro parameter number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4942 % We define \csname macarg.\endcsname to be \realbackslash, so |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4943 % \\ in macro replacement text gets you a backslash. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4944 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4945 {\catcode`@=0 @catcode`@\=@active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4946 @gdef@usembodybackslash{@let\=@mbodybackslash} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4947 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4948 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4949 \expandafter\def\csname macarg.\endcsname{\realbackslash} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4950 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4951 \def\macro{\recursivefalse\parsearg\macroxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4952 \def\rmacro{\recursivetrue\parsearg\macroxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4953 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4954 \def\macroxxx#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4955 \getargs{#1}% now \macname is the macname and \argl the arglist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4956 \ifx\argl\empty % no arguments |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4957 \paramno=0% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4958 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4959 \expandafter\parsemargdef \argl;% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4960 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4961 \if1\csname ismacro.\the\macname\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4962 \message{Warning: redefining \the\macname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4963 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4964 \expandafter\ifx\csname \the\macname\endcsname \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4965 \else \errmessage{The name \the\macname\space is reserved}\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4966 \global\cslet{macsave.\the\macname}{\the\macname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4967 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4968 % Add the macroname to \macrolist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4969 \toks0 = \expandafter{\macrolist\do}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4970 \xdef\macrolist{\the\toks0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4971 \expandafter\noexpand\csname\the\macname\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4972 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4973 \begingroup \macrobodyctxt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4974 \ifrecursive \expandafter\parsermacbody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4975 \else \expandafter\parsemacbody |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4976 \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4977 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4978 \def\unmacro{\parsearg\unmacroxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4979 \def\unmacroxxx#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4980 \if1\csname ismacro.#1\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4981 \global\cslet{#1}{macsave.#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4982 \global\expandafter\let \csname ismacro.#1\endcsname=0% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4983 % Remove the macro name from \macrolist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4984 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4985 \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4986 \def\do##1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4987 \def\tempb{##1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4988 \ifx\tempa\tempb |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4989 % remove this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4990 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4991 \toks0 = \expandafter{\newmacrolist\do}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4992 \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4993 \fi}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4994 \def\newmacrolist{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4995 % Execute macro list to define \newmacrolist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4996 \macrolist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4997 \global\let\macrolist\newmacrolist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4998 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
4999 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5000 \errmessage{Macro #1 not defined}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5001 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5002 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5003 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5004 % This makes use of the obscure feature that if the last token of a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5005 % <parameter list> is #, then the preceding argument is delimited by |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5006 % an opening brace, and that opening brace is not consumed. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5007 \def\getargs#1{\getargsxxx#1{}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5008 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5009 \def\getmacname #1 #2\relax{\macname={#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5010 \def\getmacargs#1{\def\argl{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5011 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5012 % Parse the optional {params} list. Set up \paramno and \paramlist |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5013 % so \defmacro knows what to do. Define \macarg.blah for each blah |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5014 % in the params list, to be ##N where N is the position in that list. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5015 % That gets used by \mbodybackslash (above). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5016 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5017 % We need to get `macro parameter char #' into several definitions. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5018 % The technique used is stolen from LaTeX: let \hash be something |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5019 % unexpandable, insert that wherever you need a #, and then redefine |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5020 % it to # just before using the token list produced. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5021 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5022 % The same technique is used to protect \eatspaces till just before |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5023 % the macro is used. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5024 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5025 \def\parsemargdef#1;{\paramno=0\def\paramlist{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5026 \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5027 \def\parsemargdefxxx#1,{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5028 \if#1;\let\next=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5029 \else \let\next=\parsemargdefxxx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5030 \advance\paramno by 1% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5031 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5032 {\xeatspaces{\hash\the\paramno}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5033 \edef\paramlist{\paramlist\hash\the\paramno,}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5034 \fi\next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5035 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5036 % These two commands read recursive and nonrecursive macro bodies. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5037 % (They're different since rec and nonrec macros end differently.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5038 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5039 \long\def\parsemacbody#1@end macro% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5040 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5041 \long\def\parsermacbody#1@end rmacro% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5042 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5043 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5044 % This defines the macro itself. There are six cases: recursive and |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5045 % nonrecursive macros of zero, one, and many arguments. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5046 % Much magic with \expandafter here. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5047 % \xdef is used so that macro definitions will survive the file |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5048 % they're defined in; @include reads the file inside a group. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5049 \def\defmacro{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5050 \let\hash=##% convert placeholders to macro parameter chars |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5051 \ifrecursive |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5052 \ifcase\paramno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5053 % 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5054 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5055 \noexpand\scanmacro{\temp}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5056 \or % 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5057 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5058 \bgroup\noexpand\macroargctxt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5059 \noexpand\braceorline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5060 \expandafter\noexpand\csname\the\macname xxx\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5061 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5062 \egroup\noexpand\scanmacro{\temp}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5063 \else % many |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5064 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5065 \bgroup\noexpand\macroargctxt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5066 \noexpand\csname\the\macname xx\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5067 \expandafter\xdef\csname\the\macname xx\endcsname##1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5068 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5069 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5070 \expandafter\xdef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5071 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5072 \csname\the\macname xxx\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5073 \paramlist{\egroup\noexpand\scanmacro{\temp}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5074 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5075 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5076 \ifcase\paramno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5077 % 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5078 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5079 \noexpand\norecurse{\the\macname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5080 \noexpand\scanmacro{\temp}\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5081 \or % 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5082 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5083 \bgroup\noexpand\macroargctxt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5084 \noexpand\braceorline |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5085 \expandafter\noexpand\csname\the\macname xxx\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5086 \expandafter\xdef\csname\the\macname xxx\endcsname##1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5087 \egroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5088 \noexpand\norecurse{\the\macname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5089 \noexpand\scanmacro{\temp}\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5090 \else % many |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5091 \expandafter\xdef\csname\the\macname\endcsname{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5092 \bgroup\noexpand\macroargctxt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5093 \expandafter\noexpand\csname\the\macname xx\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5094 \expandafter\xdef\csname\the\macname xx\endcsname##1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5095 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5096 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5097 \expandafter\xdef |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5098 \expandafter\expandafter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5099 \csname\the\macname xxx\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5100 \paramlist{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5101 \egroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5102 \noexpand\norecurse{\the\macname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5103 \noexpand\scanmacro{\temp}\egroup}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5104 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5105 \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5106 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5107 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5108 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5109 % \braceorline decides whether the next nonwhitespace character is a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5110 % {. If so it reads up to the closing }, if not, it reads the whole |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5111 % line. Whatever was read is then fed to the next control sequence |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5112 % as an argument (by \parsebrace or \parsearg) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5113 \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5114 \def\braceorlinexxx{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5115 \ifx\nchar\bgroup\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5116 \expandafter\parsearg |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5117 \fi \next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5118 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5119 % We mant to disable all macros during \shipout so that they are not |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5120 % expanded by \write. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5121 \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5122 \edef\next{\macrolist}\expandafter\endgroup\next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5123 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5124 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5125 % @alias. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5126 % We need some trickery to remove the optional spaces around the equal |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5127 % sign. Just make them active and then expand them all to nothing. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5128 \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5129 \def\aliasxxx #1{\aliasyyy#1\relax} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5130 \def\aliasyyy #1=#2\relax{\ignoreactivespaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5131 \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5132 \expandafter\noexpand\csname#2\endcsname}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5133 \expandafter\endgroup\next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5134 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5135 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5136 \message{cross references,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5137 % @xref etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5138 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5139 \newwrite\auxfile |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5140 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5141 \newif\ifhavexrefs % True if xref values are known. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5142 \newif\ifwarnedxrefs % True if we warned once that they aren't known. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5143 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5144 % @inforef is relatively simple. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5145 \def\inforef #1{\inforefzzz #1,,,,**} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5146 \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5147 node \samp{\ignorespaces#1{}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5148 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5149 % @node's job is to define \lastnode. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5150 \def\node{\ENVcheck\parsearg\nodezzz} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5151 \def\nodezzz#1{\nodexxx [#1,]} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5152 \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5153 \let\nwnode=\node |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5154 \let\lastnode=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5155 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5156 % The sectioning commands (@chapter, etc.) call these. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5157 \def\donoderef{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5158 \ifx\lastnode\relax\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5159 \expandafter\expandafter\expandafter\setref{\lastnode}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5160 {Ysectionnumberandtype}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5161 \global\let\lastnode=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5162 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5163 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5164 \def\unnumbnoderef{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5165 \ifx\lastnode\relax\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5166 \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5167 \global\let\lastnode=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5168 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5169 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5170 \def\appendixnoderef{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5171 \ifx\lastnode\relax\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5172 \expandafter\expandafter\expandafter\setref{\lastnode}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5173 {Yappendixletterandtype}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5174 \global\let\lastnode=\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5175 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5176 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5177 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5178 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5179 % @anchor{NAME} -- define xref target at arbitrary point. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5180 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5181 \newcount\savesfregister |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5182 \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5183 \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5184 \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5185 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5186 % \setref{NAME}{SNT} defines a cross-reference point NAME, namely |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5187 % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5188 % to set \indexdummies so commands such as @code in a section title |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5189 % aren't expanded. It would be nicer not to expand the titles in the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5190 % first place, but there's so many layers that that is hard to do. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5191 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5192 \def\setref#1#2{{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5193 \indexdummies |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5194 \pdfmkdest{#1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5195 \dosetq{#1-title}{Ytitle}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5196 \dosetq{#1-pg}{Ypagenumber}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5197 \dosetq{#1-snt}{#2}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5198 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5199 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5200 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5201 % the node name, #2 the name of the Info cross-reference, #3 the printed |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5202 % node name, #4 the name of the Info file, #5 the name of the printed |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5203 % manual. All but the node name can be omitted. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5204 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5205 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5206 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5207 \def\ref#1{\xrefX[#1,,,,,,,]} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5208 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5209 \unsepspaces |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5210 \def\printedmanual{\ignorespaces #5}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5211 \def\printednodename{\ignorespaces #3}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5212 \setbox1=\hbox{\printedmanual}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5213 \setbox0=\hbox{\printednodename}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5214 \ifdim \wd0 = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5215 % No printed node name was explicitly given. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5216 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5217 % Use the node name inside the square brackets. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5218 \def\printednodename{\ignorespaces #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5219 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5220 % Use the actual chapter/section title appear inside |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5221 % the square brackets. Use the real section title if we have it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5222 \ifdim \wd1 > 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5223 % It is in another manual, so we don't have it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5224 \def\printednodename{\ignorespaces #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5225 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5226 \ifhavexrefs |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5227 % We know the real title if we have the xref values. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5228 \def\printednodename{\refx{#1-title}{}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5229 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5230 % Otherwise just copy the Info node name. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5231 \def\printednodename{\ignorespaces #1}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5232 \fi% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5233 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5234 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5235 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5236 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5237 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5238 % insert empty discretionaries after hyphens, which means that it will |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5239 % not find a line break at a hyphen in a node names. Since some manuals |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5240 % are best written with fairly long node names, containing hyphens, this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5241 % is a loss. Therefore, we give the text of the node name again, so it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5242 % is as if TeX is seeing it for the first time. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5243 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5244 \leavevmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5245 \getfilename{#4}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5246 \ifnum\filenamelength>0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5247 \startlink attr{/Border [0 0 0]}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5248 goto file{\the\filename.pdf} name{#1@}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5249 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5250 \startlink attr{/Border [0 0 0]}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5251 goto name{#1@}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5252 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5253 \linkcolor |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5254 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5255 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5256 \ifdim \wd1 > 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5257 \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5258 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5259 % _ (for example) has to be the character _ for the purposes of the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5260 % control sequence corresponding to the node, but it has to expand |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5261 % into the usual \leavevmode...\vrule stuff for purposes of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5262 % printing. So we \turnoffactive for the \refx-snt, back on for the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5263 % printing, back off for the \refx-pg. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5264 {\normalturnoffactive |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5265 % Only output a following space if the -snt ref is nonempty; for |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5266 % @unnumbered and @anchor, it won't be. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5267 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5268 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5269 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5270 % [mynode], |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5271 [\printednodename],\space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5272 % page 3 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5273 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5274 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5275 \endlink |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5276 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5277 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5278 % \dosetq is the interface for calls from other macros |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5279 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5280 % Use \normalturnoffactive so that punctuation chars such as underscore |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5281 % and backslash work in node names. (\turnoffactive doesn't do \.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5282 \def\dosetq#1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5283 {\let\folio=0% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5284 \normalturnoffactive |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5285 \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5286 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5287 \next |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5288 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5289 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5290 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5291 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5292 % \internalsetq {foo}{page} expands into |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5293 % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5294 % When the aux file is read, ' is the escape character |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5295 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5296 \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5297 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5298 % Things to be expanded by \internalsetq |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5299 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5300 \def\Ypagenumber{\folio} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5301 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5302 \def\Ytitle{\thissection} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5303 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5304 \def\Ynothing{} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5305 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5306 \def\Ysectionnumberandtype{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5307 \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5308 \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5309 \else \ifnum \subsubsecno=0 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5310 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5311 \else % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5312 \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5313 \fi \fi \fi } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5314 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5315 \def\Yappendixletterandtype{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5316 \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5317 \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5318 \else \ifnum \subsubsecno=0 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5319 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5320 \else % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5321 \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5322 \fi \fi \fi } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5323 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5324 \gdef\xreftie{'tie} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5325 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5326 % Use TeX 3.0's \inputlineno to get the line number, for better error |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5327 % messages, but if we're using an old version of TeX, don't do anything. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5328 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5329 \ifx\inputlineno\thisisundefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5330 \let\linenumber = \empty % Non-3.0. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5331 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5332 \def\linenumber{\the\inputlineno:\space} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5333 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5334 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5335 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5336 % If its value is nonempty, SUFFIX is output afterward. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5337 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5338 \def\refx#1#2{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5339 \expandafter\ifx\csname X#1\endcsname\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5340 % If not defined, say something at least. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5341 \angleleft un\-de\-fined\angleright |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5342 \iflinks |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5343 \ifhavexrefs |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5344 \message{\linenumber Undefined cross reference `#1'.}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5345 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5346 \ifwarnedxrefs\else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5347 \global\warnedxrefstrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5348 \message{Cross reference values unknown; you must run TeX again.}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5349 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5350 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5351 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5352 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5353 % It's defined, so just use it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5354 \csname X#1\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5355 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5356 #2% Output the suffix in any case. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5357 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5358 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5359 % This is the macro invoked by entries in the aux file. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5360 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5361 \def\xrdef#1{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5362 % Reenable \ as an escape while reading the second argument. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5363 \catcode`\\ = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5364 \afterassignment\endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5365 \expandafter\gdef\csname X#1\endcsname |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5366 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5367 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5368 % Read the last existing aux file, if any. No error if none exists. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5369 \def\readauxfile{\begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5370 \catcode`\^^@=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5371 \catcode`\^^A=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5372 \catcode`\^^B=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5373 \catcode`\^^C=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5374 \catcode`\^^D=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5375 \catcode`\^^E=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5376 \catcode`\^^F=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5377 \catcode`\^^G=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5378 \catcode`\^^H=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5379 \catcode`\^^K=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5380 \catcode`\^^L=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5381 \catcode`\^^N=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5382 \catcode`\^^P=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5383 \catcode`\^^Q=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5384 \catcode`\^^R=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5385 \catcode`\^^S=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5386 \catcode`\^^T=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5387 \catcode`\^^U=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5388 \catcode`\^^V=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5389 \catcode`\^^W=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5390 \catcode`\^^X=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5391 \catcode`\^^Z=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5392 \catcode`\^^[=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5393 \catcode`\^^\=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5394 \catcode`\^^]=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5395 \catcode`\^^^=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5396 \catcode`\^^_=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5397 \catcode`\@=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5398 \catcode`\^=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5399 % It was suggested to define this as 7, which would allow ^^e4 etc. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5400 % in xref tags, i.e., node names. But since ^^e4 notation isn't |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5401 % supported in the main text, it doesn't seem desirable. Furthermore, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5402 % that is not enough: for node names that actually contain a ^ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5403 % character, we would end up writing a line like this: 'xrdef {'hat |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5404 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5405 % argument, and \hat is not an expandable control sequence. It could |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5406 % all be worked out, but why? Either we support ^^ or we don't. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5407 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5408 % The other change necessary for this was to define \auxhat: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5409 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5410 % and then to call \auxhat in \setq. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5411 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5412 \catcode`\~=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5413 \catcode`\[=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5414 \catcode`\]=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5415 \catcode`\"=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5416 \catcode`\_=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5417 \catcode`\|=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5418 \catcode`\<=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5419 \catcode`\>=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5420 \catcode`\$=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5421 \catcode`\#=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5422 \catcode`\&=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5423 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5424 % Make the characters 128-255 be printing characters |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5425 {% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5426 \count 1=128 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5427 \def\loop{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5428 \catcode\count 1=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5429 \advance\count 1 by 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5430 \ifnum \count 1<256 \loop \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5431 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5432 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5433 % The aux file uses ' as the escape (for now). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5434 % Turn off \ as an escape so we do not lose on |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5435 % entries which were dumped with control sequences in their names. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5436 % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5437 % Reference to such entries still does not work the way one would wish, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5438 % but at least they do not bomb out when the aux file is read in. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5439 \catcode`\{=1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5440 \catcode`\}=2 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5441 \catcode`\%=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5442 \catcode`\'=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5443 \catcode`\\=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5444 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5445 \openin 1 \jobname.aux |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5446 \ifeof 1 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5447 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5448 \input \jobname.aux |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5449 \global\havexrefstrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5450 \global\warnedobstrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5451 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5452 % Open the new aux file. TeX will close it automatically at exit. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5453 \openout\auxfile=\jobname.aux |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5454 \endgroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5455 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5456 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5457 % Footnotes. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5458 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5459 \newcount \footnoteno |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5460 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5461 % The trailing space in the following definition for supereject is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5462 % vital for proper filling; pages come out unaligned when you do a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5463 % pagealignmacro call if that space before the closing brace is |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5464 % removed. (Generally, numeric constants should always be followed by a |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5465 % space to prevent strange expansion errors.) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5466 \def\supereject{\par\penalty -20000\footnoteno =0 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5467 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5468 % @footnotestyle is meaningful for info output only. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5469 \let\footnotestyle=\comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5470 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5471 \let\ptexfootnote=\footnote |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5472 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5473 {\catcode `\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5474 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5475 % Auto-number footnotes. Otherwise like plain. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5476 \gdef\footnote{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5477 \global\advance\footnoteno by \@ne |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5478 \edef\thisfootno{$^{\the\footnoteno}$}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5479 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5480 % In case the footnote comes at the end of a sentence, preserve the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5481 % extra spacing after we do the footnote number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5482 \let\@sf\empty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5483 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5484 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5485 % Remove inadvertent blank space before typesetting the footnote number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5486 \unskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5487 \thisfootno\@sf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5488 \footnotezzz |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5489 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5490 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5491 % Don't bother with the trickery in plain.tex to not require the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5492 % footnote text as a parameter. Our footnotes don't need to be so general. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5493 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5494 % Oh yes, they do; otherwise, @ifset and anything else that uses |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5495 % \parseargline fail inside footnotes because the tokens are fixed when |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5496 % the footnote is read. --karl, 16nov96. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5497 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5498 \long\gdef\footnotezzz{\insert\footins\bgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5499 % We want to typeset this text as a normal paragraph, even if the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5500 % footnote reference occurs in (for example) a display environment. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5501 % So reset some parameters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5502 \interlinepenalty\interfootnotelinepenalty |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5503 \splittopskip\ht\strutbox % top baseline for broken footnotes |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5504 \splitmaxdepth\dp\strutbox |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5505 \floatingpenalty\@MM |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5506 \leftskip\z@skip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5507 \rightskip\z@skip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5508 \spaceskip\z@skip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5509 \xspaceskip\z@skip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5510 \parindent\defaultparindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5511 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5512 \smallfonts \rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5513 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5514 % Hang the footnote text off the number. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5515 \hang |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5516 \textindent{\thisfootno}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5517 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5518 % Don't crash into the line above the footnote text. Since this |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5519 % expands into a box, it must come within the paragraph, lest it |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5520 % provide a place where TeX can split the footnote. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5521 \footstrut |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5522 \futurelet\next\fo@t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5523 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5524 \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5525 \else\let\next\f@t\fi \next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5526 \def\f@@t{\bgroup\aftergroup\@foot\let\next} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5527 \def\f@t#1{#1\@foot} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5528 \def\@foot{\strut\par\egroup} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5529 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5530 }%end \catcode `\@=11 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5531 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5532 % Set the baselineskip to #1, and the lineskip and strut size |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5533 % correspondingly. There is no deep meaning behind these magic numbers |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5534 % used as factors; they just match (closely enough) what Knuth defined. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5535 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5536 \def\lineskipfactor{.08333} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5537 \def\strutheightpercent{.70833} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5538 \def\strutdepthpercent {.29167} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5539 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5540 \def\setleading#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5541 \normalbaselineskip = #1\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5542 \normallineskip = \lineskipfactor\normalbaselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5543 \normalbaselines |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5544 \setbox\strutbox =\hbox{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5545 \vrule width0pt height\strutheightpercent\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5546 depth \strutdepthpercent \baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5547 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5548 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5549 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5550 % @| inserts a changebar to the left of the current line. It should |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5551 % surround any changed text. This approach does *not* work if the |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5552 % change spans more than two lines of output. To handle that, we would |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5553 % have adopt a much more difficult approach (putting marks into the main |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5554 % vertical list for the beginning and end of each change). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5555 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5556 \def\|{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5557 % \vadjust can only be used in horizontal mode. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5558 \leavevmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5559 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5560 % Append this vertical mode material after the current line in the output. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5561 \vadjust{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5562 % We want to insert a rule with the height and depth of the current |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5563 % leading; that is exactly what \strutbox is supposed to record. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5564 \vskip-\baselineskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5565 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5566 % \vadjust-items are inserted at the left edge of the type. So |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5567 % the \llap here moves out into the left-hand margin. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5568 \llap{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5569 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5570 % For a thicker or thinner bar, change the `1pt'. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5571 \vrule height\baselineskip width1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5572 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5573 % This is the space between the bar and the text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5574 \hskip 12pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5575 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5576 }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5577 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5578 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5579 % For a final copy, take out the rectangles |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5580 % that mark overfull boxes (in case you have decided |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5581 % that the text looks ok even though it passes the margin). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5582 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5583 \def\finalout{\overfullrule=0pt} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5584 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5585 % @image. We use the macros from epsf.tex to support this. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5586 % If epsf.tex is not installed and @image is used, we complain. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5587 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5588 % Check for and read epsf.tex up front. If we read it only at @image |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5589 % time, we might be inside a group, and then its definitions would get |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5590 % undone and the next image would fail. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5591 \openin 1 = epsf.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5592 \ifeof 1 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5593 \closein 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5594 % Do not bother showing banner with post-v2.7 epsf.tex (available in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5595 % doc/epsf.tex until it shows up on ctan). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5596 \def\epsfannounce{\toks0 = }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5597 \input epsf.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5598 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5599 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5600 % We will only complain once about lack of epsf.tex. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5601 \newif\ifwarnednoepsf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5602 \newhelp\noepsfhelp{epsf.tex must be installed for images to |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5603 work. It is also included in the Texinfo distribution, or you can get |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5604 it from ftp://tug.org/tex/epsf.tex.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5605 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5606 \def\image#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5607 \ifx\epsfbox\undefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5608 \ifwarnednoepsf \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5609 \errhelp = \noepsfhelp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5610 \errmessage{epsf.tex not found, images will be ignored}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5611 \global\warnednoepsftrue |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5612 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5613 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5614 \imagexxx #1,,,\finish |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5615 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5616 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5617 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5618 % Arguments to @image: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5619 % #1 is (mandatory) image filename; we tack on .eps extension. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5620 % #2 is (optional) width, #3 is (optional) height. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5621 % #4 is just the usual extra ignored arg for parsing this stuff. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5622 \def\imagexxx#1,#2,#3,#4\finish{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5623 \ifpdf |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5624 \centerline{\dopdfimage{#1}{#2}{#3}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5625 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5626 % \epsfbox itself resets \epsf?size at each figure. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5627 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5628 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5629 \begingroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5630 \catcode`\^^M = 5 % in case we're inside an example |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5631 % If the image is by itself, center it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5632 \ifvmode |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5633 \nobreak\bigskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5634 % Usually we'll have text after the image which will insert |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5635 % \parskip glue, so insert it here too to equalize the space |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5636 % above and below. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5637 \nobreak\vskip\parskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5638 \nobreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5639 \centerline{\epsfbox{#1.eps}}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5640 \bigbreak |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5641 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5642 % In the middle of a paragraph, no extra space. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5643 \epsfbox{#1.eps}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5644 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5645 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5646 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5647 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5648 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5649 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5650 \message{localization,} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5651 % and i18n. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5652 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5653 % @documentlanguage is usually given very early, just after |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5654 % @setfilename. If done too late, it may not override everything |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5655 % properly. Single argument is the language abbreviation. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5656 % It would be nice if we could set up a hyphenation file here. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5657 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5658 \def\documentlanguage{\parsearg\dodocumentlanguage} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5659 \def\dodocumentlanguage#1{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5660 \tex % read txi-??.tex file in plain TeX. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5661 % Read the file if it exists. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5662 \openin 1 txi-#1.tex |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5663 \ifeof1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5664 \errhelp = \nolanghelp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5665 \errmessage{Cannot read language file txi-#1.tex}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5666 \let\temp = \relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5667 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5668 \def\temp{\input txi-#1.tex }% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5669 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5670 \temp |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5671 \endgroup |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5672 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5673 \newhelp\nolanghelp{The given language definition file cannot be found or |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5674 is empty. Maybe you need to install it? In the current directory |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5675 should work if nowhere else does.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5676 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5677 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5678 % @documentencoding should change something in TeX eventually, most |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5679 % likely, but for now just recognize it. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5680 \let\documentencoding = \comment |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5681 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5682 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5683 % Page size parameters. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5684 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5685 \newdimen\defaultparindent \defaultparindent = 15pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5686 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5687 \chapheadingskip = 15pt plus 4pt minus 2pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5688 \secheadingskip = 12pt plus 3pt minus 2pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5689 \subsecheadingskip = 9pt plus 2pt minus 2pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5690 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5691 % Prevent underfull vbox error messages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5692 \vbadness = 10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5693 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5694 % Don't be so finicky about underfull hboxes, either. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5695 \hbadness = 2000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5696 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5697 % Following George Bush, just get rid of widows and orphans. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5698 \widowpenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5699 \clubpenalty=10000 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5700 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5701 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5702 % using an old version of TeX, don't do anything. We want the amount of |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5703 % stretch added to depend on the line length, hence the dependence on |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5704 % \hsize. We call this whenever the paper size is set. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5705 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5706 \def\setemergencystretch{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5707 \ifx\emergencystretch\thisisundefined |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5708 % Allow us to assign to \emergencystretch anyway. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5709 \def\emergencystretch{\dimen0}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5710 \else |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5711 \emergencystretch = .15\hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5712 \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5713 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5714 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5715 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5716 % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5717 % set \parskip and call \setleading for \baselineskip. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5718 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5719 \def\internalpagesizes#1#2#3#4#5#6{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5720 \voffset = #3\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5721 \topskip = #6\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5722 \splittopskip = \topskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5723 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5724 \vsize = #1\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5725 \advance\vsize by \topskip |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5726 \outervsize = \vsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5727 \advance\outervsize by 2\topandbottommargin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5728 \pageheight = \vsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5729 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5730 \hsize = #2\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5731 \outerhsize = \hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5732 \advance\outerhsize by 0.5in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5733 \pagewidth = \hsize |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5734 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5735 \normaloffset = #4\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5736 \bindingoffset = #5\relax |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5737 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5738 \parindent = \defaultparindent |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5739 \setemergencystretch |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5740 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5741 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5742 % @letterpaper (the default). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5743 \def\letterpaper{{\globaldefs = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5744 \parskip = 3pt plus 2pt minus 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5745 \setleading{13.2pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5746 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5747 % If page is nothing but text, make it come out even. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5748 \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5749 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5750 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5751 % Use @smallbook to reset parameters for 7x9.5 (or so) format. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5752 \def\smallbook{{\globaldefs = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5753 \parskip = 2pt plus 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5754 \setleading{12pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5755 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5756 \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5757 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5758 \lispnarrowing = 0.3in |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5759 \tolerance = 700 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5760 \hfuzz = 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5761 \contentsrightmargin = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5762 \deftypemargin = 0pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5763 \defbodyindent = .5cm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5764 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5765 \let\smalldisplay = \smalldisplayx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5766 \let\smallexample = \smalllispx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5767 \let\smallformat = \smallformatx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5768 \let\smalllisp = \smalllispx |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5769 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5770 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5771 % Use @afourpaper to print on European A4 paper. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5772 \def\afourpaper{{\globaldefs = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5773 \setleading{12pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5774 \parskip = 3pt plus 2pt minus 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5775 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5776 \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5777 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5778 \tolerance = 700 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5779 \hfuzz = 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5780 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5781 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5782 % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5783 % 29mm, hence bottom margin 28mm, nominal side margin 3cm. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5784 \def\afourlatex{{\globaldefs = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5785 \setleading{13.6pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5786 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5787 \afourpaper |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5788 \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5789 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5790 \globaldefs = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5791 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5792 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5793 % Use @afourwide to print on European A4 paper in wide format. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5794 \def\afourwide{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5795 \afourpaper |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5796 \internalpagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5797 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5798 \globaldefs = 0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5799 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5800 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5801 % @pagesizes TEXTHEIGHT[,TEXTWIDTH] |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5802 % Perhaps we should allow setting the margins, \topskip, \parskip, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5803 % and/or leading, also. Or perhaps we should compute them somehow. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5804 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5805 \def\pagesizes{\parsearg\pagesizesxxx} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5806 \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5807 \def\pagesizesyyy#1,#2,#3\finish{{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5808 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5809 \globaldefs = 1 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5810 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5811 \parskip = 3pt plus 2pt minus 1pt |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5812 \setleading{13.2pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5813 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5814 \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5815 }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5816 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5817 % Set default to letter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5818 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5819 \letterpaper |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5820 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5821 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5822 \message{and turning on texinfo input format.} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5823 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5824 % Define macros to output various characters with catcode for normal text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5825 \catcode`\"=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5826 \catcode`\~=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5827 \catcode`\^=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5828 \catcode`\_=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5829 \catcode`\|=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5830 \catcode`\<=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5831 \catcode`\>=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5832 \catcode`\+=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5833 \catcode`\$=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5834 \def\normaldoublequote{"} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5835 \def\normaltilde{~} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5836 \def\normalcaret{^} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5837 \def\normalunderscore{_} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5838 \def\normalverticalbar{|} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5839 \def\normalless{<} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5840 \def\normalgreater{>} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5841 \def\normalplus{+} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5842 \def\normaldollar{$} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5843 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5844 % This macro is used to make a character print one way in ttfont |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5845 % where it can probably just be output, and another way in other fonts, |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5846 % where something hairier probably needs to be done. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5847 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5848 % #1 is what to print if we are indeed using \tt; #2 is what to print |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5849 % otherwise. Since all the Computer Modern typewriter fonts have zero |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5850 % interword stretch (and shrink), and it is reasonable to expect all |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5851 % typewriter fonts to have this, we can check that font parameter. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5852 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5853 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5854 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5855 % Same as above, but check for italic font. Actually this also catches |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5856 % non-italic slanted fonts since it is impossible to distinguish them from |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5857 % italic fonts. But since this is only used by $ and it uses \sl anyway |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5858 % this is not a problem. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5859 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5860 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5861 % Turn off all special characters except @ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5862 % (and those which the user can use as if they were ordinary). |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5863 % Most of these we simply print from the \tt font, but for some, we can |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5864 % use math or other variants that look better in normal text. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5865 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5866 \catcode`\"=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5867 \def\activedoublequote{{\tt\char34}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5868 \let"=\activedoublequote |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5869 \catcode`\~=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5870 \def~{{\tt\char126}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5871 \chardef\hat=`\^ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5872 \catcode`\^=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5873 \def^{{\tt \hat}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5874 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5875 \catcode`\_=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5876 \def_{\ifusingtt\normalunderscore\_} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5877 % Subroutine for the previous macro. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5878 \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5879 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5880 \catcode`\|=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5881 \def|{{\tt\char124}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5882 \chardef \less=`\< |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5883 \catcode`\<=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5884 \def<{{\tt \less}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5885 \chardef \gtr=`\> |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5886 \catcode`\>=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5887 \def>{{\tt \gtr}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5888 \catcode`\+=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5889 \def+{{\tt \char 43}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5890 \catcode`\$=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5891 \def${\ifusingit{{\sl\$}}\normaldollar} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5892 %\catcode 27=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5893 %\def^^[{$\diamondsuit$} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5894 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5895 % Set up an active definition for =, but don't enable it most of the time. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5896 {\catcode`\==\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5897 \global\def={{\tt \char 61}}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5898 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5899 \catcode`+=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5900 \catcode`\_=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5901 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5902 % If a .fmt file is being used, characters that might appear in a file |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5903 % name cannot be active until we have parsed the command line. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5904 % So turn them off again, and have \everyjob (or @setfilename) turn them on. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5905 % \otherifyactive is called near the end of this file. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5906 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5907 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5908 \catcode`\@=0 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5909 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5910 % \rawbackslashxx output one backslash character in current font |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5911 \global\chardef\rawbackslashxx=`\\ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5912 %{\catcode`\\=\other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5913 %@gdef@rawbackslashxx{\}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5914 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5915 % \rawbackslash redefines \ as input to do \rawbackslashxx. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5916 {\catcode`\\=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5917 @gdef@rawbackslash{@let\=@rawbackslashxx }} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5918 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5919 % \normalbackslash outputs one backslash in fixed width font. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5920 \def\normalbackslash{{\tt\rawbackslashxx}} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5921 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5922 % \catcode 17=0 % Define control-q |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5923 \catcode`\\=\active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5924 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5925 % Used sometimes to turn off (effectively) the active characters |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5926 % even after parsing them. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5927 @def@turnoffactive{@let"=@normaldoublequote |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5928 @let\=@realbackslash |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5929 @let~=@normaltilde |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5930 @let^=@normalcaret |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5931 @let_=@normalunderscore |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5932 @let|=@normalverticalbar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5933 @let<=@normalless |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5934 @let>=@normalgreater |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5935 @let+=@normalplus |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5936 @let$=@normaldollar} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5937 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5938 @def@normalturnoffactive{@let"=@normaldoublequote |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5939 @let\=@normalbackslash |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5940 @let~=@normaltilde |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5941 @let^=@normalcaret |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5942 @let_=@normalunderscore |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5943 @let|=@normalverticalbar |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5944 @let<=@normalless |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5945 @let>=@normalgreater |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5946 @let+=@normalplus |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5947 @let$=@normaldollar} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5948 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5949 % Make _ and + \other characters, temporarily. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5950 % This is canceled by @fixbackslash. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5951 @otherifyactive |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5952 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5953 % If a .fmt file is being used, we don't want the `\input texinfo' to show up. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5954 % That is what \eatinput is for; after that, the `\' should revert to printing |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5955 % a backslash. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5956 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5957 @gdef@eatinput input texinfo{@fixbackslash} |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5958 @global@let\ = @eatinput |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5959 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5960 % On the other hand, perhaps the file did not have a `\input texinfo'. Then |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5961 % the first `\{ in the file would cause an error. This macro tries to fix |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5962 % that, assuming it is called before the first `\' could plausibly occur. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5963 % Also back turn on active characters that might appear in the input |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5964 % file name, in case not using a pre-dumped format. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5965 % |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5966 @gdef@fixbackslash{% |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5967 @ifx\@eatinput @let\ = @normalbackslash @fi |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5968 @catcode`+=@active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5969 @catcode`@_=@active |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5970 } |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5971 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5972 % Say @foo, not \foo, in error messages. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5973 @escapechar = `@@ |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5974 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5975 % These look ok in all fonts, so just make them not special. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5976 @catcode`@& = @other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5977 @catcode`@# = @other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5978 @catcode`@% = @other |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5979 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5980 @c Set initial fonts. |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5981 @textfonts |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5982 @rm |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5983 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5984 |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5985 @c Local variables: |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5986 @c eval: (add-hook 'write-file-hooks 'time-stamp) |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5987 @c page-delimiter: "^\\\\message" |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5988 @c time-stamp-start: "def\\\\texinfoversion{" |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5989 @c time-stamp-format: "%:y-%02m-%02d.%02H" |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5990 @c time-stamp-end: "}" |
e5ed410ac0a1
Copy texinfo.tex from octave itself to avoid problems with broken texinfo
adb014
parents:
diff
changeset
|
5991 @c End: |