[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: TOC @subsubsection number alignment
From: |
Gavin D. Smith |
Subject: |
branch master updated: TOC @subsubsection number alignment |
Date: |
Wed, 26 Jul 2023 18:14:47 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 0c361237cb TOC @subsubsection number alignment
0c361237cb is described below
commit 0c361237cb5ef6a6acc27de29d9d24baf5126d9b
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Jul 26 23:14:38 2023 +0100
TOC @subsubsection number alignment
* doc/texinfo.tex (\findsecnowidths): Also collect information
on the widths of subsubsection numbers.
(\numsubsecentry, \unsubsecentry): Call \retrievesecnowidth.
(\dosubsubsecentry): Assign \secnowidth based on result.
---
ChangeLog | 11 ++++++++++-
doc/texinfo.tex | 28 +++++++++++++++++++++++++---
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ebc9fa51e9..f9c50553ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-07-26 Gavin Smith <gavinsmith0123@gmail.com>
+
+ TOC @subsubsection number alignment
+
+ * doc/texinfo.tex (\findsecnowidths): Also collect information
+ on the widths of subsubsection numbers.
+ (\numsubsecentry, \unsubsecentry): Call \retrievesecnowidth.
+ (\dosubsubsecentry): Assign \secnowidth based on result.
+
2023-07-26 Gavin Smith <gavinsmith0123@gmail.com>
TOC @subsection number alignment
@@ -7,7 +16,7 @@
(\retrievesecnowidth): Take an argument, being the dimension
register to assign to.
(\numsecentry, \unsecentry): Call \retrievesecnowidth.
- (\dosubsubsecentry): Assign \secnowidth based on result.
+ (\dosubsecentry): Assign \secnowidth based on result.
2023-07-26 Patrice Dumas <pertusus@free.fr>
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index beeea56bbf..9928acf04e 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2023-07-26.21}
+\def\texinfoversion{2023-07-26.22}
%
% Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
%
@@ -6737,6 +6737,9 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\let\appsecentry\numsecentry
%
\def\numsubsecentry##1##2##3##4{%
+ \def\curssecname{secnowidth-##2}%
+ \curssecmax=0pt
+ %
\setbox0=\hbox{##2}%
\ifdim\wd0>\cursecmax
\cursecmax=\wd0
@@ -6745,6 +6748,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}%
\let\appsubsecentry\numsubsecentry
%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \setbox0=\hbox{##2}%
+ \ifdim\wd0>\curssecmax
+ \curssecmax=\wd0
+ \expandafter\xdef\csname\curssecname\endcsname{\the\wd0}%
+ \fi
+ }%
+ \let\appsubsubsecentry\numsubsubsecentry
+ %
% Discard any output by outputting to dummy vbox, in case the toc file
% contains macros that we have not redefined above.
\setbox\dummybox\vbox\bgroup
@@ -6754,6 +6766,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
\newdimen\curchapmax
\newdimen\cursecmax
+\newdimen\curssecmax
% set #1 to the maximum section width for #2
@@ -6769,6 +6782,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\secnowidthchap=0pt
\newdimen\secnowidthsec
\secnowidthsec=0pt
+\newdimen\secnowidthssec
+\secnowidthssec=0pt
\newskip\contentsrightmargin \contentsrightmargin=1in
@@ -6962,9 +6977,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
}
% Subsections.
-\def\numsubsecentry#1#2#3#4{\dosubsecentry{#1}{#2}{#4}}
+\def\numsubsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthssec{#2}%
+ \dosubsecentry{#1}{#2}{#4}%
+}
\let\appsubsecentry=\numsubsecentry
-\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{}{#4}}
+\def\unsubsecentry#1#2#3#4{%
+ \retrievesecnowidth\secnowidthssec{#2}%
+ \dosubsecentry{#1}{}{#4}%
+}
% And subsubsections.
\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#4}}
@@ -7005,6 +7026,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\endgroup}
\def\dosubsubsecentry#1#2#3{\begingroup
+ \secnowidth=\secnowidthssec
\subsubsecentryfonts \leftskip=3\tocindent
\tocentry{#1}{#2}{#3}%
\endgroup}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: TOC @subsubsection number alignment,
Gavin D. Smith <=