B ç0œ`àã@sLddlZdZd dd„Zddd„Zddd „Zed krHd Zeeeƒ d ¡ƒdS)éNzP\documentclass{article} \usepackage{amsmath} \begin{document} %s \end{document} c Cs0tjdddgtjtjtjdd}|j t| d¡¡|j ¡|j  ¡}|j   ¡  d¡}|rz|  d¡dksp|sz|  |¡tjd dd d d gtjtjtjdd}|j |¡|j ¡|j  ¡  d¡}|j   ¡  d¡}|rô|  d¡dksê|sô|  |¡|  d ¡|  d¡d}} ||| …}d|kr,t|ƒ‚|S)zdConvert LaTeX math code to MathML with LaTeXML_ .. _LaTeXML: http://dlmf.nist.gov/LaTeXML/ Úlatexmlú-z--inputencoding=utf8T)ÚstdinÚstdoutÚstderrÚ close_fdsÚutf8ÚErrorrZ latexmlpostz--nonumbersectionsz--format=xhtmlz--zézclass="ltx_ERROR)Ú subprocessÚPopenÚPIPErÚwriteÚdocument_templateÚencodeÚcloserÚreadrÚdecodeÚfindÚerrorÚ SyntaxError) Ú math_codeÚreporterÚpZ latexml_codeZ latexml_errZpost_pÚresultZ post_p_errÚstartÚend©rú€/private/var/folders/sf/wxz_36012wxg_prv29r6623x5vlqx8/T/pip-target-tft40_m7/lib/python/docutils/utils/math/tex2mathml_extern.pyrsB        rcCsÖtjdddgtjtjtjdd}|j t| d¡¡|j ¡|j  ¡}|j   ¡  d¡}|  d¡dkrŒd   d d „| ¡Dƒ¡}td |ƒ‚|rž|  d ¡dks¢|s¬| |¡|  d¡|  d¡d}}|||…}|S)zgConvert LaTeX math code to MathML with TtM_ .. _TtM: http://hutchinson.belmont.ma.us/tth/mml/ Úttmz-uz-rT)rrrrrz **** UnknownrÚ cSsg|]}| d¡r|‘qS)z****)Ú startswith)Ú.0Úlinerrrú \szttm..z& Message from external converter TtM: z **** Errorzr )r r r rrrrrrrrrrÚjoinÚ splitlinesrr)rrrrÚerrÚmsgrrrrrrIs&     rTc Csdddddddddd g }|r"d }nd }| d ¡tjd g|tjtjtjdd}|j | d¡¡|j ¡|j  ¡  d¡}|j   ¡  d¡}|  d¡dkr¾t d||  d¡d|  d¡…ƒ‚|rÞ|  d¡dksÔ|sÞ| |¡|  d¡d|  d¡}} d|||| …f}|S)zlConvert LaTeX math code to MathML with blahtexml_ .. _blahtexml: http://gva.noekeon.org/blahtexml/ z--mathmlz --indentedz --spacingZmoderatez--mathml-encodingÚrawz--other-encodingz--doctype-xhtml+mathmlz--annotate-TeXÚzmode="display"z --displaymathÚ blahtexmlT)rrrrrzrz, Message from external converter blahtexml: z é z z **** Errorzz z> %s )Úappendr r r rrrrrrrrrrr) rÚinlinerÚoptionsZ mathmode_argrrr'rrrrrr+es:     r+Ú__main__uH\frac{\partial \sin^2(\alpha)}{\partial \vec r} \varpi \, \text{Grüße}r)N)N)TN) r rrrr+Ú__name__ZexampleÚprintrrrrrÚs .  )