The SoC deadline (for code) is tommorow (Aug 21st.), so I decided to commit
what I have done till now to the repository.
JDH is going on a vacation and will not be able to review it for at
least a week,
but I had to commit it before 21st. Aug - that's the SoC rules. Hopefully,
I'll be adding new stuff the next week (and after), but that doesn't
count as part of SoC anymore...
Since this is my first commit, can anyone please test it. I tested it
only on my windows box.
Anyone who wants to test the new mathtext2 has to add the following line(s)
to the matplotlibrc (mathtext2 is disabled by default):
mathtext2: True # Needed to enable the new mathtext
# Font lines, feel free to change or uncomment (BaKoMa is used by default)
mathtext.rm : FreeSerif.ttf
mathtext.it : FreeSerifItalic.ttf # Text italic
mathtext.tt : FreeMono.ttf # Typewriter (monospaced)
mathtext.mit : FreeSerifItalic.ttf # Math italic
mathtext.cal : FreeSansOblique.ttf # Caligraphic
mathtext.nonascii: FreeSerif.ttf # Used for \sum, \infty etc.
The FreeFont fonts (or any other for that matter) have to be downloaded and put
into the mpl-data dir. The default settingsuse the current bakoma
fonts, and they play pretty well with FreeSerif.ttf as the nonascii
so I recommend you just put the line
and comment out the rest (experiment a little with fonts).
Tonight I plan to add support for fractions. Beware that the only
supported backend for now is Agg.
mathtext2_demo.py is attached
mathtext2_demo.py (1.3 KB)