| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/docutils/utils/math/__pycache__/ |
Upload File : |
�
��b� � � � d Z ddlZdZdd�Zdd�Zdd�Zedk r+d Z e ee� � � d
� � � � dS dS )
z�Wrappers 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}
c � � t j g d�t j t j t j d�� � }|j � t
| z � d� � � � |j � � � |j � � � }|j
� � � � d� � }|r0|� d� � dk s|s|�
|� � t j g d�t j t j t j d�� � }|j � |� � |j � � � |j � � � � d� � }|j
� � � � d� � }|r0|� d� � dk s|s|�
|� � |� d� � |� d � � d
z } }||| � }d|v rt |� � �|S )zdConvert LaTeX math code to MathML with LaTeXML_
.. _LaTeXML: http://dlmf.nist.gov/LaTeXML/
)�latexml�-z--inputencoding=utf8T��stdin�stdout�stderr� close_fds�utf-8�Errorr )�latexmlpostr z--nonumbersectionsz--format=xhtmlz--�<math�</math>� zclass="ltx_ERROR)�
subprocess�Popen�PIPEr �write�document_template�encode�closer �readr �decode�find�error�SyntaxError)
� math_code�reporter�p�latexml_code�latexml_err�post_p�result�
post_p_err�start�ends
�G/usr/lib/python3/dist-packages/docutils/utils/math/tex2mathml_extern.pyr r s � �
�� � � �
*�� *�� *��#'� )� )� )�A� �G�M�M�$�y�0�8�8��A�A�B�B�B��G�M�M�O�O�O��8�=�=�?�?�L��(�-�-�/�/�(�(��1�1�K�� $�[�%�%�g�.�.�!�3�3�<�3����{�#�#�#�
�
� !� !� !� %/�O�%/�_�%/�_�(,�
.�
.�
.�F� �L���|�$�$�$�
�L������
�]�
�
�
!�
!�
(�
(��
1�
1�F���#�#�%�%�,�,�W�5�5�J�� #�Z�_�_�W�-�-��2�2�&�2����z�"�"�"� ���W�%�%�v�{�{�9�'=�'=�a�'?�3�E�
�E�#�I�
�F��V�#�#��&�!�!�!��M� c �$ � t j g d�t j t j t j d�� � }|j � t
| z � d� � � � |j � � � |j � � � }|j
� � � � d� � }|� d� � dk rCd�
d� |� � � D � � � � }t d |z � � �|r|� d
� � dk s|s|� |� � |� d� � |� d� � d
z }}|||� S )zgConvert LaTeX math code to MathML with TtM_
.. _TtM: http://hutchinson.belmont.ma.us/tth/mml/
)�ttmz-uz-rTr r z**** Unknownr �
c 3 �D K � | ]}|� d � � �|V � �dS )z****N)�
startswith)�.0�lines r'