summaryrefslogtreecommitdiff
path: root/doc/ms.ms
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-07-10 00:44:20 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-07-14 04:24:38 -0500
commit6ed7d0d66facc19f8630cf1816993e9546987242 (patch)
tree0220c34d71d64ee74713e4a6741f9d92473aa03f /doc/ms.ms
parent578a07cf0b297343f068916d1854732781d43ee1 (diff)
downloadgroff-git-6ed7d0d66facc19f8630cf1816993e9546987242.tar.gz
doc/doc.am (doc/ms.ps): Depend on and use "eqn".
Correct and expand documentation of eqn(1) usage with ms macro package. * doc/groff.texi (ms Insertions): * doc/ms.ms (Tables, figures, equations, and references): * tmac/groff_ms.man (Tables, figures, equations, and references): Document optional second argument to `EQ` macro. * doc/groff.texi (ms Headings): * doc/ms.ms (Headings): * tmac/groff_ms.man (Headings): Document additional applications of `SN` string. * doc/groff.texi (Example multi-page table): * doc/ms.ms (An example multi-page table): Drop node/section title. * doc/groff.texi (ms Insertions): * doc/ms.ms (Tables, figures, equations, and references): Add example of eqn usage. * src/utils/grog/tests/smoke-test.sh: Update expected "grog" output for the ms.ms document.
Diffstat (limited to 'doc/ms.ms')
-rw-r--r--doc/ms.ms82
1 files changed, 66 insertions, 16 deletions
diff --git a/doc/ms.ms b/doc/ms.ms
index 63a5929e0..0f5eb5256 100644
--- a/doc/ms.ms
+++ b/doc/ms.ms
@@ -1279,8 +1279,12 @@ following redefinition of the alias for
.
The formatted number of the current heading is available in
.CW \[rs]*[SN]
-(a feature first documented by Berkeley),
-facilitating its inclusion in
+(a feature first documented by Berkeley);
+this feature facilitates its inclusion in,
+for example,
+table captions,
+equation labels,
+and
.CW .XS /\c
.CW .XA /\c
.CW .XE
@@ -2382,7 +2386,8 @@ _
T{
\&.EQ
.R
-.I align ] [
+.I align \~[\c [
+.I label ]]
.CW
.br
\&.EN
@@ -2391,19 +2396,22 @@ Demarcate an equation to be processed by the
.I eqn
preprocessor.
.
-The equation is center-aligned by default;
-the optional
+The equation is centered by default;
.I align
-argument can be
+can be
.CW C ,
.CW L ,
or
.CW I
-to center,
+to (explicitly) center,
left-align,
or indent it by
.CW \[rs]n[DI] ,
respectively.
+.
+If specified,
+.I label
+is set right-aligned.
T}
_
T{
@@ -2436,14 +2444,7 @@ as an unnumbered heading
.
.
.KS
-.NH 3
-An example multi-page table
-.XS
- An example multi-page table
-.XE
-.
-.
-.LP
+.PP
The following is an example of how to set up a table that may print
across two or more pages.
.
@@ -2473,7 +2474,6 @@ T}
.TE
.
.
-.PP
Attempting to place a multi-page table inside a keep can lead to
unpleasant results,
particularly if the
@@ -2483,6 +2483,56 @@ option is used.
.KE
.
.
+.PP
+Mathematics can be typeset using the language of the
+.I eqn
+preprocessor.
+.
+.
+.TS
+box center;
+Lf(CR).
+\&.EQ C (\[rs]*[SN\-NO\-DOT]a)
+p \[ti] = \[ti] q sqrt { ( 1 + \[ti] ( x / q sup 2 ) }
+\&.EN
+.TE
+.
+.
+This input formats a labelled equation.
+.
+We used the
+.CW SN\-NO\-DOT
+string to base the equation label on the current heading number,
+giving us more flexibility to reorganize the document.
+.
+.
+.EQ C (\*[SN-NO-DOT]a)
+p ~ = ~ q sqrt { ( 1 + ~ ( x / q sup 2 ) }
+.EN
+.
+.
+.PP
+Remember to run any desired preprocessors on the input;
+.I groff
+options
+will take care of this.
+.
+Use
+.CW \-e
+for
+.I eqn ,
+.CW \-p
+for
+.I pic ,
+.CW \-R
+for
+.I refer ,
+and
+.CW \-t
+for
+.I tbl.
+.
+.
.KS
.NH 2
Footnotes