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

CalcuLaTeX 2.0 #87

Open
mkhan45 opened this issue Jul 5, 2022 · 1 comment
Open

CalcuLaTeX 2.0 #87

mkhan45 opened this issue Jul 5, 2022 · 1 comment

Comments

@mkhan45
Copy link
Owner

mkhan45 commented Jul 5, 2022

CalcuLaTeX has potential, but it's held back by messy code and a badly designed arbitrary precision unit math system.

Arbitrary precision unit math is a pain. There are a number of libraries for it in Rust, but many of them are either made for type safe compile-time usecases, or are text based calculators.

An obvious solution is to use one of these text based calculators with a custom parser and then compile the result to LaTeX. However, an easier and less efficient solution is to use the language as an IR.

For example, with fend, we could compile CalcuLaTeX input to fend input, run fend, and then re-parse fend output and display it with LaTeX. It would probably be easier to intercept a FendResult on the output end and compile it to LaTeX. However, on the input side I believe it would be a lot easier to generate a fend input string than to actually create a Fend IR.

Using this method, a lot of CalcuLaTeX's general design might stay the same. Right now, input expressions (left side of the = ?), are basically directly translated to LaTeX, and that won't change.

@mkhan45
Copy link
Owner Author

mkhan45 commented Jul 24, 2022

One major issue with this approach is vectors and matrices

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

No branches or pull requests

1 participant