[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Appendices in TOC badly formatted
From: |
Werner LEMBERG |
Subject: |
Appendices in TOC badly formatted |
Date: |
Fri, 03 May 2002 11:16:22 +0200 (CEST) |
In connection with my other mail, 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 number has two or more
digits, the entries are moved to the right. While this may be
acceptable to a certain degree to due the constant width of digits,
the former isn't IMHO.
Below a patch for version 4.2. Note that this still works with my
\gobblefirst command described in another mail to suppress the word
`Appendix'.
Werner
======================================================================
--- 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
- Appendices in TOC badly formatted,
Werner LEMBERG <=