bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

several texinfo.tex issues in 4.2 release


From: Bob Wilson
Subject: several texinfo.tex issues in 4.2 release
Date: Mon, 20 May 2002 15:06:54 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020310

I've discovered a number of issues with texinfo.tex from the 4.2
release.  I'm using pdftex from  RedHat 6.2 (tetex-1.0.6-11) to format
the documentation for various GNU tools and libraries.  Both the
documents and the macros in texinfo.tex have been customized, so some of
these issues may not readily apparent. Some of these items are not new in the 4.2 release, but I thought I might as well send along all my changes.

I've patched my version of texinfo.tex to work around these issues.
I've included the patches in the descriptions below, but I'm not
familiar enough with texinfo to know if these are the right solutions or
not.  Do whatever you like with the patches.  I hope they are helpful.

Here are the issues:

1) "Active" characters in PDF bookmarks.  I sent a message and partial
patch for this issue a while back
(http://mail.gnu.org/pipermail/bug-texinfo/2002-April/004985.html), but
I've since discovered that double quote characters also cause problems.
 Here is a revised patch that handles both plus and doublequote, but not
the general problem described in my previous mail:

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:11:40 2002
@@ -989,6 +989,8 @@
       \closein 1
       \indexnofonts
       \def\tt{}
+      \catcode`+=\other
+      \catcode`\"=\other
       \let\_ = \normalunderscore
       % Thanh's hack / proper braces in bookmarks
       \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace


2) Many GNU docs have nested @var inside @code (e.g., @address@hidden) , but the default TeX output for this doesn't look very nice. The font selected by @var is the same regardless of whether it is nested inside @code or not. I think it looks much better to use the \ttsl font for italic and slanted text when inside of @code. Here is a simple patch that seems to do this:

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:14:39 2002
@@ -1352,8 +1352,8 @@
 % \smartitalic{ARG} outputs arg in italics, followed by an italic
correction
 % unless the following character is such as not to need one.
 \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
-\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}

 \let\i=\smartitalic
 \let\var=\smartslanted


3) The definition of aboveenvbreak was recently changed to do nothing if lastpenalty is 10000 or more. This causes really ugly spacing when an "environment" follows immediately after a heading (which happens often enough in the GNU docs to make me notice this). Presumably someone had a good reason for adding this conditional, but it worked well enough for me if I just removed it. Why was this check of lastpenalty added?

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:27:03 2002
@@ -4253,7 +4253,6 @@
 % start of the next paragraph will insert \parskip
 %
 \def\aboveenvbreak{{%
-  \ifnum\lastpenalty < 10000
     \advance\envskipamount by \parskip
     \endgraf
     \ifdim\lastskip<\envskipamount
@@ -4261,7 +4260,6 @@
       \penalty-50
       \vskip\envskipamount
     \fi
-  \fi
 }}

 \let\afterenvbreak = \aboveenvbreak


4) The definitions of smalllispx, smalldisplayx and smallformatx all use smallexamplefonts followed by a macro containing nonfillstart, which in turn uses singlespace. I have customized the fonts used by smallexamplefonts and also modified it to use a different line spacing that is appropriate for my fonts. The problem is that the singlespace macro sets the line spacing to a fixed value independent of the current font. The value of singlespaceskip (12.5pt) is really only appropriate for the "standard" size fonts; it looks really bad for small fonts. I worked around this by changing the "small" macros above to change the font after nonfillstart. There's probably a better way to do this....

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:41:19 2002
@@ -4394,8 +4394,12 @@
 \def\smalllispx{\begingroup
   \def\Esmalllisp{\nonfillfinish\endgroup}%
   \def\Esmallexample{\nonfillfinish\endgroup}%
+  \begingroup
+  \nonfillstart
   \smallexamplefonts
-  \lisp
+  \tt
+  \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+  \gobble       % eat return
 }

 % @display: same as @lisp except keep current font.
@@ -4410,8 +4414,11 @@
 %
 \def\smalldisplayx{\begingroup
   \def\Esmalldisplay{\nonfillfinish\endgroup}%
+  \begingroup
+  \nonfillstart
   \smallexamplefonts \rm
-  \display
+  \gobble
+
 }

 % @format: same as @display except don't narrow margins.
@@ -4427,8 +4434,11 @@
 %
 \def\smallformatx{\begingroup
   \def\Esmallformat{\nonfillfinish\endgroup}%
+  \begingroup
+  \let\nonarrowing = t
+  \nonfillstart
   \smallexamplefonts \rm
-  \format
+  \gobble
 }

 % @flushleft (same as @format).


5) The defname macro was recently changed to use a fixed value of -1.25pc in one place where it used to use deftypemargin. I don't understand this, because deftypemargin is still referenced but seems to have no effect. In particular, I'm using a modified smallbook format where the margins are small and it looks bad to have the definition types sticking out into the margin. The smallbook format sets deftypemargin to 0 but it doesn't do anything. The following patch restores the use of deftypemargin. Why was this changed to -1.25pc?

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:43:20 2002
@@ -4722,7 +4722,7 @@
 {% Adjust \hsize to exclude the ambient margins,
 % so that \rightline will obey them.
 \advance \hsize by -\dimen2
-\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}%
+\rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}%
 % Make all lines underfull and no complaints:
 \tolerance=10000 \hbadness=10000
 \advance\leftskip by -\defbodyindent


6) The GNU BFD document has one very long sequence of @deffn, @address@hidden that does not fit on a page. (This is a list of relocations for IA64.) With the standard 4.2 version of texinfo.tex, this resulted in a very overfull vbox. The following patch inserts a penalty of 9998 before each line so that TeX can break the page if it has to. I used 9998 because I noticed another place in the file where 9999 was used, and it seemed like these page breaks should be preferred over the 9999 page breaks. I really have no idea what I'm doing here :-)

--- texinfo-4.2.orig/doc/texinfo.tex    Tue Mar 26 08:29:26 2002
+++ texinfo-4.2/doc/texinfo.tex Mon May 20 14:48:35 2002
@@ -4741,7 +4741,7 @@
 % Define the end token that this defining construct specifies
 % so that it will exit this group.
 \def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+\def#2{\penalty9998\begingroup\obeylines\activeparens\spacesplit#3}%
 \parindent=0in
 \advance\leftskip by \defbodyindent
 \exdentamount=\defbodyindent


7) I think there might be something wrong with cross-references. I haven't investigated the problem, but I noticed at least one document where @xref{nodename,,nodetext} produced a reference in the TeX output with "Section [nodename]" instead of "Section [nodetext]". I don't remember that happening before, and it seems to not follow the output format shown in the texinfo documentation for cross-references. I was able to fix this by setting xref-automatic-section-title in my texinfo source files. A separate problem is that xref-automatic-section-title is not documented anywhere that I could find.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]