Re: Metapost - text alignment



You can't expect to get correct positioning for anything but "plain
text".  If you want to do formatting, you're on your own until there's
TeX integration.  It's better that we do one thing right than both
things wrong.

I couldn't agree more.  And that is why I think we should use 'draw'
instead of 'label'.

DIA can approximate the text width.  This approximation will be very
good for plain-ish text.  It will be lousy for very complicated
formulas.  You can use this approximation with the 'draw' command to
place text.  It will be correctly aligned vertically, and
approximately horizontally (essentially correct for simple cases).

On the other hand, you can use 'label.xxx'.  This text will always be
aligned correctly horizontally (no matter how complex), but never
aligned correctly vertically.

I would rather get the common cases right ('draw') than get all the
cases wrong ('label').

In my opinion, for really complex LaTeX strings, the user can simply
use the lower left corner of the string and position it manually (and
iteratively).  They are going to have lots of challenges (Like sizing
a box to put the string in), and it is very different from the
'normal' DIA usage.  I don't think it is worth an extreme of work
until someone integrates DIA with a LaTeX renderer, at which point,
all these problems have new solutions.  (and they have to be solved
for a lot more than the MetaPost format)

I may be misunderstanding part of Rob's e-mail, so he may have an
alternate approach which provides a slightly different compromise.  I
am satisfied that smart people understand the problem and will come up
with an acceptable solution.

Thanks for everyone's work and contributions,

               Rob



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