groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 18/23: [ms]: Revise register rescaling discussion.


From: G. Branden Robinson
Subject: [groff] 18/23: [ms]: Revise register rescaling discussion.
Date: Fri, 16 Sep 2022 13:07:42 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit cc8b5b4b3d88dadac8a8cc842fffde5f69bfcffb
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Sep 15 22:51:37 2022 -0500

    [ms]: Revise register rescaling discussion.
    
    Some of my earlier surmises about why this feature existed were
    incorrect.  Commit f17868f6b7 (4 August) to the mm(7) package was
    instructive in this regard.
    
    It also appears that while Version 7 Unix nroff did not apply scaling
    units to register values set from the command line (which didn't affect
    the ones here because only single-character register names were
    supported anyway), that system's troff executable _did_.
    
    A survey of the V7 Unix and V10 Research Unix "volume 2" papers, a
    significant corpus of ms documents, reveals that scaling units were
    never applied to PS and VS register assignments.  Their values were
    apparently always interpreted in (integral) points.
---
 doc/groff.texi      | 40 +++++++++++++++-------------------------
 doc/ms.ms           | 46 +++++++++++++++++++++++++++++-----------------
 tmac/groff_ms.7.man | 42 +++++++++++++++++++++++++++++-------------
 3 files changed, 73 insertions(+), 55 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index c9e95cd24..d6bb6f01a 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -2752,13 +2752,7 @@ Default: empty.
 @unnumberedsubsubsec Text settings
 
 @Defmpreg {PS, ms}
-Defines the type size of the body text in points.  If the value is
-larger than or equal to 1000, it is divided by 1000 to get a fractional
-type size.  For example, @samp{.nr PS 10500} sets the document's type
-size to 10.5@dmn{points}.  This rescaling of large type sizes is a GNU
-extension.  In @file{ms} documents that don't need to be portable to
-other implementations, using a scaling unit, as in @samp{.nr PS
-10.5p}, is preferable.
+Defines the type size of the body text.
 
 Effective: next paragraph.
 
@@ -2766,10 +2760,7 @@ Default: 10@dmn{p}.
 @endDefmpreg
 
 @Defmpreg {VS, ms}
-Defines the space between lines (line height plus leading).  If the
-value is larger than or equal to 1000, it is divided by 1000 to get a
-fractional type size.  This rescaling of large type sizes is a GNU
-extension.  See register @code{PS} above.
+Defines the space between lines (line height plus leading).
 
 Effective: next paragraph.
 
@@ -2930,10 +2921,7 @@ Default: 0.
 @endDefmpreg
 
 @Defmpreg {FPS, ms}
-Defines the footnote type size in points.  If the value is larger than
-or equal to 1000, it is divided by 1000 to get a fractional type size.
-This rescaling of large type sizes is a GNU extension.  See register
-@code{PS} above.
+Defines the footnote type size.
 
 Effective: next footnote.
 
@@ -2941,10 +2929,7 @@ Default: @math{@code{@\n[PS]} - 2p}.
 @endDefmpreg
 
 @Defmpreg {FVS, ms}
-Defines the footnote vertical spacing.  If the value is larger than or
-equal to 1000, it is divided by 1000 to get a fractional type size.
-This rescaling of large type sizes is a GNU extension.  See register
-@code{PS} above.
+Defines the footnote vertical spacing.
 
 Effective: next footnote.
 
@@ -4438,12 +4423,17 @@ request, but the @file{ms} @code{RS} and @code{RE} 
macros.
 @item
 @cindex fractional type sizes in @file{ms} macros
 @cindex @file{ms} macros, fractional type sizes in
-@acronym{AT&T} @file{ms} supported only integral values for the type
-size and vertical spacing.  To overcome this restriction, for the
-registers @code{PS}, @code{VS}, @code{FPS}, and @code{FVS}, @code{groff}
-@file{ms} interprets values equal to or larger than 1000 as decimal
-fractions multiplied by 1000.  See the @code{PS} register in @ref{ms
-Document Control Settings}.
+@acronym{AT&T} @file{ms} interpreted the values of the registers
+@code{PS} and @code{VS} in points, and did not support the use of
+scaling units with them.  @code{groff} @file{ms} interprets values of
+the registers @code{PS}, @code{VS}, @code{FPS}, and @code{FVS} equal to
+or larger than@tie{}1,000 (one thousand) as decimal fractions multiplied
+by@tie{}1,000.@footnote{Register values are converted to and stored as
+basic units.  @xref{Measurements}.}  This threshold makes use of a
+scaling unit with these parameters practical for high-resolution
+devices while preserving backward compatibility.  For example,
+@samp{groff -rPS=10.5p} at the shell prompt is equivalent to placing
+@samp{.nr PS 10.5p} at the beginning of the document.
 
 @item
 @acronym{AT&T} @file{ms}'s @code{AU} macro supported arguments used with
diff --git a/doc/ms.ms b/doc/ms.ms
index 7875fbe06..2eb48dbdf 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -3704,30 +3704,42 @@ and
 .PP
 AT&T
 .I ms
-supported only integral values for the type size and vertical spacing.
+interpreted the values of the registers
+.CW PS
+and
+.CW VS
+in points,
+and did not support the use of scaling units with them.
 .
-To overcome this restriction,
-for the registers
+.I "groff ms"
+interprets values of the registers
 .CW PS ,
 .CW VS ,
 .CW FPS ,
 and
-.CW FVS ,
-.I "groff ms"
-interprets values equal to or larger than\~1000 as decimal fractions
-multiplied by\~1000.
+.CW FVS
+equal to or larger than\~1,000
+(one thousand)
+as decimal fractions multiplied by\~1,000.\**
+.FS
+Register values are converted to and stored as basic units.
 .
-For example,
-.CW ".nr PS 10500" \[rq] \[lq]
-sets the document's type size to 10.5\~points.
+See \[lq]Measurements\[rq] in the
+.I groff
+Texinfo manual or the
+.I groff (7)
+man page.
+.FE
 .
-In
-.I ms
-documents that don't need to be portable to other implementations,
-using a scaling unit,
-as in
-.CW ".nr PS 10.5p" \[rq], \[lq]
-is preferable.
+This threshold makes use of a scaling unit with these parameters
+practical for high-resolution devices while preserving backward
+compatibility.
+.
+For example,
+.CW "groff \-rPS=10.5p"
+at the shell prompt is equivalent to placing
+.CW ".nr PS 10.5p"
+at the beginning of the document.
 .
 .
 .PP
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index d60eb7e97..1f9b8b28b 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -2434,26 +2434,42 @@ and
 .IP \[bu]
 AT&T
 .I ms
-supported only integral values for the type size and vertical spacing.
+interpreted the values of the registers
+.B PS
+and
+.B VS
+in points,
+and did not support the use of scaling units with them.
 .
-To overcome this restriction,
-for the registers
+.I groff ms
+interprets values of the registers
 .BR PS ,
 .BR VS ,
 .BR FPS ,
 and
 .BR FVS ,
-.I groff ms
-interprets values equal to or larger than\~1000 as decimal fractions
-multiplied by\~1000.
+equal to or larger than\~1,000
+(one thousand)
+as decimal fractions multiplied by\~1,000.
 .
-In
-.I ms
-documents that don't need to be portable to other implementations,
-use of a scaling unit,
-as in
-.RB \[lq] ".nr PS 10.5p" \[rq],
-is preferable.
+(Register values are converted to and stored as basic
+units.
+.
+See \[lq]Measurements\[rq] in the
+.I groff
+Texinfo manual or the
+.MR groff @MAN7EXT@
+man page.)
+.
+This threshold makes use of a scaling unit with these parameters
+practical for high-resolution devices while preserving backward
+compatibility.
+.
+For example,
+.RB \[lq] "groff \-rPS=10.5p" \[rq]
+at the shell prompt is equivalent to placing
+.RB \[lq] ".nr PS 10.5p" \[rq]
+at the beginning of the document.
 .
 .
 .IP \[bu]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]