|
From: Matt N. <new...@ca...> - 2004-10-03 20:04:53
|
Hi Dominique,
> > > title(r'$\Delta_i^j \hspace{0.4} \rm{versus} \hspace{0.4}
> > > \Delta_{i+1}^j$', fontsize=20)
> > >
> > > becomes
> > >
> > > title(r'$\Delta_i^j \hspace{0.4} \rm{versus some} \hspace{0.4}
> > > \Delta_{i+1}^j$', fontsize=20)
> > >
> > > the space between 'versus' and 'some' is not rendered on my machine.
> >
> > That's the normal behavior of TeX math-mode. I believe you want:
> >
> > \rm{versus \ some}
>
> Certainly, my example was giving the expected result (i.e. with
> spacing) in older versions of matplotlib. If the argument of
> \rm{} were to be interpreted as math mode, it would appear as an
> equation where the variables v, e, r, s, u, s, s, o, m and e are
> multiplied together. It doesn't.
Hmm.... For me, mathtext renders your expression as latex does
(except that with latex \hspace needs units and the resulting
\Delta looks a bit less slanted). The result does appear to
include the product of variables v,e,r,s,u,s,s,o,m, and e. The
variables are set in a roman font, but are still in math mode.
I can't tell if you're getting or *expecting* different results
from what latex gives. All I can say is that mathtext seems to
behave correctly (ie, closing emulating latex) for me. I would've
sworn this was the behavior of recent versions of mathtext, but
perhaps it has not always been this way.
IMHO, I think the decision to closely emulate TeX for math
typesetting was billiant, and that the implementation is amazing.
--Matt
|