[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Equation Label wrongly positioned in indented '-mm' (MM) display
From: |
Damian McGuckin |
Subject: |
Equation Label wrongly positioned in indented '-mm' (MM) display |
Date: |
Sun, 13 Mar 2022 18:23:43 +1100 (AEDT) |
This is version 1.22.4.
When using
groff -mm -e
and an left justified Equation like
.DS 0
.EQ (10)
equation data
.EN
.DE
the equation is nicely left justified and the label right justified right
up against the right margin. The same alignment, i.e. up against the right
margin, happens if the argument to .DS is 2, i.e. a centered equation.
Alignment against the right margin is what you want and what the manual
says should happen, i.e. quoting from the manual:
..... The label argument appears at the right margin of the equation,
This is a fix done sometime after 1.19 I think.
Unfortunately, in an indented display (an argument of 1 or I to .DS) like
.DS 1
.EQ (10)
equation data
.EN
.DE
the equation is indented on the left and the label indented the same
amount on the right. It is not up against the right margin which is not
really what I want, and in disagreement with the manual.
I believe the offending statement is this line in .EQ
\h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]
because an indented display (or the ds*format register being 1) messes
with the line length.
The following replacement works for me with arguments of [012LIC]:
.ie \\n[ds*format]=1
\h'|\\n[.l]u-\w'\\*[eq*label]'u+\\n(Sin'\\*[eq*label]
.el \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]
Am I doing it the right way or will that stab me in the back sometime? I
think that the Si register is in the correct units. I could be wrong as I
write groff macro's once every 5 years so the brain is very rusty.
A
diff m.tmac m-fixEQ.tmac
shows:
2418c2418,2419
< \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]
---
.ie \\n[ds*format]=1 \h'|\\n[.l]u-\w'\\*[eq*label]'u+\\n(Sin'\\*[eq*label]
.el \h'|\\n[.l]u-\w'\\*[eq*label]'u'\\*[eq*label]
If anybody else agrees that there is a problem and that my fix is done
correctly, how do I submit a bug report and the fix.
If anybody wants to tell me a better way to fix the problem, I would love
to know.
Thanks - Damian
- Equation Label wrongly positioned in indented '-mm' (MM) display,
Damian McGuckin <=
Re: Equation Label wrongly positioned in indented '-mm' (MM) display, Dave Kemper, 2022/03/15