groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/06: [ms]: Fix errors in display documentation.


From: G. Branden Robinson
Subject: [groff] 02/06: [ms]: Fix errors in display documentation.
Date: Thu, 11 Nov 2021 19:43:58 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit c119e892271b1a7bc364482e34a0aec5ea14136d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Nov 12 08:38:48 2021 +1100

    [ms]: Fix errors in display documentation.
    
    ...and one omission.
    
    * `DS` without an argument creates an indented display, not a (flush)
      left-aligned one.
    * The macro to end a display is `DE`, not `ED`(!).
    * Mention that `DI` register's indentation amount is also applied to
      indented equations (".EQ I") when the register is presented.
---
 doc/groff.texi      | 16 ++++++----------
 doc/ms.ms           | 31 ++++++++++---------------------
 tmac/groff_ms.7.man | 34 ++++++++++++----------------------
 3 files changed, 28 insertions(+), 53 deletions(-)

diff --git a/doc/groff.texi b/doc/groff.texi
index 9751fe3..2b3981a 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -424,7 +424,7 @@ developing GNU and promoting software freedom.''
 @title groff
 @subtitle The GNU implementation of @code{troff}
 @subtitle Edition 1.23.0
-@subtitle October 2021
+@subtitle November 2021
 @author by Trent A.@tie{}Fisher
 @author and Werner Lemberg
 
@@ -2924,7 +2924,8 @@ Default: 0.5@dmn{v} (1@dmn{v} on low-resolution devices).
 
 @Defmpreg {DI, ms}
 Sets the default amount by which to indent a display started with
-@samp{.DS I} or @code{ID}.  This is a GNU extension.
+@code{DS}, @samp{.DS@tie{}I}, or @code{ID}; or an equation set with
+@samp{.EQ@tie{}I}.  This is a GNU extension.
 
 Effective: next indented display.
 
@@ -3726,12 +3727,12 @@ begins a kept display of the layout specified in its 
first argument;
 non-kept displays are begun with dedicated macros corresponding to their
 layout.
 
-@DefmacList {DS, [@t{L}], ms}
+@DefmacList {DS, @t{L}, ms}
 @DefmacListEndx {LD, , ms}
 Begin (@code{DS}:@: kept) left-aligned display.
 @endDefmac
 
-@DefmacList {DS, @t{I} [@Var{indent}], ms}
+@DefmacList {DS, [@t{I} [@Var{indent}]], ms}
 @DefmacListEndx {ID, [@Var{indent}], ms}
 Begin (@code{DS}:@: kept) display indented by @var{indent} if specified,
 and by the amount of the @code{DI} register otherwise.
@@ -3756,7 +3757,7 @@ Begin a (@code{DS}:@: kept) right-aligned display.  This 
is a GNU
 extension.
 @endDefmac
 
-@Defmac {ED, , ms}
+@Defmac {DE, , ms}
 End any display.
 @endDefmac
 
@@ -4418,11 +4419,6 @@ until the first @file{ms} macro is called.  This implies 
that the
 changed also: accessing an undefined register automatically defines it.
 
 @item
-Displays are left-aligned by default, not indented.  In @acronym{AT&T}
-@file{ms}, @samp{.DS} is synonymous with @samp{.DS I}; in @code{groff}
-@file{ms}, it is synonymous with @samp{.DS L}.
-
-@item
 Right-aligned displays are available.  The @acronym{AT&T} @file{ms}
 manual observes that ``it is tempting to assume that @samp{.DS R} will
 right adjust lines, but it doesn't work''.  In @code{groff} @file{ms},
diff --git a/doc/ms.ms b/doc/ms.ms
index bc17a05..c514555 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -1926,8 +1926,8 @@ lf(CR) lf(CR) | lx .
 Display macro  Description
 With keep      Without keep
 _
-\&.DS \f[R][\f[]L\f[R]]        \&.LD   Begin left-aligned display.
-\&.DS I \f[R][\,\f[I]indent\/\f[]]     \
+\&.DS L        \&.LD   Begin left-aligned display.
+\&.DS \f[R][\f[]I\f[R] [\,\f[I]indent\/\f[]]]  \
 \&.ID \f[R][\,\f[I]indent\/\f[]]       T{
 Begin display indented by
 .I indent
@@ -1947,7 +1947,7 @@ T}
 _
 .T&
 cf(CR) s | lx .
-\&.ED  End any display.
+\&.DE  End any display.
 .TE
 .
 .
@@ -1959,11 +1959,15 @@ this is a Berkeley extension.
 .
 The
 .CW \[rs]n[DI]
-indentation is applied to only to displays created with
-.CW ".DS I" \[rq] \[lq]
+register is a GNU extension;
+its value is an indentation applied to displays created with
+.CW .DS
+(with no argument),
+.CW ".DS\~I" \[rq], \[lq]
 and
 .CW .ID ;
-this is a GNU extension.
+and indented equations set with
+.CW .EQ .
 .
 Changes to either register take effect at the next display boundary.
 .
@@ -3120,21 +3124,6 @@ and
 .
 .
 .PP
-Displays are left-aligned by default,
-not indented.
-.
-In AT&T
-.I ms ,
-.CW .DS
-is synonymous with
-.CW ".DS I" ;
-in
-.I "groff ms" ,
-it is synonymous with
-.CW ".DS L" .
-.
-.
-.PP
 Right-aligned displays are available.
 .
 The AT&T
diff --git a/tmac/groff_ms.7.man b/tmac/groff_ms.7.man
index 9c66bea..4f42e60 100644
--- a/tmac/groff_ms.7.man
+++ b/tmac/groff_ms.7.man
@@ -1219,7 +1219,7 @@ layout.
 .
 .
 .TP
-.BR .DS \~[ L ]
+.B .DS L
 .TQ
 .B .LD
 Begin
@@ -1228,8 +1228,9 @@ left-aligned display.
 .
 .
 .TP
-.B .DS I \c
-.RI [ indent ]
+.BR .DS \~\c
+.RB [ I \~\c
+.RI [ indent ]]
 .TQ
 .B .ID \c
 .RI [ indent ]
@@ -1276,7 +1277,7 @@ This is a GNU extension.
 .
 .
 .TP
-.B .ED
+.B .DE
 End any display.
 .
 .
@@ -1288,11 +1289,15 @@ this is a Berkeley extension.
 .
 The
 .B \[rs]n[DI]
-indentation is applied only to displays created with
-.RB \[lq] ".DS I" \[rq]
+register is a GNU extension;
+its value is an indentation applied to displays created with
+.B .DS
+(with no argument),
+.RB \[lq] ".DS\~I" \[rq],
 and
 .BR .ID ;
-this is a GNU extension.
+and indented equations set with
+.BR .EQ .
 .
 Changes to either register take effect at the next display boundary.
 .
@@ -2263,21 +2268,6 @@ accessing an undefined register automatically defines it.
 .
 .
 .IP \[bu]
-Displays are left-aligned by default,
-not indented.
-.
-In AT&T
-.IR ms ,
-.B .DS
-is synonymous with
-.RB \[lq] ".DS I" \[rq];
-in
-.IR "groff ms" ,
-it is synonymous with
-.RB \[lq] ".DS L" \[rq].
-.
-.
-.IP \[bu]
 Right-aligned displays are available.
 .
 The AT&T



reply via email to

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