groff
[Top][All Lists]
Advanced

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

Re: removing the .IX macro from the ms package in 1.23 breaks old docume


From: G. Branden Robinson
Subject: Re: removing the .IX macro from the ms package in 1.23 breaks old documents
Date: Fri, 4 Oct 2024 14:40:44 -0500

Hi Joerg,

At 2024-10-04T15:10:32+0200, joerg van den hoff wrote:
> correction regarding the "long entries that do line break do not
> honour indent": this probably is technically not a bug since in the
> original context the entries do have the form
> 
> SN[tab]entry
> 
> the SN is missing in the example so the entries in fact all start with
> \t and when line break occurs the next line of course is aligned with
> the \t of previous line... so this is technically a non-issue so
> forget about 3)... (must think about a better way to correctly indent
> TOC entries dependent on section level).

This is an instance where groff 1.23.0 might be a convenience rather
than a horror show.

commit 2a99e14dc1ffd73c48457709deb8a6115b955955
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Apr 17 19:02:39 2022 +1000

    [ms]: Apply depth-specific indents to TOC entries.
    
    * tmac/s.tmac (XH-UPDATE-TOC): Modify Keith Marshall's new XN/XH feature
      to indent TOC entries by section heading depth.  The increment is 2
      ens per depth level.

diff --git a/tmac/s.tmac b/tmac/s.tmac
index 98bf0ce7e..c6cad011a 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1768,7 +1768,8 @@ .de XH-UPDATE-TOC
 .\" .XH-UPDATE-TOC <outline-level> [<section-number>] <text>
 .\" (<section-number> present only when called by XN)
 .XS
-.shift\" don't use <outline-level> in rudimentary style
+.in (\\$1u - 1u * 2n)
+.shift
 \&\\$*\" capture <section-number> (if present) and <text>
 .XE
 ..

Also, for your enjoyment (I hope), I'm attach a document groff started
shipping (again) in 1.23.0.  You might find it both familiar and
strange.  This edition of it is from bleeding-edge Git.

I would very much appreciate your feedback on it.

Regards,
Branden

Attachment: ms.2024-10-04.pdf
Description: ms.2024-10-04.pdf

Attachment: signature.asc
Description: PGP signature


reply via email to

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