jfhrdZddlZdZd dZd dZd dZd dZed krd Ze eedSdS) zWrappers for TeX->MathML conversion by external tools This module is provisional: the API is not settled and may change with any minor Docutils version. NzP\documentclass{article} \usepackage{amsmath} \begin{document} %s \end{document} ctjgdtjtjtjd}|jt |zd|j|j }|j d}|r0| ddks|s| |tjgdtjtjtjd}|j||j|j d}|j d}|r0| ddks|s| || d| d d z} }||| }d |vrt||S) zdConvert LaTeX math code to MathML with LaTeXML_ .. _LaTeXML: http://dlmf.nist.gov/LaTeXML/ )latexml-z--preload=amsfontsz--preload=amsmathz--inputencoding=utf8Tstdinstdoutstderr close_fdsutf-8Errorr) latexmlpostrz--nonumbersectionsz--format=xhtmlz--zclass="ltx_ERROR) subprocessPopenPIPErwritedocument_templateencodecloserreadr decodefinderror SyntaxError) math_codereporterp latexml_code latexml_errpost_presult post_p_errstartends /builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/docutils/utils/math/tex2mathml_extern.pyrrs   * * *#' ) ) )AGMM$y088AABBBGMMOOO8==??L(--//((11K$[%%g..!33<3{###  !!!%/O%/_%/_(, . . .F L|$$$ L ]   ! ! ( ( 1 1F##%%,,W55J#Z__W--22&2z"""W%%v{{9'='=a'?3E E#I FV##&!!! Mc$tjgdtjtjtjd}|jt |zd|j|j }|j d}| ddkrCd d|D}td |z|r| d dks|s||| d | d d z}}|||S)zgConvert LaTeX math code to MathML with TtM_ .. _TtM: http://hutchinson.belmont.ma.us/tth/mml/ )ttmz-uz-rTrr z **** Unknownr c3DK|]}|d|VdS)z****N) startswith).0lines r' zttm.._sF44??6224444444r(z& Message from external converter TtM: **** Errorrrr)rrrrrrrrrrr rrjoin splitlinesrr)rrrr#errmsgr%r&s r'r*r*Lsp  * * *#' ) ) )AGMM$y088AABBBGMMOOO X]]__F (--//  ) )C xx1$$ii44)9)944444DSHIIICHH\**a//v/sW%%v{{9'='=a'?3E %) r(Tcgd}|rd}nd}|dtjdg|ztjtjtjd}|j|d|j|j d}|j d}| d d krE|| d d z| d }td|z|r0| dd ks|s||| dd z| d} } d|d|| | d}|S)zlConvert LaTeX math code to MathML with blahtexml_ .. _blahtexml: http://gva.noekeon.org/blahtexml/ ) --mathmlz --indentedz --spacingmoderatez--mathml-encodingrawz--other-encodingr9z--doctype-xhtml+mathmlz--annotate-TeXz display="block"z --displaymath blahtexmlTrr zrz z z. Message from external converter blahtexml: %sr1zz z0 z )appendrrrrrrrrrrr rrr) rinlineroptions mathmode_argrr#r4r5r%r&s r'r;r;hs G( ) '''+w.) * *#'  ) ) )A GMM)""7++,,,GMMOOO X]]__ # #G , ,F (--//  ) )C {{9""V[[--a/ L0I0IIJL !! !SXXl++q000sZ((*FKK ,D,D3EE , fU3Y.?.?.?AF Mr(ctjgdtjtjtjd}|j|d|j|j d}|j  d }| }|r)|r| |td|z|dkrtd|z|d|d d z}}|||S) zXConvert LaTeX math code to MathML with pandoc_ .. _pandoc: https://pandoc.org/ )pandocr7z --from=latexTrr z1 Error message from external converter pandoc: %srz. Error code from external converter pandoc: %srrr)rrrrrrrrrrr stripwaitrrr)rrrr#r4xr%r&s r'rBrBs`  * * *#' ) ) )AGMM)""7++,,,GMMOOO X]]__ # #G , ,F (--//  ) ) / / 1 1C A !  NN3   O !! !AvvL W%%v{{9'='=a'?3E %) r(__main__uR\frac{\partial \sin^2(\alpha)}{\partial \vec r}\varpi \mathbb{R} \, \text{Grüße})N)TN) __doc__rrrr*r;rB__name__exampleprintr(r'rLs ----`8&&&&RD z9G E))G   r(