diff options
author | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-01-04 09:29:39 -0600 |
---|---|---|
committer | G. Branden Robinson <g.branden.robinson@gmail.com> | 2023-01-06 13:59:26 -0600 |
commit | 60dd8ae0dc3431c98ef0e91a853d110450954830 (patch) | |
tree | fb588b8da00a8a1d642c61c46c5d5e2594089eed /tmac | |
parent | 1f8b9f29dd4787d0837d15d7e6567608a28a0f14 (diff) | |
download | groff-git-60dd8ae0dc3431c98ef0e91a853d110450954830.tar.gz |
[mdoc]: Narrow scope of font remappings.
* tmac/mdoc/doc-common (Sh, Ss): Narrow scope of font remappings
lexically and restrict remapping to the heading font family (if any)
to avoid undesired remapping of fonts in page headers if, say, a
(sub)section heading begins just prior to a page break--which is ugly
anyway and should be avoided, but the package has no keep macros and
solving that problem in an automatic way promises to be complex.
Diffstat (limited to 'tmac')
-rw-r--r-- | tmac/mdoc/doc-common | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common index e059c491e..53a25659f 100644 --- a/tmac/mdoc/doc-common +++ b/tmac/mdoc/doc-common @@ -1382,9 +1382,6 @@ . el \ . nr doc-in-name-section 0 . -. if \n[doc-remap-I-style-in-headings] \ -. ftr I \*[doc-heading-family]BI -. . ie \n[doc-arg-count] \{\ . \" we only allow 'Sh' within 'Sh'; it will change the font back to . \" 'doc-Sh-font' @@ -1474,6 +1471,9 @@ . ss (\n[.ss] * 5 / 3) (\n[.sss] * 5 / 3) . \} . +. if \n[doc-remap-I-style-in-headings] \ +. ftr \*[doc-heading-family]I \*[doc-heading-family]BI +. . nr doc-arg-ptr +1 . nr doc-curr-font \n[.f] . nop \*[doc-Sh-font]\c @@ -1486,10 +1486,10 @@ . ns . . doc-check-depth +. if \n[doc-remap-I-style-in-headings] \ +. ftr \*[doc-heading-family]I \*[doc-heading-family]I . \} . -. if \n[doc-remap-I-style-in-headings] \ -. ftr I I . . \" Don't let doc-print-recursive force caps on anything else. . nr doc-do-capitalize 0 @@ -1511,9 +1511,6 @@ . .eo .de Ss -. if \n[doc-remap-I-style-in-headings] \ -. ftr I \*[doc-heading-family]BI -. . ie \n[doc-arg-count] \{\ . \" we only allow 'Ss' within 'Ss'; it will change the font back to . \" 'doc-Sh-font' @@ -1555,6 +1552,9 @@ . nr doc-reg-Ss1 \n[.sss] . ss (\n[.ss] * 5 / 4) (\n[.sss] * 5 / 4) . +. if \n[doc-remap-I-style-in-headings] \ +. ftr \*[doc-heading-family]I \*[doc-heading-family]BI +. . nr doc-arg-ptr +1 . nr doc-curr-font \n[.f] . nop \*[doc-Sh-font]\c @@ -1570,10 +1570,10 @@ . ns . . doc-check-depth +. if \n[doc-remap-I-style-in-headings] \ +. ftr \*[doc-heading-family]I \*[doc-heading-family]I . \} . -. if \n[doc-remap-I-style-in-headings] \ -. ftr I I .. .ec . |