Ted: On Wed, Aug 01, 2007 at 11:00:10PM +0100, Ted Harding wrote: > Hi Folks, > > I'm trying to overcome an eqn "phenomenon" -- in some ways a > "feature", in others a "bug". > > What I'm referring to can be seen if you set the following > in Times, using a fairly large point size (say 15) (I'm using > ms macros here): > > .nr DD 0 > .EQ I > 21 ~~=~~ 3 times 7 > .EN > .EQ I > 22 ~~=~~ 2 times 11 > .EN > > You wil see that the "=" signs do not line up. > > It seems that eqn uses the glyph-width of the digits in computing > the layout, as opposed to the normal metrics. In TR, digits have > fixed width, so, while one would expect the "=" signs in the above > to line up, they don't -- since the "1" glyph is narrower than the > "2" glyph, and eqn therefore packs it closer to the "2". > > I reckon this is an instance of "bug" behaviour, since it can spoil > the layout of a stack of equations. > > It is possible to overcome this by using constructs like > > .EQ I > 2{roman "1"} ~~=~~ 3 times 7 > .EN > .EQ I > 22 ~~=~~ 2 times 11 > .EN > > but that is very clumsy (you have to use the "roman" attribute, > since otherise the "1" comes out italic). > > I've been looking for a simpler way to turn this off. None of the > "customisation" variables listed for eqn seems to have anything > to do with this. > > One can of course also handle it by writing the equations as a > matrix, like: > > .EQ I > set column_sep 40 > matrix { > lcol { 21 above 22 } > lcol { = above = } > lcol {{3 times 7} above {2 times 11}} > } > .EN > > but (a) this too is very complicated, (b) the spacing between > "2" and "1" in "21" is still too narrow (just doesn't look right). > > I should add that the above is just a simple example, for illustration. > In real life, I hit this problem with long equations which have > several subscripts or superscripts, e.g.: > > .nr DD 0 > .EQ I > define Exp %{ type "operator" roman "E" ^ }% > > {partial b sub 1} over {partial theta sub 1} > Exp ( tau sub 1 ( y ) ) ~+~ > {partial b sub 2} over {partial theta sub 1} > Exp ( tau sub 2 ( y ) ) ~+~ > {partial c} over {partial theta sub 1} ~~=~~0 > .EN > .EQ I > {partial b sub 1} over {partial theta sub 2} > Exp ( tau sub 1 ( y ) ) ~+~ > {partial b sub 2} over {partial theta sub 2} > Exp ( tau sub 2 ( y ) ) ~+~ > {partial c} over {partial theta sub 2} ~~=~~0 > .EN > > which gets noticeably out of line as a result of this effect, > and would be impossibly cumbersome to correct using "local" > modifications like the above. So I'd just like to turn it off! > > Anyone know something I don't know? Or is one stuck with it? > > With thanks, > Ted.
I'm a little late getting to this list, and you probably have an acceptable solution, but here's mine anyway. Use 'mark' and 'lineup' as per: .NH Ted's Lineup Problem .LP .nr DD 0 .EQ I 21 ~~=~~ 3 times 7 .EN .EQ I 22 ~~=~~ 2 times 11 .EN .NH Solution - Use 'mark' and 'lineup' .LP .nr DD 0 .EQ I 21 ~~ mark =~~ 3 times 7 .EN .EQ I 22 ~~ lineup =~~ 2 times 11 .EN The equal signs line up properly this way. Dean -- Dean Provins, P. Geoph. 50.95033N, 114.03791E [EMAIL PROTECTED] [EMAIL PROTECTED] KeyID at at pgpkeys.mit.edu:11371: 0x9643AE65 Fingerprint: 9B79 75FB 5C2B 22D0 6C8C 5A87 D579 9BE5 9643 AE65