It would be a good thing to have a KATEX formula-editor (and helper!) that could at the same time be used as a calculator. This is a first attempt to integrate @Charlie_Veniot 's alculator with Katex.
He made a TW implementation of a calculator and macros that render the result…
I made some slight changes: I put the evaluated formula into a temporary tiddler and I added a katex-line. And I made some more search replace filters to make the calculator render more katex expressions like the \pi and ^for powers.
I am also working on a Test to optimze the Design of the Calculator to be more suitable on smaller screens and to use the Linkcatcher to be more economical and easier to understand and to hack
<<calcrow "1 2 3 +" "99d">>
<<calcrow "4 5 6 -" "99d">>
<<calcrow "7 8 9 *" "99d">>
<<calcrow "0 . enter /" "99d">>
<<calcrow "Cos(x) 1/x (x) (x)^n" "9d9">>
<<calcrow "\pi Log(x) [<sqrt>] [[\frac 1 x]]" "d99">>
Results in:
Problems:
Some Katexexpressions can be rendered but for things with [ ] like $\sqrt[n]{(x)}$
(x)n\sqrt[n]{(x)}n(x)
because I could not find regex -filters to replace them by js eval expressions…
It would be great, if someone could implement a library to calculate directly with katex expressions like evaluatex
I turned it into a plugin not because it is ready but because this makes it more comfortable and reversible to play with it. It is allowed by Charlie (and me of course) to take this further.