gbranden pushed a commit to branch master
in repository groff.

commit 7375f7e1123396cd275aadd4f71a86d2af14f353
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Feb 14 14:53:50 2024 -0600

    [mm]: Reckon default units more consistently.
    
    * contrib/mm/m.tmac (EPIC): Reckon width argument in ens by default, and
      height argument in vees.
    
    * contrib/mm/m.tmac (ds@set-format): Reckon right-indentation argument
      in ens by default.  This is a difference from DWB 3.3 mm, which used
      ems (because it passed the argument as-is to the `ll` request), but
      groff has been using basic units for 30 years without apparent
      complaint, even though on the PostScript device this threw off the
      amount by five orders of magnitude instead of one half.  Thus, take
      this opportunity to be more consistent than DWB by more rigorously
      using ens for horizontal measurement and vees for vertical ones.
    
    * NEWS: Add items.
---
 NEWS                 | 11 +++++++++++
 contrib/mm/ChangeLog | 14 ++++++++++++++
 contrib/mm/m.tmac    |  6 +++---
 3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index c446f2d3d..cfe5b770e 100644
--- a/NEWS
+++ b/NEWS
@@ -178,6 +178,17 @@ o The doc (mdoc) macro package's `Mt` macro now sets its 
argument in
 o The new macro file "koi8-r.tmac" supports the KOI8-R character
   encoding, which supports the new Russian locale for groff.
 
+o The m (mm) macro package's `EPIC` macro (a GNU extension) now
+  interprets its "width" argument in ens by default, and its "height"
+  argument in vees, instead of basic units, for consistency with the
+  rest of the package.
+
+o The m (mm) macro package's `DS` macro now interprets its third
+  argument (a right-hand indentation) in ens by default, for consistency
+  with the rest of the package.  This is a difference from DWB mm (which
+  passed the value unprocessed to the `ll` request, which itself uses
+  ems), and groff mm's own historical behavior, which used basic units.
+
 o The m (mm) macro package's `HU` macro now supports a second argument
   as a GNU extension.  It corresponds to the optional third argument of
   the `H` macro.
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 95a32776d..eb463a1e0 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,17 @@
+2024-02-14  G. Branden Robinson <[email protected]>
+
+       * m.tmac (EPIC): Reckon width argument in ens by default, and
+       height argument in vees.
+       * m.tmac (ds@set-format): Reckon right-indentation argument in
+       ens by default.  This is a difference from DWB 3.3 mm, which
+       used ems (because it passed the argument as-is to the `ll`
+       request), but groff has been using basic units for 30 years
+       without apparent complaint, even though on the PostScript device
+       this threw off the amount by five orders of magnitude instead of
+       one half.  Thus, take this opportunity to be more consistent
+       than DWB by more rigorously using ens for horizontal
+       measurement and vees for vertical ones.
+
 2023-12-27  G. Branden Robinson <[email protected]>
 
        Support pic(1) pictures when formatting HTML.
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index f4b5c36de..7043256bc 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -946,9 +946,9 @@ numeric; got '\\$1'
 .\}
 .\" Permit a document to start with EPIC.
 .if \\n[nl]<0 \&
-.ie \B'\\$1' .nr pict*w \\$1
+.ie \B'\\$1' .nr pict*w (n;\\$1)
 .el          .@error \\$0: width parameter is not numeric; got '\\$1'
-.ie \B'\\$2' .nr pict*h \\$2
+.ie \B'\\$2' .nr pict*h (v;\\$2)
 .el          .@error \\$0: height parameter is not numeric; got '\\$2'
 .\" XXX: This is kind of lame.  It's also not localized.
 .ds pict*name External picture\"
@@ -2136,7 +2136,7 @@ within DF/DE
 .\}
 .if \\n[D]>2 .tm set fill=\\n[ds*fill]
 .nr ds*rindent 0
-.if \\n[.$]>2 .nr ds*rindent \\$3
+.if \\n[.$]>2 .nr ds*rindent (n;\\$3)
 .if \\n[D]>2 .tm set indent=\\n[ds*rindent]
 ..
 .\"-----------------------------

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

Reply via email to