On 1/27/07, Rob McDonald <[EMAIL PROTECTED]> wrote:
> On 1/27/07, Lars Clausen <[EMAIL PROTECTED]> wrote:
> > On Fri, 2007-01-26 at 07:51 -0800, Rob McDonald wrote:
> > > In MetaPost, LaTeX renders the text, and I don't think MP ever 'knows'
> > > or 'controls' the text width. The text width is a fallout from the
> > > font size and the string.
> >
> > Can't we tell the LaTeX part to scale it to a certain width?
> >
>
> I'll see what I can do. I think I can come up with another MetaPost
> macro to scale any object to a desired width. However, I don't think
> that is a great idea.
>
Here is the MetaPost to handle what you're after. I still don't think
it is the right thing to do in 99% of all situations.
% Define macro to scale to a desired width.
primarydef P scaledw W =
P scaled (W/(xpart (lrcorner P - llcorner P)))
enddef;
draw btex {\usefont{OT1}{cmr}{m}{n} $c^2=a^2+b^2$} etex scaled 1.0
shifted (11.00000x,4.650000y);
draw btex {\usefont{OT1}{cmr}{m}{n} Mary had a little lamb.} etex
scaled 1.0 shifted (11.00000x,5.000000y);
draw btex {\usefont{OT1}{cmr}{m}{n} $c^2=a^2+b^2$} etex scaledw 4.0cm
shifted (11.00000x,7.650000y);
draw btex {\usefont{OT1}{cmr}{m}{n} Mary had a little lamb.} etex
scaledw 4.0cm shifted (11.00000x,8.000000y);
_______________________________________________
Dia-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://www.gnome.org/projects/dia/faq.html
Main page at http://www.gnome.org/projects/dia