From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29720 invoked by alias); 21 Oct 2007 16:43:12 -0000 Received: (qmail 29704 invoked by uid 22791); 21 Oct 2007 16:43:12 -0000 X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 21 Oct 2007 16:43:00 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5133622D76 for ; Sun, 21 Oct 2007 18:42:56 +0200 (CEST) From: Andreas Jaeger To: libc-hacker@sources.redhat.com Subject: Update manual Date: Sun, 21 Oct 2007 16:43:00 -0000 Message-ID: <87odesmnar.fsf@suse.de> User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00019.txt.bz2 To generate the manual, I needed to do the following changes. Ok to commit for both HEAD and 2.7 branch? Andreas 2007-10-21 Andreas Jaeger * manual/texinfo.tex: Update to latest version. * manual/sysinfo.texi (System Parameters): Fix Formatting. * manual/arith.texi (Status bit operations): Fix formatting. * manual/errno.texi (Error Messages): Fix formatting. * manual/sysinfo.texi (System Parameters): Fix formatting. * manual/libc.texinfo: Update VERSION and UPDATED. Index: arith.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/glibc/libc/manual/arith.texi,v retrieving revision 1.76 diff -u -p -r1.76 arith.texi --- arith.texi 6 Oct 2004 03:02:14 -0000 1.76 +++ arith.texi 21 Oct 2007 16:42:19 -0000 @@ -778,8 +778,7 @@ non-zero value otherwise. =20 @comment fenv.h @comment ISO -@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int -@var{excepts}) +@deftypefun int fesetexceptflag (const fexcept_t *@var{flagp}, int @var{ex= cepts}) This function restores the flags for the exceptions indicated by @var{excepts} to the values stored in the variable pointed to by @var{flagp}. Index: errno.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/glibc/libc/manual/errno.texi,v retrieving revision 1.73 diff -u -p -r1.73 errno.texi --- errno.texi 22 Jul 2007 06:53:48 -0000 1.73 +++ errno.texi 21 Oct 2007 16:42:19 -0000 @@ -1494,7 +1494,7 @@ can be customized by defining a variable =20 @comment error.h @comment GNU -@deftypevar {void (*} error_print_progname ) (void) +@deftypevar {void (*) error_print_progname } (void) If the @code{error_print_progname} variable is defined to a non-zero value the function pointed to is called by @code{error} or @code{error_at_line}. It is expected to print the program name or do Index: libc.texinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/glibc/libc/manual/libc.texinfo,v retrieving revision 1.95 diff -u -p -r1.95 libc.texinfo --- libc.texinfo 31 Jul 2007 01:53:58 -0000 1.95 +++ libc.texinfo 21 Oct 2007 16:42:19 -0000 @@ -19,8 +19,8 @@ =20 @c sold 0.06/1.09, print run out 21may96 @set EDITION 0.11 -@set VERSION 2.6 -@set UPDATED 2006-12-03 +@set VERSION 2.7 +@set UPDATED 2007-09-09 @set ISBN 1-882114-55-8 =20 @copying Index: sysinfo.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/glibc/libc/manual/sysinfo.texi,v retrieving revision 1.42 diff -u -p -r1.42 sysinfo.texi --- sysinfo.texi 10 Nov 2006 21:10:22 -0000 1.42 +++ sysinfo.texi 21 Oct 2007 16:42:20 -0000 @@ -1066,8 +1066,7 @@ The symbols used in this section are dec =20 @comment sysctl.h @comment BSD -@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldva= l}, - size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen}) +@deftypefun int sysctl (int *@var{names}, int @var{nlen}, void *@var{oldva= l}, size_t *@var{oldlenp}, void *@var{newval}, size_t @var{newlen}) =20 @code{sysctl} gets or sets a specified system parameter. There are so many of these parameters that it is not practical to list them all here, Index: texinfo.tex =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/glibc/libc/manual/texinfo.tex,v retrieving revision 2.240 diff -u -p -r2.240 texinfo.tex --- texinfo.tex 16 Feb 2005 04:23:16 -0000 2.240 +++ texinfo.tex 21 Oct 2007 16:42:21 -0000 @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2004-11-25.16} +\def\texinfoversion{2006-11-08.17} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software -% Foundation, Inc. +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free +% Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -21,8 +21,8 @@ % % You should have received a copy of the GNU General Public License % along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -% Boston, MA 02111-1307, USA. +% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +% Boston, MA 02110-1301, USA. % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -153,20 +153,22 @@ \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi =20 -% In some macros, we cannot use the `\? notation---the left quote is -% in some cases the escape char. +% Since the category of space is not known, we have to be careful. +\chardef\spacecat =3D 10 +\def\spaceisspace{\catcode`\ =3D\spacecat} + +% sometimes characters are active, so we need control sequences. \chardef\colonChar =3D `\: \chardef\commaChar =3D `\, +\chardef\dashChar =3D `\- \chardef\dotChar =3D `\. \chardef\exclamChar=3D `\! +\chardef\lquoteChar=3D `\` \chardef\questChar =3D `\? +\chardef\rquoteChar=3D `\' \chardef\semiChar =3D `\; \chardef\underChar =3D `\_ =20 -\chardef\spaceChar =3D `\ % -\chardef\spacecat =3D 10 -\def\spaceisspace{\catcode\spaceChar=3D\spacecat} - % Ignore a token. % \def\gobble#1{} @@ -302,10 +304,14 @@ % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % - \escapechar =3D `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if - % the page break happens to be in the middle of an exam= ple. + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym= }} + % "\acronym" won't work when it's read back in; + % it needs to be=20 + % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi @@ -333,9 +339,9 @@ \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. - % (We lessened \vsize for it in \oddfootingxxx.) + % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=3D24pt in plain's \makefootline has no effect. - \vskip 2\baselineskip + \vskip 24pt \unvbox\footlinebox \fi % @@ -356,7 +362,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox - }% end of group with \normalturnoffactive + }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -391,7 +397,7 @@ % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% - \def\next{#2}% + \def\argtorun{#2}% \begingroup \obeylines \spaceisspace @@ -422,8 +428,7 @@ \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty - % We cannot use \next here, as it holds the macro to run; - % thus we reuse \temp. + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \te= mp: \let\temp\finishparsearg \else \let\temp\argcheckspaces @@ -435,14 +440,14 @@ % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, -% just before passing the control to \next. +% just before passing the control to \argtorun. % (Similarily, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % -\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}} +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} =20 % \parseargdef\foo{...} % is roughly equivalent to @@ -566,7 +571,7 @@ \let\}=3D\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux file. + % and @{ and @} for the aux/toc files. \catcode`\{ =3D \other \catcode`\} =3D \other \catcode`\[ =3D 1 \catcode`\] =3D 2 \catcode`\! =3D 0 \catcode`\\ =3D \other @@ -647,13 +652,28 @@ \let\/=3D\allowbreak =20 % @. is an end-of-sentence period. -\def\.{.\spacefactor=3D3000 } +\def\.{.\spacefactor=3D\endofsentencespacefactor\space} =20 % @! is an end-of-sentence bang. -\def\!{!\spacefactor=3D3000 } +\def\!{!\spacefactor=3D\endofsentencespacefactor\space} =20 % @? is an end-of-sentence query. -\def\?{?\spacefactor=3D3000 } +\def\?{?\spacefactor=3D\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +%=20 +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp =3D \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% + \fi\fi +} =20 % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would @@ -1031,9 +1051,9 @@ where each line of input produces a line % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { - \catcode\underChar =3D \active + \catcode`\_ =3D \active \gdef\mathunderscore{% - \catcode\underChar=3D\active + \catcode`\_=3D\active \def_{\ifnum\fam=3D\slfam \_\else\sb\fi}% } } @@ -1076,15 +1096,24 @@ where each line of input produces a line \def\minus{$-$} =20 % @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in a typewriter -% font as three actual period characters. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. % \def\dots{% \leavevmode - \hbox to 1.5em{% - \hskip 0pt plus 0.25fil - .\hfil.\hfil.% - \hskip 0pt plus 0.5fil + \setbox0=3D\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 =3D \wd0 + \else + \dimen0 =3D 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil }% } =20 @@ -1092,7 +1121,7 @@ where each line of input produces a line % \def\enddots{% \dots - \spacefactor=3D3000 + \spacefactor=3D\endofsentencespacefactor } =20 % @comma{} is so commas can be inserted into text without messing up @@ -1176,13 +1205,98 @@ where each line of input produces a line \fi \fi \fi -% + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html +% (and related messages, the final outcome is that it is up to the TeX +% user to double the backslashes and otherwise make the string valid, so +% that's what we do). + +% double active backslashes. +%=20 +{\catcode`\@=3D0 \catcode`\\=3D\active + @gdef@activebackslashdouble{% + @catcode`@\=3D@active + @let\=3D@doublebackslash} +} + +% To handle parens, we must adopt a different approach, since parens are +% not active characters. hyperref.dtx (which has the same problem as +% us) handles it with this amazing macro to replace tokens. I've +% tinkered with it a little for texinfo, but it's definitely from there. +%=20 +% #1 is the tokens to replace. +% #2 is the replacement. +% #3 is the control sequence with the string. +%=20 +\def\HyPsdSubst#1#2#3{% + \def\HyPsdReplace##1#1##2\END{% + ##1% + \ifx\\##2\\% + \else + #2% + \HyReturnAfterFi{% + \HyPsdReplace##2\END + }% + \fi + }% + \xdef#3{\expandafter\HyPsdReplace#3#1\END}% +} +\long\def\HyReturnAfterFi#1\fi{\fi#1} + +% #1 is a control sequence in which to do the replacements. +\def\backslashparens#1{% + \xdef#1{#1}% redefine it as its expansion; the definition is simply + % \lastnode when called from \setref -> \pdfmkdest. + \HyPsdSubst{(}{\realbackslash(}{#1}% + \HyPsdSubst{)}{\realbackslash)}{#1}% +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + \ifpdf \input pdfcolor \pdfcatalog{/PageMode /UseOutlines}% + % #1 is image name, #2 width (might be empty/whitespace), #3 height (dit= to). \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}% - \def\imageheight{#3}% + \def\imagewidth{#2}\setbox0 =3D \hbox{\ignorespaces #2}% + \def\imageheight{#3}\setbox2 =3D \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .png, .jpg, .pdf (among + % others). Let's try in that order. + \let\pdfimgext=3D\empty + \begingroup + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \openin 1 #1.pdf \ifeof 1 + \errhelp =3D \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else + \gdef\pdfimgext{pdf}% + \fi + \else + \gdef\pdfimgext{JPG}% + \fi + \else + \gdef\pdfimgext{jpeg}% + \fi + \else + \gdef\pdfimgext{jpg}% + \fi + \else + \gdef\pdfimgext{png}% + \fi + \closein 1 + \endgroup + % % without \immediate, pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 @@ -1190,24 +1304,29 @@ where each line of input produces a line \else \immediate\pdfximage \fi - \ifx\empty\imagewidth\else width \imagewidth \fi - \ifx\empty\imageheight\else height \imageheight \fi + \ifdim \wd0 >0pt width \imagewidth \fi + \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 - #1.pdf% + #1.\pdfimgext \else - {#1.pdf}% + {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{{% - % We have to set dummies so commands such as @code in a section title - % aren't expanded. + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. \atdummies - \normalturnoffactive - \pdfdest name{#1} xyz% - }} - \def\pdfmkpgn#1{#1} + \activebackslashdouble + \def\pdfdestname{#1}% + \backslashparens\pdfdestname + \pdfdest name{\pdfdestname} xyz% + }}% + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1}% + % \let\linkcolor =3D \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines @@ -1218,20 +1337,31 @@ where each line of input produces a line \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % - % #1 is the section text. #2 is the pdf expression for the number - % of subentries (or empty, for subsubsections). #3 is the node - % text, which might be empty if this toc entry had no - % corresponding node. #4 is the page number. + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't - % seem worthwhile, since most documents are normally structured. + % seem worth the trouble, since most documents are normally structured. \def\pdfoutlinedest{#3}% - \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + % Doubled backslashes in the name. + {\activebackslashdouble \xdef\pdfoutlinedest{#3}% + \backslashparens\pdfoutlinedest}% + \fi % - \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}% + % Also double the backslashes in the display string. + {\activebackslashdouble \xdef\pdfoutlinetext{#1}% + \backslashparens\pdfoutlinetext}% + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% @@ -1272,7 +1402,7 @@ where each line of input produces a line \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% - \input \jobname.toc + \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of @@ -1298,41 +1428,12 @@ where each line of input produces a line % their "best" equivalent, based on the @documentencoding. Right % now, I guess we'll just let the pdf reader have its way. \indexnofonts - \turnoffactive + \setupdatafile + \catcode`\\=3D\active \otherbackslash \input \jobname.toc \endgroup } % - \def\makelinks #1,{% - \def\params{#1}\def\E{END}% - \ifx\params\E - \let\nextmakelinks=3D\relax - \else - \let\nextmakelinks=3D\makelinks - \ifnum\lnkcount>0,\fi - \picknum{#1}% - \startlink attr{/Border [0 0 0]} - goto name{\pdfmkpgn{\the\pgn}}% - \linkcolor #1% - \advance\lnkcount by 1% - \endlink - \fi - \nextmakelinks - } - \def\picknum#1{\expandafter\pn#1} - \def\pn#1{% - \def\p{#1}% - \ifx\p\lbrace - \let\nextpn=3D\ppn - \else - \let\nextpn=3D\ppnn - \def\first{#1} - \fi - \nextpn - } - \def\ppn#1{\pgn=3D#1\gobble} - \def\ppnn{\pgn=3D\first} - \def\pdfmklnk#1{\lnkcount=3D0\makelinks #1,END,} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces @@ -1347,9 +1448,17 @@ where each line of input produces a line \else \let \startlink \pdfstartlink \fi + % make a live url in pdf output. \def\pdfurl#1{% \begingroup - \normalturnoffactive\def\@{@}% + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + %=20 + \normalturnoffactive + \def\@{@}% + \let\/=3D\empty \makevalueexpandable \leavevmode\Red \startlink attr{/Border [0 0 0]}% @@ -1419,6 +1528,7 @@ where each line of input produces a line % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} =20 + % Default leading. \newdimen\textleading \textleading =3D 13.2pt =20 @@ -1440,11 +1550,13 @@ where each line of input produces a line }% } =20 + % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=3D\fontprefix#2#3 scaled #4} =20 + % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. @@ -1468,6 +1580,10 @@ where each line of input produces a line \def\scshape{csc} \def\scbshape{csc} =20 +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +%=20 +\def\definetextfontsizexi{ % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} @@ -1581,6 +1697,165 @@ where each line of input produces a line \font\reducedi=3Dcmmi10 \font\reducedsy=3Dcmsy10 =20 +% reset the current fonts +\textfonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +%=20 +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep} +\setfont\texttt\ttshape{10}{\mainmagstep} +\setfont\textbf\bfshape{10}{\mainmagstep} +\setfont\textit\itshape{10}{\mainmagstep} +\setfont\textsl\slshape{10}{\mainmagstep} +\setfont\textsf\sfshape{10}{\mainmagstep} +\setfont\textsc\scshape{10}{\mainmagstep} +\setfont\textttsl\ttslshape{10}{\mainmagstep} +\font\texti=3Dcmmi10 scaled \mainmagstep +\font\textsy=3Dcmsy10 scaled \mainmagstep + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf} +\setfont\deftt\ttshape{10}{\magstephalf} +\setfont\defttsl\ttslshape{10}{\magstephalf} +\def\df{\let\tentt=3D\deftt \let\tenbf =3D \defbf \let\tenttsl=3D\defttsl = \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000} +\setfont\smalltt\ttshape{9}{1000} +\setfont\smallbf\bfshape{10}{900} +\setfont\smallit\itshape{9}{1000} +\setfont\smallsl\slshape{9}{1000} +\setfont\smallsf\sfshape{9}{1000} +\setfont\smallsc\scshape{10}{900} +\setfont\smallttsl\ttslshape{10}{900} +\font\smalli=3Dcmmi9 +\font\smallsy=3Dcmsy9 + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000} +\setfont\smallertt\ttshape{8}{1000} +\setfont\smallerbf\bfshape{10}{800} +\setfont\smallerit\itshape{8}{1000} +\setfont\smallersl\slshape{8}{1000} +\setfont\smallersf\sfshape{8}{1000} +\setfont\smallersc\scshape{10}{800} +\setfont\smallerttsl\ttslshape{10}{800} +\font\smalleri=3Dcmmi8 +\font\smallersy=3Dcmsy8 + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3} +\setfont\titleit\itbshape{10}{\magstep4} +\setfont\titlesl\slbshape{10}{\magstep4} +\setfont\titlett\ttbshape{12}{\magstep3} +\setfont\titlettsl\ttslshape{10}{\magstep4} +\setfont\titlesf\sfbshape{17}{\magstep1} +\let\titlebf=3D\titlerm +\setfont\titlesc\scbshape{10}{\magstep4} +\font\titlei=3Dcmmi12 scaled \magstep3 +\font\titlesy=3Dcmsy10 scaled \magstep4 +\def\authorrm{\secrm} +\def\authortt{\sectt} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1} +\setfont\chapit\itbshape{10}{\magstep2} +\setfont\chapsl\slbshape{10}{\magstep2} +\setfont\chaptt\ttbshape{12}{\magstep1} +\setfont\chapttsl\ttslshape{10}{\magstep2} +\setfont\chapsf\sfbshape{12}{\magstep1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2} +\font\chapi=3Dcmmi12 scaled \magstep1 +\font\chapsy=3Dcmsy10 scaled \magstep2 + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000} +\setfont\secit\itbshape{10}{\magstep1} +\setfont\secsl\slbshape{10}{\magstep1} +\setfont\sectt\ttbshape{12}{1000} +\setfont\secttsl\ttslshape{10}{\magstep1} +\setfont\secsf\sfbshape{12}{1000} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1} +\font\seci=3Dcmmi12=20 +\font\secsy=3Dcmsy10 scaled \magstep1 + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000} +\setfont\ssecit\itbshape{10}{1000} +\setfont\ssecsl\slbshape{10}{1000} +\setfont\ssectt\ttbshape{10}{1000} +\setfont\ssecttsl\ttslshape{10}{1000} +\setfont\ssecsf\sfbshape{10}{1000} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000} +\font\sseci=3Dcmmi10 +\font\ssecsy=3Dcmsy10 + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000} +\setfont\reducedtt\ttshape{9}{1000} +\setfont\reducedbf\bfshape{10}{900} +\setfont\reducedit\itshape{9}{1000} +\setfont\reducedsl\slshape{9}{1000} +\setfont\reducedsf\sfshape{9}{1000} +\setfont\reducedsc\scshape{10}{900} +\setfont\reducedttsl\ttslshape{10}{900} +\font\reducedi=3Dcmmi9 +\font\reducedsy=3Dcmsy9 + +% reduce space between paragraphs +\divide\parskip by 2 + +% reset the current fonts +\textfonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +%=20 +\def\xword{10} +\def\xiword{11} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + \wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + %=20 + \begingroup \globaldefs=3D1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=3D\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizear= g'} + \fi\fi + \endgroup +} + + % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except @@ -1691,7 +1966,7 @@ where each line of input produces a line =20 % Set up the default fonts, so we can use them for creating boxes. % -\textfonts \rm +\definetextfontsizexi =20 % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} @@ -1749,14 +2024,21 @@ where each line of input produces a line % sometimes \x has an active definition that messes things up. % \catcode`@=3D11 - \def\frenchspacing{% + \def\plainfrenchspacing{% \sfcode\dotChar =3D\@m \sfcode\questChar=3D\@m \sfcode\exclamChar=3D\= @m \sfcode\colonChar=3D\@m \sfcode\semiChar =3D\@m \sfcode\commaChar =3D\= @m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=3D\other +\def\endofsentencespacefactor{3000}% default =20 \def\t#1{% - {\tt \rawbackslash \frenchspacing #1}% + {\tt \rawbackslash \plainfrenchspacing #1}% \null } \def\samp#1{`\tclose{#1}'\null} @@ -1768,6 +2050,7 @@ where each line of input produces a line \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} +\def\key #1{{\nohyphenation \uppercase{#1}}\null} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -1793,7 +2076,7 @@ where each line of input produces a line \nohyphenation % \rawbackslash - \frenchspacing + \plainfrenchspacing #1% }% \null @@ -1809,12 +2092,21 @@ where each line of input produces a line % and arrange explicitly to hyphenate at a dash. % -- rms. { - \catcode`\-=3D\active - \catcode`\_=3D\active + \catcode`\-=3D\active \catcode`\_=3D\active + \catcode`\'=3D\active \catcode`\`=3D\active % \global\def\code{\begingroup - \catcode`\-=3D\active \let-\codedash - \catcode`\_=3D\active \let_\codeunder + \catcode\rquoteChar=3D\active \catcode\lquoteChar=3D\active + \let'\codequoteright \let`\codequoteleft + % + \catcode\dashChar=3D\active \catcode\underChar=3D\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\realdash + \let_\realunder + \fi \codex } } @@ -1834,6 +2126,28 @@ where each line of input produces a line } \def\codex #1{\tclose{#1}\endgroup} =20 +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. +%=20 +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp =3D \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg'}% + \fi\fi +} + % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. =20 @@ -1841,16 +2155,16 @@ where each line of input produces a line % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% - \def\arg{#1}% - \ifx\arg\worddistinct + \def\txiarg{#1}% + \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\arg\wordexample + \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\arg\wordcode + \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp =3D \EMsimple - \errmessage{Unknown @kbdinputstyle option `\arg'}% + \errmessage{Unknown @kbdinputstyle option `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} @@ -1962,7 +2276,7 @@ where each line of input produces a line %=20 \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% - {\frenchspacing #1}% + {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% @@ -2000,7 +2314,7 @@ where each line of input produces a line \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that - % installations which never need the symbold don't have to have the + % installations which never need the symbol don't have to have the % font installed. %=20 % There is only one designed size (nominal 10pt), so we always scale @@ -2031,6 +2345,10 @@ where each line of input produces a line }$% } =20 +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=3Dplain 93.10.14) (68K) 16 APR 2004 = 02:38 % so we'll define it if necessary. @@ -2202,8 +2520,8 @@ where each line of input produces a line % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. - \global\advance\pageheight by -\baselineskip - \global\advance\vsize by -\baselineskip + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt } =20 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} @@ -2862,6 +3180,7 @@ where each line of input produces a line =20 \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: + \obeylines \catcode`\@ =3D \other \catcode`\{ =3D \other \catcode`\} =3D \other @@ -2882,16 +3201,16 @@ where each line of input produces a line \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % - % Define a command to find the next `@end #1', which must be on a line - % by itself. - \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}% + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. - \obeylines % \doignoretext ^^M% }% } @@ -2921,7 +3240,12 @@ where each line of input produces a line } =20 % Finish off ignored text. -\def\enddoignore{\endgroup\ignorespaces} +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} =20 =20 % @set VAR sets the variable VAR to an empty value. @@ -3121,42 +3445,50 @@ where each line of input produces a line % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% + \escapechar =3D `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index file= s. \def\ {\realbackslash\space }% + % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ =3D \mylbrace \let\} =3D \myrbrace % - % \definedummyword defines \#1 as \realbackslash #1\space, thus - % effectively preventing its expansion. This is used only for control - % words, not control letters, because the \space would be incorrect - % for control characters, but is needed to separate the control word - % from whatever follows. - % - % For control letters, we have \definedummyletter, which omits the - % space. - % - % These can be used both for control words that take an argument and - % those that do not. If it is followed by {arg} in the input, then - % that will dutifully get written to the index (or wherever). - % - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% - }% - \let\definedummyaccent\definedummyletter + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + %=20 + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + %=20 + % The above is not enough to reproduce the bug, but it gives the flavor. + %=20 + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + %=20 + % So: + \let\endinput =3D \empty % % Do the redefinitions. \commondummies } =20 -% For the aux file, @ is the escape character. So we want to redefine -% everything using @ instead of \realbackslash. When everything uses -% @, this will be simpler. +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. % \def\atdummies{% \def\@{@@}% @@ -3164,147 +3496,152 @@ where each line of input produces a line \let\{ =3D \lbraceatcmd \let\} =3D \rbraceatcmd % - % (See comments in \indexdummies.) - \def\definedummyword##1{% - \expandafter\def\csname ##1\endcsname{@##1\space}% - }% - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{@##1}% - }% - \let\definedummyaccent\definedummyletter - % % Do the redefinitions. \commondummies + \otherbackslash } =20 -% Called from \indexdummies and \atdummies. \definedummyword and -% \definedummyletter must be defined first. +% Called from \indexdummies and \atdummies. % \def\commondummies{% % - \normalturnoffactive + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control% words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter % \commondummiesnofonts % - \definedummyletter{_}% + \definedummyletter\_% % % Non-English letters. - \definedummyword{AA}% - \definedummyword{AE}% - \definedummyword{L}% - \definedummyword{OE}% - \definedummyword{O}% - \definedummyword{aa}% - \definedummyword{ae}% - \definedummyword{l}% - \definedummyword{oe}% - \definedummyword{o}% - \definedummyword{ss}% - \definedummyword{exclamdown}% - \definedummyword{questiondown}% - \definedummyword{ordf}% - \definedummyword{ordm}% + \definedummyword\AA + \definedummyword\AE + \definedummyword\L + \definedummyword\OE + \definedummyword\O + \definedummyword\aa + \definedummyword\ae + \definedummyword\l + \definedummyword\oe + \definedummyword\o + \definedummyword\ss + \definedummyword\exclamdown + \definedummyword\questiondown + \definedummyword\ordf + \definedummyword\ordm % % Although these internal commands shouldn't show up, sometimes they do. - \definedummyword{bf}% - \definedummyword{gtr}% - \definedummyword{hat}% - \definedummyword{less}% - \definedummyword{sf}% - \definedummyword{sl}% - \definedummyword{tclose}% - \definedummyword{tt}% + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt % - \definedummyword{LaTeX}% - \definedummyword{TeX}% + \definedummyword\LaTeX + \definedummyword\TeX % % Assorted special characters. - \definedummyword{bullet}% - \definedummyword{comma}% - \definedummyword{copyright}% - \definedummyword{registeredsymbol}% - \definedummyword{dots}% - \definedummyword{enddots}% - \definedummyword{equiv}% - \definedummyword{error}% - \definedummyword{euro}% - \definedummyword{expansion}% - \definedummyword{minus}% - \definedummyword{pounds}% - \definedummyword{point}% - \definedummyword{print}% - \definedummyword{result}% + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\minus + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable - % - % Normal spaces, not active ones. - \unsepspaces - % - % No macro expansion. - \turnoffmacros } =20 % \commondummiesnofonts: common to \commondummies and \indexnofonts. % -% Better have this without active chars. -{ - \catcode`\~=3D\other - \gdef\commondummiesnofonts{% - % Control letters and accents. - \definedummyletter{!}% - \definedummyaccent{"}% - \definedummyaccent{'}% - \definedummyletter{*}% - \definedummyaccent{,}% - \definedummyletter{.}% - \definedummyletter{/}% - \definedummyletter{:}% - \definedummyaccent{=3D}% - \definedummyletter{?}% - \definedummyaccent{^}% - \definedummyaccent{`}% - \definedummyaccent{~}% - \definedummyword{u}% - \definedummyword{v}% - \definedummyword{H}% - \definedummyword{dotaccent}% - \definedummyword{ringaccent}% - \definedummyword{tieaccent}% - \definedummyword{ubaraccent}% - \definedummyword{udotaccent}% - \definedummyword{dotless}% - % - % Texinfo font commands. - \definedummyword{b}% - \definedummyword{i}% - \definedummyword{r}% - \definedummyword{sc}% - \definedummyword{t}% - % - % Commands that take arguments. - \definedummyword{acronym}% - \definedummyword{cite}% - \definedummyword{code}% - \definedummyword{command}% - \definedummyword{dfn}% - \definedummyword{emph}% - \definedummyword{env}% - \definedummyword{file}% - \definedummyword{kbd}% - \definedummyword{key}% - \definedummyword{math}% - \definedummyword{option}% - \definedummyword{samp}% - \definedummyword{strong}% - \definedummyword{tie}% - \definedummyword{uref}% - \definedummyword{url}% - \definedummyword{var}% - \definedummyword{verb}% - \definedummyword{w}% - } +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=3D% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sc + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\acronym + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref } =20 % \indexnofonts is used when outputting the strings to sort the index @@ -3314,13 +3651,9 @@ where each line of input produces a line % \def\indexnofonts{% % Accent commands should become @asis. - \def\definedummyaccent##1{% - \expandafter\let\csname ##1\endcsname\asis - }% + \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. - \def\definedummyletter##1{% - \expandafter\def\csname ##1\endcsname{}% - }% + \def\definedummyletter##1{\let##1\empty}% % Hopefully, all control words can become @asis. \let\definedummyword\definedummyaccent % @@ -3373,9 +3706,19 @@ where each line of input produces a line \def\point{.}% \def\print{-|}% \def\result{=3D>}% + \def\textdegree{degrees}% % - % Don't write macro names. - \emptyusermacros + % We need to get rid of all macros, leaving only the arguments (if prese= nt). + % Of course this is not nearly correct, but it is the best we can do for= now. + % makeinfo does not expand macros in the argument to @deffn, which ends = up + % writing an index entry, and texindex isn't prepared for an index sort = entry + % that starts with \. + %=20 + % Since macro invocations are followed by braces, we can just redefine t= hem + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + %=20 + \macrolist } =20 \let\indexbackslash=3D0 %overridden during \printindex. @@ -3422,7 +3765,6 @@ where each line of input produces a line % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage - \escapechar=3D`\\ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % @@ -3713,9 +4055,9 @@ where each line of input produces a line \endgroup } =20 -% Like \dotfill except takes at least 1 em. +% Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders - \hbox{$\mathsurround=3D0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em= plus 1fill} + \hbox{$\mathsurround=3D0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fil= l} =20 \def\primary #1{\line{#1\hfil}} =20 @@ -4289,14 +4631,17 @@ where each line of input produces a line \ifx\temptype\Ynothingkeyword \setbox0 =3D \hbox{}% \def\toctype{unnchap}% - \def\thischapter{#1}% + \gdef\thischapternum{}% + \gdef\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 =3D \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% - \xdef\thischapter{}% + \gdef\thischapternum{}% + \gdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 =3D \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% + \xdef\thischapternum{\appendixletter}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. And we don't % use \thissection because that changes with each section. @@ -4306,6 +4651,7 @@ where each line of input produces a line \else \setbox0 =3D \hbox{#3\enspace}% \def\toctype{numchap}% + \xdef\thischapternum{\the\chapno}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \fi\fi\fi @@ -4417,13 +4763,21 @@ where each line of input produces a line \gdef\thissection{#1}% \fi\fi\fi % - % Write the toc entry (before \donoderef). See comments in \chfplain. + % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (=3D pdf destination for pdftex). - % Again, see comments in \chfplain. + % Again, see comments in \chapmacro. \donoderef{#3}% % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % % Output the actual section heading. \vbox{\hyphenpenalty=3D10000 \tolerance=3D5000 \parindent=3D0pt \ragge= dright \hangindent=3D\wd0 % zero if no section number @@ -4482,11 +4836,11 @@ where each line of input produces a line \fi % \iflinks - \toks0 =3D {#2}% - \toks2 =3D \expandafter{\lastnode}% - \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}% - {\the\toks2}{\noexpand\folio}}}% - \temp + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% \fi \fi % @@ -4499,6 +4853,31 @@ where each line of input produces a line \ifpdf \global\pdfmakepagedesttrue \fi } =20 + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +%=20 +\def\activecatcodes{% + \catcode`\"=3D\active + \catcode`\$=3D\active + \catcode`\<=3D\active + \catcode`\>=3D\active + \catcode`\\=3D\active + \catcode`\^=3D\active + \catcode`\_=3D\active + \catcode`\|=3D\active + \catcode`\~=3D\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \jobname.toc +} + \newskip\contentsrightmargin \contentsrightmargin=3D1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno =3D -1 @@ -4520,11 +4899,7 @@ where each line of input produces a line % \savepageno =3D \pageno \begingroup % Set up to handle contents files properly. - \catcode`\\=3D0 \catcode`\{=3D1 \catcode`\}=3D2 \catcode`\@=3D11 - % We can't do this, because then an actual ^ in a section - % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. - %\catcode`\^=3D7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi - \raggedbottom % Worry more about breakpoints than the bott= om. + \raggedbottom % Worry more about breakpoints than the bot= tom. \advance\hsize by -\contentsrightmargin % Don't use the full line leng= th. % % Roman numerals for page numbers. @@ -4537,7 +4912,7 @@ where each line of input produces a line \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else - \input \jobname.toc + \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect @@ -4575,7 +4950,7 @@ where each line of input produces a line \let\unnsubsubsecentry =3D \numsecentry \openin 1 \jobname.toc \ifeof 1 \else - \input \jobname.toc + \readtocfile \fi \closein 1 \vfill \eject @@ -4717,7 +5092,7 @@ where each line of input produces a line {\tentt \global\dimen0 =3D 3em}% Width of the box. \dimen2 =3D .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 =3D \hbox{\kern-.75pt \tensf error\kern-1.5pt} +\setbox0 =3D \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} % \setbox\errorbox=3D\hbox to \dimen0{\hfil \hsize =3D \dimen0 \advance\hsize by -5.8pt % Space to left+right. @@ -4765,6 +5140,7 @@ where each line of input produces a line \let\/=3D\ptexslash \let\*=3D\ptexstar \let\t=3D\ptext + \let\frenchspacing=3D\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=3D0pt \endldots\= ,$\fi}% @@ -4810,7 +5186,8 @@ where each line of input produces a line =20 \let\afterenvbreak =3D \aboveenvbreak =20 -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it wi= ll +% also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=3D\relax =20 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around @@ -4847,7 +5224,7 @@ where each line of input produces a line % each corner char, and rule thickness \normbskip=3D\baselineskip \normpskip=3D\parskip \normlskip=3D\lineskip % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing=3D\comment + \let\nonarrowing =3D t% \vbox\bgroup \baselineskip=3D0pt\parskip=3D0pt\lineskip=3D0pt \carttop @@ -4887,11 +5264,11 @@ where each line of input produces a line \parskip =3D 0pt \parindent =3D 0pt \emergencystretch =3D 0pt % don't try to avoid overfull boxes - % @cartouche defines \nonarrowing to inhibit narrowing - % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=3D\lispnarrowing + \else + \let\nonarrowing =3D \relax \fi \let\exdent=3D\nofillexdent } @@ -4938,11 +5315,10 @@ where each line of input produces a line % \maketwodispenvs {lisp}{example}{% \nonfillstart - \tt + \tt\quoteexpand \let\kbdfont =3D \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } - % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenv {display}{% @@ -4991,6 +5367,7 @@ where each line of input produces a line \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount =3D \lispnarrowing + \else \let\nonarrowing =3D \relax \fi \parsearg\quotationlabel @@ -5069,6 +5446,34 @@ where each line of input produces a line \newdimen\tabw \setbox0=3D\hbox{\tt\space} \tabw=3D8\wd0 % tab amount % \def\starttabbox{\setbox0=3D\hbox\bgroup} + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27.=20=20 +%=20 +\def\codequoteright{% + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else + \char'15 + \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +%=20 +\def\codequoteleft{% + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + `% + \else + \char'22 + \fi +} +% \begingroup \catcode`\^^I=3D\active \gdef\tabexpand{% @@ -5081,15 +5486,25 @@ where each line of input produces a line \wd0=3D\dimen0 \box0 \starttabbox }% } + \catcode`\'=3D\active + \gdef\rquoteexpand{\catcode\rquoteChar=3D\active \def'{\codequoteright}}% + % + \catcode`\`=3D\active + \gdef\lquoteexpand{\catcode\lquoteChar=3D\active \def`{\codequoteleft}}% + % + \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% \endgroup + +% start the verbatim environment. \def\setupverbatim{% + \let\nonarrowing =3D t% \nonfillstart - \advance\leftskip by -\defbodyindent % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=3D\active \tabexpand + \quoteexpand % Respect line breaks, % print special symbols as themselves, and % make each space count @@ -5539,7 +5954,6 @@ where each line of input produces a line \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newli= ne. - % % I've verified that it is necessary both for e-TeX and for ordinary T= eX % --kasal, 29nov03 \scantokens{#1\endinput}% @@ -5554,8 +5968,19 @@ where each line of input produces a line \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? -\def\macrolist{} % List of all defined macros in the form - % \do\macro1\do\macro2... + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 =3D \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} =20 % Utility routines. % This does \let #1 =3D #2, with \csnames; that is, @@ -5653,10 +6078,7 @@ where each line of input produces a line \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=3D1% - % Add the macroname to \macrolist - \toks0 =3D \expandafter{\macrolist\do}% - \xdef\macrolist{\the\toks0 - \expandafter\noexpand\csname\the\macname\endcsname}% + \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody @@ -5670,7 +6092,7 @@ where each line of input produces a line % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax - \let\do\unmacrodo + \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else @@ -5682,10 +6104,10 @@ where each line of input produces a line % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% - \ifx#1\relax + \ifx #1\relax % remove this \else - \noexpand\do \noexpand #1% + \noexpand\definedummyword \noexpand#1% \fi } =20 @@ -5798,30 +6220,11 @@ where each line of input produces a line % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\next=3D#1\futurelet\nchar\braceorlinexxx} +\def\braceorline#1{\let\macnamexxx=3D#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg - \fi \next} - -% We want to disable all macros during \shipout so that they are not -% expanded by \write. -\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=3D\relax}% - \edef\next{\macrolist}\expandafter\endgroup\next} - -% For \indexnofonts, we need to get rid of all macros, leaving only the -% arguments (if present). Of course this is not nearly correct, but it -% is the best we can do for now. makeinfo does not expand macros in the -% argument to @deffn, which ends up writing an index entry, and texindex -% isn't prepared for an index sort entry that starts with \. -%=20 -% Since macro invocations are followed by braces, we can just redefine them -% to take a single TeX argument. The case of a macro invocation that -% goes to end-of-line is not handled. -%=20 -\def\emptyusermacros{\begingroup - \def\do##1{\let\noexpand##1=3D\noexpand\asis}% - \edef\next{\macrolist}\expandafter\endgroup\next} + \fi \macnamexxx} =20 =20 % @alias. @@ -5832,6 +6235,7 @@ where each line of input produces a line \def\aliasyyy #1=3D#2\relax{% {% \expandafter\let\obeyedspace=3D\empty + \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=3D\makecsname{#2}}% }% \next @@ -5901,8 +6305,6 @@ where each line of input produces a line \iflinks {% \atdummies % preserve commands, but don't expand them - \turnoffactive - \otherbackslash \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef @@ -5956,13 +6358,17 @@ where each line of input produces a line \ifpdf \leavevmode \getfilename{#4}% - {\turnoffactive \otherbackslash + {\turnoffactive + % See comments at \activebackslashdouble. + {\activebackslashdouble \xdef\pdfxrefdest{#1}% + \backslashparens\pdfxrefdest}% + % \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{#1}% + goto file{\the\filename.pdf} name{\pdfxrefdest}% \else \startlink attr{/Border [0 0 0]}% - goto name{\pdfmkpgn{#1}}% + goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \linkcolor @@ -5976,7 +6382,6 @@ where each line of input produces a line % include an _ in the xref name, etc. \indexnofonts \turnoffactive - \otherbackslash \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% @@ -5984,7 +6389,7 @@ where each line of input produces a line % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd0 =3D 0pt - \refx{#1-snt}% + \refx{#1-snt}{}% \else \printedrefname \fi @@ -6011,7 +6416,7 @@ where each line of input produces a line % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. - {\turnoffactive \otherbackslash + {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 =3D \hbox{\ignorespaces \refx{#1-snt}{}}% @@ -6024,7 +6429,7 @@ where each line of input produces a line ,\space % % output the `page 3'. - \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \fi \endlink @@ -6127,13 +6532,13 @@ where each line of input produces a line \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else - \readauxfile + \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } =20 -\def\readauxfile{\begingroup +\def\setupdatafile{% \catcode`\^^@=3D\other \catcode`\^^A=3D\other \catcode`\^^B=3D\other @@ -6202,11 +6607,11 @@ where each line of input produces a line % % Make the characters 128-255 be printing characters. {% - \count 1=3D128 + \count1=3D128 \def\loop{% - \catcode\count 1=3D\other - \advance\count 1 by 1 - \ifnum \count 1<256 \loop \fi + \catcode\count1=3D\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi }% }% % @@ -6214,10 +6619,13 @@ where each line of input produces a line \catcode`\{=3D1 \catcode`\}=3D2 \catcode`\@=3D0 - % - \input \jobname.aux -\endgroup} +} =20 +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} =20 \message{insertions,} % including footnotes. @@ -6411,7 +6819,7 @@ where each line of input produces a line % above and below. \nobreak\vskip\parskip \nobreak - \line\bgroup\hss + \line\bgroup \fi % % Output the image. @@ -6424,7 +6832,7 @@ where each line of input produces a line \epsfbox{#1.eps}% \fi % - \ifimagevmode \hss \egroup \bigbreak \fi % space after the image + \ifimagevmode \egroup \bigbreak \fi % space after the image \endgroup} =20 =20 @@ -6564,7 +6972,8 @@ where each line of input produces a line % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else not= hing. {% - \atdummies \turnoffactive \otherbackslash + \atdummies + % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux f= ile. @@ -6585,8 +6994,9 @@ where each line of input produces a line % % place the captured inserts % - % BEWARE: when the floats start float, we have to issue warning whenever= an - % insert appears inside a float which could possibly float. --kasal, 26m= ay04 + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 % \checkinserts } @@ -6754,9 +7164,9 @@ should work if nowhere else does.} \fi } =20 -% Parameters in order: 1) textheight; 2) textwidth; 3) voffset; -% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) -% physical page width. +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. @@ -6803,7 +7213,7 @@ should work if nowhere else does.} {11in}{8.5in}% }} =20 -% Use @smallbook to reset parameters for 7x9.5 (or so) format. +% Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs =3D 1 \parskip =3D 2pt plus 1pt \textleading =3D 12pt @@ -6820,6 +7230,24 @@ should work if nowhere else does.} \defbodyindent =3D .5cm }} =20 +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs =3D 1 + \parskip =3D 1.5pt plus 1pt + \textleading =3D 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing =3D 0.25in + \tolerance =3D 700 + \hfuzz =3D 1pt + \contentsrightmargin =3D 0pt + \defbodyindent =3D .4cm +}} + % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs =3D 1 \parskip =3D 3pt plus 2pt minus 1pt @@ -6972,6 +7400,7 @@ should work if nowhere else does.} =20 \catcode`\_=3D\active \def_{\ifusingtt\normalunderscore\_} +\let\realunder=3D_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07e= m } =20 @@ -6994,6 +7423,13 @@ should work if nowhere else does.} % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=3D\other \catcode`\_=3D\other} =20 +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + \catcode`\@=3D0 =20 % \backslashcurfont outputs one backslash character in current font, @@ -7001,27 +7437,29 @@ should work if nowhere else does.} \global\chardef\backslashcurfont=3D`\\ \global\let\rawbackslashxx=3D\backslashcurfont % let existing .??s files = work =20 +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=3D\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=3D\active +@def@normalbackslash{{@tt@backslashcurfont}} +% On startup, @fixbackslash assigns: +% @let \ =3D @normalbackslash + % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. -{\catcode`\\=3D\active - @gdef@rawbackslash{@let\=3D@backslashcurfont} - @gdef@otherbackslash{@let\=3D@realbackslash} -} - -% \realbackslash is an actual character `\' with catcode other. -{\catcode`\\=3D\other @gdef@realbackslash{\}} +@gdef@rawbackslash{@let\=3D@backslashcurfont} +@gdef@otherbackslash{@let\=3D@realbackslash} =20 -% \normalbackslash outputs one backslash in fixed width font. -\def\normalbackslash{{\tt\backslashcurfont}} - -\catcode`\\=3D\active - -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -@def@turnoffactive{% +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +%=20 +@def@normalturnoffactive{% + @let\=3D@normalbackslash @let"=3D@normaldoublequote - @let\=3D@realbackslash @let~=3D@normaltilde @let^=3D@normalcaret @let_=3D@normalunderscore @@ -7033,12 +7471,6 @@ should work if nowhere else does.} @unsepspaces } =20 -% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. (Thus, \ is not expandable when this is in -% effect.) -% -@def@normalturnoffactive{@turnoffactive @let\=3D@normalbackslash} - % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive @@ -7051,9 +7483,9 @@ should work if nowhere else does.} @global@let\ =3D @eatinput =20 % On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix +% the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. -% Also back turn on active characters that might appear in the input +% Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% --=20 Andreas Jaeger, Director Platform / openSUSE, aj@suse.de SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG N=FCrnberg) Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126