On Sunday 20 August 2006 10:25 am, Edin Salković wrote:
> Here are the reasons for rewriting mathtext2 that I can come up with:
>
>  * One of the reasons I started the complete rewrite of the parser is that
> I'm a newbie at parsing, and I wanted to try it out a bit. I didn't
> understand why was it so difficult to parse TeX (or anything a little bit
> complicated for that matter). Well, now I know ;)
>
>  * The other reason was that I didn't understand fully the current parsing
> code, or more precisely, the part when what's interpreted get's rendered.
> And I'm not talking about glyphs, but about the complex constructs
> (scripts, frac's etc.)
>
>  * The third reason was that I can now try out in pararel the new and the
> old code. Also, because I'm not touching the PS and SVG backends for now we
> can have the following code in the current mathtext:
>
> if rcParams[some_parameter]:
>    from matplotlib.mathtext2 import math_parse_s_ft2font
> else:
>    math_parse_s_ft2font = math_parse_s_ft2font_common('BMP')
> math_parse_s_ft2font_svg = math_parse_s_ft2font_common('SVG')
> math_parse_s_ps = math_parse_s_ft2font_common('PS')
> math_parse_s_pdf = math_parse_s_ft2font_common('PDF')
>
> Also, I thought that the author of the current code base did some design
> mistakes at the begining. And, being a developer newbie, it's a lot easier
> to start things from scratch, than make fixes to old stuff you don't
> understand well.

Just a general comment. Eric Raymond observed in The Cathedral and the Bazaar 
that "Good programmers know what to write. Great ones know what to rewrite 
(and reuse)." In the future, I suggest you consider that it may be in your 
own long term interest to try to understand and extend existing code instead 
of rewriting it from scratch. You'll learn quickly by being exposed to other 
people's ideas and techniques, and you will get faster results since you 
won't be reinventing the wheel.

> As for the mathtext_demo.py part, even real TeX can't handle it :). 

If TeX isn't yielding the result you expect, then you were expecting the wrong 
result.

> The point is that, i.e. \cal sets the current fontface to "cal", and the 
> change is propagated till the end of the current scope (or untill it hits 
> \rm, for example). Old mathtext applies it only to the first item after the 
> command. 

What does this have to do with real TeX? Maybe you could post an example. It 
is possibly just an mpl bug that needs to be addressed.

Darren

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to