---
tags: chapman, student projects, algorithm analysis, peter jipsen
---
# LaTeXPy: A Latex Calculator
This project has been designed in collaboration with Peter Jipsen, the creator and developer of LaTeXPy.
**Prerequisites:** Knowledge of Latex, Python and Parsing. The following courses would be beneficial: Discrete Mathematics, Programming Languages.
## Idea
In many areas including mathematics, physics, computer science and economics Latex is the preferred typesetting software for mathematical formulas.
The aim of this project is to write a calculator that can evaluate formulas written in Latex.
Similarly to running Python in a Jupyter notebook, one can then write, read, and evaluate formulas in the same environment.
## Details
The current version of the LaTeX-to-Python translator is on Peter Jipsen's github page at https://github.com/jipsen/LaTeXPy. The README file has a (brief) description and some examples.
Currently there are two main deficiencies and five very desirable extensions:
1. The LaTeXPy code should be turned into a well-structured Python module with sensible comments.
2. The parser needs to generate sensible error messages when users provide input that is not handled correctly by the parser or the evaluator.
3. The LaTeXPy parser should be extended (carefully) to handle SymPy input. SymPy is a Python package that implements a very capable computer algebra system and it will allow LaTeX syntax to be used to find limits, derivatives, integrals etc. SymPy can already produce output in LaTeX form but for input it uses Python syntax.
4. The LaTeXPy parser should be extended to handle NumPy input and output. NumPy is a very efficient numerical analysis package that implements algorithms for matrices and linear algebra.
5. The LaTeXPy parser should be extended to handle some well-defined subset of pseudocode so that programs can be written in LaTeXPy and are translated to correct Python.
6. The LaTeXPy parser should be extended to handle the TPTP syntax that is used by most automated theorem provers. This would allow using provers other than Prover9/Mace4 within LaTeXPy.
7. The LaTeXPy parser should be extended to handle the SMT-Lib2 syntax that is used by most Satisfiability-Modulo-Theory solvers. This would allow interfacing with CVC5 and other SMT-solvers.
Peter says he would be very interested to meet with any student(s) who choose to work on something related to LaTeXPy (it does not have to be one of the suggested topics above).