Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tab triggered calculation #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

YuruiHong
Copy link

@YuruiHong YuruiHong commented Apr 30, 2023

I really appreciate the idea of inline calculation as provided by sympy and mma, and I've noticed a package named "latex2sympy2", which converts LaTeX expressions directly into sympy and makes it possible to calculate right after typing an expression!

Examples:

% before
$x=\int_0^1 \mathrm{d}x = $ % add a '=' at the end before tab for numeric calculation
                            % otherwise for simplification
% after
$x=\int_0^1 \mathrm{d}x = 0.5$

% before
\begin{align*}    
    x &= 123 * 456 % tab here
.\end{align*}

% after
\begin{align*}
    x &= 123 * 456
      &= 56088
.\end{align*}

% before
\begin{align*}    
    x &= \frac{y^2}{y} % tab here
.\end{align*}

% after
\begin{align*}    
    x &= \frac{y^2}{y}
      &= y
.\end{align*}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant