#!/usr/bin/env python # coding: utf-8 # # [`latex2sympy`](https://github.com/augustt198/latex2sympy) Demo # This has local `conda` packages of the build chain, with the `latex2sympy` version built from from [this PR](https://github.com/augustt198/latex2sympy/pull/33). # In[9]: from sympy import init_printing from sympy.plotting import plot3d from latex2sympy import process_sympy # In[10]: get_ipython().run_line_magic('matplotlib', 'inline') init_printing() # In[13]: z = process_sympy("y ^ 2 + x ^ 3") z # In[14]: plot3d(z); # Note that `antlr4` is not required at runtime: # In[17]: # uncomment the next line to see installed packages #!conda list # # After that PR was merged, and the recipes were submitted to [conda-forge/staged-recipes](https://github.com/conda-forge/staged-recipes) Linux, OSX, or Windows user would just have to: # # ```bash # conda install -c conda-forge latex2sympy # ``` # # While a developer on any of those platforms could choose to use: # # ```bash # conda install -c conda-forge antlr4 # ``` # # To add new rules, run tests, etc. for example.