groff
[Top][All Lists]
Advanced

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

RE: [Groff] Omission in -ms man page


From: Ted Harding
Subject: RE: [Groff] Omission in -ms man page
Date: Fri, 11 May 2007 12:31:32 +0100 (BST)

On 11-May-07 09:58:48, Robert Goulding wrote:
> The -ms macros do in fact allow equation numbering (as I
> discovered much to my relief the other day, when writing up
> an article), but this is not mentioned in either groff_ms (7)
> or the info pages on -ms.

Your suggestion is a good idea! Different macro packages do
handle .EQ and .EN in different ways (while ms and me are
similar, mm is different, for instance). So it is useful to
know what is possible for each different macro set.

However, I'm doubtful about what you write at the end of
your suggested inclusion (see below).

> The manpage should read something like:
> 
> .TP
> .BR ".EQ [\fI\,align\/\fP|\fI\,equation label\/\fP] [\fI\,align\/\fP]"
> " and
> " .EN
> Denotes an equation, to be processed by the
> .I eqn
> preprocessor.
> If the first optional argument is
> .BR C ,
> .BR L ,
> or\~\c
> .B I ,
> it will be considered to be an
> .I align
> argument,
> to center (the default), left-justify, or indent
> the equation respectively.
> Any other argument will be used as a flush-right
> .I label
> for the equation.
> If the first argument is a
> .I label ,
> then a second optional argument may be used for
> .I align .
> 
> Robert.

I query this last sentence. According to .de @EQ in my ms
macros, if there are two arguments:

1. \n[eqn*num] is set to $2
2. If $1 is "L" or "I" then the equation layout type is set
   to 0 (left-justified) or 1 (right-justified).
   Otherwise it is set to 2 (centred).
3. If $1 is not "C", then \n[eqn*num] is set to $1

and that's all! So if $1 is anything except "L", "I" or "C"
then the equation label is $1, the equation is centred, and
$2 is ignored.

I've checked this (using ms macros) with:

.LP
First:
.EQ L (1)
X ~~=~~ Y ~+~ Z
.EN
Next:
.EQ (2) L
X ~~=~~ Y ~+~ Z
.EN

which (with -Tascii) generates:



First:

X=Y+Z                                                    (1)

Next:

                            X=Y+Z                        (2)



(and, of course, similar with the default -Tps)

Has something changed lately in the ms macros?

Best wishes to all,
Ted.

PS Don't label your equations "A", "B", "C", ... unless you
make sure that it's the second argument and the first is one
of the three alignment specifiers!

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 11-May-07                                       Time: 12:31:28
------------------------------ XFMail ------------------------------




reply via email to

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