⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
docutils
/
utils
/
math
/
View File Name :
__init__.py
# :Id: $Id: __init__.py 8554 2020-09-04 16:52:11Z milde $ # :Author: Guenter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # This file is offered as-is, without any warranty. # # .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause """ This is the Docutils (Python Documentation Utilities) "math" sub-package. It contains various modules for conversion between different math formats (LaTeX, MathML, HTML). :math2html: LaTeX math -> HTML conversion from eLyXer :latex2mathml: LaTeX math -> presentational MathML :unichar2tex: Unicode character to LaTeX math translation table :tex2unichar: LaTeX math to Unicode character translation dictionaries :tex2mathml_extern: Wrapper for TeX -> MathML command line converters """ # helpers for Docutils math support # ================================= def pick_math_environment(code, numbered=False): """Return the right math environment to display `code`. The test simply looks for line-breaks (``\\``) outside environments. Multi-line formulae are set with ``align``, one-liners with ``equation``. If `numbered` evaluates to ``False``, the "starred" versions are used to suppress numbering. """ # cut out environment content: chunks = code.split(r'\begin{') toplevel_code = ''.join([chunk.split(r'\end{')[-1] for chunk in chunks]) if toplevel_code.find(r'\\') >= 0: env = 'align' else: env = 'equation' if not numbered: env += '*' return env