Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 424c79d

Browse files
committed
Update information about mathtext improvements.
svn path=/trunk/matplotlib/; revision=3618
1 parent c10b4bb commit 424c79d

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

API_CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
The mathtext font commands (\cal, \rm, \it, \tt) now behave as TeX
2+
does: they are in effect until the next font change command or the
3+
end of the grouping. Therefore uses of $\cal{R}$ should be
4+
changed to ${\cal R}$. Alternatively, you may use the new
5+
LaTeX-style font commands (\mathcal, \mathrm, \mathit, \mathtt)
6+
which do affect the following group, eg. $\mathcal{R}$.
7+
18
Text creation commands have a new default linespacing and
29
a new linespacing kwarg, which is a multiple of the maximum
310
vertical extent of a line of ordinary text. The default is

CHANGELOG

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model.
2+
3+
There is one (known) backward incompatible change. The
4+
font commands (\cal, \rm, \it, \tt) now behave as TeX does:
5+
they are in effect until the next font change command or
6+
the end of the grouping. Therefore uses of $\cal{R}$
7+
should be changed to ${\cal R}$. Alternatively, you may
8+
use the new LaTeX-style font commands (\mathcal, \mathrm,
9+
\mathit, \mathtt) which do affect the following group,
10+
eg. $\mathcal{R}$.
11+
12+
Other new features include:
13+
14+
- Math may be interspersed with non-math text. Any text
15+
with an even number of $'s (non-escaped) will be sent to
16+
the mathtext parser for layout.
17+
18+
- Sub/superscripts are less likely to accidentally overlap.
19+
20+
- Support for sub/superscripts in either order, eg. $x^i_j$
21+
and $x_j^i$ are equivalent.
22+
23+
- Double sub/superscripts (eg. $x_i_j$) are considered
24+
ambiguous and raise an exception. Use braces to disambiguate.
25+
26+
- $\frac{x}{y}$ can be used for displaying fractions
27+
28+
- $\left(\frac{x}{y}\right)$ may be used to create
29+
parentheses and other delimiters that automatically
30+
resize to the height of their contents.
31+
32+
- Spacing around operators etc. is now generally more like
33+
TeX.
34+
35+
- Added support (and fonts) for boldface (\bf) and
36+
sans-serif (\sf) symbols.
37+
38+
- Log-like function name shortcuts are supported. For
39+
example, $\sin(x)$ may be used instead of ${\rm sin}(x)$
40+
41+
- Limited use of kerning for the easy case (same font)
42+
43+
Behind the scenes, the pyparsing.py module used for doing
44+
the math parsing was updated to the latest stable version
45+
(1.4.6). A lot of duplicate code was refactored out of the
46+
Font classes.
47+
48+
- MGD
49+
150
2007-07-19 completed numpification of most trivial cases - NN
251

352
2007-07-19 converted non-numpy relicts troughout the code - NN

0 commit comments

Comments
 (0)