• File: mathtext.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyc
  • Date Modified: 07/22/2015 11:41 PM
  • File size: 107.39 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

)Uc@ s;dZddlmZddlZddlmZddlmZyeWn!e	k
rmddl
mZnXddlZddl
mZddlmZmZddlZdd	lmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$e$j%dd
l&m'Z'ddl(m)Z)m*Z*m+Z+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1m2Z2dd
l3m4Z4m5Z5ddl6m7Z7m8Z8m9Z9m:Z:m;Z;ddl<m=Z=m>Z>ddl?j@ZAddlBjCZCdZDdZEdeFfdYZGdeGfdYZHdeGfdYZIdZJdeIfdYZKdZLdeGfdYZMdeGfdYZNd eGfd!YZOd"eGfd#YZPd$eGfd%YZQd&eFfd'YZRd(eRfd)YZSd*eSfd+YZTd,eSfd-YZUd.eUfd/YZVd0eVfd1YZWd2eRfd3YZXd4ZYd5eYZZd6Z[d7Z\d8Z]d9Z^d:Z_d;Z`d<eafd=YZbd>eFfd?YZcd@ecfdAYZddBedfdCYZedDedfdEYZfdFecfdGYZgdHegfdIYZhdJedfdKYZidLeifdMYZjdNeifdOYZkdPedfdQYZldRelfdSYZmdTelfdUYZndVecfdWYZodXeFfdYYZpiepd:d5dZd:d[d\6epd:d5d]d:d[d^6epd:d5d_d:d[d`6epd:d:d[d5dZda6epd:d:d[d5d]db6epd:d:d[d5d_dc6epd:d:d[d:d[dd6epd:d5dZdedZdf6ep_qdgeofdhYZrdieofdjYZsdkeofdlYZtdmeofdnYZudoeofdpYZvdqeofdrYZwdseofdtYZxduejfdvYZydwejfdxYZzdyecfdzYZ{d{ejfd|YZ|d}ejfd~YZ}dejfdYZ~deFfdYZeZdZdeFfdYZdeFfdYZdS(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_pathtrcParamscC su|dkrdSyt|SWntk
r1nXyt|jdSWn'tk
rpdt}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((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_unicode_index<s


cC s-yt|SWntk
r(tdSXdS(sReturn the Unicode character corresponding to the index,
or the replacement character if this is a narrow build of Python
and the requested character is outside the BMP.iN(tunichrR1(tindex((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytunichr_safeUs
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((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt__init__nscC s||_||_||_dS(sDimension the drawing canvasN(twidththeighttdepth(R;twthtd((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytset_canvas_sizeqs		cC s
tdS(s_
        Draw a glyph described by *info* to the reference point (*ox*,
        *oy*).
        N(tNotImplementedError(R;toxtoytinfo((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytrender_glyphwscC s
tdS(sR
        Draw a filled black rectangle from (*x1*, *y1*) to (*x2*, *y2*).
        N(RD(R;tx1ty1tx2ty2((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytrender_filled_rect~scC s
tdS(sp
        Return a backend-specific tuple to return to the backend after
        all processing is done.
        N(RD(R;tbox((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_resultsscC stS(s\
        Get the Freetype hinting type to use with this particular
        backend.
        (R!(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_hinting_types(	t__name__t
__module__t__doc__R<RCRHRMRORP(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR8^s					tMathtextBackendBboxcB sMeZdZdZdZdZdZdZdZdZ	RS(so
    A backend whose only purpose is to get a precise bounding box.
    Only required for the Agg backend.
    cC s/tj|ddddg|_||_dS(Ni(R8R<tbboxtreal_backend(R;RV((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
cC sYt|jd|t|jd|t|jd|t|jd|g|_dS(Niiii(tminRUtmax(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_update_bboxscC sB|j||jj||jj||jj||jjdS(N(RYtmetricstxmintymaxtxmaxtymin(R;RERFRG((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHs

cC s|j||||dS(N(RY(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytrender_rect_filledscC s|j}|j}tdd||j}|dd|dd|dd|ddg}|j|jj|d|d|d|d||d|d|t|d|d||jj|S(Niiii(R>R?tshipRUt_switch_to_real_backendR:RCRO(R;RNtorig_heightt
orig_depthRU((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROs			2
	cC s
|jjS(N(RVRP(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRPscC sH|j|j_|j|j_|jd|j_|jd|j_dS(Nii(RVR:tmathtext_backendRURERF(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRas(
RQRRRSR<RYRHR_RORPRa(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRTs						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|_tj|dS(Ni(RERFR9timageR8R<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s			cC s<tj||||tt|t|||_dS(N(R8RCRRRf(R;R@RARB((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRCscC s-|jj|j|||jj|jdS(N(tfonttdraw_glyph_to_bitmapRfRZticebergtglyph(R;RERFRG((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHs	cC stt||dd}|dkrR||d}t||dd}nt|}|jjt||t|||dS(Niig@(RXtintRftdraw_rect_filledR(R;RIRJRKRLR>tcenterty((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_scC s;|j|j|j|j|j|j|j|jjfS(N(RERFR=R>R?RfR:tget_used_characters(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROs
cC stdrtStSdS(Nstext.hinting(R*R R!(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRPs
(	RQRRRSR<RCRHR_RORP(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRes							cC s
ttS(N(RTRe(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytMathtextBackendAggstMathtextBackendBitmapRendercB seZdZRS(cC s|j|jfS(N(RfR?(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROs(RQRRRO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRqscC s
ttS(sn
    A backend to generate standalone mathtext images.  No additional
    matplotlib backend is required.
    (RTRq(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytMathtextBackendBitmapstMathtextBackendPscB s2eZdZdZdZdZdZRS(sX
    Store information to write a mathtext rendering to the PostScript
    backend.
    cC st|_d|_dS(N(RtpswriterR9tlastfont(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<scC s|j||j}|j}|j}|j}||f|jkrsdt}||f|_|jj|ndt}|jj|dS(Ns=/%(postscript_name)s findfont
%(fontsize)s scalefont
setfont
s1%(ox)f %(oy)f moveto
/%(symbol_name)s glyphshow

(	R>toffsettpostscript_nametfontsizetsymbol_nameRuR0Rttwrite(R;RERFRGRwRxRytps((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHs			

cC s9d||j|||||f}|jj|dS(Ns%f %f %f %f rectfill
(R>RtRz(R;RIRJRKRLR{((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_s%cC sCtd|j||j|j|j|j|j|jjfS(Ni(R`R?R=R>RtR:Ro(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROs
(RQRRRSR<RHR_RO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRss
			tMathtextBackendPdfcB s2eZdZdZdZdZdZRS(sQ
    Store information to write a mathtext rendering to the PDF
    backend.
    cC sg|_g|_dS(N(tglyphstrects(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<*s	cC sO|jj}|j||j}|jj||||j|j|jfdS(N(	RgtfnameR>RvR}tappendRxtnumRy(R;RERFRGtfilename((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRH.s
	cC s/|jj||j|||||fdS(N(R~RR>(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_5scC sItd|j||j|j|j|j|j|j|jjfS(Ni(R`R?R=R>R}R~R:Ro(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRO8s
(RQRRRSR<RHR_RO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR|%s
			tMathtextBackendSvgcB s2eZdZdZdZdZdZRS(sQ
    Store information to write a mathtext rendering to the SVG
    backend.
    cC sg|_g|_dS(N(t
svg_glyphst	svg_rects(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<Fs	cC sR|j||j}t|j}|jj|j|j||||jfdS(N(	R>RvR7RRRRgRxRZ(R;RERFRGtthetext((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHJs	cC s3|jj||j|d||||fdS(Ni(RRR>(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_Qs	cC s[td|j|td|jd|j}|j|j|j|j||jjfS(NiRR(	R`R?RRRR=R>R:Ro(R;RNtsvg_elements((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROUs
(RQRRRSR<RHR_RO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRAs
			tMathtextBackendPathcB s2eZdZdZdZdZdZRS(sS
    Store information to write a mathtext rendering to the Cairo
    backend.
    cC sg|_g|_dS(N(R}R~(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<es	cC sL|j||j}t|j}|jj|j|j|||fdS(N(R>RvR7RR}RRgRx(R;RERFRGR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHis	cC s/|jj||j|||||fdS(N(R~RR>(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_os	cC s=td|j||j|j|j|j|j|jfS(Ni(R`R?R=R>R}R~(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROss
(RQRRRSR<RHR_RO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_s
			tMathtextBackendCairocB s2eZdZdZdZdZdZRS(sS
    Store information to write a mathtext rendering to the Cairo
    backend.
    cC sg|_g|_dS(N(R}R~(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s	cC sL||j|j}t|j}|jj|j|j|||fdS(N(RvR>R7RR}RRgRx(R;RERFRGR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHs	cC s/|jj|||j||||fdS(N(R~RR>(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_s	cC s=td|j||j|j|j|j|j|jfS(Ni(R`R?R=R>R}R~(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyROs
(RQRRRSR<RHR_RO(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR{s
			tFontscB szeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
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+||_||_||j_i|_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_propRdR:tused_characters(R;RRd((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
		cC s
d|_dS(sa
        Fix any cyclical references before the object is about
        to be destroyed.
        N(R9R(R;((sF/opt/alt/python27/lib64/python2.7/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((
R;tfont1t
fontclass1tsym1t	fontsize1tfont2t
fontclass2tsym2t	fontsize2tdpi((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_kernscC s"|j|||||}|jS(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_infoRZ(R;Rgt
font_classtsymRxRRG((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_metricsscC sRt|t|t||_|_|_|jj|j|j|jdS(s
        Set the size of the buffer used to render the math expression.
        Only really necessary for the bitmap backends.
        N(RR=R>R?RdRC(R;R@RARB((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRCs/cC s|j|||||}t|jj\}	}
|jj|
|	tf}|dj|j|j	j
|||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(RRRgRRt
setdefaulttsettaddRRdRH(R;RERFtfacenameRRRxRRGtrealpathtstat_keyR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRHs	cC s|jj||||dS(sL
        Draw a filled rectangle from (*x1*, *y1*) to (*x2*, *y2*).
        N(RdR_(R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_scC s
tdS(sF
        Get the xheight for the given *font* and *fontsize*.
        N(RD(R;RgRxR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_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(RD(R;RgRxR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytget_underline_thicknessscC s|jS(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(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRoscC s|jj|S(s
        Get the data needed by the backend to render the math
        expression.  The return value is backend-specific.
        (RdRO(R;RN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRO#scC 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.
        ((R;tfontnameR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt!get_sized_alternatives_for_symbol*s(RQRRRSR<RRRRCRHR_RRRoROR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs											t
TruetypeFontscB sieZdZdddYZdZdZdZdZdZdZ	d	Z
d
ZRS(sa
    A generic base class for all font setups that use Truetype fonts
    (through FT2Font).
    t
CachedFontcB seZdZdZRS(cC sS||_|j|_tg|jjD]\}}||f^q+|_dS(N(Rgtget_charmaptcharmaptdictt	iteritemstglyphmap(R;Rgtccodetglyphind((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<9s	cC s
t|jS(N(treprRg(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt__repr__?s(RQRRR<R(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR8s	cC sjtj|||i|_i|_t|}|jtt|}||jd<||jd<dS(Ntdefaulttregular(RR<tglyphdt_fontsR"RRtstr(R;RRdRtdefault_font((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<Bs		
cC sd|_tj|dS(N(R9RRR(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRLs	cC s||jkr|j|}n|}|jj|}|dkrtt|}|j|}||j|<||j|j<||j|jj<n|S(N(	tfontmapRtgetR9RRRRwtlower(R;Rgtbasenametcached_font((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	_get_fontPs
cC s1|jjdkr-|jddd|dSdS(NtCmex10gP@g@gp@gR@gg@(RgRwR>(R;RRjRxR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_get_offset_scC s|||||f}|jj|}|dk	r7|S|j||||\}}	}
}}|j}|j|||j|	d|jj}
g|
j	D]}|d^q\}}}}|j
||
||}td|
jdd|
j
dd|
jdd|d|d	||d
||d|
jd|d|	}td
|d|d|jd|d|
d|	d|
d|}|j|<|S(NtflagsgP@tadvanceg@R>R=R[R]R^R\RitslantedRgRxRwRZRyRRjRv(RRR9t
_get_glyphRgtset_sizet	load_charRdRPRURRtlinearHoriAdvanceR>R=thoriBearingYRw(R;RRRRxRtkeytbunchRRRyRRgRjtvalR[R^R]R\RvRZtresult((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRds@'	,




		cC s|j|}|jj|||jjd}|dkrf|j|tdd||}|jS|dd|d|d}|S(Ntpcltsmathtext.defaulttxtxHeightgP@g(@gY@(RRgRtget_sfnt_tableR9RR*Ri(R;RgRxRRRRZR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC sd||dS(Ng?g(@gR@g?((R;RgRxR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsc

C s||krt||krt|j|||||	}
|j|||||	}|
j}|j|
j|jtdStj||||||||||	
S(NgP@(RRgtget_kerningRRRR(
R;RRRRRRRRRtinfo1tinfo2Rg((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs	((RQRRRSRR<RRRRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR3s
	
				*		tBakomaFontscB seZdZidd6dd6dd6dd6d	d
6dd6d
d6ZdZedjZdZidkdldmdndogd6dpdqdrdsdtgd6dudvdwdxdygd6dzd{d|d}d~gd 6ddddgd$6ddddgd(6ddddgd06ddddgd56ddddgd:6ddddgd?6ddddgdD6ddddgdI6ddddgdN6ddddgdS6dddddgdP6ddddgd\6ddddgda6ddgdb6ddgdc6Z	x4ddddddgD]\Z
Ze	ee	e
<qWdjZRS(s
    Use the Bakoma TrueType fonts for rendering.

    Symbols are strewn about a number of font files, each of which has
    its own proprietary 8-bit encoding.
    tcmsy10tcaltcmr10trmtcmtt10ttttcmmi10tittcmb10tbftcmss10tsftcmex10texcO sxt|||_tj|||i|_xC|jjD]2\}}t|}||j|<||j|<q>WdS(N(t	StixFontst_stix_fallbackRR<Rt_fontmapRR"(R;targstkwargsRRtfullpath((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s	
s
\int \ointcC s[d}||jkr|tkrt|\}}|dkpI||jk}y|j|}	Wntk
rrq#X|	jj|}|	j|}nt	|dkr#|dk}y|j|}	Wntk
rq#Xt
|}|	jj|}
|
dk	r#|	jj|	j|}q#n|dkrH|j
j||||S|	||||fS(NRiR(R9RR$t_slanted_symbolsRtRuntimeErrorRgtget_glyph_nameRtlenR,RRRR(R;RRRRxRyRRRRtgid((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs2

		t(sssst)ssss!t{stnst}stost[sRAs"t]stis#stjss$s\lfloorstkss%s\rfloorstlss&s\lceilstmss's\rceilstDss*s\langlestEss+s\rangletptqtrtss	\__sqrt__ss/ss-s
\backslashss.ss,s^tbtcRBs\widehats~tetftgs
\widetildet<t>s
\leftparens
ightparents
\leftbraces

ightbraces\leftbrackets
ightbracketcC s|jj|||fgS(N(t_size_alternativesR(R;RR((sF/opt/alt/python27/lib64/python2.7/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(
RQRRRSRR<RtsplitRRRtaliasttargetR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsp

		"	
	
	
	
	
	








	
	
	

tUnicodeFontscB sJeZdZeZdZedjZdZ	dZ
dZRS(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 stdrt|||_n	d|_tj|||i|_x;djD]-}td|}t|}||j|<qQWt	d}t|}||jd<dS(Nsmathtext.fallback_to_cmscal rm tt it bf sfs	mathtext.RR(
R*Rtcm_fallbackR9RR<RRR"R#(R;RRttexfonttpropRg((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<)s
		s
\int \ointcC s
||fS(N((R;RRtuniindex((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_map_virtual_font;sc
	C st}|jr<tj|}|dk	r<d}t}q<n|syt|}t}Wqtk
rtd}t	d|j
ddtqXn|j|||\}}|}|r|dkr$|dkr$t
|}tj|dd	kstj|jd
r!d}q!q$n|dkp<||jk}	t}y|j|}
Wntk
rkqXy|
j|}t}Wqtk
rqXn|sj|jrt	dt|jj|d||S|dkrt|tr|jd|||St	d||j
dd|ftt	dtd}|}|j|}
d}|
j|}t}	n|
jj|}|
||||	fS(NRt?s"No TeX to unicode mapping for '%s'tasciitbackslashreplaceRiitLs
GREEK CAPITALRs0Substituting with a symbol from Computer Modern.Rs.Font '%s' does not have a glyph for '%s' [U%x]s!Substituting with a dummy symbol.i(sitsregular(tFalsetuse_cmexR'RR9tTrueR4R1R,RtencodetMathTextWarningRR5tunicodedatatcategorytnamet
startswithRRRRR/RRt
isinstanceRRgR(
R;RRRRxtfound_symbolRtnew_fontnamet	unistringRRt
glyphindexRy((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR>sp	





		

	cC s)|jr|jj||S||fgS(N(RR(R;RR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs		
(RQRRRSRRR<RRRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s
			FRcB seZdZidd6dd6dd6dd6d	d
6dd6dd
6dd6dd6dd6dd6dd6ZeZeZeZdZdZ	iZ
dZRS(sa
    A font handling class for the STIX fonts.

    In addition to what UnicodeFonts provides, this class:

    - supports "virtual fonts" which are complete alpha numeric
      character sets with different font styles at special Unicode
      code points, such as "Blackboard".

    - handles sized alternative characters for the STIXSizeX fonts.
    tSTIXGeneralRsSTIXGeneral:italicRsSTIXGeneral:weight=boldRtSTIXNonUnicodetnonunirmsSTIXNonUnicode:italictnonuniitsSTIXNonUnicode:weight=boldtnonunibfitSTIXSizeOneSymitSTIXSizeTwoSymitSTIXSizeThreeSymitSTIXSizeFourSymitSTIXSizeFiveSymicO sftj|||i|_xC|jjD]2\}}t|}||j|<||j|<q,WdS(N(RR<RRRR"(R;RRRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s	
c
C stj|}|jrC|dkrC|dkrCtd}t}nt}|dk	rLt|try|j|d}nd}t|}x_||kr||d}||}	||	dkr|}q||	dkrPq|d}qW||	dkr0||	dkr0||	d|	d}|	d}qL|sLd}t	d	}qLn|dkr}|dkr}|d
kr}d|}n||fS(NRRRRiiiismathtext.defaultRRiitnonuni(sregularsdefault(sitsrmsbf(
R(Rt_sansR9RRRRRR*(
R;RRRtmappingtdoing_sans_conversiontlothitmidtrange((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs:
	
	 

c	C s|jj|}|r|Sg}yt|}Wntk
rO||fgSXidtd6dtd6}|j||}x]tdD]O}|j|}|jj|}|dk	r|j	|t
|fqqW|dkr|d }n||j|<|S(Ni'Ri'Ris	\__sqrt__i(RRR4R1R,R3RRR9RR7(	R;RRtalternativesRtfix_upsRRR!((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs*

 

(RQRRRSRRRRR-R<RRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs(

		+t
StixSansFontscB seZdZeZRS(sd
    A font handling class for the STIX fonts (that uses sans-serif
    characters by default).
    (RQRRRSRR-(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR6stStandardPsFontscB seZdZejjeddZidd6dd6dd6d	d
6dd6d
d6dd6Z	dZ
dZdZdZ
dZdZRS(s
    Use the standard postscript fonts for rendering to backend_ps

    Unlike the other font classes, BakomaFont and UnicodeFont, this
    one requires the Ps backend.
    tfontstafmtpzcmi8aRtpncr8aRtpcrr8aRtpncri8aRtphvr8aRtpncb8aRtpsyrcC stj||ti|_i|_t|ddd|j}|dkrmtdddd|j}ntt	|d}||_
||jd<||jd<t|_dS(NtfontextR9t	directoryt	HelveticaRRR(
RR<RsRR8R"tbasepathR9RtfileRRRt(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s			

cC s||jkr|j|}n|}|jj|}|dkrtjj|j|d}tt	|d}||_
||j|<||j|j<n|S(Ns.afmR(RR8RR9tostpathtjoinRDRRERtget_fontname(R;RgRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR%s	
cC s||||f}|jj|}|dk	r4|S|dkrzt|dksqtjt|jdrzd}nt}|t	krt	|\}}	t
|	}
t}n>t|dkr|}
t|
}	t}nt
d|t|dk}|j|}|rZy|j|
}
WqZtk
rVt
d|j|ftt}qZXn|sd}
}t|
}	|j|
}
nd}d	|}g|j|
D]}||^q\}}}}td
|j|
|d|j|
|d|j|
|d
|d|d||d||d||d|	}td|d|d|jd|d|
d|	d|
d||j|<|j|S(s/load the cmfont, metrics and glyph with cachingRiRRs.No TeX to built-in Postscript mapping for '%s's2No glyph in standard Postscript font '%s' for '%s'RigMbP?RR=R>R[R]R^R\RiRRgRxRwRZRyRRjRvN(RRR9RRRtunicodeRRR%tchrRR,RRRt
get_name_charR/Rwt
get_bbox_charRtget_width_chartget_height_charRI(R;RRRRxRRttupRRRjRRgRyRvtscaleRR[R^R]R\RZ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR4sr			





/


	c

C s||kru||kru|j|||||	}
|j|||||	}|
j}|j|
j|jd|Stj||||||||||	
S(NgMbP?(RRgt
get_kern_distRjRR(
R;RRRRRRRRRRRRg((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs	cC s!|j|}|jd|S(NgMbP?(RR(R;RgRxRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC s!|j|}|jd|S(NgMbP?(RR(R;RgRxRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsN(RQRRRSRFRGRHR)RDR9RR<RRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR7s

			N		gffffff?g?ig?g333333?g?gg
ףp=
?RcB seZRS((RQRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstNodecB sMeZdZdZdZdZdZdZdZdZ	RS(s%
    A node in the TeX box model
    cC s
d|_dS(Ni(tsize(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<scC s
|jS(N(t__internal_repr__(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC s
|jjS(N(t	__class__RQ(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRUscC sdS(Ng((R;tnext((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC s|jd7_dS(s
        Shrinks one level smaller.  There are only three levels of
        sizes, after which things will no longer get smaller.
        iN(RT(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytshrinkscC s|jd8_dS(sb
        Grows one level larger.  There is no limit to how big
        something can get.
        iN(RT(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytgrowscC sdS(N((R;RRn((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytrenders(
RQRRRSR<RRURRXRYRZ(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRSs						tBoxcB s2eZdZdZdZdZdZRS(s7
    Represents any node with a physical location.
    cC s,tj|||_||_||_dS(N(RSR<R=R>R?(R;R=R>R?((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
		cC sPtj||jtkrL|jt9_|jt9_|jt9_ndS(N(RSRXRTtNUM_SIZE_LEVELSR=t
SHRINK_FACTORR>R?(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXs

cC s>tj||jt9_|jt9_|jt9_dS(N(RSRYR=tGROW_FACTORR>R?(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYs
cC sdS(N((R;RIRJRKRL((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRZs(RQRRRSR<RXRYRZ(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR[s
			tVboxcB seZdZdZRS(s.
    A box with only height (zero width).
    cC stj|d||dS(Ng(R[R<(R;R>R?((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_stHboxcB seZdZdZRS(s8
    A box with only width (zero height and depth).
    cC stj||dddS(Ng(R[R<(R;R=((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/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 stj|||_|j|_t|jtttfsCt	|j|_|j
|_
|j|_|j|_|j
dS(N(RSR<Rtfont_outputRRgRRJRktAssertionErrorRRxRt_update_metrics(R;Rtstate((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
	!cC sd|jS(Ns`%s`(R(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRU#scC s|jj|j|j|j|j|j}|_|jdkrR|j|_	n|j	|_	|j
|_|j
|j|_dS(Nt (
RbRRgRRRxRt_metricsRR=RiR>R?(R;RZ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRd&s	+cC s
|jjS(N(RgR(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt
is_slanted0sc
C sx|jj|j}d}t|trp|jj|j|j|j	|j
|j|j|j	|j
|j	}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(RgRR=RRaRbRRgRRRxR(R;RWRtkern((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR3s	cC s5|jj|||j|j|j|j|jdS(s4
        Render the character to the canvas
        N(RbRHRgRRRxR(R;RRn((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRZBs	cC s_tj||jtkr[|jt9_|jt9_|jt9_|jt9_ndS(N(	RSRXRTR\RxR]R=R>R?(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXJs
cC sMtj||jt9_|jt9_|jt9_|jt9_dS(N(RSRYRxR^R=R>R?(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYRs

(RQRRRSR<RURdRhRRZRXRY(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRas
	
		
				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|jj|j|j|j|j|j}|_|j|j	|_
|j|j|_
d|_dS(Ni(RbRRgRRRxRRgR]R[R=R\R^R>R?(R;RZ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRd_s
	+cC stj||jdS(N(RaRXRd(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXfs
cC stj||jdS(N(RaRYRd(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYjs
cC sI|jj||jj||jj|j|j|j|j|j	dS(s5
        Render the character to the canvas.
        N(
RbRHRgR[R^RgRRRxR(R;RRn((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRZns	(RQRRRSRdRXRYRZ(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRjYs
			tListcB sDeZdZdZdZdZdZdZdZRS(s:
    A list of nodes (either horizontal or vertical).
    cC sGtj|dddd|_||_d|_d|_d|_dS(Ngi(R[R<tshift_amounttchildrentglue_sett	glue_signt
glue_order(R;telements((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<zs				cC sQd|j|j|j|j|jdjg|jD]}t|^q4fS(Ns![%s <%.02f %.02f %.02f %.02f> %s]Rf(RUR=R>R?RlRHRmR(R;R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs
	cC sKd}x>tt|dddD] }||dkr#|}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(R3R(R;ttotalsRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_determine_orders#cC s|j|}||_||_||dkrE||||_nd|_d|_|dkrt|jrtd||jj	|ft
qndS(Ngis	%s %s: %r(RsRpRoRnt
glue_ratioRRmRRVRQR(R;RtsignRrt
error_typeR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	_set_glues				cC s_x|jD]}|jq
Wtj||jtkr[|jt9_|jt9_ndS(N(RmRXR[RTR\RlR]Rn(R;tchild((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXs
cC sMx|jD]}|jq
Wtj||jt9_|jt9_dS(N(RmRYR[RlR^Rn(R;Rx((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYs

(	RQRRRSR<RRsRwRXRY(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRkvs						tHlistcB s8eZdZddedZdZdddZRS(s%
    A horizontal list of boxes.
    gt
additionalcC s1tj|||r#|jn|jdS(N(RkR<Rithpack(R;RqR@Rtdo_kern((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
cC sg}t|j}|rxt|D]}|j|}||dkr_|j|d}nd}|j||j|}|dkr(t|}|j|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(RRmR3R9RRtKern(R;tnew_childrentnum_childrenRtelemRWtkerning_distanceRi((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRis

cC sd}d}d}dgd}dgd}xG|jD]<}t|tr||j7}t||j}t||j}q6t|tr||j7}t|jrrt|jrrt	|dd}	t||j|	}t||j|	}qrq6t|t
rS|j}
||
j7}||
jc|
j
7<||
jc|
j7<q6t|tr6||j7}q6q6W||_||_|dkr||7}n||_||}|dkrd|_d|_d|_dS|dkr|j|d|dn|j|d	|d
dS(s
        The main duty of :meth:`hpack` is to compute the dimensions of
        the resulting boxes, and to adjust the glue if one of those
        dimensions is pre-specified.  The computed sizes normally
        enclose all of the material inside the new box; but some items
        may stick out if negative glue is used, if the box is
        overfull, or if a ``\vbox`` includes other boxes that have
        been shifted left.

          - *w*: specifies a width

          - *m*: is either 'exactly' or 'additional'.

        Thus, ``hpack(w, 'exactly')`` produces a box whose width is
        exactly *w*, while ``hpack(w, 'additional')`` yields a box
        whose width is the natural width plus *w*.  The default values
        produce a box with the natural width.
        giRlRziNitOverfullit	Underfull(RmRRaR=RXR>R?R[RtgetattrtGluet	glue_spect
stretch_ordertstretchtshrink_orderRXR}RoRpRtRw(R;R@RRARBRt
total_stretchttotal_shrinkRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR{sJ



 	
		
	
			(RQRRRSRR<RiR{(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRys	&tVlistcB s5eZdZdddZddeedZRS(s#
    A vertical list of boxes.
    gRzcC stj|||jdS(N(RkR<tvpack(R;RqRAR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<&scC sd}d}d}dgd}dgd}x"|jD]}	t|	tr|||	j7}|	j}t|	jsMt|	dd}
t||	j|
}qMq6t|	t	r||7}d}|	j
}||j7}||jc|j7<||j
c|j7<q6t|	tr/|||	j7}d}q6t|	tr6tdq6q6W||_||kr|||7}||_n	||_|dkr||7}n||_||}|dkrd|_d|_d|_dS|dkr|j|d|d	n|j|d
|ddS(s6
        The main duty of :meth:`vpack` is to compute the dimensions of
        the resulting boxes, and to adjust the glue if one of those
        dimensions is pre-specified.

          - *h*: specifies a height
          - *m*: is either 'exactly' or 'additional'.
          - *l*: a maximum height

        Thus, ``vpack(h, 'exactly')`` produces a box whose height is
        exactly *h*, while ``vpack(h, 'additional')`` yields a box
        whose height is the natural height plus *h*.  The default
        values produce a box with the natural width.
        giRls2Internal mathtext error: Char node found in Vlist.RziNiRiR(RmRR[R>R?RR=RRXRRRRRRXR}RaRRoRpRtRw(R;RARRR@RBRRRRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR*sR

	
	
			
	
			(RQRRRSR<tfloatRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR"stRulecB 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&tj|||||j|_dS(N(R[R<Rb(R;R=R>R?Re((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<vscC s%|jj||||||dS(N(RbR_(R;RRnR@RA((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRZzs(RQRRRSR<RZ(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRls		tHrulecB seZdZddZRS(s8
    Convenience class to create a horizontal rule.
    cC s[|dkr0|jj|j|j|j}n|d}}tj|t|||dS(Ng?(	R9RbRRgRxRRR<R(R;Ret	thicknessR>R?((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
	N(RQRRRSR9R<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR}stVrulecB seZdZdZRS(s6
    Convenience class to create a vertical rule.
    cC s>|jj|j|j|j}tj||tt|dS(N(RbRRgRxRRR<R(R;ReR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s	(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsRcB 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 sztj|d|_t|r4tj|}n$t|trL|}ntd|rm|j}n||_	dS(Ntnormals/glue_type must be a glue spec name or instance.(
RSR<tglue_subtypeRtGlueSpectfactoryRt
ArgumentErrortcopyR(R;t	glue_typeRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
		cC s\tj||jtkrX|jjdkrX|jj|_|jjt9_qXndS(Ng(RSRXRTR\RR=RR](R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXs

cC sJtj||jjdkrF|jj|_|jjt9_ndS(Ng(RSRYRR=RR^(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYs
(RQRRRSRR<RXRY(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs
	RcB sDeZdZddddddZdZdZeeZRS(s
    See :class:`Glue`.
    gicC s1||_||_||_||_||_dS(N(R=RRRXR(R;R=RRRXR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s
				cC s%t|j|j|j|j|jS(N(RR=RRRXR(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC s|j|S(N(t_types(tclsR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs(RQRRRSR<RRtclassmethod(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs
		iitfilitfillitfillltneg_filtneg_fillt	neg_fillltemptygtsstFilcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstFillcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstFilllcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstNegFilcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstNegFillcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstNegFilllcB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRstSsGluecB seZdZRS(cC stj|ddS(NR(RR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRR<(((sF/opt/alt/python27/lib64/python2.7/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.tj|tg|tgdtdS(NR|(RyR<RR(R;Rq((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s#(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/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(tj|tg|tgdS(N(RR<R(R;Rq((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<s(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsR}cB 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 stj|||_dS(N(RSR<R=(R;R=((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<
s
cC sd|jS(Nsk%.02f(R=(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRscC s2tj||jtkr.|jt9_ndS(N(RSRXRTR\R=R](R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRXs
cC s tj||jt9_dS(N(RSRYR=R^(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRYs
(RQRRRSR<RRXRY(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR}s
				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|_tj|gdS(N(R9tnucleustsubtsuperRyR<(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<%s			(RQRRRSR<(((sF/opt/alt/python27/lib64/python2.7/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|jj|j|}|j}||}xF|D]>\}}	||_t|	|}
|
j|
j|kr5Pq5q5W||
j|
j}|j|9_t|	|}
||
j}tj	||
g||_
dS(N(RbRRgRRaR>R?RxRyR<Rl(
R;RR>R?RetalwaysR4ttarget_totalRRtchartfactortshift((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<3s	
	
(RQRRRSRR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR+st
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.
    cC s|jj|j|}|j}x?|D]7\}}||_|||}	|	j|kr+Pq+q+W||	j}
|j|
9_|||}	tj||	g|	j|_dS(N(RbRRgRR=RxRyR<(R;RR=ReRt
char_classR4RRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<Os		
(RQRRRSRRaR<(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRGstShipcB 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|_||_||j|_|j|dS(Nig(tmax_pushtcur_stcur_vtcur_htoff_hR>toff_vt	hlist_out(R;RERFRN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt__call__ks					cC s$|dkrdS|dkr dS|S(NgegeA((tvalue((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytclampts
cC s/d}d}|j}|j}|j}|j}|jd7_t|j|j|_|j}x|jD]}	t	|	t
r|	j|j|j|j|j
|j|	j7_qjt	|	tr|j|	j7_qjt	|	trvt|	jdkr|j|	j7_q|j}
||	j|_t	|	trM|j|	n
|j|	|
|	j|_||_qjt	|	tr=|	j}|	j}|	j}
t|r|j}nt|r|j}n|dkr+|
dkr+t||_|	j|j|j|j|j
|
|t|_n|j|
7_qjt	|	trj|	j}|j|}
|dkr|dkr|j|kr||j7}t|t |j!|}qq|j"|kr||j#7}t|t |j!|}qn|
|7}
|j|
7_qjqjW|jd8_dS(Nigi($RpRoRRRRXRRRmRRaRZRRR=R}RkRRlRyRt	vlist_outR[R>R?RtbaselineRRRRtroundRRnRRX(R;RNtcur_gtcur_glueRpRot	base_linet	left_edgeRRtedgetrule_heightt
rule_deptht
rule_widthR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR|sl					$	
			


	

%
%
cC sd}d}|j}|j}|jd7_t|j|j|_|j}|j|j8_|j}|j}x|j	D]}	t
|	tr|j|	j7_q|t
|	t
ret|	j	dkr|j|	j|	j7_q|j|	j7_||	j|_|j}
|j|	_t
|	tr<|j|	n
|j|	|
|	j|_||_q|t
|	tr|	j}|	j}|	j}
t|
r|j}
n||7}|dkr|dkr|j|7_|	j|j|j|j|j|
|qq|t
|	tr|	j}|j|}|dkr|dkr|j|kr||j7}t|t|j|}qq|j |kr||j!7}t|t|j|}qn||7}|j|7_q|t
|	t"r|t#dq|q|W|jd8_dS(Nigis1Internal mathtext error: Char node found in vlist($RpRoRRXRRRR>RRmRR}R=RkRR?RlRyRRR[RRZRRRRRRRRRnRRXRaR(R;RNRRRpRoRttop_edgeRRtsave_vRRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRsj						
			

	

%
%
(RQRRRSRRtstaticmethodRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRas					?c s)fd}t}|j||S(s.
    Helper class to raise parser errors.
    c std|dS(Ns
(R(Rtlocttoks(tmsg(sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytraise_errors(RtsetParseAction(RRR((RsF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytErrors	
tParsercB seZdZedjZedjZedjZeeBeBZedjZ	edjZ
edjZedjZedjZ
ed	jZed
jZedjZedjZd
ZdZdZdefdYZdZdZdZdZdZdZdZidd6dd6dd6dd 6d!d"6d#d$6dd%6Zd&Zd'Z d(Z!id`dbd.fd/6Z#d0Z$id1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6d;dC6d7dD6d9dE6d=dF6d?dG6d1dH6dIdJ6dKdL6Z%edMjZ&dNZ'dOZ(dPZ)dQZ*dRZ+dSZ,dTZ-dUZ.dVZ/dWZ0dXZ1dYZ2dZZ3d[Z4d\Z5d]Z6d^Z7d_Z8RS(cs
    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 sEtj|jjd}t}tj|jjd}tjd}tjd}tj|j}tj|jjd|_td}t	dj
}t	dj
}	t||}
|
j|j|	j
}|j|jt	d	}t|jjt|j}
tt|j}tt|j}tg|jD]}d
|^qp}t|tddd
ddddgj|jjd}t	d|||	tdBj|jjd}d}td|t|ttjttdBj|jj}t|t|jjj|j }t!t||
|j|j"jd}
t||j|j#jd}t!|
t$||A|j|j%jd}|t||>|t||>t!tt	d||tdBj|j&jd}t!tt	d||td Bj|j'jd!}t!tt	d"||td#Bj|j(jd$}tt|j)}tt|j*}tt|j+}tt|j+t,dg}t!tt	d%tt	dtt|j)|j*Bt,d&gBtt	dtt	dtt|j)|j+t,dgBt,d&d'gBtt	dtt	dtd(tt	d|||td)Bj|j-jd*}t!tt	d+ttt	d,td-tt	d.d/d|td0Bj|j/jd1} ||||BA|
A|A|A|A|A|A| A>|||B|B|B>td2d3g}!|t!t|t0|!||B>|tt	d4||Btd5Bt!t0||Att	d6||Btd5B>t0||Aj|j1jd
}"|t	d7}#td8j|j2jd9j}$|j|$t$t|#t|"t|#td:B|$t3>|j4dS(;NRgtsubsupert	placeabletsimpletfinishs[-+]?([0-9]+\.?[0-9]*|\.[0-9]+)RRs\tmaths\ s\/s\,s\;s\quads\qquads\!tspaces\hspacesExpected \hspace{n}tcustomspaceu€-🿿u8([a-zA-Z0-9 +\-*/<>=:,.;!'@()\[\]|%s])|(\\[%%${}\[\]_|])s	[^a-zA-Z]taccenttfunctiontgroups\fracsExpected \frac{num}{den}tfracs	\stackrelsExpected \stackrel{num}{den}tstackrels\binomsExpected \binom{num}{den}tbinoms\genfracts\}s[0-9]*(\.?[0-9]*)?s<Expected \genfrac{ldelim}{rdelim}{rulesize}{style}{num}{den}tgenfracs\sqrtRs[0-9]+RRsExpected \sqrt{value}tsqrtt_t^s\leftsExpected a delimiters\rightt$s(?:(?:\\[$])|[^$])*tnon_mathsExpected end of math '$'(5R
RRgtsetNametsubsuperscripttauto_sized_delimiterRt_expressionRRtsuppressR	tstart_groupRt	end_groupRt_accent_maptkeystlistt
_wide_accentst_function_namest
_fontnamesRRRRRR&R2tleaveWhitespaceRt_char_over_charstchar_over_charsRRRR
RRRRt
_ambiDelimt
_leftDelimt_rightDelimRRR9RRRRRtclear(%R;Rgt	latexfontRRRt	autoDelimRtlbracetrbraceRRtbslashRRRRtlatex2efontRRt
unicode_rangeR2tc_over_cRRRRt	ambiDelimt	leftDelimt
rightDelimtrightDelimSafeRRt
subsuperopRt
math_delimR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<Ts	!&	
	
		"Y)		Y
/	cC sd|_d|_i|_dS(s1
        Clear any state before parsing.
        N(R9t_exprt_state_stackt_em_width_cache(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR	s		cC s|j|dd||g|_y|jj|WnLtk
r}tdjd|jd|jddt	|gnX|j
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
RRfiR(tStateRRtparseStringRR1RHtlinetcolumnRR(R;RR:RxRterr((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytparse 	s!	RcB 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(Rbt_fontRRxR(R;RbRgRRxR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<=	s
				cC s(tj|j|j|j|j|jS(N(RRRbRgRRxR(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRD	scC s|jS(N(R(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRL	scC s%|dkr||_n||_dS(NRRR(srmsitsbf(RR(R;R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	_set_fontN	s(	RQRRRSR<RRRtpropertyRg(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR6	s				cC s|jdS(s?
        Get the current :class:`State` of the parser.
        i(R(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	get_stateT	scC s|jjdS(s8
        Pop a :class:`State` off of the stack.
        N(Rtpop(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	pop_stateZ	scC s |jj|jjdS(sm
        Push a new :class:`State` onto the stack which is just a copy
        of the current state.
        N(RRRR(R;((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt
push_state`	scC st||_|jgS(N(RyR(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRg	scC st|}|j|gS(N(RyR(R;RRRthlist((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRl	s
cC sn|djdd}g|D]}t||j^q}t|}|jtd|j_|gS(Nis\$Rsmathtext.default(treplaceRaRRyRR*Rg(R;RRRRtsymbolsR ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRr	s(
cC s|j}|j|j|jf}|jj|}|dkr|jj|jt	dd|j|j}|j
}||j|<nt||S(Nsmathtext.defaultR(RRgRxRRRR9RbRR*RR}(R;t
percentageReRR=RZ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_make_space|	s	"	g333333?s\ g?s\,g?s\;g?s\quadg	@s\qquadgٿs\!s\/cC s?t|dkst|j|d}|j|}|gS(Nii(RRct
_space_widthsR$(R;RRRRRN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR	scC s|jt|dgS(Ni(R$R(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR	scC s|d}yt||j}Wn!tk
rFtd|nX||jkrt|jd||jdgdtgS||jkrt||jdgdtgS|gS(NisUnknown symbol: %sg?R|(	RaRR1Rt_spaced_symbolsRyR$Rt_punctuation_symbols(R;RRRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR2	s



RtAg?s\circg?gtAAcC s|d}|j}|jj|j|j|j}|jj|d\}}}	|dkrpt	dn|j
}
|ddk	r|d|
_n|
j|d9_t|d|
}|j
}|ddk	r|d|_n|j|d9_t|d|}
t
|j|
j}t|g}|j|dt|
g}|j|dt|td||	|gS(NigsError parsing symboliitexactly(NNg(RRbRRgRxRRRR9RRRjRaRXR=RR{RR_(R;RRRRReRt
under_desct	over_descRt
over_statetovertunder_statetunderR=t
over_centeredtunder_centered((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR	s4
	s\circumflexaccentthats\combiningbrevetbreves\combiningoverlinetbars\combininggraveaccenttgraves\combiningacuteaccenttacutes\combiningdiaeresistddots\combiningtildettildes\combiningdotabovetdots\combiningrightarrowabovetvect"t`t't~t.Rs\rightarrowtoverrightarrows
\leftarrowt
overleftarrowswidehat widetilde widebarc	C st|dkst|j}|jj|j|j|j}t|ddkrjtdn|d\}}||j	krt
d||j|dt}nt|j
||}t|g}|j|jdt|td|d	t|ggS(
NiiisError parsing accents\RR*gg@(RRcRRbRRgRxRRRRR=RjRRR{RR_Ry(	R;RRRReRRRtcentered((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR	s"	cC sf|j|j}d|_tg|dD]}t||^q-}|j|d|_|S(NRi(RRRgRyRaRt
function_name(R;RRRReRR ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s
	,

cC s4|jt|r0|dd|j_ngS(Nii(RRRRg(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s
cC st|d}|gS(Ni(Ry(R;RRRtgrp((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
scC s|jgS(N(R(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s
cC s5t|dkst|d}||j_gS(Nii(RRcRRg(R;RRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRg
s
cC sQt|tr|j|jkSt|trMt|drM|j|jkStS(NRD(	RRaRt_overunder_symbolsRythasattrRDt_overunder_functionsR(R;R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytis_overunder!
s
cC s#t|tr|j|jkStS(N(RRaRt_dropsub_symbolsR(R;R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt
is_dropsub(
scC st|tr|jStS(N(RRaRhR(R;R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRh-
s
cC sLt|dkstd}d}d}t|ddkrN|djSt|ddkr|d\}}td}|dkr|}q|}nt|ddkr|d\}}}|dkr|}q|}nt|ddkrt|d\}}	}
}}|	|krJ|	dkr;tdqJtd	n|	dkre|
}|}q|
}|}ntd
|j}
|
jj|
j	|
j
|
j}|
jj|
j	|
j
|
j}|j
|rEg}d}|j}|dk	r|jt||j}n|dk	rH|jt||j}n|dk	rt|g}|j|d|j|t|dgnt|g}|j|d|j||dk	rt|g}|j|d|jt|d|g|j}nt|}||j|_t|g}|gS|jt|}|j|ry|jt|}n
t|}|dkr|jt|g}t|t}|jt|d
d}t||}||_nF|jt|tt|g}t |}t||}|jt|d
}t||}|dkrk||_n|jt|g}t|t|}d|||j|j|}|dkr||7}||7}n|j!|rt"|||_nt|t||j|j||g}||_t||g}|gS(NiiigRiisDouble subscriptsDouble superscriptsOSubscript/superscript sequence is too long. Use braces { } to remove ambiguity.R*g@g@g@g@(#RRcR9tasListR`RRRbRRgRxRRRIR=RXRXRR{textendR}RR>RR?RlRytSUBDROPRKtSUB1tabstSCRIPT_SPACEtSUP1RhtDELTA(R;RRRRRRtopRWtop1tnext1top2tnext2Retrule_thicknessRtvlistRR=R Rtshift_upt
shift_downRtclrRn((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR2
s										

 








	cC s|j}|jj|j|j|j}t|}|j|jt|g}	t|g}
t	|j
|j
}|	j|d|
j|dt|	t
d|dt||t
d|d|
g}|jj|jtdd|j|j}
|
j|
j|
jd|d}||_t|t|dgg}|s`|r|dkrud	}n|dkrd	}n|d
krd}n|j|||S|S(NR*ig@smathtext.defaultt=ig@RR@s\}R(RRbRRgRxRRRXRRXR=R{RR_RRR*R>R\R^RlRyR`t_auto_sized_delimiter(R;tldelimtrdelimtruletstyleRtdenReRtcnumtcdenR=RZRZRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt_genfrac
sB	

	
				cC sKt|dkstt|ddks4t|jt|dS(Niii(RRcRgttuple(R;RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
scC st|dkstt|ddks4t|j}|jj|j|j|j}|d\}}|jdd|d||S(NiiiR(	RRcRRbRRgRxRRg(R;RRRReRRRd((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s	cC s`t|dkstt|ddks4t|d\}}|jdddd||S(NiiiRg(RRcRg(R;RRRRRd((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
scC s`t|dkstt|ddks4t|d\}}|jdddd||S(NiiiRRgR(RRcRg(R;RRRRRd((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
scC s|d\}}|j}|jj|j|j|j}|j|j|d}|j|j}	t	d||	|dt
}
|
j|
j}|
j|
j}	tt|d|t|dg}t
t|t|g}|j||j|jd|	d|dkr4t|
jd	d
d
}n<tg|D]}
t|
|^q>}|j|jt
t|gg}|d|_t|t|
jd	|
|g}|gS(
Nig@s	\__sqrt__Rg@gY@g(@R*g?gg333333?g@(RRbRRgRxRR>RlR?RRRyR`RRRRR9R[R=RaRXR}(R;RRRtroottbodyReRR>R?tchecktpadded_bodyt	rightsideRt
root_vlistR ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR
s:	
(

c
C s|j}tg|D]}|j^q}tg|D]}|j^q8}g}|dkr|jt||||n|j||dkr|jt||||nt|}	|	S(NR@(RRXR>R?RRRMRy(
R;tfronttmiddletbackReRR>R?tpartsR ((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR_ s""
cC s(|\}}}|j||j|S(N(R_RL(R;RRRRoRpRq((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR/s(srmR(g?N(Ns\circg?(9RQRRRSRRt_binary_operatorst_relation_symbolst_arrow_symbolsR&R'RFRHRJRRRRRR<RRtobjectRRRRRRRR$R%RRR2R9RRRRRRRRRRgRIRKRhRRgRRRRRR_R(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRs
									
	

				%
		
								y	)					-	tMathTextParsercB seZdZied6ed6ed6ed6ed6e	d6e
d6ed6Zied6e
d	6ed
6ed6ZdZd
ddZdddZddddZddddZdddZRS(tbitmaptaggR{tpdftsvgRGtcairotmacosxtcmtstixtstixsanstcustomcC s"|j|_td|_dS(sI
        Create a MathTextParser for the given backend *output*.
        i2N(Rt_outputRt_cache(R;toutput((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyR<OsiHcC s|dkrt}n||t|f}|jj|}|dk	rO|S|jdkrwtdrwt|}n_|j|j}td}|j	j|j
}	|	dk	r|	||}ntd|j}
|j
dkrt|j_
n|j
j|||
|}|j|j|j|j|j|}||j|<|j
j|jd|j_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.
        R{s	ps.useafmsmathtext.fontsetsEmathtext.fontset must be either 'cm', 'stix', 'stixsans', or 'custom'N(R9R#thashRRRR*R7t_backend_mappingt_font_type_mappingRR1tget_size_in_pointst_parserRRVRRCR=R>R?RORRRdR:(R;RRR
tcacheKeyRRbtbackendtfontsett
fontset_classRxRN((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRVs6
	


	ixicC s[|jdksttd|}|j|d|d|\}}|j}||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.
        RxRTRR
(RRcR#Rtas_array(R;ttexstrRRxR
tftimageR?R((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytto_masks
!tblackcC s|j|d|d|\}}tjj|\}}}	tj|jd|jddfdtj}
td||
dddddf<td||
dddddf<td|	|
ddddd	f<||
ddddd
f<|
|fS(s
        *texstr*
            A valid mathtext string, eg r'IQ: $\sigma_i=15$'

        *color*
            Any matplotlib color argument

        *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.
        RRxiiitdtypeiNii(	RtmcolorstcolorConvertertto_rgbtnptzerostshapetuint8Rk(R;RtcolorRRxRR?RRRtRGBA((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytto_rgbas!/)))cC sY|j|d|d|d|\}}|j\}}	}
tj|j|	|||S(s8
        Writes a tex expression to a PNG file.

        Returns the offset of the baseline from the bottom of the
        image in pixels.

        *filename*
            A writable filename or fileobject

        *texstr*
            A valid mathtext string, eg r'IQ: $\sigma_i=15$'

        *color*
            A valid matplotlib color argument

        *dpi*
            The dots-per-inch to render the text

        *fontsize*
            The font size in points

        Returns the offset of the baseline from the bottom of the
        image in pixels.
        RRRx(RRt_pngt	write_pngttostring(R;RRRRRxtrgbaR?tnumrowstnumcolsttmp((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pytto_pngs'cC sI|jdksttd|}|j|d|d|\}}|S(s+
        Returns the offset of the baseline from the bottom of the
        image in pixels.

        *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
        RxRTRR
(RRcR#R(R;RRRxR
RR?((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt	get_depths!N(RQRRR9RRrRpRsR|RRRRRRR6R
RR<RRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyRw:s*

	4 (RSt
__future__RRFt	cStringIORRRRt	NameErrortsetsRRtwarningsRtnumpyRRRt	pyparsingRRR	R
RRR
RRRRRRRRRRt
enablePackrattmatplotlib.afmRtmatplotlib.cbookRRRRtmatplotlib.ft2fontRRRR R!tmatplotlib.font_managerR"R#tmatplotlib._mathtext_dataR$R%R&R'R(t
matplotlibR)R*tmatplotlib.colorstcolorsRtmatplotlib._pngRR4R7RvR8RTReRpRqRrRsR|RRRRRRR
RR6R7R]R^R\RQRNRRRORStWarningRRSR[R_R`RaRjRkRyRRRRRRRRRRRRRRRRR}RRRRR`RRRw(((sF/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/mathtext.pyt<module>s
p
"((			41+		)vsnq
!N=oJ	!			8