gbranden pushed a commit to branch master
in repository groff.

commit c7289acc12e62fc3386125b78d9bd0ef52409a22
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Sep 25 08:37:49 2023 -0500

    [man]: Add bespoke handling of `lbp` device.
    
    * tmac/an.tmac (EX): Refactor, using new register `an*unmap-fonts` to
      keep track of whether we're remapping fonts instead of switching
      families.  Like TeX DVI, the LBP output device lacks a (complete)
      monospaced font family.  In EX/EE examples on that device, remap the
      bold-italic face to italics.
    
      (EE): Revert remappings and remove `an*unmap-fonts` register.
    
    Prompted by discussion with pandoc developers at
    <https://github.com/jgm/pandoc/issues/9020>.
---
 ChangeLog    | 14 ++++++++++++++
 tmac/an.tmac | 18 +++++++++++++++---
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e1dffac62..b4afd794f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-09-25  G. Branden Robinson <[email protected]>
+
+       [man]: Add bespoke handling of `lbp` device.
+
+       * tmac/an.tmac (EX): Refactor, using new register
+       `an*unmap-fonts` to keep track of whether we're remapping fonts
+       instead of switching families.  Like TeX DVI, the LBP output
+       device lacks a (complete) monospaced font family.  In EX/EE
+       examples on that device, remap the bold-italic face to italics.
+       (EE): Revert remappings and remove `an*unmap-fonts` register.
+
+       Prompted by discussion with pandoc developers at
+       <https://github.com/jgm/pandoc/issues/9020>.
+
 2023-09-25  G. Branden Robinson <[email protected]>
 
        [eqn]: Make synopsis, usage message more helpful.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index c3b1598a4..4dc059fe0 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1032,16 +1032,27 @@ contains unsupported escape sequence
 .  nr an*saved-paragraph-distance \\n[PD]
 .  nr PD 1v
 .  nf
+.  nr an*unmap-fonts 0
 .  \" If using the DVI output device, we have no constant-width fonts of
 .  \" bold weight and, relatedly, no constant-width family (because that
 .  \" requires all four styles).  Remap the bold styles to normal ones.
-.  ie '\*[.T]'dvi' \{\
+.        ie '\*[.T]'dvi' \{\
 .    ftr R CW
 .    ftr B CW
 .    ftr I CWI
 .    ftr BI CWI
+.    nr an*unmap-fonts 1
+.  \}
+.  \" The LBP output device lacks a Courier bold-italic face.
+.  el \{.ie '\*[.T]'lbp' \{\
+.    ftr R CR
+.    ftr B CB
+.    ftr I CI
+.    ftr BI CI
+.    nr an*unmap-fonts 1
+.  \}
+.  el                    .fam \\*[an*example-family]
 .  \}
-.  el .fam \\*[an*example-family]
 .  ft R
 .  nr an*is-in-example 1
 ..
@@ -1054,11 +1065,12 @@ contains unsupported escape sequence
 .    return
 .  \}
 .  \" Undo the remappings from `EX`.
-.  ie '\*[.T]'dvi' \{\
+.  ie \\n[an*unmap-fonts] \{\
 .    ftr R
 .    ftr B
 .    ftr I
 .    ftr BI
+.    rr an*unmap-fonts
 .  \}
 .  fam \\*[an*saved-family]
 .  ft \\n[an*saved-font]

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to