ó ÿgdSc@s^dZddlmZddlmZddlmZd„Zd„Z d„Z d„Z d S( sO sphinx.ext.mathjax ~~~~~~~~~~~~~~~~~~ Allow `MathJax `_ to be used to display math in Sphinx's HTML writer -- requires the MathJax JavaScript library on your webserver/computer. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. iÿÿÿÿ(tnodes(tExtensionError(t setup_mathcCsu|jj|j|ddddƒƒ|jj|jjjd|j|dƒ|jjjddƒtj‚dS( NtspanttCLASStmathitlatexis( tbodytappendtstarttagtbuildertconfigtmathjax_inlinetencodeRtSkipNode(tselftnode((s</usr/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pythtml_visit_maths% :cCs´|jj|j|dddƒƒ|dr~|jj|jjjd|d|jjjdƒ|jjdƒtj‚ng|djd ƒD]}|j ƒr’|^q’}xät |ƒD]Ö\}}|j |ƒ}|dkr |d r |jjd |d ƒq nd |ks$d |kra|jj|jjjdd|d|jjjdƒq½|jj|jjjd||jjjdƒq½W|jjdƒtj‚dS(NtdivRRtnowrapiRiss tnumbers(%s)t&s\\s \begin{split}s \end{split}s ( RR R R R tmathjax_displayRRtsplittstript enumerateR(RRtprttpartstitpart((s</usr/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pythtml_visit_displaymaths,"   2    cCs2|jjstdƒ‚n|j|jjƒdS(NsGmathjax_path config value must be set for the mathjax extension to work(R t mathjax_pathRtadd_javascript(tapp((s</usr/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pytbuilder_inited6s cCsut|tdftdfƒ|jddtƒ|jdddgdƒ|jddd gdƒ|jd tƒdS( NR sMhttp://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMMLR s\(s\)thtmlRs\[s\]sbuilder-inited(tmathbase_setupRtNoneRtadd_config_valuetFalsetconnectR#(R"((s</usr/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pytsetup=s N( t__doc__tdocutilsRtsphinx.applicationRtsphinx.ext.mathbaseRR%RRR#R*(((s</usr/local/lib/python2.7/site-packages/sphinx/ext/mathjax.pyt s