diff options
author | Keith Marshall <keith.d.marshall@ntlworld.com> | 2021-10-01 10:25:49 +0100 |
---|---|---|
committer | Keith Marshall <keith.d.marshall@ntlworld.com> | 2021-10-01 10:25:49 +0100 |
commit | 3f916952393d5779f5e2acd49f9f1af908217d79 (patch) | |
tree | b49ba3f1ca0a87fd304c4a2bdaed2d44aa902f87 /tmac/s.tmac | |
parent | 423e3c0b45a59c5476a2adc95bd38426a40456f3 (diff) | |
download | groff-git-3f916952393d5779f5e2acd49f9f1af908217d79.tar.gz |
[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. <https://savannah.gnu.org/bugs/?61157>.
* tmac/groff_ms.7.man (TC_LEADER, TC_MARGIN): Document them.
Diffstat (limited to 'tmac/s.tmac')
-rw-r--r-- | tmac/s.tmac | 7 |
1 files changed, 4 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. . 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 |