pytexit 0.4.0
pip install pytexit
Released:
Convert a Python expression to a LaTeX formula
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1) (CeCILL-2.1)
- Author: Erwan Pannier
- Tags latex, py2tex
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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:
References
Initial work from Geoff Reedy on StackOverflow: https://stackoverflow.com/a/3874621/5622825 . Kudos.
Similar projects:
- https://github.com/iogf/lax : "A pythonic way of writting latex."
- https://github.com/JelteF/PyLaTeX : "A Python library for creating LaTeX files"
- sympy can also write LaTeX output.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1) (CeCILL-2.1)
- Author: Erwan Pannier
- Tags latex, py2tex
Classifiers
- Development Status
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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
Built Distribution
File details
Details for the file pytexit-0.4.0.tar.gz
.
File metadata
- Download URL: pytexit-0.4.0.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 710084f4c3e01e64e3dc8f936782dd6f6d221d0c6fcc7eba1998916cf6522f7c |
|
MD5 | da0d175b3c6dfd0230d4eb182c2c8ae8 |
|
BLAKE2b-256 | 8879e1994646af0f755d0b404586609a1787424dfa63dbf4b2ea7f2c0378f732 |
File details
Details for the file pytexit-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pytexit-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cbd088b33d508a9324ffb51c58505180f0ca3f58409a7860578e4a27d5b7fc8 |
|
MD5 | c71e7d76117ef8b463ebadaca6995af7 |
|
BLAKE2b-256 | 650b3a0d40b023b2c2164e5623651423608b7db157fd5f3e85350d06c367096f |