/usr/lib64/python2.6/site-packages/matplotlib
NameSizeModeActions
backends/-0755rm
delaunay/-0755rm
mpl-data/-0755rm
numerix/-0755rm
projections/-0755rm
sphinxext/-0755rm
afm.py150890644editdlrm
afm.pyc169590644editdlrm
afm.pyo169590644editdlrm
artist.py356230644editdlrm
artist.pyc403260644editdlrm
artist.pyo403260644editdlrm
axes.py2800890644editdlrm
axes.pyc2493960644editdlrm
axes.pyo2482840644editdlrm
axis.py573540644editdlrm
axis.pyc589730644editdlrm
axis.pyo586660644editdlrm
backend_bases.py723180644editdlrm
backend_bases.pyc779670644editdlrm
backend_bases.pyo778770644editdlrm
bezier.py149170644editdlrm
bezier.pyc135260644editdlrm
bezier.pyo135260644editdlrm
blocking_input.py136900644editdlrm
blocking_input.pyc143460644editdlrm
blocking_input.pyo140280644editdlrm
cbook.py427560644editdlrm
cbook.pyc567550644editdlrm
cbook.pyo565290644editdlrm
cm.py80980644editdlrm
cm.pyc97720644editdlrm
cm.pyo97720644editdlrm
collections.py407840644editdlrm
collections.pyc440060644editdlrm
collections.pyo440060644editdlrm
colorbar.py274560644editdlrm
colorbar.pyc254970644editdlrm
colorbar.pyo254970644editdlrm
colors.py391100644editdlrm
colors.pyc400790644editdlrm
colors.pyo400790644editdlrm
contour.py428950644editdlrm
contour.pyc360990644editdlrm
contour.pyo359370644editdlrm
dates.py360070755editdlrm
dates.pyc400170644editdlrm
dates.pyo399530644editdlrm
dviread.py320330644editdlrm
dviread.pyc346820644editdlrm
dviread.pyo345390644editdlrm
figure.py412640644editdlrm
figure.pyc429390644editdlrm
figure.pyo428080644editdlrm
finance.py205820644editdlrm
finance.pyc185190644editdlrm
finance.pyo183590644editdlrm
fontconfig_pattern.py64290644editdlrm
fontconfig_pattern.pyc65190644editdlrm
fontconfig_pattern.pyo65190644editdlrm
font_manager.py426530644editdlrm
font_manager.pyc404560644editdlrm
font_manager.pyo404560644editdlrm
ft2font.so3061680775editdlrm
hatch.py65640644editdlrm
hatch.pyc91200644editdlrm
hatch.pyo91200644editdlrm
image.py315400644editdlrm
image.pyc330420644editdlrm
image.pyo329960644editdlrm
legend.py323020644editdlrm
legend.pyc235510644editdlrm
legend.pyo233780644editdlrm
lines.py546850644editdlrm
lines.pyc564310644editdlrm
lines.pyo563260644editdlrm
mathtext.py1020090644editdlrm
mathtext.pyc1030670644editdlrm
mathtext.pyo1026790644editdlrm
mlab.py942940644editdlrm
mlab.pyc1000040644editdlrm
mlab.pyo998240644editdlrm
mpl.py7850644editdlrm
mpl.pyc11760644editdlrm
mpl.pyo11760644editdlrm
nxutils.so95120775editdlrm
offsetbox.py298070644editdlrm
offsetbox.pyc338890644editdlrm
offsetbox.pyo338340644editdlrm
patches.py1284850644editdlrm
patches.pyc1301480644editdlrm
patches.pyo1300100644editdlrm
path.py217650644editdlrm
path.pyc211740644editdlrm
path.pyo209540644editdlrm
pylab.py109810644editdlrm
pylab.pyc123990644editdlrm
pylab.pyo123990644editdlrm
pyparsing.py1439240644editdlrm
pyparsing.pyc1467370644editdlrm
pyparsing.pyo1467370644editdlrm
pyplot.py824680644editdlrm
pyplot.pyc802790644editdlrm
pyplot.pyo802790644editdlrm
quiver.py375400644editdlrm
quiver.pyc337880644editdlrm
quiver.pyo337880644editdlrm
rcsetup.py234340644editdlrm
rcsetup.pyc211190644editdlrm
rcsetup.pyo209490644editdlrm
scale.py142330644editdlrm
scale.pyc194740644editdlrm
scale.pyo194740644editdlrm
spines.py126840644editdlrm
spines.pyc116360644editdlrm
spines.pyo112090644editdlrm
table.py168280644editdlrm
table.pyc169310644editdlrm
table.pyo167800644editdlrm
texmanager.py224640644editdlrm
texmanager.pyc199620644editdlrm
texmanager.pyo199620644editdlrm
text.py598220644editdlrm
text.pyc592400644editdlrm
text.pyo592400644editdlrm
ticker.py404280644editdlrm
ticker.pyc504610644editdlrm
ticker.pyo503250644editdlrm
tight_bbox.py36550644editdlrm
tight_bbox.pyc40660644editdlrm
tight_bbox.pyo40660644editdlrm
transforms.py753870644editdlrm
transforms.pyc896110644editdlrm
transforms.pyo887020644editdlrm
ttconv.so653600775editdlrm
type1font.py115370644editdlrm
type1font.pyc112560644editdlrm
type1font.pyo112560644editdlrm
units.py49760644editdlrm
units.pyc57750644editdlrm
units.pyo57750644editdlrm
widgets.py408330644editdlrm
widgets.pyc425680644editdlrm
widgets.pyo423820644editdlrm
windowing.py4540644editdlrm
windowing.pyc12830644editdlrm
windowing.pyo12830644editdlrm
_cm.py3704140644editdlrm
_cm.pyc1030420644editdlrm
_cm.pyo1030420644editdlrm
_cntr.so211840775editdlrm
_delaunay.so611200775editdlrm
_image.so2822480775editdlrm
_mathtext_data.py579900644editdlrm
_mathtext_data.pyc637870644editdlrm
_mathtext_data.pyo637870644editdlrm
_path.so2799920775editdlrm
_png.so1564720775editdlrm
_pylab_helpers.py27150644editdlrm
_pylab_helpers.pyc37080644editdlrm
_pylab_helpers.pyo37080644editdlrm
__init__.py289720644editdlrm
__init__.pyc289800644editdlrm
__init__.pyo289260644editdlrm
Edit: /usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyc (103067B)
Jc@ sdZddklZddkZddklZddklZyeWn#e j oddk l ZnXddk Z ddk lZddklZlZddkZdd klZlZlZlZlZlZlZlZlZlZlZlZl Z l!Z!l"Z"l#Z#l$Z$e$i%dd k&l'Z'dd k(l)Z)l*Z*l+Z+l,Z,dd k-l.Z.l/Z/l0Z0l1Z1l2Z2dd k3l4Z4l5Z5ddk6l7Z7l8Z8l9Z9l:Z:l;Z;ddk<l=Z=l>Z>ddk?i@ZAddkBiCZCdZDdeEfdYZFdeFfdYZGdeFfdYZHdZIdeHfdYZJdZKdeFfdYZLdeFfdYZMdeFfd YZNd!eFfd"YZOd#eEfd$YZPd%ePfd&YZQd'eQfd(YZRd)eQfd*YZSd+eSfd,YZTd-eTfd.YZUd/ePfd0YZVd1ZWd2eWZXd3ZYd4ZZd5Z[d6Z\d7Z]d8Z^d9e_fd:YZ`d;eEfd<YZad=eafd>YZbd?ebfd@YZcdAebfdBYZddCeafdDYZedEeefdFYZfdGebfdHYZgdIegfdJYZhdKegfdLYZidMebfdNYZjdOejfdPYZkdQejfdRYZldSeafdTYZmdUeEfdVYZnhend7d2dWd7dXdY6end7d2dZd7dXd[6end7d2d\d7dXd]6end7d7dXd2dWd^6end7d7dXd2dZd_6end7d7dXd2d\d`6end7d7dXd7dXda6end7d2dWdbdWdc6en_oddemfdeYZpdfemfdgYZqdhemfdiYZrdjemfdkYZsdlemfdmYZtdnemfdoYZudpemfdqYZvdrehfdsYZwdtehfduYZxdveafdwYZydxehfdyYZzdzehfd{YZ{d|ehfd}YZ|d~eEfdYZ}e}Z~dZdeEfdYZdeEfdYZdS(s :mod:`~matplotlib.mathtext` is a module for parsing a subset of the TeX math syntax and drawing them to a matplotlib backend. For a tutorial of its usage see :ref:`mathtext-tutorial`. This document is primarily concerned with implementation details. The module uses pyparsing_ to parse the TeX expression. .. _pyparsing: http://pyparsing.wikispaces.com/ The Bakoma distribution of the TeX Computer Modern fonts, and STIX fonts are supported. There is experimental support for using arbitrary fonts, but results may vary without proper tweaking and metrics for those fonts. If you find TeX expressions that don't parse or render properly, please email mdroe@stsci.edu, but please check KNOWN ISSUES below first. i(tdivisionN(tStringIO(tceil(tSet(twarn(tinftisinf(tCombinetGrouptOptionaltForwardtLiteralt OneOrMoret ZeroOrMoretParseExceptiontEmptyt ParseResultstSuppresstoneOft StringEndtParseFatalExceptiont FollowedBytRegext ParserElement(tAFM(tBunchtget_realpath_and_stattis_string_liketmaxdict(tFT2FonttFT2ImagetKERNING_DEFAULTtLOAD_FORCE_AUTOHINTtLOAD_NO_HINTING(tfindfonttFontProperties(tlatex_to_bakomatlatex_to_standardttex2unit latex_to_cmextstix_virtual_fonts(t get_data_pathtrcParamsc C s{|djodSyt|SWntj onXyt|idSWn)tj odt}t|nXdS(sget_unicode_index(symbol) -> integer Return the integer index (from the Unicode table) of symbol. *symbol* can be a single unicode character, a TeX command (i.e. r'\pi'), or a Type1 symbol name (i.e. 'phi'). t-i"s\sA'%(symbol)s' is not a valid Unicode character or TeX/Type1 symbolN(tordt TypeErrorR&tstriptKeyErrortlocalst ValueError(tsymboltmessage((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytget_unicode_index<s  tMathtextBackendcB sDeZdZdZdZdZdZdZdZRS(s The base class for the mathtext backend-specific code. The purpose of :class:`MathtextBackend` subclasses is to interface between mathtext and a specific matplotlib graphics backend. Subclasses need to override the following: - :meth:`render_glyph` - :meth:`render_filled_rect` - :meth:`get_results` And optionally, if you need to use a Freetype hinting style: - :meth:`get_hinting_type` cC s d|_dS(N(tNonet fonts_object(tself((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt__init__fscC s||_||_||_dS(sDimension the drawing canvasN(twidththeighttdepth(R8twthtd((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytset_canvas_sizeis  cC s tdS(s_ Draw a glyph described by *info* to the reference point (*ox*, *oy*). N(tNotImplementedError(R8toxtoytinfo((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt render_glyphoscC s tdS(sR Draw a filled black rectangle from (*x1*, *y1*) to (*x2*, *y2*). N(RA(R8tx1ty1tx2ty2((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytrender_filled_rectvscC s tdS(sp Return a backend-specific tuple to return to the backend after all processing is done. N(RA(R8tbox((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt get_results|scC stS(s\ Get the Freetype hinting type to use with this particular backend. (R!(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytget_hinting_types( t__name__t __module__t__doc__R9R@RERJRLRM(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR5Vs     tMathtextBackendBboxcB sMeZdZdZdZdZdZdZdZdZ RS(so A backend whose only purpose is to get a precise bounding box. Only required for the Agg backend. cC s/ti|ddddg|_||_dS(Ni(R5R9tbboxt real_backend(R8RS((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s cC sYt|id|t|id|t|id|t|id|g|_dS(Niiii(tminRRtmax(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt _update_bboxscC sB|i||ii||ii||ii||iidS(N(RVtmetricstxmintymaxtxmaxtymin(R8RBRCRD((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyREs  cC s|i||||dS(N(RV(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytrender_rect_filledscC s|i}|i}tdd||i}|dd|dd|dd|ddg}|i|ii|d|d|d|d||d|d|t|d |d ||ii|S(Niiii(R;R<tshipRRt_switch_to_real_backendR7R@RL(R8RKt orig_heightt orig_depthRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLs   2  cC s |iiS(N(RSRM(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRMscC sH|i|i_|i|i_|id|i_|id|i_dS(Nii(RSR7tmathtext_backendRRRBRC(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR^s( RNRORPR9RVRER\RLRMR^(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRQs      tMathtextBackendAggRendercB sDeZdZdZdZdZdZdZdZRS(s Render glyphs and rectangles to an FTImage buffer, which is later transferred to the Agg image by the Agg backend. cC s,d|_d|_d|_ti|dS(Ni(RBRCR6timageR5R9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s   cC s<ti||||tt|t|||_dS(N(R5R@RRRc(R8R=R>R?((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR@scC s-|ii|i|||ii|idS(N(tfonttdraw_glyph_to_bitmapRcRWticebergtglyph(R8RBRCRD((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyREs cC stt||dd}|djo*||d}t||dd}n t|}|iit||t|||dS(Niig@(RUtintRctdraw_rect_filledR(R8RFRGRHRIR;tcenterty((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\s   cC s;|i|i|i|i|i|i|i|iifS(N(RBRCR:R;R<RcR7tget_used_characters(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLs cC stS(N(R (R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRMs( RNRORPR9R@RER\RLRM(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRbs    cC s ttS(N(RQRb(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytMathtextBackendAggstMathtextBackendBitmapRendercB seZdZRS(cC s|i|ifS(N(RcR<(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLs(RNRORL(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRnscC s ttS(sn A backend to generate standalone mathtext images. No additional matplotlib backend is required. (RQRn(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytMathtextBackendBitmapstMathtextBackendPscB s2eZdZdZdZdZdZRS(sX Store information to write a mathtext rendering to the PostScript backend. cC st|_d|_dS(N(RtpswriterR6tlastfont(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s cC s|i||i}|i}|i}|i}||f|ijo0dt}||f|_|ii|ndt}|ii|dS(Ns=/%(postscript_name)s findfont %(fontsize)s scalefont setfont s1%(ox)f %(oy)f moveto /%(symbol_name)s glyphshow ( R;toffsettpostscript_nametfontsizet symbol_nameRrR0Rqtwrite(R8RBRCRDRtRuRvtps((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyREs     cC s9d||i|||||f}|ii|dS(Ns%f %f %f %f rectfill (R;RqRw(R8RFRGRHRIRx((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\ s%cC sCtd|i ||i|i|i|i|i|iifS(Ni(R]R<R:R;RqR7Rl(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLs  (RNRORPR9RER\RL(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRps    tMathtextBackendPdfcB s2eZdZdZdZdZdZRS(sQ Store information to write a mathtext rendering to the PDF backend. cC sg|_g|_dS(N(tglyphstrects(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s cC sO|ii}|i||i}|ii||||i|i|ifdS(N( RdtfnameR;RsRztappendRutnumRv(R8RBRCRDtfilename((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRE#s   cC s/|ii||i|||||fdS(N(R{R}R;(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\*scC sItd|i ||i|i|i|i|i|i|iifS(Ni(R]R<R:R;RzR{R7Rl(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRL-s (RNRORPR9RER\RL(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRys    tMathtextBackendSvgcB s2eZdZdZdZdZdZRS(sQ Store information to write a mathtext rendering to the SVG backend. cC sg|_g|_dS(N(t svg_glyphst svg_rects(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9;s cC sR|i||i}t|i}|ii|i|i||||ifdS(N( R;RstunichrR~RR}RdRuRW(R8RBRCRDtthetext((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRE?s cC s3|ii||i|d||||fdS(Ni(RR}R;(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\Es cC s[td|i |td|id|i}|i|i|i|i||iifS(NiRR( R]R<RRRR:R;R7Rl(R8RKt svg_elements((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLIs  (RNRORPR9RER\RL(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR6s    tMathtextBackendCairocB s2eZdZdZdZdZdZRS(sS Store information to write a mathtext rendering to the Cairo backend. cC sg|_g|_dS(N(RzR{(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9Ys cC sL||i|i}t|i}|ii|i|i|||fdS(N(RsR;RR~RzR}RdRu(R8RBRCRDR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRE]s cC s/|ii|||i||||fdS(N(R{R}R;(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\cs cC s=td|i ||i|i|i|i|i|ifS(Ni(R]R<R:R;RzR{(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLgs  (RNRORPR9RER\RL(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRSs    tFontscB szeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d ZRS( s An abstract base class for a system of fonts to use for mathtext. The class must be able to take symbol keys and font file names and return the character metrics. It also delegates to a backend class to do the actual drawing. cC s+||_||_||i_h|_dS(sH *default_font_prop*: A :class:`~matplotlib.font_manager.FontProperties` object to use for the default non-math font, or the base font for Unicode (generic) font rendering. *mathtext_backend*: A subclass of :class:`MathTextBackend` used to delegate the actual rendering. N(tdefault_font_propRaR7tused_characters(R8RRa((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9xs   cC s d|_dS(sa Fix any cyclical references before the object is about to be destroyed. N(R6R(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytdestroysc C sdS(su Get the kerning distance for font between *sym1* and *sym2*. *fontX*: one of the TeX font names:: tt, it, rm, cal, sf, bf or default/regular (non-math) *fontclassX*: TODO *symX*: a symbol in raw TeX form. e.g. '1', 'x' or '\sigma' *fontsizeX*: the fontsize in points *dpi*: the current dots-per-inch g(( R8tfont1t fontclass1tsym1t fontsize1tfont2t fontclass2tsym2t fontsize2tdpi((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytget_kernscC s"|i|||||}|iS(s *font*: one of the TeX font names:: tt, it, rm, cal, sf, bf or default/regular (non-math) *font_class*: TODO *sym*: a symbol in raw TeX form. e.g. '1', 'x' or '\sigma' *fontsize*: font size in points *dpi*: current dots-per-inch Returns an object with the following attributes: - *advance*: The advance distance (in points) of the glyph. - *height*: The height of the glyph in points. - *width*: The width of the glyph in points. - *xmin*, *xmax*, *ymin*, *ymax* - the ink rectangle of the glyph - *iceberg* - the distance from the baseline to the top of the glyph. This corresponds to TeX's definition of "height". (t _get_infoRW(R8Rdt font_classtsymRuRRD((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt get_metricsscC sRt|t|t||_|_|_|ii|i|i|idS(s Set the size of the buffer used to render the math expression. Only really necessary for the bitmap backends. N(RR:R;R<RaR@(R8R=R>R?((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR@s/c C s|i|||||}t|ii\} } |ii| | tf} | di|i|i i |||dS(s Draw a glyph at - *ox*, *oy*: position - *facename*: One of the TeX face names - *font_class*: - *sym*: TeX symbol name or single character - *fontsize*: fontsize in points - *dpi*: The dpi to draw at. iN( RRRdR|Rt setdefaulttsettaddR~RaRE( R8RBRCtfacenameRRRuRRDtrealpathtstat_keyR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyREs  cC s|ii||||dS(sL Draw a filled rectangle from (*x1*, *y1*) to (*x2*, *y2*). N(RaR\(R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\scC s tdS(sF Get the xheight for the given *font* and *fontsize*. N(RA(R8RdRuR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt get_xheightscC s tdS(s Get the line thickness that matches the given font. Used as a base unit for drawing lines such as in a fraction or radical. N(RA(R8RdRuR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytget_underline_thicknessscC s|iS(s Get the set of characters that were used in the math expression. Used by backends that need to subset fonts so they know which glyphs to include. (R(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRlscC s|ii|S(s Get the data needed by the backend to render the math expression. The return value is backend-specific. (RaRL(R8RK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLscC s ||fgS(s Override if your font provides multiple sizes of the same symbol. Should return a list of symbols matching *sym* in various sizes. The expression renderer will select the most appropriate size for a given situation from this list. ((R8tfontnameR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt!get_sized_alternatives_for_symbols(RNRORPR9RRRR@RER\RRRlRLR(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRos           t TruetypeFontscB sieZdZdd dYZdZdZdZdZdZdZ d Z d Z RS( sa A generic base class for all font setups that use Truetype fonts (through FT2Font). t CachedFontcB seZdZdZRS(cC s[||_|i|_tg}|iiD]\}}|||fq/~|_dS(N(Rdt get_charmaptcharmaptdictt iteritemstglyphmap(R8Rdt_[1]tccodetglyphind((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s cC s t|iS(N(treprRd(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt__repr__s(RNROR9R(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs cC sjti|||h|_h|_t|}|itt|}||id<||idWdS(N(t StixFontst_stix_fallbackRR9Rt_fontmapRR"(R8targstkwargsRRtfullpath((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s    s \int \ointc C sid}||ijo|tjoxt|\}}|djp ||ij}y|i|} Wntj oq/X| ii|}| i|}nt |djo|dj}y|i|} Wntj oq/Xt |}| i i |} | dj o| ii| i |}q/n|djo|i i||||S| ||||fS(NRiR(R6RR$t_slanted_symbolsRt RuntimeErrorRdtget_glyph_nameRtlenR,RRRR( R8RRRRuRvRR~RRtgid((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs2      t(sssst)ssss!t{stnst}stost[sR>s"t]stis#stjss$s\lfloorstkss%s\rfloorstlss&s\lceilstmss's\rceilstDss*s\langlestEss+s\rangletptqtrtss \__sqrt__ss/ss-s \backslashss.ss,s^tbtcR?s\widehats~tetftgs \widetildets \leftparens ightparents \leftbraces ightbraces \leftbrackets ightbracketcC s|ii|||fgS(N(t_size_alternativesR(R8RR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs(RR(Rs(Rs(Rs(Rs(RR(Rs(Rs(Rs(Rs!(RR(Rs(Rsn(Rs(RR(RR(Rs(Rso(Rs(RR(RR(Rs(Rsh(Rs"(RR(Rs(Rsi(Rs#(Rs(Rsj(Rs(Rs$(Rs(Rsk(Rs(Rs%(Rs(Rsl(Rs(Rs&(Rs(Rsm(Rs(Rs'(Rs(RsD(Rs(Rs*(Rs(RsE(Rs(Rs+(Rsp(Rsq(Rsr(Rss(Rs(Rs/(Rs(Rs-(Rs/(Rs(Rs.(Rs(Rs,(Rs^(Rsb(Rsc(Rsd(Rs~(Rse(Rsf(Rsg(Rsh(RsD(Rsi(RsE(s \leftparenR(s ightparentR(s \leftbraceR(s ightbraceR(s \leftbracketR(s ightbracketR( RNRORPRR9RtsplitRRRtaliasttargetR(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRsr    "                            t UnicodeFontscB sJeZdZeZdZediZdZ dZ dZ RS(sa An abstract base class for handling Unicode fonts. While some reasonably complete Unicode fonts (such as DejaVu) may work in some situations, the only Unicode font I'm aware of with a complete set of math symbols is STIX. This class will "fallback" on the Bakoma fonts when a required symbol can not be found in the font. cO stdot|||_n d|_ti|||h|_x;diD]-}td|}t|}||i|ti||it9_|it9_|it9_dS(N(RORUR:t GROW_FACTORR;R<(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRUs cC sdS(N((R8RFRGRHRI((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRVs(RNRORPR9RTRURV(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRWs    tVboxcB seZdZdZRS(s. A box with only height (zero width). cC sti|d||dS(Ng(RWR9(R8R;R<((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR[stHboxcB seZdZdZRS(s8 A box with only width (zero height and depth). cC sti||dddS(Ng(RWR9(R8R:((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR\stCharcB sVeZdZdZdZdZdZdZdZdZ dZ RS( s# Represents a single character. Unlike TeX, the font information and metrics are stored with each :class:`Char` to make it easier to lookup the font metrics when needed. Note that TeX boxes have a width, height, and depth, unlike Type1 and Truetype which use a full bounding box and an advance in the x-direction. The metrics must be converted to the TeX way, and the advance (if different from width) must be converted into a :class:`Kern` node when the :class:`Char` is added to its parent :class:`Hlist`. cC sti|||_|i|_t|itttfpt |i|_|i |_ |i |_ |i |_ |i dS(N(ROR9Rt font_outputRRdRRFRhtAssertionErrorRRuRt_update_metrics(R8Rtstate((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s   #    cC s d|iS(Ns`%s`(R(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRQscC s|ii|i|i|i|i|i}|_|idjo|i|_ n |i |_ |i |_ |i |i  |_ dS(Nt ( R^RRdRRRuRt_metricsRR:RfR;R<(R8RW((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR`s +  cC s |iiS(N(RcR(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt is_slantedsc C sz|ii|i}d}t|toI|ii|i|i|i |i |i|i|i |i |i }n||S(s Return the amount of kerning between this and the given character. Called when characters are strung together into :class:`Hlist` to create :class:`Kern` nodes. g( RcRR:RR]R^RRdRRRuR(R8RSRtkern((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs cC s5|ii|||i|i|i|i|idS(s4 Render the character to the canvas N(R^RERdRRRuR(R8RRk((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRVs cC sati||itjo@|it9_|it9_|it9_|it9_ndS(N( RORTRPRXRuRYR:R;R<(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRTs  cC sMti||it9_|it9_|it9_|it9_dS(N(RORURuRZR:R;R<(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRU!s  ( RNRORPR9RQR`RdRRVRTRU(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR]s      tAccentcB s2eZdZdZdZdZdZRS(s The font metrics need to be dealt with differently for accents, since they are already offset correctly from the baseline in TrueType fonts. cC sg|ii|i|i|i|i|i}|_|i|i |_ |i |i |_ d|_dS(Ni(R^RRdRRRuRRcRZRXR:RYR[R;R<(R8RW((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR`.s  +cC sti||idS(N(R]RTR`(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRT5s cC sti||idS(N(R]RUR`(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRU9s cC sI|ii||ii||ii|i|i|i|i|i dS(s5 Render the character to the canvas. N( R^RERcRXR[RdRRRuR(R8RRk((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRV=s (RNRORPR`RTRURV(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRf(s    tListcB sDeZdZdZdZdZdZdZdZRS(s: A list of nodes (either horizontal or vertical). cC sGti|dddd|_||_d|_d|_d|_dS(Ngi(RWR9t shift_amounttchildrentglue_sett glue_signt glue_order(R8telements((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9Is     c C sYd|i|i|i|i|idig}|iD]}|t|q8~fS(Ns![%s <%.02f %.02f %.02f %.02f> %s]Rb(RQR:R;R<RhRCRiR(R8RR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRRs    cC sMd}x@tt|dddD]"}||djo |}Pq#q#W|S(s A helper function to determine the highest order of glue used by the members of this list. Used by vpack and hpack. iiig(R1R(R8ttotalsRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt_determine_orderYs cC s|i|}||_||_||djo||||_nd|_d|_|djo8t|io$td||ii |ft qndS(Ngis %s %s: %r( RoRlRkRjt glue_ratioRRiRRRRNR(R8RtsignRnt error_typeR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt _set_gluees     cC sax|iD]}|iq Wti||itjo"|it9_|it9_ndS(N(RiRTRWRPRXRhRYRj(R8tchild((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRTss  cC sMx|iD]}|iq Wti||it9_|it9_dS(N(RiRURWRhRZRj(R8Rt((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRU{s   ( RNRORPR9RRoRsRTRU(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRgEs   tHlistcB s8eZdZddedZdZdddZRS(s% A horizontal list of boxes. gt additionalcC s3ti|||o|in|idS(N(RgR9Rethpack(R8RmR=Rtdo_kern((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9scC sg}t|i}|oxt|D]}|i|}||djo|i|d}nd}|i||i|}|djot|}|i|q)q)W||_ndS(s) Insert :class:`Kern` nodes between :class:`Char` nodes to set kerning. The :class:`Char` nodes themselves determine the amount of kerning they need (in :meth:`~Char.get_kerning`), and this function just creates the linked list in the correct way. igN(RRiR1R6R}RtKern(R8t new_childrent num_childrenRtelemRStkerning_distanceRe((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRes     c C s/d}d}d}dgd}dgd}xR|iD]G}t|to5||i7}t||i}t||i}q6t|tou||i7}t|i oSt|i oBt |dd} t||i| }t||i| }q}q6t|t oF|i } || i7}|| i c| i 7<|| ic| i7R?Rt total_stretcht total_shrinkRRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRwsL     "            (RNRORPRR9ReRw(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRus &tVlistcB s5eZdZdddZddeedZRS(s# A vertical list of boxes. gRvcC sti|||idS(N(RgR9tvpack(R8RmR>R((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9sc C s1d}d}d}dgd}dgd}x,|iD]!} t| toZ||| i7}| i}t| ip,t| dd} t|| i| }qWq6t| t oV||7}d}| i } || i7}|| i c| i 7<|| i c| i7RRR=R?RRRRRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRsT                    (RNRORPR9tfloatRR(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstRulecB s eZdZdZdZRS(s A :class:`Rule` node stands for a solid black rectangle; it has *width*, *depth*, and *height* fields just as in an :class:`Hlist`. However, if any of these dimensions is inf, the actual value will be determined by running the rule up to the boundary of the innermost enclosing box. This is called a "running dimension." The width is never running in an :class:`Hlist`; the height and depth are never running in a :class:`Vlist`. cC s&ti|||||i|_dS(N(RWR9R^(R8R:R;R<Ra((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9EscC s%|ii||||||dS(N(R^R\(R8RRkR=R>((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRVIs(RNRORPR9RV(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR;s  tHrulecB seZdZdZRS(s8 Convenience class to create a horizontal rule. cC sL|ii|i|i|i}|d}}ti|t|||dS(Ng?(R^RRdRuRRR9R(R8Rat thicknessR;R<((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9Ps (RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRLstVrulecB seZdZdZRS(s6 Convenience class to create a vertical rule. cC s>|ii|i|i|i}ti||tt|dS(N(R^RRdRuRRR9R(R8RaR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9Zs (RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRVsRcB s,eZdZedZdZdZRS(s Most of the information in this object is stored in the underlying :class:`GlueSpec` class, which is shared between multiple glue objects. (This is a memory optimization which probably doesn't matter anymore, but it's easier to stick to what TeX does.) cC sti|d|_t|oti|}n't|to |}n td|o|i}n||_ dS(Ntnormals/glue_type must be a glue spec name or instance.( ROR9t glue_subtypeRtGlueSpectfactoryRt ArgumentErrortcopyR(R8t glue_typeRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9fs     cC s`ti||itjo?|iidjo(|ii|_|iit9_q\ndS(Ng(RORTRPRXRR:RRY(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRTss  cC sLti||iidjo(|ii|_|iit9_ndS(Ng(RORURR:RRZ(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRUzs (RNRORPRR9RTRU(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR_s RcB sDeZdZddddddZdZdZeeZRS(s See :class:`Glue`. gicC s1||_||_||_||_||_dS(N(R:RRRTR(R8R:RRRTR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s     cC s%t|i|i|i|i|iS(N(RR:RRRTR(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs cC s |i|S(N(t_types(tclsR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs(RNRORPR9RRt classmethod(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs   iitfilitfillitfillltneg_filtneg_fillt neg_fillltemptygtsstFilcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstFillcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstFilllcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstNegFilcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstNegFillcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstNegFilllcB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstSsGluecB seZdZRS(cC sti|ddS(NR(RR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNROR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRst HCenteredcB seZdZdZRS(ss A convenience class to create an :class:`Hlist` whose contents are centered within its enclosing box. cC s.ti|tg|tgdtdS(NRx(RuR9RR(R8Rm((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s#(RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRst VCenteredcB seZdZdZRS(sr A convenience class to create a :class:`Vlist` whose contents are centered within its enclosing box. cC s(ti|tg|tgdS(N(RR9R(R8Rm((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s(RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRsRycB s2eZdZdZdZdZdZRS(s A :class:`Kern` node has a width field to specify a (normally negative) amount of spacing. This spacing correction appears in horizontal lists between letters like A and V when the font designer said that it looks better to move them closer together or further apart. A kern node can also appear in a vertical list, when its *width* denotes additional spacing in the vertical direction. cC sti|||_dS(N(ROR9R:(R8R:((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s cC s d|iS(Nsk%.02f(R:(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRscC s4ti||itjo|it9_ndS(N(RORTRPRXR:RY(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRTs cC s ti||it9_dS(N(RORUR:RZ(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRUs (RNRORPR9RRTRU(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRys     tSubSuperClustercB seZdZdZRS(sR :class:`SubSuperCluster` is a sort of hack to get around that fact that this code do a two-pass parse like TeX. This lets us store enough information in the hlist itself, namely the nucleus, sub- and super-script, such that if another script follows that needs to be attached, it can be reconfigured on the fly. cC s/d|_d|_d|_ti|gdS(N(R6tnucleustsubtsuperRuR9(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s   (RNRORPR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstAutoHeightCharcB seZdZedZRS(sG :class:`AutoHeightChar` will create a character as close to the given height and depth as possible. When using a font with multiple height versions of some characters (such as the BaKoMa fonts), the correct glyph will be selected, otherwise this will always just return a scaled version of the glyph. c C s|ii|i|}|i}||}xH|D]@\}} ||_t| |} | i| i|joPq5q5W|| i| i} |i| 9_t| |} || i} ti || g| |_ dS(N( R^RRdRR]R;R<RuRuR9Rh( R8RR;R<RatalwaysR2t target_totalRRtchartfactortshift((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s        (RNRORPRR9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRst AutoWidthCharcB seZdZeedZRS(s: :class:`AutoWidthChar` will create a character as close to the given width as possible. When using a font with multiple width versions of some characters (such as the BaKoMa fonts), the correct glyph will be selected, otherwise this will always just return a scaled version of the glyph. c C s|ii|i|}|i}xA|D]9\}}||_|||} | i|joPq+q+W|| i} |i| 9_|||} ti|| g| i|_dS(N(R^RRdRR:RuRuR9( R8RR:RaRt char_classR2RRRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s      (RNRORPRR]R9(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRstShipcB s>eZdZdZdZeeZdZdZRS(s Once the boxes have been set up, this sends them to output. Since boxes can be inside of boxes inside of boxes, the main work of :class:`Ship` is done by two mutually recursive routines, :meth:`hlist_out` and :meth:`vlist_out`, which traverse the :class:`Hlist` nodes and :class:`Vlist` nodes inside of horizontal and vertical boxes. The global variables used in TeX to store state as it processes have become member variables here. cC sNd|_d|_d|_d|_||_||i|_|i|dS(Nig(tmax_pushtcur_stcur_vtcur_htoff_hR;toff_vt hlist_out(R8RBRCRK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt__call__9s     cC s(|djodS|djodS|S(NgegeA((tvalue((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytclampBs   cC sLd}d}|i}|i}|i}|i}|id7_t|i|i|_|i}x|iD]} t | t o:| i |i|i |i|i |i| i7_qjt | to|i| i7_qjt | tot| idjo|i| i7_q5|i} || i|_t | to|i| n|i| | | i|_||_qjt | to| i} | i} | i} t| o |i} nt| o |i} n| djoQ| djoDt| |_| i |i|i |i|i | | t|_n|i| 7_qjt | to| i}|i|} |djo|djoD|i|jo0||i7}t|t |i!|}qq|i"|jo0||i#7}t|t |i!|}qn| |7} |i| 7_qjqjW|id8_dS(Nigi($RlRkRRRRURRRiRR]RVRRR:RyRgRRhRuRt vlist_outRWR;R<RtbaselineRRRRtroundRRjRRT(R8RKtcur_gtcur_glueRlRkt base_linet left_edgeRRtedget rule_heightt rule_deptht rule_widthR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRJsn      $                   ' ' cC s3d}d}|i}|i}|id7_t|i|i|_|i}|i|i8_|i}|i}x|i D]} t | t o|i| i 7_q|t | t ot| i djo|i| i| i7_q|i| i7_|| i|_|i} |i | _ t | to|i| n|i| | | i|_||_q|t | to| i} | i} | i } t| o |i } n| | 7} | djoJ| djo=|i| 7_| i|i|i|i|i| | qq|t | to| i}|i |} |djo|djoD|i|jo0||i7}t|t|i|}qq|i |jo0||i!7}t|t|i|}qn| |7} |i| 7_q|t | t"ot#dq|q|W|id8_dS(Nigis1Internal mathtext error: Char node found in vlist($RlRkRRURRRR;RRiRRyR:RgRR<RhRuRRRWRRVRRRRRRRRRjRRTR]R(R8RKRRRlRkRttop_edgeRRtsave_vRRRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRsl                      ' ' (RNRORPRRt staticmethodRR(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR/s     ?c s)fd}t}|i||S(s. Helper class to raise parser errors. c std|dS(Ns (R(Rtlocttoks(tmsg(s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt raise_errors(RtsetParseAction(RRR((Rs9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytErrors  tParsercB seZdZediZediZediZeeBeBZediZ ediZ ediZ ediZ ediZ ed iZed iZed iZed iZd ZdZdZdefdYZdZdZdZdZdZdZdZhdd6dd6dd6dd 6d!d"6d#d$6dd%6Zd&Zd'Z d(Z!hd[d]d.fd/6Z#d0Z$hd1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6d;dC6d7dD6d9dE6d=dF6d?dG6d1dH6dIdJ6dKdL6Z%edMiZ&dNZ'dOZ(dPZ)dQZ*dRZ+dSZ,dTZ-dUZ.dVZ/dWZ0dXZ1dYZ2dZZ3RS(^s This is the pyparsing-based parser for math expressions. It actually parses full strings *containing* math expressions, in that raw text may also appear outside of pairs of ``$``. The grammar is based directly on that in TeX, though it cuts a few corners. s + * \pm \sqcap \rhd \mp \sqcup \unlhd \times \vee \unrhd \div \wedge \oplus \ast \setminus \ominus \star \wr \otimes \circ \diamond \oslash \bullet \bigtriangleup \odot \cdot \bigtriangledown \bigcirc \cap \triangleleft \dagger \cup \triangleright \ddagger \uplus \lhd \amalgsc = < > : \leq \geq \equiv \models \prec \succ \sim \perp \preceq \succeq \simeq \mid \ll \gg \asymp \parallel \subset \supset \approx \bowtie \subseteq \supseteq \cong \Join \sqsubset \sqsupset \neq \smile \sqsubseteq \sqsupseteq \doteq \frown \in \ni \propto \vdash \dashv \dotss \leftarrow \longleftarrow \uparrow \Leftarrow \Longleftarrow \Uparrow \rightarrow \longrightarrow \downarrow \Rightarrow \Longrightarrow \Downarrow \leftrightarrow \longleftrightarrow \updownarrow \Leftrightarrow \Longleftrightarrow \Updownarrow \mapsto \longmapsto \nearrow \hookleftarrow \hookrightarrow \searrow \leftharpoonup \rightharpoonup \swarrow \leftharpoondown \rightharpoondown \nwarrow \rightleftharpoons \leadstos, ; . ! \ldotp \cdotps} \sum \prod \coprod \bigcap \bigcup \bigsqcup \bigvee \bigwedge \bigodot \bigotimes \bigoplus \biguplus slim liminf limsup sup max mins \int \oints6rm cal it tt sf bf default bb frak circled scr regulars arccos csc ker min arcsin deg lg Pr arctan det lim sec arg dim liminf sin cos exp limsup sinh cosh gcd ln sup cot hom log tan coth inf max tanhsb | \| / \backslash \uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow .s( [ { < \lfloor \langle \lceils) ] } > \rfloor \rangle \rceilc" C sti|iid}t}ti|iid}tid}tid}ti|i}ti|iid|_td}t di }t di } t ||} | i|i | i } | i|it d } t|iit|i} tt|i}tt|i}tg}|iD]}|d |qt~}t| td d d ddddgi|iid}t d||| tdBi|iid}d}td|t| ttittdBi|ii}t| t|iii|i }t!t| | |i|i"id} t| |i|i#id}t!| t$||A| i|i%id}|t| |>|t| |>t!tt d||tdBi|i&id}t!tt dt tt d td!tt d"d#d|td$Bi|i(id%}||||BA| A|A|A|A>|||B|B|B>td&d'g}|t!t |t)|||B>tt|i*}tt|i+}tt|i,}|tt d(||Btd)Bt!|t)|Att d*||Btd)B>t)||Ai|i-id }| t d+} td,i|i.id-i}!|i|!t$t| t |t| td.B|!t/>|i0dS(/NRdtsubsupert placeabletsimpletfinishs[-+]?([0-9]+\.?[0-9]*|\.[0-9]+)RRs\tmaths\ s\/s\,s\;s\quads\qquads\!tspaces\hspacesExpected \hspace{n}t customspaceu€-🿿u8([a-zA-Z0-9 +\-*/<>=:,.;!'@()\[\]|%s])|(\\[%%${}\[\]_|])s [^a-zA-Z]taccenttfunctiontgroups\fracsExpected \frac{num}{den}tfracs\sqrtRs[0-9]+RRsExpected \sqrt{value}tsqrtt_t^s\leftsExpected a delimiters\rightt$s(?:(?:\\[$])|[^$])*tnon_mathsExpected end of math '$'(1R RRdtsetNametsubsuperscripttauto_sized_delimiterRt _expressionRR tsuppressR t start_groupRt end_groupRt _accent_maptkeystlistt _wide_accentst_function_namest _fontnamesRRRRRR&R2tleaveWhitespaceRt_char_over_charstchar_over_charsRRRR RRR6RR t _ambiDelimt _leftDelimt _rightDelimRRRtclear("R8Rdt latexfontRRRt autoDelimRtlbracetrbraceRRtbslashRRRRRt latex2efontRRt unicode_rangeR2tc_over_cRRRt subsuperopt ambiDelimt leftDelimt rightDelimRt math_delimR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9"s !   .          Y  Y  / cC sd|_d|_h|_dS(s1 Clear any state before parsing. N(R6t_exprt _state_stackt_em_width_cache(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs  cC s|i|dd||g|_y|ii|WnNtj oB}tdid|id|iddt |gnX|i S(s Parse expression *s* using the given *fonts_object* for output, at the given *fontsize* and *dpi*. Returns the parse tree of :class:`Node` instances. RRs tRbiR( tStateRRt parseStringRR1RCtlinetcolumnRR(R8RR7RuRterr((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytparses! R cB sAeZdZdZdZdZdZeeeZRS(s Stores the state of the parser. States are pushed and popped from a stack as necessary, and the "current" state is always at the top of the stack. cC s1||_||_||_||_||_dS(N(R^t_fontRRuR(R8R^RdRRuR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9s     cC s(ti|i|i|i|i|iS(N(RR R^RdRRuR(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs cC s|iS(N(R(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRscC s'|djo ||_n||_dS(NRRR(srmsitsbf(RR(R8R((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt _set_fonts  ( RNRORPR9RRRtpropertyRd(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR s     cC s |idS(s? Get the current :class:`State` of the parser. i(R(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt get_statescC s|iidS(s8 Pop a :class:`State` off of the stack. N(Rtpop(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt pop_state scC s |ii|iidS(sm Push a new :class:`State` onto the stack which is just a copy of the current state. N(RR}RR(R8((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyt push_state scC st||_|igS(N(RuR(R8RRR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR scC st|}|i|gS(N(RuR(R8RRRthlist((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR s  cC sv|didd}g}|D]}|t||iq!~}t|}|itd|i_|gS(Nis\$Rsmathtext.default(treplaceR]RRuRR*Rd(R8RRRRRtsymbolsR((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR s 0  cC s|i}|i|i|if}|ii|}|djoE|ii|it dd|i|i}|i }||i|R@RBRRRRRR9RRtobjectR RRRRRRRRRRR2R6RRRRRRRRRRdRARCRdRRRR(((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyRs                %          y " -tMathTextParsercB seZdZhed6ed6ed6ed6ed6e d6ed6Z he d6e d6e d 6ed 6Zd Zd dd ZdddZddddZddddZdddZRS(tbitmaptaggRxtpdftsvgtcairotmacosxtcmtstixtstixsanstcustomcC s"|i|_td|_dS(sI Create a MathTextParser for the given backend *output*. i2N(Rt_outputRt_cache(R8toutput((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR9 siHc C s|djo t}n||t|f}|ii|}|dj o|S|idjotdot|}nb|i|i}td}|i i|i } | dj o| ||}n t d|i } |i djot|i_ n|i i||| |} |i| i| i| i|i| }||i|<|i i|id|i_d|_|S(s Parse the given math expression *s* at the given *dpi*. If *prop* is provided, it is a :class:`~matplotlib.font_manager.FontProperties` object specifying the "default" font to use in the math expression, used for all non-math text. The results are cached, so multiple calls to :meth:`parse` with the same expression should be fast. Rxs ps.useafmsmathtext.fontsetsEmathtext.fontset must be either 'cm', 'stix', 'stixsans', or 'custom'N(R6R#thashRuRRtR*R5t_backend_mappingt_font_type_mappingRR1tget_size_in_pointst_parserRRRRR@R:R;R<RLRRRaR7( R8RRR tcacheKeyRR^tbackendtfontsett fontset_classRuRK((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pyR s6            ixicC s]|idjpttd|}|i|d|d|\}}|i}||fS(s *texstr* A valid mathtext string, eg r'IQ: $\sigma_i=15$' *dpi* The dots-per-inch to render the text *fontsize* The font size in points Returns a tuple (*array*, *depth*) - *array* is an NxM uint8 alpha ubyte mask array of rasterized tex. - depth is the offset of the baseline from the bottom of the image in pixels. RjRPRR (RtR_R#Rtas_array(R8ttexstrRRuR tftimageR<R((s9/usr/lib64/python2.6/site-packages/matplotlib/mathtext.pytto_mask s ! tblackc C s|i|d|d|\}}tii|\}}} ti|id|iddfdti} td|| dddddfs   p "(( 41(  )vsnl !N=oJ  !