[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63158] [ms] consider exposing internal register `nh*hl` as `HL` or
From: |
G. Branden Robinson |
Subject: |
[bug #63158] [ms] consider exposing internal register `nh*hl` as `HL` or similar |
Date: |
Wed, 5 Oct 2022 02:31:48 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?63158>
Summary: [ms] consider exposing internal register `nh*hl` as
`HL` or similar
Project: GNU troff
Submitter: gbranden
Submitted: Wed 05 Oct 2022 06:31:47 AM UTC
Category: Macro ms
Severity: 1 - Wish
Item Group: Feature change
Status: Postponed
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 05 Oct 2022 06:31:47 AM UTC By: G. Branden Robinson <gbranden>
While working on bug #63110 I ran into the following issue.
+.PP
+To get the section number of the numbered headings into the table of
+contents entries,
+we might define
+.CW \%XN\-REPLACEMENT
+as follows.
+.
+(We obtain the heading depth from
+.I "groff ms" 's
+internal register
+.CW nh*hl .)
+.
+.
+.LP
+.TS
+box center;
+L.
+T{
+.nf
+.CW
+\&.XN-INIT
+\&.XH-UPDATE-TOC \[rs]\[rs]n[nh*hl] \[rs]\[rs]$@
+\&\[rs]&\[rs]\[rs]*[SN] \[rs]\[rs]$*
+\&..
+T}
+.TE
The user shouldn't have to grub around with internal registers to extract the
heading depth level. We should either expose it, or give the new XN/XH
features some way of obtaining it, but the latter might be difficult since we
encourage the user to write replacements for them.
No plans to resolve this for 1.23.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63158>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #63158] [ms] consider exposing internal register `nh*hl` as `HL` or similar,
G. Branden Robinson <=