From 3f916952393d5779f5e2acd49f9f1af908217d79 Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Fri, 1 Oct 2021 10:25:49 +0100 Subject: [ms]: Support user-defined TOC leader style. * tmac/s.tmac (toc*leader-char): Rename it as... (TC-LEADER): ...this; within PX, leave it unchanged, if predefined. (TC-MARGIN): New numeric register; if predefined, leave it unchanged, otherwise define as \w'000'; use it instead of hard-wired definition, within PX; cf. . * tmac/groff_ms.7.man (TC_LEADER, TC_MARGIN): Document them. --- tmac/s.tmac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tmac/s.tmac') diff --git a/tmac/s.tmac b/tmac/s.tmac index 5ebc50420..7bdbfdddc 100644 --- a/tmac/s.tmac +++ b/tmac/s.tmac @@ -1751,9 +1751,10 @@ along with this program. If not, see . . ps .\} .nf -.char \[toc*leader-char] .\h'1m' -.lc \[toc*leader-char] -.ta (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R +.if !r TC-MARGIN .nr TC-MARGIN \w'000' +.if !c \[TC-LEADER] .char \[TC-LEADER] .\h'1m' +.ta (u;\\n[.l]-\\n[.i]-\\n[TC-MARGIN]) (u;\\n[.l]-\\n[.i])R +.lc \[TC-LEADER] .sp 2 .toc*div .par@reset -- cgit v1.2.1