Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pytexit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pannier Erwan
pytexit
Commits
c8bf679b
Commit
c8bf679b
authored
4 years ago
by
Pannier Erwan
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md > rst
parent
de4077ee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+0
-3
0 additions, 3 deletions
README.md
README.rst
+74
-0
74 additions, 0 deletions
README.rst
with
74 additions
and
3 deletions
README.md
deleted
100644 → 0
+
0
−
3
View file @
de4077ee
# pytexit
Convert a Python expression to a LaTeX formula
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.rst
0 → 100644
+
74
−
0
View file @
c8bf679b
============================================
`pytexit <https://pytexit.readthedocs.io>`__
============================================
Convert a Python expression to a LaTeX formula
.. image:: https://img.shields.io/pypi/v/pytexit.svg
:target: https://pypi.python.org/pypi/pytexit
:alt: PyPI
.. image:: https://img.shields.io/travis/erwanp/pytexit.svg
:target: https://travis-ci.com/erwanp/pytexit
:alt: Tests
.. image:: https://codecov.io/gh/erwanp/pytexit/branch/master/graph/badge.svg
:target: https://codecov.io/gh/erwanp/pytexit
:alt: Coverage
Documentation
-------------
https://pytexit.readthedocs.io
.. image:: https://readthedocs.org/projects/pytexit/badge/
:target: https://pytexit.readthedocs.io/en/latest/?badge=latest
:alt: 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:: https://github.com/erwanp/pytexit/blob/master/docs/output.png
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.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment