source: patches/glibc-2.7-branch_update-1A.patch@ c2a7c62f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since c2a7c62f was 9e76341, checked in by Ken Moffat <zarniwhoop@…>, 17 years ago

Working version of glibc branch update for ppc/ppc64

  • Property mode set to 100644
File size: 63.8 KB
RevLine 
[9e76341]1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
2Date: 10-25-2007
3 Altered to omit changes to nptl/sysdeps/powerpc/tcb-offsets.sym which don't compile
4 and are no longer in recent snapshots: Ken Moffat
5Initial Package Version: 2.7
6Origin: Upstream
7Upstream Status: Applied
8Description: This is a branch update for Glibc-2.7, and should be
9 rechecked periodically. See the 'Changelog' and 'localedata/ChangeLog'
10 for specific details.
11
12diff -Naur glibc-2.7.orig/ChangeLog glibc-2.7/ChangeLog
13--- glibc-2.7.orig/ChangeLog 2007-10-17 17:09:32.000000000 -0700
14+++ glibc-2.7/ChangeLog 2007-10-21 22:03:58.000000000 -0700
15@@ -1,3 +1,17 @@
16+2007-10-21 Andreas Jaeger <aj@suse.de>
17+
18+ * manual/texinfo.tex: Update to latest version.
19+
20+ * manual/sysinfo.texi (System Parameters): Fix Formatting.
21+
22+ * manual/arith.texi (Status bit operations): Fix formatting.
23+
24+ * manual/errno.texi (Error Messages): Fix formatting.
25+
26+ * manual/sysinfo.texi (System Parameters): Fix formatting.
27+
28+ * manual/libc.texinfo: Update VERSION and UPDATED.
29+
30 2007-10-17 Jakub Jelinek <jakub@redhat.com>
31
32 * sysdeps/x86_64/memset.S (bzero): Renamed to __bzero. Add
33diff -Naur glibc-2.7.orig/manual/arith.texi glibc-2.7/manual/arith.texi
34--- glibc-2.7.orig/manual/arith.texi 2004-10-05 20:02:14.000000000 -0700
35+++ glibc-2.7/manual/arith.texi 2007-10-21 22:03:58.000000000 -0700
36@@ -778,8 +778,7 @@
37
38 @comment fenv.h
39 @comment ISO
40-@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int
41-@var{excepts})
42+@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int @var{excepts})
43 This function restores the flags for the exceptions indicated by
44 @var{excepts} to the values stored in the variable pointed to by
45 @var{flagp}.
46diff -Naur glibc-2.7.orig/manual/errno.texi glibc-2.7/manual/errno.texi
47--- glibc-2.7.orig/manual/errno.texi 2007-07-21 23:53:48.000000000 -0700
48+++ glibc-2.7/manual/errno.texi 2007-10-21 22:03:58.000000000 -0700
49@@ -1494,7 +1494,7 @@
50
51 @comment error.h
52 @comment GNU
53-@deftypevar {void (*} error_print_progname ) (void)
54+@deftypevar {void (*) error_print_progname } (void)
55 If the @code{error_print_progname} variable is defined to a non-zero
56 value the function pointed to is called by @code{error} or
57 @code{error_at_line}. It is expected to print the program name or do
58diff -Naur glibc-2.7.orig/manual/libc.texinfo glibc-2.7/manual/libc.texinfo
59--- glibc-2.7.orig/manual/libc.texinfo 2007-07-30 18:53:58.000000000 -0700
60+++ glibc-2.7/manual/libc.texinfo 2007-10-21 22:03:58.000000000 -0700
61@@ -19,8 +19,8 @@
62
63 @c sold 0.06/1.09, print run out 21may96
64 @set EDITION 0.11
65-@set VERSION 2.6
66-@set UPDATED 2006-12-03
67+@set VERSION 2.7
68+@set UPDATED 2007-09-09
69 @set ISBN 1-882114-55-8
70
71 @copying
72diff -Naur glibc-2.7.orig/manual/sysinfo.texi glibc-2.7/manual/sysinfo.texi
73--- glibc-2.7.orig/manual/sysinfo.texi 2006-11-10 13:10:22.000000000 -0800
74+++ glibc-2.7/manual/sysinfo.texi 2007-10-21 22:03:58.000000000 -0700
75@@ -1066,8 +1066,7 @@
76
77 @comment sysctl.h
78 @comment BSD
79-@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval},
80- size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen})
81+@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldval}, size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen})
82
83 @code{sysctl} gets or sets a specified system parameter. There are so
84 many of these parameters that it is not practical to list them all here,
85diff -Naur glibc-2.7.orig/manual/texinfo.tex glibc-2.7/manual/texinfo.tex
86--- glibc-2.7.orig/manual/texinfo.tex 2005-02-15 20:23:16.000000000 -0800
87+++ glibc-2.7/manual/texinfo.tex 2007-10-21 22:03:58.000000000 -0700
88@@ -3,11 +3,11 @@
89 % Load plain if necessary, i.e., if running under initex.
90 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
91 %
92-\def\texinfoversion{2004-11-25.16}
93+\def\texinfoversion{2006-11-08.17}
94 %
95 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
96-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
97-% Foundation, Inc.
98+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
99+% Software Foundation, Inc.
100 %
101 % This texinfo.tex file is free software; you can redistribute it and/or
102 % modify it under the terms of the GNU General Public License as
103@@ -21,8 +21,8 @@
104 %
105 % You should have received a copy of the GNU General Public License
106 % along with this texinfo.tex file; see the file COPYING. If not, write
107-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
108-% Boston, MA 02111-1307, USA.
109+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
110+% Boston, MA 02110-1301, USA.
111 %
112 % As a special exception, when this file is read by TeX when processing
113 % a Texinfo source document, you may use the result without
114@@ -153,20 +153,22 @@
115 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
116 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
117
118-% In some macros, we cannot use the `\? notation---the left quote is
119-% in some cases the escape char.
120+% Since the category of space is not known, we have to be careful.
121+\chardef\spacecat = 10
122+\def\spaceisspace{\catcode`\ =\spacecat}
123+
124+% sometimes characters are active, so we need control sequences.
125 \chardef\colonChar = `\:
126 \chardef\commaChar = `\,
127+\chardef\dashChar = `\-
128 \chardef\dotChar = `\.
129 \chardef\exclamChar= `\!
130+\chardef\lquoteChar= `\`
131 \chardef\questChar = `\?
132+\chardef\rquoteChar= `\'
133 \chardef\semiChar = `\;
134 \chardef\underChar = `\_
135
136-\chardef\spaceChar = `\ %
137-\chardef\spacecat = 10
138-\def\spaceisspace{\catcode\spaceChar=\spacecat}
139-
140 % Ignore a token.
141 %
142 \def\gobble#1{}
143@@ -302,10 +304,14 @@
144 % take effect in \write's, yet the group defined by the \vbox ends
145 % before the \shipout runs.
146 %
147- \escapechar = `\\ % use backslash in output files.
148 \indexdummies % don't expand commands in the output.
149 \normalturnoffactive % \ in index entries must not stay \, e.g., if
150- % the page break happens to be in the middle of an example.
151+ % the page break happens to be in the middle of an example.
152+ % We don't want .vr (or whatever) entries like this:
153+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
154+ % "\acronym" won't work when it's read back in;
155+ % it needs to be
156+ % {\code {{\tt \backslashcurfont }acronym}
157 \shipout\vbox{%
158 % Do this early so pdf references go to the beginning of the page.
159 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
160@@ -333,9 +339,9 @@
161 \pagebody{#1}%
162 \ifdim\ht\footlinebox > 0pt
163 % Only leave this space if the footline is nonempty.
164- % (We lessened \vsize for it in \oddfootingxxx.)
165+ % (We lessened \vsize for it in \oddfootingyyy.)
166 % The \baselineskip=24pt in plain's \makefootline has no effect.
167- \vskip 2\baselineskip
168+ \vskip 24pt
169 \unvbox\footlinebox
170 \fi
171 %
172@@ -356,7 +362,7 @@
173 \egroup % \vbox from first cropmarks clause
174 \fi
175 }% end of \shipout\vbox
176- }% end of group with \normalturnoffactive
177+ }% end of group with \indexdummies
178 \advancepageno
179 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
180 }
181@@ -391,7 +397,7 @@
182 %
183 \def\parsearg{\parseargusing{}}
184 \def\parseargusing#1#2{%
185- \def\next{#2}%
186+ \def\argtorun{#2}%
187 \begingroup
188 \obeylines
189 \spaceisspace
190@@ -422,8 +428,7 @@
191 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
192 \def\temp{#3}%
193 \ifx\temp\empty
194- % We cannot use \next here, as it holds the macro to run;
195- % thus we reuse \temp.
196+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
197 \let\temp\finishparsearg
198 \else
199 \let\temp\argcheckspaces
200@@ -435,14 +440,14 @@
201 % If a _delimited_ argument is enclosed in braces, they get stripped; so
202 % to get _exactly_ the rest of the line, we had to prevent such situation.
203 % We prepended an \empty token at the very beginning and we expand it now,
204-% just before passing the control to \next.
205+% just before passing the control to \argtorun.
206 % (Similarily, we have to think about #3 of \argcheckspacesY above: it is
207 % either the null string, or it ends with \^^M---thus there is no danger
208 % that a pair of braces would be stripped.
209 %
210 % But first, we have to remove the trailing space token.
211 %
212-\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
213+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
214
215 % \parseargdef\foo{...}
216 % is roughly equivalent to
217@@ -566,7 +571,7 @@
218 \let\}=\myrbrace
219 \begingroup
220 % Definitions to produce \{ and \} commands for indices,
221- % and @{ and @} for the aux file.
222+ % and @{ and @} for the aux/toc files.
223 \catcode`\{ = \other \catcode`\} = \other
224 \catcode`\[ = 1 \catcode`\] = 2
225 \catcode`\! = 0 \catcode`\\ = \other
226@@ -647,13 +652,28 @@
227 \let\/=\allowbreak
228
229 % @. is an end-of-sentence period.
230-\def\.{.\spacefactor=3000 }
231+\def\.{.\spacefactor=\endofsentencespacefactor\space}
232
233 % @! is an end-of-sentence bang.
234-\def\!{!\spacefactor=3000 }
235+\def\!{!\spacefactor=\endofsentencespacefactor\space}
236
237 % @? is an end-of-sentence query.
238-\def\?{?\spacefactor=3000 }
239+\def\?{?\spacefactor=\endofsentencespacefactor\space}
240+
241+% @frenchspacing on|off says whether to put extra space after punctuation.
242+%
243+\def\onword{on}
244+\def\offword{off}
245+%
246+\parseargdef\frenchspacing{%
247+ \def\temp{#1}%
248+ \ifx\temp\onword \plainfrenchspacing
249+ \else\ifx\temp\offword \plainnonfrenchspacing
250+ \else
251+ \errhelp = \EMsimple
252+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
253+ \fi\fi
254+}
255
256 % @w prevents a word break. Without the \leavevmode, @w at the
257 % beginning of a paragraph, when TeX is still in vertical mode, would
258@@ -1031,9 +1051,9 @@
259 % _ active, and distinguish by seeing if the current family is \slfam,
260 % which is what @var uses.
261 {
262- \catcode\underChar = \active
263+ \catcode`\_ = \active
264 \gdef\mathunderscore{%
265- \catcode\underChar=\active
266+ \catcode`\_=\active
267 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
268 }
269 }
270@@ -1076,15 +1096,24 @@
271 \def\minus{$-$}
272
273 % @dots{} outputs an ellipsis using the current font.
274-% We do .5em per period so that it has the same spacing in a typewriter
275-% font as three actual period characters.
276+% We do .5em per period so that it has the same spacing in the cm
277+% typewriter fonts as three actual period characters; on the other hand,
278+% in other typewriter fonts three periods are wider than 1.5em. So do
279+% whichever is larger.
280 %
281 \def\dots{%
282 \leavevmode
283- \hbox to 1.5em{%
284- \hskip 0pt plus 0.25fil
285- .\hfil.\hfil.%
286- \hskip 0pt plus 0.5fil
287+ \setbox0=\hbox{...}% get width of three periods
288+ \ifdim\wd0 > 1.5em
289+ \dimen0 = \wd0
290+ \else
291+ \dimen0 = 1.5em
292+ \fi
293+ \hbox to \dimen0{%
294+ \hskip 0pt plus.25fil
295+ .\hskip 0pt plus1fil
296+ .\hskip 0pt plus1fil
297+ .\hskip 0pt plus.5fil
298 }%
299 }
300
301@@ -1092,7 +1121,7 @@
302 %
303 \def\enddots{%
304 \dots
305- \spacefactor=3000
306+ \spacefactor=\endofsentencespacefactor
307 }
308
309 % @comma{} is so commas can be inserted into text without messing up
310@@ -1176,13 +1205,98 @@
311 \fi
312 \fi
313 \fi
314-%
315+
316+% PDF uses PostScript string constants for the names of xref targets,
317+% for display in the outlines, and in other places. Thus, we have to
318+% double any backslashes. Otherwise, a name like "\node" will be
319+% interpreted as a newline (\n), followed by o, d, e. Not good.
320+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
321+% (and related messages, the final outcome is that it is up to the TeX
322+% user to double the backslashes and otherwise make the string valid, so
323+% that's what we do).
324+
325+% double active backslashes.
326+%
327+{\catcode`\@=0 \catcode`\\=\active
328+ @gdef@activebackslashdouble{%
329+ @catcode`@\=@active
330+ @let\=@doublebackslash}
331+}
332+
333+% To handle parens, we must adopt a different approach, since parens are
334+% not active characters. hyperref.dtx (which has the same problem as
335+% us) handles it with this amazing macro to replace tokens. I've
336+% tinkered with it a little for texinfo, but it's definitely from there.
337+%
338+% #1 is the tokens to replace.
339+% #2 is the replacement.
340+% #3 is the control sequence with the string.
341+%
342+\def\HyPsdSubst#1#2#3{%
343+ \def\HyPsdReplace##1#1##2\END{%
344+ ##1%
345+ \ifx\\##2\\%
346+ \else
347+ #2%
348+ \HyReturnAfterFi{%
349+ \HyPsdReplace##2\END
350+ }%
351+ \fi
352+ }%
353+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
354+}
355+\long\def\HyReturnAfterFi#1\fi{\fi#1}
356+
357+% #1 is a control sequence in which to do the replacements.
358+\def\backslashparens#1{%
359+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
360+ % \lastnode when called from \setref -> \pdfmkdest.
361+ \HyPsdSubst{(}{\realbackslash(}{#1}%
362+ \HyPsdSubst{)}{\realbackslash)}{#1}%
363+}
364+
365+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
366+with PDF output, and none of those formats could be found. (.eps cannot
367+be supported due to the design of the PDF format; use regular TeX (DVI
368+output) for that.)}
369+
370 \ifpdf
371 \input pdfcolor
372 \pdfcatalog{/PageMode /UseOutlines}%
373+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
374 \def\dopdfimage#1#2#3{%
375- \def\imagewidth{#2}%
376- \def\imageheight{#3}%
377+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
378+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
379+ %
380+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among
381+ % others). Let's try in that order.
382+ \let\pdfimgext=\empty
383+ \begingroup
384+ \openin 1 #1.png \ifeof 1
385+ \openin 1 #1.jpg \ifeof 1
386+ \openin 1 #1.jpeg \ifeof 1
387+ \openin 1 #1.JPG \ifeof 1
388+ \openin 1 #1.pdf \ifeof 1
389+ \errhelp = \nopdfimagehelp
390+ \errmessage{Could not find image file #1 for pdf}%
391+ \else
392+ \gdef\pdfimgext{pdf}%
393+ \fi
394+ \else
395+ \gdef\pdfimgext{JPG}%
396+ \fi
397+ \else
398+ \gdef\pdfimgext{jpeg}%
399+ \fi
400+ \else
401+ \gdef\pdfimgext{jpg}%
402+ \fi
403+ \else
404+ \gdef\pdfimgext{png}%
405+ \fi
406+ \closein 1
407+ \endgroup
408+ %
409 % without \immediate, pdftex seg faults when the same image is
410 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
411 \ifnum\pdftexversion < 14
412@@ -1190,24 +1304,29 @@
413 \else
414 \immediate\pdfximage
415 \fi
416- \ifx\empty\imagewidth\else width \imagewidth \fi
417- \ifx\empty\imageheight\else height \imageheight \fi
418+ \ifdim \wd0 >0pt width \imagewidth \fi
419+ \ifdim \wd2 >0pt height \imageheight \fi
420 \ifnum\pdftexversion<13
421- #1.pdf%
422+ #1.\pdfimgext
423 \else
424- {#1.pdf}%
425+ {#1.\pdfimgext}%
426 \fi
427 \ifnum\pdftexversion < 14 \else
428 \pdfrefximage \pdflastximage
429 \fi}
430 \def\pdfmkdest#1{{%
431- % We have to set dummies so commands such as @code in a section title
432- % aren't expanded.
433+ % We have to set dummies so commands such as @code, and characters
434+ % such as \, aren't expanded when present in a section title.
435 \atdummies
436- \normalturnoffactive
437- \pdfdest name{#1} xyz%
438- }}
439- \def\pdfmkpgn#1{#1}
440+ \activebackslashdouble
441+ \def\pdfdestname{#1}%
442+ \backslashparens\pdfdestname
443+ \pdfdest name{\pdfdestname} xyz%
444+ }}%
445+ %
446+ % used to mark target names; must be expandable.
447+ \def\pdfmkpgn#1{#1}%
448+ %
449 \let\linkcolor = \Blue % was Cyan, but that seems light?
450 \def\endlink{\Black\pdfendlink}
451 % Adding outlines to PDF; macros for calculating structure of outlines
452@@ -1218,20 +1337,31 @@
453 \advance\tempnum by 1
454 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
455 %
456- % #1 is the section text. #2 is the pdf expression for the number
457- % of subentries (or empty, for subsubsections). #3 is the node
458- % text, which might be empty if this toc entry had no
459- % corresponding node. #4 is the page number.
460+ % #1 is the section text, which is what will be displayed in the
461+ % outline by the pdf viewer. #2 is the pdf expression for the number
462+ % of subentries (or empty, for subsubsections). #3 is the node text,
463+ % which might be empty if this toc entry had no corresponding node.
464+ % #4 is the page number
465 %
466 \def\dopdfoutline#1#2#3#4{%
467 % Generate a link to the node text if that exists; else, use the
468 % page number. We could generate a destination for the section
469 % text in the case where a section has no node, but it doesn't
470- % seem worthwhile, since most documents are normally structured.
471+ % seem worth the trouble, since most documents are normally structured.
472 \def\pdfoutlinedest{#3}%
473- \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
474+ \ifx\pdfoutlinedest\empty
475+ \def\pdfoutlinedest{#4}%
476+ \else
477+ % Doubled backslashes in the name.
478+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
479+ \backslashparens\pdfoutlinedest}%
480+ \fi
481 %
482- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
483+ % Also double the backslashes in the display string.
484+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
485+ \backslashparens\pdfoutlinetext}%
486+ %
487+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
488 }
489 %
490 \def\pdfmakeoutlines{%
491@@ -1272,7 +1402,7 @@
492 \def\unnsecentry{\numsecentry}%
493 \def\unnsubsecentry{\numsubsecentry}%
494 \def\unnsubsubsecentry{\numsubsubsecentry}%
495- \input \jobname.toc
496+ \readdatafile{toc}%
497 %
498 % Read toc second time, this time actually producing the outlines.
499 % The `-' means take the \expnumber as the absolute number of
500@@ -1298,41 +1428,12 @@
501 % their "best" equivalent, based on the @documentencoding. Right
502 % now, I guess we'll just let the pdf reader have its way.
503 \indexnofonts
504- \turnoffactive
505+ \setupdatafile
506+ \catcode`\\=\active \otherbackslash
507 \input \jobname.toc
508 \endgroup
509 }
510 %
511- \def\makelinks #1,{%
512- \def\params{#1}\def\E{END}%
513- \ifx\params\E
514- \let\nextmakelinks=\relax
515- \else
516- \let\nextmakelinks=\makelinks
517- \ifnum\lnkcount>0,\fi
518- \picknum{#1}%
519- \startlink attr{/Border [0 0 0]}
520- goto name{\pdfmkpgn{\the\pgn}}%
521- \linkcolor #1%
522- \advance\lnkcount by 1%
523- \endlink
524- \fi
525- \nextmakelinks
526- }
527- \def\picknum#1{\expandafter\pn#1}
528- \def\pn#1{%
529- \def\p{#1}%
530- \ifx\p\lbrace
531- \let\nextpn=\ppn
532- \else
533- \let\nextpn=\ppnn
534- \def\first{#1}
535- \fi
536- \nextpn
537- }
538- \def\ppn#1{\pgn=#1\gobble}
539- \def\ppnn{\pgn=\first}
540- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
541 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
542 \ifx\PP\D\let\nextsp\relax
543 \else\let\nextsp\skipspaces
544@@ -1347,9 +1448,17 @@
545 \else
546 \let \startlink \pdfstartlink
547 \fi
548+ % make a live url in pdf output.
549 \def\pdfurl#1{%
550 \begingroup
551- \normalturnoffactive\def\@{@}%
552+ % it seems we really need yet another set of dummies; have not
553+ % tried to figure out what each command should do in the context
554+ % of @url. for now, just make @/ a no-op, that's the only one
555+ % people have actually reported a problem with.
556+ %
557+ \normalturnoffactive
558+ \def\@{@}%
559+ \let\/=\empty
560 \makevalueexpandable
561 \leavevmode\Red
562 \startlink attr{/Border [0 0 0]}%
563@@ -1419,6 +1528,7 @@
564 % We don't need math for this font style.
565 \def\ttsl{\setfontstyle{ttsl}}
566
567+
568 % Default leading.
569 \newdimen\textleading \textleading = 13.2pt
570
571@@ -1440,11 +1550,13 @@
572 }%
573 }
574
575+
576 % Set the font macro #1 to the font named #2, adding on the
577 % specified font prefix (normally `cm').
578 % #3 is the font's design size, #4 is a scale factor
579 \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
580
581+
582 % Use cm as the default font prefix.
583 % To specify the font prefix, you must define \fontprefix
584 % before you read in texinfo.tex.
585@@ -1468,6 +1580,10 @@
586 \def\scshape{csc}
587 \def\scbshape{csc}
588
589+% Definitions for a main text size of 11pt. This is the default in
590+% Texinfo.
591+%
592+\def\definetextfontsizexi{
593 % Text fonts (11.2pt, magstep1).
594 \def\textnominalsize{11pt}
595 \edef\mainmagstep{\magstephalf}
596@@ -1581,6 +1697,165 @@
597 \font\reducedi=cmmi10
598 \font\reducedsy=cmsy10
599
600+% reset the current fonts
601+\textfonts
602+\rm
603+} % end of 11pt text font size definitions
604+
605+
606+% Definitions to make the main text be 10pt Computer Modern, with
607+% section, chapter, etc., sizes following suit. This is for the GNU
608+% Press printing of the Emacs 22 manual. Maybe other manuals in the
609+% future. Used with @smallbook, which sets the leading to 12pt.
610+%
611+\def\definetextfontsizex{%
612+% Text fonts (10pt).
613+\def\textnominalsize{10pt}
614+\edef\mainmagstep{1000}
615+\setfont\textrm\rmshape{10}{\mainmagstep}
616+\setfont\texttt\ttshape{10}{\mainmagstep}
617+\setfont\textbf\bfshape{10}{\mainmagstep}
618+\setfont\textit\itshape{10}{\mainmagstep}
619+\setfont\textsl\slshape{10}{\mainmagstep}
620+\setfont\textsf\sfshape{10}{\mainmagstep}
621+\setfont\textsc\scshape{10}{\mainmagstep}
622+\setfont\textttsl\ttslshape{10}{\mainmagstep}
623+\font\texti=cmmi10 scaled \mainmagstep
624+\font\textsy=cmsy10 scaled \mainmagstep
625+
626+% A few fonts for @defun names and args.
627+\setfont\defbf\bfshape{10}{\magstephalf}
628+\setfont\deftt\ttshape{10}{\magstephalf}
629+\setfont\defttsl\ttslshape{10}{\magstephalf}
630+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
631+
632+% Fonts for indices, footnotes, small examples (9pt).
633+\def\smallnominalsize{9pt}
634+\setfont\smallrm\rmshape{9}{1000}
635+\setfont\smalltt\ttshape{9}{1000}
636+\setfont\smallbf\bfshape{10}{900}
637+\setfont\smallit\itshape{9}{1000}
638+\setfont\smallsl\slshape{9}{1000}
639+\setfont\smallsf\sfshape{9}{1000}
640+\setfont\smallsc\scshape{10}{900}
641+\setfont\smallttsl\ttslshape{10}{900}
642+\font\smalli=cmmi9
643+\font\smallsy=cmsy9
644+
645+% Fonts for small examples (8pt).
646+\def\smallernominalsize{8pt}
647+\setfont\smallerrm\rmshape{8}{1000}
648+\setfont\smallertt\ttshape{8}{1000}
649+\setfont\smallerbf\bfshape{10}{800}
650+\setfont\smallerit\itshape{8}{1000}
651+\setfont\smallersl\slshape{8}{1000}
652+\setfont\smallersf\sfshape{8}{1000}
653+\setfont\smallersc\scshape{10}{800}
654+\setfont\smallerttsl\ttslshape{10}{800}
655+\font\smalleri=cmmi8
656+\font\smallersy=cmsy8
657+
658+% Fonts for title page (20.4pt):
659+\def\titlenominalsize{20pt}
660+\setfont\titlerm\rmbshape{12}{\magstep3}
661+\setfont\titleit\itbshape{10}{\magstep4}
662+\setfont\titlesl\slbshape{10}{\magstep4}
663+\setfont\titlett\ttbshape{12}{\magstep3}
664+\setfont\titlettsl\ttslshape{10}{\magstep4}
665+\setfont\titlesf\sfbshape{17}{\magstep1}
666+\let\titlebf=\titlerm
667+\setfont\titlesc\scbshape{10}{\magstep4}
668+\font\titlei=cmmi12 scaled \magstep3
669+\font\titlesy=cmsy10 scaled \magstep4
670+\def\authorrm{\secrm}
671+\def\authortt{\sectt}
672+
673+% Chapter fonts (14.4pt).
674+\def\chapnominalsize{14pt}
675+\setfont\chaprm\rmbshape{12}{\magstep1}
676+\setfont\chapit\itbshape{10}{\magstep2}
677+\setfont\chapsl\slbshape{10}{\magstep2}
678+\setfont\chaptt\ttbshape{12}{\magstep1}
679+\setfont\chapttsl\ttslshape{10}{\magstep2}
680+\setfont\chapsf\sfbshape{12}{\magstep1}
681+\let\chapbf\chaprm
682+\setfont\chapsc\scbshape{10}{\magstep2}
683+\font\chapi=cmmi12 scaled \magstep1
684+\font\chapsy=cmsy10 scaled \magstep2
685+
686+% Section fonts (12pt).
687+\def\secnominalsize{12pt}
688+\setfont\secrm\rmbshape{12}{1000}
689+\setfont\secit\itbshape{10}{\magstep1}
690+\setfont\secsl\slbshape{10}{\magstep1}
691+\setfont\sectt\ttbshape{12}{1000}
692+\setfont\secttsl\ttslshape{10}{\magstep1}
693+\setfont\secsf\sfbshape{12}{1000}
694+\let\secbf\secrm
695+\setfont\secsc\scbshape{10}{\magstep1}
696+\font\seci=cmmi12
697+\font\secsy=cmsy10 scaled \magstep1
698+
699+% Subsection fonts (10pt).
700+\def\ssecnominalsize{10pt}
701+\setfont\ssecrm\rmbshape{10}{1000}
702+\setfont\ssecit\itbshape{10}{1000}
703+\setfont\ssecsl\slbshape{10}{1000}
704+\setfont\ssectt\ttbshape{10}{1000}
705+\setfont\ssecttsl\ttslshape{10}{1000}
706+\setfont\ssecsf\sfbshape{10}{1000}
707+\let\ssecbf\ssecrm
708+\setfont\ssecsc\scbshape{10}{1000}
709+\font\sseci=cmmi10
710+\font\ssecsy=cmsy10
711+
712+% Reduced fonts for @acro in text (9pt).
713+\def\reducednominalsize{9pt}
714+\setfont\reducedrm\rmshape{9}{1000}
715+\setfont\reducedtt\ttshape{9}{1000}
716+\setfont\reducedbf\bfshape{10}{900}
717+\setfont\reducedit\itshape{9}{1000}
718+\setfont\reducedsl\slshape{9}{1000}
719+\setfont\reducedsf\sfshape{9}{1000}
720+\setfont\reducedsc\scshape{10}{900}
721+\setfont\reducedttsl\ttslshape{10}{900}
722+\font\reducedi=cmmi9
723+\font\reducedsy=cmsy9
724+
725+% reduce space between paragraphs
726+\divide\parskip by 2
727+
728+% reset the current fonts
729+\textfonts
730+\rm
731+} % end of 10pt text font size definitions
732+
733+
734+% We provide the user-level command
735+% @fonttextsize 10
736+% (or 11) to redefine the text font size. pt is assumed.
737+%
738+\def\xword{10}
739+\def\xiword{11}
740+%
741+\parseargdef\fonttextsize{%
742+ \def\textsizearg{#1}%
743+ \wlog{doing @fonttextsize \textsizearg}%
744+ %
745+ % Set \globaldefs so that documents can use this inside @tex, since
746+ % makeinfo 4.8 does not support it, but we need it nonetheless.
747+ %
748+ \begingroup \globaldefs=1
749+ \ifx\textsizearg\xword \definetextfontsizex
750+ \else \ifx\textsizearg\xiword \definetextfontsizexi
751+ \else
752+ \errhelp=\EMsimple
753+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
754+ \fi\fi
755+ \endgroup
756+}
757+
758+
759 % In order for the font changes to affect most math symbols and letters,
760 % we have to define the \textfont of the standard families. Since
761 % texinfo doesn't allow for producing subscripts and superscripts except
762@@ -1691,7 +1966,7 @@
763
764 % Set up the default fonts, so we can use them for creating boxes.
765 %
766-\textfonts \rm
767+\definetextfontsizexi
768
769 % Define these so they can be easily changed for other fonts.
770 \def\angleleft{$\langle$}
771@@ -1749,14 +2024,21 @@
772 % sometimes \x has an active definition that messes things up.
773 %
774 \catcode`@=11
775- \def\frenchspacing{%
776+ \def\plainfrenchspacing{%
777 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
778 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
779+ \def\endofsentencespacefactor{1000}% for @. and friends
780+ }
781+ \def\plainnonfrenchspacing{%
782+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
783+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
784+ \def\endofsentencespacefactor{3000}% for @. and friends
785 }
786 \catcode`@=\other
787+\def\endofsentencespacefactor{3000}% default
788
789 \def\t#1{%
790- {\tt \rawbackslash \frenchspacing #1}%
791+ {\tt \rawbackslash \plainfrenchspacing #1}%
792 \null
793 }
794 \def\samp#1{`\tclose{#1}'\null}
795@@ -1768,6 +2050,7 @@
796 \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
797 \kern-0.4pt\hrule}%
798 \kern-.06em\raise0.4pt\hbox{\angleright}}}}
799+\def\key #1{{\nohyphenation \uppercase{#1}}\null}
800 % The old definition, with no lozenge:
801 %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
802 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
803@@ -1793,7 +2076,7 @@
804 \nohyphenation
805 %
806 \rawbackslash
807- \frenchspacing
808+ \plainfrenchspacing
809 #1%
810 }%
811 \null
812@@ -1809,12 +2092,21 @@
813 % and arrange explicitly to hyphenate at a dash.
814 % -- rms.
815 {
816- \catcode`\-=\active
817- \catcode`\_=\active
818+ \catcode`\-=\active \catcode`\_=\active
819+ \catcode`\'=\active \catcode`\`=\active
820 %
821 \global\def\code{\begingroup
822- \catcode`\-=\active \let-\codedash
823- \catcode`\_=\active \let_\codeunder
824+ \catcode\rquoteChar=\active \catcode\lquoteChar=\active
825+ \let'\codequoteright \let`\codequoteleft
826+ %
827+ \catcode\dashChar=\active \catcode\underChar=\active
828+ \ifallowcodebreaks
829+ \let-\codedash
830+ \let_\codeunder
831+ \else
832+ \let-\realdash
833+ \let_\realunder
834+ \fi
835 \codex
836 }
837 }
838@@ -1834,6 +2126,28 @@
839 }
840 \def\codex #1{\tclose{#1}\endgroup}
841
842+% An additional complication: the above will allow breaks after, e.g.,
843+% each of the four underscores in __typeof__. This is undesirable in
844+% some manuals, especially if they don't have long identifiers in
845+% general. @allowcodebreaks provides a way to control this.
846+%
847+\newif\ifallowcodebreaks \allowcodebreakstrue
848+
849+\def\keywordtrue{true}
850+\def\keywordfalse{false}
851+
852+\parseargdef\allowcodebreaks{%
853+ \def\txiarg{#1}%
854+ \ifx\txiarg\keywordtrue
855+ \allowcodebreakstrue
856+ \else\ifx\txiarg\keywordfalse
857+ \allowcodebreaksfalse
858+ \else
859+ \errhelp = \EMsimple
860+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
861+ \fi\fi
862+}
863+
864 % @kbd is like @code, except that if the argument is just one @key command,
865 % then @kbd has no effect.
866
867@@ -1841,16 +2155,16 @@
868 % `example' (@kbd uses ttsl only inside of @example and friends),
869 % or `code' (@kbd uses normal tty font always).
870 \parseargdef\kbdinputstyle{%
871- \def\arg{#1}%
872- \ifx\arg\worddistinct
873+ \def\txiarg{#1}%
874+ \ifx\txiarg\worddistinct
875 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
876- \else\ifx\arg\wordexample
877+ \else\ifx\txiarg\wordexample
878 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
879- \else\ifx\arg\wordcode
880+ \else\ifx\txiarg\wordcode
881 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
882 \else
883 \errhelp = \EMsimple
884- \errmessage{Unknown @kbdinputstyle option `\arg'}%
885+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
886 \fi\fi\fi
887 }
888 \def\worddistinct{distinct}
889@@ -1962,7 +2276,7 @@
890 %
891 \def\abbr#1{\doabbr #1,,\finish}
892 \def\doabbr#1,#2,#3\finish{%
893- {\frenchspacing #1}%
894+ {\plainfrenchspacing #1}%
895 \def\temp{#2}%
896 \ifx\temp\empty \else
897 \space ({\unsepspaces \ignorespaces \temp \unskip})%
898@@ -2000,7 +2314,7 @@
899 \def\eurofont{%
900 % We set the font at each command, rather than predefining it in
901 % \textfonts and the other font-switching commands, so that
902- % installations which never need the symbold don't have to have the
903+ % installations which never need the symbol don't have to have the
904 % font installed.
905 %
906 % There is only one designed size (nominal 10pt), so we always scale
907@@ -2031,6 +2345,10 @@
908 }$%
909 }
910
911+% @textdegree - the normal degrees sign.
912+%
913+\def\textdegree{$^\circ$}
914+
915 % Laurent Siebenmann reports \Orb undefined with:
916 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
917 % so we'll define it if necessary.
918@@ -2202,8 +2520,8 @@
919 %
920 % Leave some space for the footline. Hopefully ok to assume
921 % @evenfooting will not be used by itself.
922- \global\advance\pageheight by -\baselineskip
923- \global\advance\vsize by -\baselineskip
924+ \global\advance\pageheight by -12pt
925+ \global\advance\vsize by -12pt
926 }
927
928 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
929@@ -2862,6 +3180,7 @@
930
931 \def\doignore#1{\begingroup
932 % Scan in ``verbatim'' mode:
933+ \obeylines
934 \catcode`\@ = \other
935 \catcode`\{ = \other
936 \catcode`\} = \other
937@@ -2882,16 +3201,16 @@
938 \gdef\dodoignore#1{%
939 % #1 contains the command name as a string, e.g., `ifinfo'.
940 %
941- % Define a command to find the next `@end #1', which must be on a line
942- % by itself.
943- \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}%
944+ % Define a command to find the next `@end #1'.
945+ \long\def\doignoretext##1^^M@end #1{%
946+ \doignoretextyyy##1^^M@#1\_STOP_}%
947+ %
948 % And this command to find another #1 command, at the beginning of a
949 % line. (Otherwise, we would consider a line `@c @ifset', for
950 % example, to count as an @ifset for nesting.)
951 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
952 %
953 % And now expand that command.
954- \obeylines %
955 \doignoretext ^^M%
956 }%
957 }
958@@ -2921,7 +3240,12 @@
959 }
960
961 % Finish off ignored text.
962-\def\enddoignore{\endgroup\ignorespaces}
963+{ \obeylines%
964+ % Ignore anything after the last `@end #1'; this matters in verbatim
965+ % environments, where otherwise the newline after an ignored conditional
966+ % would result in a blank line in the output.
967+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
968+}
969
970
971 % @set VAR sets the variable VAR to an empty value.
972@@ -3121,42 +3445,50 @@
973 % we have to laboriously prevent expansion for those that we don't.
974 %
975 \def\indexdummies{%
976+ \escapechar = `\\ % use backslash in output files.
977 \def\@{@}% change to @@ when we switch to @ as escape char in index files.
978 \def\ {\realbackslash\space }%
979+ %
980 % Need these in case \tex is in effect and \{ is a \delimiter again.
981 % But can't use \lbracecmd and \rbracecmd because texindex assumes
982 % braces and backslashes are used only as delimiters.
983 \let\{ = \mylbrace
984 \let\} = \myrbrace
985 %
986- % \definedummyword defines \#1 as \realbackslash #1\space, thus
987- % effectively preventing its expansion. This is used only for control
988- % words, not control letters, because the \space would be incorrect
989- % for control characters, but is needed to separate the control word
990- % from whatever follows.
991- %
992- % For control letters, we have \definedummyletter, which omits the
993- % space.
994- %
995- % These can be used both for control words that take an argument and
996- % those that do not. If it is followed by {arg} in the input, then
997- % that will dutifully get written to the index (or wherever).
998- %
999- \def\definedummyword##1{%
1000- \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
1001- }%
1002- \def\definedummyletter##1{%
1003- \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
1004- }%
1005- \let\definedummyaccent\definedummyletter
1006+ % I don't entirely understand this, but when an index entry is
1007+ % generated from a macro call, the \endinput which \scanmacro inserts
1008+ % causes processing to be prematurely terminated. This is,
1009+ % apparently, because \indexsorttmp is fully expanded, and \endinput
1010+ % is an expandable command. The redefinition below makes \endinput
1011+ % disappear altogether for that purpose -- although logging shows that
1012+ % processing continues to some further point. On the other hand, it
1013+ % seems \endinput does not hurt in the printed index arg, since that
1014+ % is still getting written without apparent harm.
1015+ %
1016+ % Sample source (mac-idx3.tex, reported by Graham Percival to
1017+ % help-texinfo, 22may06):
1018+ % @macro funindex {WORD}
1019+ % @findex xyz
1020+ % @end macro
1021+ % ...
1022+ % @funindex commtest
1023+ %
1024+ % The above is not enough to reproduce the bug, but it gives the flavor.
1025+ %
1026+ % Sample whatsit resulting:
1027+ % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
1028+ %
1029+ % So:
1030+ \let\endinput = \empty
1031 %
1032 % Do the redefinitions.
1033 \commondummies
1034 }
1035
1036-% For the aux file, @ is the escape character. So we want to redefine
1037-% everything using @ instead of \realbackslash. When everything uses
1038-% @, this will be simpler.
1039+% For the aux and toc files, @ is the escape character. So we want to
1040+% redefine everything using @ as the escape character (instead of
1041+% \realbackslash, still used for index files). When everything uses @,
1042+% this will be simpler.
1043 %
1044 \def\atdummies{%
1045 \def\@{@@}%
1046@@ -3164,147 +3496,152 @@
1047 \let\{ = \lbraceatcmd
1048 \let\} = \rbraceatcmd
1049 %
1050- % (See comments in \indexdummies.)
1051- \def\definedummyword##1{%
1052- \expandafter\def\csname ##1\endcsname{@##1\space}%
1053- }%
1054- \def\definedummyletter##1{%
1055- \expandafter\def\csname ##1\endcsname{@##1}%
1056- }%
1057- \let\definedummyaccent\definedummyletter
1058- %
1059 % Do the redefinitions.
1060 \commondummies
1061+ \otherbackslash
1062 }
1063
1064-% Called from \indexdummies and \atdummies. \definedummyword and
1065-% \definedummyletter must be defined first.
1066+% Called from \indexdummies and \atdummies.
1067 %
1068 \def\commondummies{%
1069 %
1070- \normalturnoffactive
1071+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
1072+ % preventing its expansion. This is used only for control% words,
1073+ % not control letters, because the \space would be incorrect for
1074+ % control characters, but is needed to separate the control word
1075+ % from whatever follows.
1076+ %
1077+ % For control letters, we have \definedummyletter, which omits the
1078+ % space.
1079+ %
1080+ % These can be used both for control words that take an argument and
1081+ % those that do not. If it is followed by {arg} in the input, then
1082+ % that will dutifully get written to the index (or wherever).
1083+ %
1084+ \def\definedummyword ##1{\def##1{\string##1\space}}%
1085+ \def\definedummyletter##1{\def##1{\string##1}}%
1086+ \let\definedummyaccent\definedummyletter
1087 %
1088 \commondummiesnofonts
1089 %
1090- \definedummyletter{_}%
1091+ \definedummyletter\_%
1092 %
1093 % Non-English letters.
1094- \definedummyword{AA}%
1095- \definedummyword{AE}%
1096- \definedummyword{L}%
1097- \definedummyword{OE}%
1098- \definedummyword{O}%
1099- \definedummyword{aa}%
1100- \definedummyword{ae}%
1101- \definedummyword{l}%
1102- \definedummyword{oe}%
1103- \definedummyword{o}%
1104- \definedummyword{ss}%
1105- \definedummyword{exclamdown}%
1106- \definedummyword{questiondown}%
1107- \definedummyword{ordf}%
1108- \definedummyword{ordm}%
1109+ \definedummyword\AA
1110+ \definedummyword\AE
1111+ \definedummyword\L
1112+ \definedummyword\OE
1113+ \definedummyword\O
1114+ \definedummyword\aa
1115+ \definedummyword\ae
1116+ \definedummyword\l
1117+ \definedummyword\oe
1118+ \definedummyword\o
1119+ \definedummyword\ss
1120+ \definedummyword\exclamdown
1121+ \definedummyword\questiondown
1122+ \definedummyword\ordf
1123+ \definedummyword\ordm
1124 %
1125 % Although these internal commands shouldn't show up, sometimes they do.
1126- \definedummyword{bf}%
1127- \definedummyword{gtr}%
1128- \definedummyword{hat}%
1129- \definedummyword{less}%
1130- \definedummyword{sf}%
1131- \definedummyword{sl}%
1132- \definedummyword{tclose}%
1133- \definedummyword{tt}%
1134+ \definedummyword\bf
1135+ \definedummyword\gtr
1136+ \definedummyword\hat
1137+ \definedummyword\less
1138+ \definedummyword\sf
1139+ \definedummyword\sl
1140+ \definedummyword\tclose
1141+ \definedummyword\tt
1142 %
1143- \definedummyword{LaTeX}%
1144- \definedummyword{TeX}%
1145+ \definedummyword\LaTeX
1146+ \definedummyword\TeX
1147 %
1148 % Assorted special characters.
1149- \definedummyword{bullet}%
1150- \definedummyword{comma}%
1151- \definedummyword{copyright}%
1152- \definedummyword{registeredsymbol}%
1153- \definedummyword{dots}%
1154- \definedummyword{enddots}%
1155- \definedummyword{equiv}%
1156- \definedummyword{error}%
1157- \definedummyword{euro}%
1158- \definedummyword{expansion}%
1159- \definedummyword{minus}%
1160- \definedummyword{pounds}%
1161- \definedummyword{point}%
1162- \definedummyword{print}%
1163- \definedummyword{result}%
1164+ \definedummyword\bullet
1165+ \definedummyword\comma
1166+ \definedummyword\copyright
1167+ \definedummyword\registeredsymbol
1168+ \definedummyword\dots
1169+ \definedummyword\enddots
1170+ \definedummyword\equiv
1171+ \definedummyword\error
1172+ \definedummyword\euro
1173+ \definedummyword\expansion
1174+ \definedummyword\minus
1175+ \definedummyword\pounds
1176+ \definedummyword\point
1177+ \definedummyword\print
1178+ \definedummyword\result
1179+ \definedummyword\textdegree
1180+ %
1181+ % We want to disable all macros so that they are not expanded by \write.
1182+ \macrolist
1183+ %
1184+ \normalturnoffactive
1185 %
1186 % Handle some cases of @value -- where it does not contain any
1187 % (non-fully-expandable) commands.
1188 \makevalueexpandable
1189- %
1190- % Normal spaces, not active ones.
1191- \unsepspaces
1192- %
1193- % No macro expansion.
1194- \turnoffmacros
1195 }
1196
1197 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
1198 %
1199-% Better have this without active chars.
1200-{
1201- \catcode`\~=\other
1202- \gdef\commondummiesnofonts{%
1203- % Control letters and accents.
1204- \definedummyletter{!}%
1205- \definedummyaccent{"}%
1206- \definedummyaccent{'}%
1207- \definedummyletter{*}%
1208- \definedummyaccent{,}%
1209- \definedummyletter{.}%
1210- \definedummyletter{/}%
1211- \definedummyletter{:}%
1212- \definedummyaccent{=}%
1213- \definedummyletter{?}%
1214- \definedummyaccent{^}%
1215- \definedummyaccent{`}%
1216- \definedummyaccent{~}%
1217- \definedummyword{u}%
1218- \definedummyword{v}%
1219- \definedummyword{H}%
1220- \definedummyword{dotaccent}%
1221- \definedummyword{ringaccent}%
1222- \definedummyword{tieaccent}%
1223- \definedummyword{ubaraccent}%
1224- \definedummyword{udotaccent}%
1225- \definedummyword{dotless}%
1226- %
1227- % Texinfo font commands.
1228- \definedummyword{b}%
1229- \definedummyword{i}%
1230- \definedummyword{r}%
1231- \definedummyword{sc}%
1232- \definedummyword{t}%
1233- %
1234- % Commands that take arguments.
1235- \definedummyword{acronym}%
1236- \definedummyword{cite}%
1237- \definedummyword{code}%
1238- \definedummyword{command}%
1239- \definedummyword{dfn}%
1240- \definedummyword{emph}%
1241- \definedummyword{env}%
1242- \definedummyword{file}%
1243- \definedummyword{kbd}%
1244- \definedummyword{key}%
1245- \definedummyword{math}%
1246- \definedummyword{option}%
1247- \definedummyword{samp}%
1248- \definedummyword{strong}%
1249- \definedummyword{tie}%
1250- \definedummyword{uref}%
1251- \definedummyword{url}%
1252- \definedummyword{var}%
1253- \definedummyword{verb}%
1254- \definedummyword{w}%
1255- }
1256+\def\commondummiesnofonts{%
1257+ % Control letters and accents.
1258+ \definedummyletter\!%
1259+ \definedummyaccent\"%
1260+ \definedummyaccent\'%
1261+ \definedummyletter\*%
1262+ \definedummyaccent\,%
1263+ \definedummyletter\.%
1264+ \definedummyletter\/%
1265+ \definedummyletter\:%
1266+ \definedummyaccent\=%
1267+ \definedummyletter\?%
1268+ \definedummyaccent\^%
1269+ \definedummyaccent\`%
1270+ \definedummyaccent\~%
1271+ \definedummyword\u
1272+ \definedummyword\v
1273+ \definedummyword\H
1274+ \definedummyword\dotaccent
1275+ \definedummyword\ringaccent
1276+ \definedummyword\tieaccent
1277+ \definedummyword\ubaraccent
1278+ \definedummyword\udotaccent
1279+ \definedummyword\dotless
1280+ %
1281+ % Texinfo font commands.
1282+ \definedummyword\b
1283+ \definedummyword\i
1284+ \definedummyword\r
1285+ \definedummyword\sc
1286+ \definedummyword\t
1287+ %
1288+ % Commands that take arguments.
1289+ \definedummyword\acronym
1290+ \definedummyword\cite
1291+ \definedummyword\code
1292+ \definedummyword\command
1293+ \definedummyword\dfn
1294+ \definedummyword\emph
1295+ \definedummyword\env
1296+ \definedummyword\file
1297+ \definedummyword\kbd
1298+ \definedummyword\key
1299+ \definedummyword\math
1300+ \definedummyword\option
1301+ \definedummyword\pxref
1302+ \definedummyword\ref
1303+ \definedummyword\samp
1304+ \definedummyword\strong
1305+ \definedummyword\tie
1306+ \definedummyword\uref
1307+ \definedummyword\url
1308+ \definedummyword\var
1309+ \definedummyword\verb
1310+ \definedummyword\w
1311+ \definedummyword\xref
1312 }
1313
1314 % \indexnofonts is used when outputting the strings to sort the index
1315@@ -3314,13 +3651,9 @@
1316 %
1317 \def\indexnofonts{%
1318 % Accent commands should become @asis.
1319- \def\definedummyaccent##1{%
1320- \expandafter\let\csname ##1\endcsname\asis
1321- }%
1322+ \def\definedummyaccent##1{\let##1\asis}%
1323 % We can just ignore other control letters.
1324- \def\definedummyletter##1{%
1325- \expandafter\def\csname ##1\endcsname{}%
1326- }%
1327+ \def\definedummyletter##1{\let##1\empty}%
1328 % Hopefully, all control words can become @asis.
1329 \let\definedummyword\definedummyaccent
1330 %
1331@@ -3373,9 +3706,19 @@
1332 \def\point{.}%
1333 \def\print{-|}%
1334 \def\result{=>}%
1335+ \def\textdegree{degrees}%
1336 %
1337- % Don't write macro names.
1338- \emptyusermacros
1339+ % We need to get rid of all macros, leaving only the arguments (if present).
1340+ % Of course this is not nearly correct, but it is the best we can do for now.
1341+ % makeinfo does not expand macros in the argument to @deffn, which ends up
1342+ % writing an index entry, and texindex isn't prepared for an index sort entry
1343+ % that starts with \.
1344+ %
1345+ % Since macro invocations are followed by braces, we can just redefine them
1346+ % to take a single TeX argument. The case of a macro invocation that
1347+ % goes to end-of-line is not handled.
1348+ %
1349+ \macrolist
1350 }
1351
1352 \let\indexbackslash=0 %overridden during \printindex.
1353@@ -3422,7 +3765,6 @@
1354 %
1355 % Remember, we are within a group.
1356 \indexdummies % Must do this here, since \bf, etc expand at this stage
1357- \escapechar=`\\
1358 \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
1359 % so it will be output as is; and it will print as backslash.
1360 %
1361@@ -3713,9 +4055,9 @@
1362 \endgroup
1363 }
1364
1365-% Like \dotfill except takes at least 1 em.
1366+% Like plain.tex's \dotfill, except uses up at least 1 em.
1367 \def\indexdotfill{\cleaders
1368- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
1369+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
1370
1371 \def\primary #1{\line{#1\hfil}}
1372
1373@@ -4289,14 +4631,17 @@
1374 \ifx\temptype\Ynothingkeyword
1375 \setbox0 = \hbox{}%
1376 \def\toctype{unnchap}%
1377- \def\thischapter{#1}%
1378+ \gdef\thischapternum{}%
1379+ \gdef\thischapter{#1}%
1380 \else\ifx\temptype\Yomitfromtockeyword
1381 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
1382 \def\toctype{omit}%
1383- \xdef\thischapter{}%
1384+ \gdef\thischapternum{}%
1385+ \gdef\thischapter{}%
1386 \else\ifx\temptype\Yappendixkeyword
1387 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
1388 \def\toctype{app}%
1389+ \xdef\thischapternum{\appendixletter}%
1390 % We don't substitute the actual chapter name into \thischapter
1391 % because we don't want its macros evaluated now. And we don't
1392 % use \thissection because that changes with each section.
1393@@ -4306,6 +4651,7 @@
1394 \else
1395 \setbox0 = \hbox{#3\enspace}%
1396 \def\toctype{numchap}%
1397+ \xdef\thischapternum{\the\chapno}%
1398 \xdef\thischapter{\putwordChapter{} \the\chapno:
1399 \noexpand\thischaptername}%
1400 \fi\fi\fi
1401@@ -4417,13 +4763,21 @@
1402 \gdef\thissection{#1}%
1403 \fi\fi\fi
1404 %
1405- % Write the toc entry (before \donoderef). See comments in \chfplain.
1406+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
1407 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
1408 %
1409 % Write the node reference (= pdf destination for pdftex).
1410- % Again, see comments in \chfplain.
1411+ % Again, see comments in \chapmacro.
1412 \donoderef{#3}%
1413 %
1414+ % Interline glue will be inserted when the vbox is completed.
1415+ % That glue will be a valid breakpoint for the page, since it'll be
1416+ % preceded by a whatsit (usually from the \donoderef, or from the
1417+ % \writetocentry if there was no node). We don't want to allow that
1418+ % break, since then the whatsits could end up on page n while the
1419+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
1420+ \nobreak
1421+ %
1422 % Output the actual section heading.
1423 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
1424 \hangindent=\wd0 % zero if no section number
1425@@ -4482,11 +4836,11 @@
1426 \fi
1427 %
1428 \iflinks
1429- \toks0 = {#2}%
1430- \toks2 = \expandafter{\lastnode}%
1431- \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}%
1432- {\the\toks2}{\noexpand\folio}}}%
1433- \temp
1434+ {\atdummies
1435+ \edef\temp{%
1436+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
1437+ \temp
1438+ }%
1439 \fi
1440 \fi
1441 %
1442@@ -4499,6 +4853,31 @@
1443 \ifpdf \global\pdfmakepagedesttrue \fi
1444 }
1445
1446+
1447+% These characters do not print properly in the Computer Modern roman
1448+% fonts, so we must take special care. This is more or less redundant
1449+% with the Texinfo input format setup at the end of this file.
1450+%
1451+\def\activecatcodes{%
1452+ \catcode`\"=\active
1453+ \catcode`\$=\active
1454+ \catcode`\<=\active
1455+ \catcode`\>=\active
1456+ \catcode`\\=\active
1457+ \catcode`\^=\active
1458+ \catcode`\_=\active
1459+ \catcode`\|=\active
1460+ \catcode`\~=\active
1461+}
1462+
1463+
1464+% Read the toc file, which is essentially Texinfo input.
1465+\def\readtocfile{%
1466+ \setupdatafile
1467+ \activecatcodes
1468+ \input \jobname.toc
1469+}
1470+
1471 \newskip\contentsrightmargin \contentsrightmargin=1in
1472 \newcount\savepageno
1473 \newcount\lastnegativepageno \lastnegativepageno = -1
1474@@ -4520,11 +4899,7 @@
1475 %
1476 \savepageno = \pageno
1477 \begingroup % Set up to handle contents files properly.
1478- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
1479- % We can't do this, because then an actual ^ in a section
1480- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
1481- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
1482- \raggedbottom % Worry more about breakpoints than the bottom.
1483+ \raggedbottom % Worry more about breakpoints than the bottom.
1484 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
1485 %
1486 % Roman numerals for page numbers.
1487@@ -4537,7 +4912,7 @@
1488 \startcontents{\putwordTOC}%
1489 \openin 1 \jobname.toc
1490 \ifeof 1 \else
1491- \input \jobname.toc
1492+ \readtocfile
1493 \fi
1494 \vfill \eject
1495 \contentsalignmacro % in case @setchapternewpage odd is in effect
1496@@ -4575,7 +4950,7 @@
1497 \let\unnsubsubsecentry = \numsecentry
1498 \openin 1 \jobname.toc
1499 \ifeof 1 \else
1500- \input \jobname.toc
1501+ \readtocfile
1502 \fi
1503 \closein 1
1504 \vfill \eject
1505@@ -4717,7 +5092,7 @@
1506 {\tentt \global\dimen0 = 3em}% Width of the box.
1507 \dimen2 = .55pt % Thickness of rules
1508 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
1509-\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
1510+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
1511 %
1512 \setbox\errorbox=\hbox to \dimen0{\hfil
1513 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
1514@@ -4765,6 +5140,7 @@
1515 \let\/=\ptexslash
1516 \let\*=\ptexstar
1517 \let\t=\ptext
1518+ \let\frenchspacing=\plainfrenchspacing
1519 %
1520 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
1521 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
1522@@ -4810,7 +5186,8 @@
1523
1524 \let\afterenvbreak = \aboveenvbreak
1525
1526-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
1527+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
1528+% also clear it, so that its embedded environments do the narrowing again.
1529 \let\nonarrowing=\relax
1530
1531 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
1532@@ -4847,7 +5224,7 @@
1533 % each corner char, and rule thickness
1534 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
1535 % Flag to tell @lisp, etc., not to narrow margin.
1536- \let\nonarrowing=\comment
1537+ \let\nonarrowing = t%
1538 \vbox\bgroup
1539 \baselineskip=0pt\parskip=0pt\lineskip=0pt
1540 \carttop
1541@@ -4887,11 +5264,11 @@
1542 \parskip = 0pt
1543 \parindent = 0pt
1544 \emergencystretch = 0pt % don't try to avoid overfull boxes
1545- % @cartouche defines \nonarrowing to inhibit narrowing
1546- % at next level down.
1547 \ifx\nonarrowing\relax
1548 \advance \leftskip by \lispnarrowing
1549 \exdentamount=\lispnarrowing
1550+ \else
1551+ \let\nonarrowing = \relax
1552 \fi
1553 \let\exdent=\nofillexdent
1554 }
1555@@ -4938,11 +5315,10 @@
1556 %
1557 \maketwodispenvs {lisp}{example}{%
1558 \nonfillstart
1559- \tt
1560+ \tt\quoteexpand
1561 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
1562 \gobble % eat return
1563 }
1564-
1565 % @display/@smalldisplay: same as @lisp except keep current font.
1566 %
1567 \makedispenv {display}{%
1568@@ -4991,6 +5367,7 @@
1569 \advance\leftskip by \lispnarrowing
1570 \advance\rightskip by \lispnarrowing
1571 \exdentamount = \lispnarrowing
1572+ \else
1573 \let\nonarrowing = \relax
1574 \fi
1575 \parsearg\quotationlabel
1576@@ -5069,6 +5446,34 @@
1577 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
1578 %
1579 \def\starttabbox{\setbox0=\hbox\bgroup}
1580+
1581+% Allow an option to not replace quotes with a regular directed right
1582+% quote/apostrophe (char 0x27), but instead use the undirected quote
1583+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
1584+% the default, but it works for pasting with more pdf viewers (at least
1585+% evince), the lilypond developers report. xpdf does work with the
1586+% regular 0x27.
1587+%
1588+\def\codequoteright{%
1589+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
1590+ '%
1591+ \else
1592+ \char'15
1593+ \fi
1594+}
1595+%
1596+% and a similar option for the left quote char vs. a grave accent.
1597+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
1598+% the code environments to do likewise.
1599+%
1600+\def\codequoteleft{%
1601+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
1602+ `%
1603+ \else
1604+ \char'22
1605+ \fi
1606+}
1607+%
1608 \begingroup
1609 \catcode`\^^I=\active
1610 \gdef\tabexpand{%
1611@@ -5081,15 +5486,25 @@
1612 \wd0=\dimen0 \box0 \starttabbox
1613 }%
1614 }
1615+ \catcode`\'=\active
1616+ \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
1617+ %
1618+ \catcode`\`=\active
1619+ \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
1620+ %
1621+ \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
1622 \endgroup
1623+
1624+% start the verbatim environment.
1625 \def\setupverbatim{%
1626+ \let\nonarrowing = t%
1627 \nonfillstart
1628- \advance\leftskip by -\defbodyindent
1629 % Easiest (and conventionally used) font for verbatim
1630 \tt
1631 \def\par{\leavevmode\egroup\box0\endgraf}%
1632 \catcode`\`=\active
1633 \tabexpand
1634+ \quoteexpand
1635 % Respect line breaks,
1636 % print special symbols as themselves, and
1637 % make each space count
1638@@ -5539,7 +5954,6 @@
1639 \spaceisspace
1640 %
1641 % Append \endinput to make sure that TeX does not see the ending newline.
1642- %
1643 % I've verified that it is necessary both for e-TeX and for ordinary TeX
1644 % --kasal, 29nov03
1645 \scantokens{#1\endinput}%
1646@@ -5554,8 +5968,19 @@
1647 \newcount\paramno % Count of parameters
1648 \newtoks\macname % Macro name
1649 \newif\ifrecursive % Is it recursive?
1650-\def\macrolist{} % List of all defined macros in the form
1651- % \do\macro1\do\macro2...
1652+
1653+% List of all defined macros in the form
1654+% \definedummyword\macro1\definedummyword\macro2...
1655+% Currently is also contains all @aliases; the list can be split
1656+% if there is a need.
1657+\def\macrolist{}
1658+
1659+% Add the macro to \macrolist
1660+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
1661+\def\addtomacrolistxxx#1{%
1662+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
1663+ \xdef\macrolist{\the\toks0}%
1664+}
1665
1666 % Utility routines.
1667 % This does \let #1 = #2, with \csnames; that is,
1668@@ -5653,10 +6078,7 @@
1669 \else \errmessage{Macro name \the\macname\space already defined}\fi
1670 \global\cslet{macsave.\the\macname}{\the\macname}%
1671 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
1672- % Add the macroname to \macrolist
1673- \toks0 = \expandafter{\macrolist\do}%
1674- \xdef\macrolist{\the\toks0
1675- \expandafter\noexpand\csname\the\macname\endcsname}%
1676+ \addtomacrolist{\the\macname}%
1677 \fi
1678 \begingroup \macrobodyctxt
1679 \ifrecursive \expandafter\parsermacbody
1680@@ -5670,7 +6092,7 @@
1681 % Remove the macro name from \macrolist:
1682 \begingroup
1683 \expandafter\let\csname#1\endcsname \relax
1684- \let\do\unmacrodo
1685+ \let\definedummyword\unmacrodo
1686 \xdef\macrolist{\macrolist}%
1687 \endgroup
1688 \else
1689@@ -5682,10 +6104,10 @@
1690 % macro definitions that have been changed to \relax.
1691 %
1692 \def\unmacrodo#1{%
1693- \ifx#1\relax
1694+ \ifx #1\relax
1695 % remove this
1696 \else
1697- \noexpand\do \noexpand #1%
1698+ \noexpand\definedummyword \noexpand#1%
1699 \fi
1700 }
1701
1702@@ -5798,30 +6220,11 @@
1703 % {. If so it reads up to the closing }, if not, it reads the whole
1704 % line. Whatever was read is then fed to the next control sequence
1705 % as an argument (by \parsebrace or \parsearg)
1706-\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
1707+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
1708 \def\braceorlinexxx{%
1709 \ifx\nchar\bgroup\else
1710 \expandafter\parsearg
1711- \fi \next}
1712-
1713-% We want to disable all macros during \shipout so that they are not
1714-% expanded by \write.
1715-\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
1716- \edef\next{\macrolist}\expandafter\endgroup\next}
1717-
1718-% For \indexnofonts, we need to get rid of all macros, leaving only the
1719-% arguments (if present). Of course this is not nearly correct, but it
1720-% is the best we can do for now. makeinfo does not expand macros in the
1721-% argument to @deffn, which ends up writing an index entry, and texindex
1722-% isn't prepared for an index sort entry that starts with \.
1723-%
1724-% Since macro invocations are followed by braces, we can just redefine them
1725-% to take a single TeX argument. The case of a macro invocation that
1726-% goes to end-of-line is not handled.
1727-%
1728-\def\emptyusermacros{\begingroup
1729- \def\do##1{\let\noexpand##1=\noexpand\asis}%
1730- \edef\next{\macrolist}\expandafter\endgroup\next}
1731+ \fi \macnamexxx}
1732
1733
1734 % @alias.
1735@@ -5832,6 +6235,7 @@
1736 \def\aliasyyy #1=#2\relax{%
1737 {%
1738 \expandafter\let\obeyedspace=\empty
1739+ \addtomacrolist{#1}%
1740 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
1741 }%
1742 \next
1743@@ -5901,8 +6305,6 @@
1744 \iflinks
1745 {%
1746 \atdummies % preserve commands, but don't expand them
1747- \turnoffactive
1748- \otherbackslash
1749 \edef\writexrdef##1##2{%
1750 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
1751 ##1}{##2}}% these are parameters of \writexrdef
1752@@ -5956,13 +6358,17 @@
1753 \ifpdf
1754 \leavevmode
1755 \getfilename{#4}%
1756- {\turnoffactive \otherbackslash
1757+ {\turnoffactive
1758+ % See comments at \activebackslashdouble.
1759+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
1760+ \backslashparens\pdfxrefdest}%
1761+ %
1762 \ifnum\filenamelength>0
1763 \startlink attr{/Border [0 0 0]}%
1764- goto file{\the\filename.pdf} name{#1}%
1765+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
1766 \else
1767 \startlink attr{/Border [0 0 0]}%
1768- goto name{\pdfmkpgn{#1}}%
1769+ goto name{\pdfmkpgn{\pdfxrefdest}}%
1770 \fi
1771 }%
1772 \linkcolor
1773@@ -5976,7 +6382,6 @@
1774 % include an _ in the xref name, etc.
1775 \indexnofonts
1776 \turnoffactive
1777- \otherbackslash
1778 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
1779 \csname XR#1-title\endcsname
1780 }%
1781@@ -5984,7 +6389,7 @@
1782 % If the user specified the print name (third arg) to the ref,
1783 % print it instead of our usual "Figure 1.2".
1784 \ifdim\wd0 = 0pt
1785- \refx{#1-snt}%
1786+ \refx{#1-snt}{}%
1787 \else
1788 \printedrefname
1789 \fi
1790@@ -6011,7 +6416,7 @@
1791 % into the usual \leavevmode...\vrule stuff for purposes of
1792 % printing. So we \turnoffactive for the \refx-snt, back on for the
1793 % printing, back off for the \refx-pg.
1794- {\turnoffactive \otherbackslash
1795+ {\turnoffactive
1796 % Only output a following space if the -snt ref is nonempty; for
1797 % @unnumbered and @anchor, it won't be.
1798 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
1799@@ -6024,7 +6429,7 @@
1800 ,\space
1801 %
1802 % output the `page 3'.
1803- \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
1804+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
1805 \fi
1806 \fi
1807 \endlink
1808@@ -6127,13 +6532,13 @@
1809 \def\tryauxfile{%
1810 \openin 1 \jobname.aux
1811 \ifeof 1 \else
1812- \readauxfile
1813+ \readdatafile{aux}%
1814 \global\havexrefstrue
1815 \fi
1816 \closein 1
1817 }
1818
1819-\def\readauxfile{\begingroup
1820+\def\setupdatafile{%
1821 \catcode`\^^@=\other
1822 \catcode`\^^A=\other
1823 \catcode`\^^B=\other
1824@@ -6202,11 +6607,11 @@
1825 %
1826 % Make the characters 128-255 be printing characters.
1827 {%
1828- \count 1=128
1829+ \count1=128
1830 \def\loop{%
1831- \catcode\count 1=\other
1832- \advance\count 1 by 1
1833- \ifnum \count 1<256 \loop \fi
1834+ \catcode\count1=\other
1835+ \advance\count1 by 1
1836+ \ifnum \count1<256 \loop \fi
1837 }%
1838 }%
1839 %
1840@@ -6214,10 +6619,13 @@
1841 \catcode`\{=1
1842 \catcode`\}=2
1843 \catcode`\@=0
1844- %
1845- \input \jobname.aux
1846-\endgroup}
1847+}
1848
1849+\def\readdatafile#1{%
1850+\begingroup
1851+ \setupdatafile
1852+ \input\jobname.#1
1853+\endgroup}
1854
1855 \message{insertions,}
1856 % including footnotes.
1857@@ -6411,7 +6819,7 @@
1858 % above and below.
1859 \nobreak\vskip\parskip
1860 \nobreak
1861- \line\bgroup\hss
1862+ \line\bgroup
1863 \fi
1864 %
1865 % Output the image.
1866@@ -6424,7 +6832,7 @@
1867 \epsfbox{#1.eps}%
1868 \fi
1869 %
1870- \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
1871+ \ifimagevmode \egroup \bigbreak \fi % space after the image
1872 \endgroup}
1873
1874
1875@@ -6564,7 +6972,8 @@
1876 % \floatlabel-lof. Besides \floatident, we include the short
1877 % caption if specified, else the full caption if specified, else nothing.
1878 {%
1879- \atdummies \turnoffactive \otherbackslash
1880+ \atdummies
1881+ %
1882 % since we read the caption text in the macro world, where ^^M
1883 % is turned into a normal character, we have to scan it back, so
1884 % we don't write the literal three characters "^^M" into the aux file.
1885@@ -6585,8 +6994,9 @@
1886 %
1887 % place the captured inserts
1888 %
1889- % BEWARE: when the floats start float, we have to issue warning whenever an
1890- % insert appears inside a float which could possibly float. --kasal, 26may04
1891+ % BEWARE: when the floats start floating, we have to issue warning
1892+ % whenever an insert appears inside a float which could possibly
1893+ % float. --kasal, 26may04
1894 %
1895 \checkinserts
1896 }
1897@@ -6754,9 +7164,9 @@
1898 \fi
1899 }
1900
1901-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
1902-% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
1903-% physical page width.
1904+% Parameters in order: 1) textheight; 2) textwidth;
1905+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
1906+% 7) physical page height; 8) physical page width.
1907 %
1908 % We also call \setleading{\textleading}, so the caller should define
1909 % \textleading. The caller should also set \parskip.
1910@@ -6803,7 +7213,7 @@
1911 {11in}{8.5in}%
1912 }}
1913
1914-% Use @smallbook to reset parameters for 7x9.5 (or so) format.
1915+% Use @smallbook to reset parameters for 7x9.25 trim size.
1916 \def\smallbook{{\globaldefs = 1
1917 \parskip = 2pt plus 1pt
1918 \textleading = 12pt
1919@@ -6820,6 +7230,24 @@
1920 \defbodyindent = .5cm
1921 }}
1922
1923+% Use @smallerbook to reset parameters for 6x9 trim size.
1924+% (Just testing, parameters still in flux.)
1925+\def\smallerbook{{\globaldefs = 1
1926+ \parskip = 1.5pt plus 1pt
1927+ \textleading = 12pt
1928+ %
1929+ \internalpagesizes{7.4in}{4.8in}%
1930+ {-.2in}{-.4in}%
1931+ {0pt}{14pt}%
1932+ {9in}{6in}%
1933+ %
1934+ \lispnarrowing = 0.25in
1935+ \tolerance = 700
1936+ \hfuzz = 1pt
1937+ \contentsrightmargin = 0pt
1938+ \defbodyindent = .4cm
1939+}}
1940+
1941 % Use @afourpaper to print on European A4 paper.
1942 \def\afourpaper{{\globaldefs = 1
1943 \parskip = 3pt plus 2pt minus 1pt
1944@@ -6972,6 +7400,7 @@
1945
1946 \catcode`\_=\active
1947 \def_{\ifusingtt\normalunderscore\_}
1948+\let\realunder=_
1949 % Subroutine for the previous macro.
1950 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
1951
1952@@ -6994,6 +7423,13 @@
1953 % \otherifyactive is called near the end of this file.
1954 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
1955
1956+% Used sometimes to turn off (effectively) the active characters even after
1957+% parsing them.
1958+\def\turnoffactive{%
1959+ \normalturnoffactive
1960+ \otherbackslash
1961+}
1962+
1963 \catcode`\@=0
1964
1965 % \backslashcurfont outputs one backslash character in current font,
1966@@ -7001,27 +7437,29 @@
1967 \global\chardef\backslashcurfont=`\\
1968 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
1969
1970+% \realbackslash is an actual character `\' with catcode other, and
1971+% \doublebackslash is two of them (for the pdf outlines).
1972+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
1973+
1974+% In texinfo, backslash is an active character; it prints the backslash
1975+% in fixed width font.
1976+\catcode`\\=\active
1977+@def@normalbackslash{{@tt@backslashcurfont}}
1978+% On startup, @fixbackslash assigns:
1979+% @let \ = @normalbackslash
1980+
1981 % \rawbackslash defines an active \ to do \backslashcurfont.
1982 % \otherbackslash defines an active \ to be a literal `\' character with
1983 % catcode other.
1984-{\catcode`\\=\active
1985- @gdef@rawbackslash{@let\=@backslashcurfont}
1986- @gdef@otherbackslash{@let\=@realbackslash}
1987-}
1988-
1989-% \realbackslash is an actual character `\' with catcode other.
1990-{\catcode`\\=\other @gdef@realbackslash{\}}
1991+@gdef@rawbackslash{@let\=@backslashcurfont}
1992+@gdef@otherbackslash{@let\=@realbackslash}
1993
1994-% \normalbackslash outputs one backslash in fixed width font.
1995-\def\normalbackslash{{\tt\backslashcurfont}}
1996-
1997-\catcode`\\=\active
1998-
1999-% Used sometimes to turn off (effectively) the active characters
2000-% even after parsing them.
2001-@def@turnoffactive{%
2002+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
2003+% the literal character `\'.
2004+%
2005+@def@normalturnoffactive{%
2006+ @let\=@normalbackslash
2007 @let"=@normaldoublequote
2008- @let\=@realbackslash
2009 @let~=@normaltilde
2010 @let^=@normalcaret
2011 @let_=@normalunderscore
2012@@ -7033,12 +7471,6 @@
2013 @unsepspaces
2014 }
2015
2016-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
2017-% the literal character `\'. (Thus, \ is not expandable when this is in
2018-% effect.)
2019-%
2020-@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
2021-
2022 % Make _ and + \other characters, temporarily.
2023 % This is canceled by @fixbackslash.
2024 @otherifyactive
2025@@ -7051,9 +7483,9 @@
2026 @global@let\ = @eatinput
2027
2028 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
2029-% the first `\{ in the file would cause an error. This macro tries to fix
2030+% the first `\' in the file would cause an error. This macro tries to fix
2031 % that, assuming it is called before the first `\' could plausibly occur.
2032-% Also back turn on active characters that might appear in the input
2033+% Also turn back on active characters that might appear in the input
2034 % file name, in case not using a pre-dumped format.
2035 %
2036 @gdef@fixbackslash{%
Note: See TracBrowser for help on using the repository browser.