bug-texinfo
[Top][All Lists]
Advanced

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

my patches sent to this list


From: Werner LEMBERG
Subject: my patches sent to this list
Date: Wed, 16 Oct 2002 21:52:57 +0200 (CEST)

        
Karl,


I've sent some patches to this list which aren't yet in texinfo.tex
-- any reason for this or just lack of time?  For convenience, I'm
appending the relevant mails below together with an appropriate
ChangeLog entry.



    Werner

======================================================================

2002-10-16  Werner Lemberg  <address@hidden>

        * texinfo.tex (\appendixbox): New macro to compute a
        fixed-width box for the appendix entry in the TOC.
        (\appendixzzz, \appendixentry): Use it.

        (\shortconttt): New font.
        (\summarycontents): Use it to set the font size of the \tt
        font properly.

        (\authortt): New macro.
        (\authorfont): Use it to provide a proper font size for
        @email used within @author.

======================================================================

I want to report that appendices in the TOC are badly formatted:

   ...
   Appendix I  foo
   ...
   Appendix M  bar

the word `foo' and `bar' aren't aligned vertically which looks ugly.
A possible solution is to put `Appendix X' into a box with a fixed
width.

The same is true in general for the TOC: If a number has two or more
digits, the entries are moved to the right.  While this may be
acceptable to a certain degree due to the constant width of digits,
the former isn't IMHO.

Below a patch for version 4.2.

======================================================================

--- texinfo.tex.current Thu May  2 16:22:51 2002
+++ texinfo.tex Fri May  3 11:14:52 2002
@@ -3552,13 +3552,18 @@
 \global\let\subsubsection = \numberedsubsubsec
 }
 
+% we use \chapno to avoid indenting back
+\def\appendixbox#1{%
+  \setbox0 = \hbox{\putwordAppendix{} \the\chapno}%
+  \hbox to \wd0{#1\hss}}
+
 \outer\def\appendix{\parsearg\appendixyyy}
 \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz
 \def\appendixzzz #1{%
 \secno=0 \subsecno=0 \subsubsecno=0
 \global\advance \appendixno by 1
 \message{\putwordAppendix\space \appendixletter}%
-\chapmacro {#1}{\putwordAppendix{} \appendixletter}%
+\chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}%
 \gdef\thissection{#1}%
 \gdef\thischaptername{#1}%
 \xdef\thischapter{\putwordAppendix{} \appendixletter: 
\noexpand\thischaptername}%
@@ -4053,7 +4058,8 @@
 }
 
 % Appendices, in the main contents.
-\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
+\def\appendixentry#1#2#3{%
+  \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}}
 %
 % Appendices, in the short toc.
 \let\shortappendixentry = \shortchapentry

======================================================================

The following patch fixes an incorrect font size for the \tt font in
@shortcontents (for my document, it was 2pt too big).  This is for
texinfo 4.2.

======================================================================

--- texinfo.tex~        Tue Apr 23 22:09:09 2002
+++ texinfo.tex Thu May  2 15:04:36 2002
@@ -1345,6 +1345,7 @@
 \setfont\shortcontrm\rmshape{12}{1000}
 \setfont\shortcontbf\bxshape{12}{1000}
 \setfont\shortcontsl\slshape{12}{1000}
+\setfont\shortconttt\ttshape{12}{1000}
 
 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
 %% serif) and @ii for TeX italic
@@ -4007,7 +4008,8 @@
       \let\unnumbchapentry = \shortunnumberedentry
       % We want a true roman here for the page numbers.
       \secfonts
-      \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl
+      \let\rm=\shortcontrm \let\bf=\shortcontbf
+      \let\sl=\shortcontsl \let\tt=\shortconttt
       \rm
       \hyphenpenalty = 10000
       \advance\baselineskip by 1pt % Open it up a little.

======================================================================

Here a small patch which fixes the font size for @email if used in
@author (this is for version 4.2).

======================================================================

--- texinfo.tex~        Thu May  2 15:04:36 2002
+++ texinfo.tex Thu May  2 16:22:51 2002
@@ -1231,6 +1231,7 @@
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
 \def\authorrm{\secrm}
+\def\authortt{\sectt}
 
 % Chapter (and unnumbered) fonts (17.28pt).
 \setfont\chaprm\rmbshape{12}{\magstep2}
@@ -1593,7 +1594,8 @@
    \let\subtitlerm=\tenrm
    \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}%
    %
-   \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}%
+   \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
+                   \let\tt=\authortt}%
    %
    % Leave some space at the very top of the page.
    \vglue\titlepagetopglue




reply via email to

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