Skip to main content

pytexit

Convert a Python expression to a LaTeX formula

PyPI

Tests

Coverage

Documentation

https://pytexit.readthedocs.io

Documentation Status

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:

image

References

Initial work from Geoff Reedy on StackOverflow: https://stackoverflow.com/a/3874621/5622825 . Kudos.

Similar projects:

Release files for pytexit 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytexit 0.4.0
File Size Uploaded
pytexit-0.4.0.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytexit 0.4.0
File Interpreter ABI Platform
pytexit-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 50.9 kB

Release files / pytexit-0.4.0.tar.gz

Download URL pytexit-0.4.0.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
710084f4c3e01e64e3dc8f936782dd6f6d221d0c6fcc7eba1998916cf6522f7c
BLAKE2b-256 checksum
How to use checksums
8879e1994646af0f755d0b404586609a1787424dfa63dbf4b2ea7f2c0378f732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release files / pytexit-0.4.0-py2.py3-none-any.whl

Download URL pytexit-0.4.0-py2.py3-none-any.whl
Size 24.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1cbd088b33d508a9324ffb51c58505180f0ca3f58409a7860578e4a27d5b7fc8
BLAKE2b-256 checksum
How to use checksums
650b3a0d40b023b2c2164e5623651423608b7db157fd5f3e85350d06c367096f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

1 release file

0.2.13

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.1.9

2 release files

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page