Convert a Python expression to a LaTeX formula
Project description
pytexit
Convert a Python expression to a LaTeX formula
Documentation
https://pytexit.readthedocs.io
Install
pytexit
is on PyPi:
pip install pytexit
Use
pytexit
features the py2tex
, for2tex
for2py
functions.
In a Terminal, use py2tex
:
py2tex 'x = 2*sqrt(2*pi*k*T_e/m_e)*(DeltaE/(k*T_e))**2*a_0**2'
In a Python console, use py2tex
:
from pytexit import py2tex
py2tex('x = 2*sqrt(2*pi*k*T_e/m_e)*(DeltaE/(k*T_e))**2*a_0**2')
returns the corresponding LaTeX formula (to re-use in papers):
$$x=2\\sqrt{\\frac{2\\pi k T_e}{m_e}} \\left(\\frac{\\Delta E}{k T_e}\\right)^2 a_0^2$$
and (in ipython console only) prints the equation:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytexit-0.3.3.tar.gz
(24.8 kB
view hashes)
Built Distribution
Close
Hashes for pytexit-0.3.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97e8f17e694a740af2d3b461cffb21a6d623f7fb5cee46d8bbe4b38bb0e490a3 |
|
MD5 | 1b5fdd451be9c4e97e0039c2442b6364 |
|
BLAKE2b-256 | 624d61536e30e8ebd537ad4f3dfb71e2ac595f4a9644d7dd85b5699b7025e9c9 |