CalTex - a LaTeX-friendly calculator for tiddlywiki

Hello all,

I’ve written a plugin (a widget, $caltex), which takes as input math expressions, and shows as output a prettified version of the expression —using KaTeX— along with the result of evaluating that expression.

For example:

2025-12-31-194530_273x141_scrot

You can check its documentation and install it from CalTeX — a LaTeX-friendly calculator for tiddlywiki

If you are curious about the implementation, check GitHub - jerojasro/tw-caltex: a LaTeX-friendly calculator for tiddlywiki , and the JS package that I used for the heavy lifting: https://mathjs.org .

9 Likes

Thanks for your contribution @jerojasro and whilst I don’t use LaTeX I know there already exists a solution within the community https://tiddlywiki.com/#KaTeX%20Plugin and its an Official Plugin. Can you document or suggest why you may use your solution over the official one to help people choose?

Because this does the maths calculation and returns a nicely KaTeX formatted answer!

KaTeX just does nice maths mark up.

4 Likes

This is fantastic.

Was it just yesterday that I said that only a tiny number of users would need symbolic computations? Well, I guess I still don’t really need this, but now I really want it!


<scott> goes wandering away muttering something like, “where can I use this wonderful tool?”</scott>

I’ll definitely have a play with this in the new year.

Just for possible interest other TW and maths stuff just in case you hadn’t unearthed them and might be useful:

Mathcell

Evans Formula Plugin

Graphs
https://stephenteacher.github.io/graph-tw5smallupdate/

Non are mine but I seem to have curated them.

Calculator
https://tiddlywiki-programming.neocities.org/tw_calculator#Charlie’s%20Calculator

3 Likes

I’ve been struggling lately because I can’t use Mathcad and Smath. This plugin is exactly what I need.

Is there anyway to force x for times, not dot?
And output in \displaystyle ?

I’ve done something similar using AsciiMath:

4 Likes

What a great collection!

Ooohhh… That’s cool…

Whoa never heard of asciimath, it’s nice it’s supports katex-style symbol decelerations while being quite a bit less syntax heavy than katex.

1 Like

yes, that also annoys me and I haven’t gotten around to changing it. I’ll release a new version.

if I understand you correctly, the $inline="no" option should do what you want; see image below for an example:

2026-02-03-104515_539x134_scrot

Read the docs and can do the displaystyle!

<$caltex $inline=“no”>

So feature request for choice of . or x please! :slight_smile:

Not sure if it’s doable but…:smiley:

if I have e.g. 2+3/4+5=W would it be possible to get the intermediate step, e.g. 5/9=W, calculated and KaTeX displayed as an explanatory step before going to W= 0.55555555

And keep the answer equal to some variable until the final step?

hmm, so; I changed the rendering of multiplication, to always use \times instead of \cdot; it’s available as of v 0.1.6.

I’d rather not have that (choosing mult. operator) as an option, to keep things simple. But if you find it useful, I’ll be happy to add that option. Do let me know :slight_smile:

I don’t really understand what you want to achieve here.

Do you want to show the rational (fraction) before evaluating it and converting it to a float (decimal) number?

regarding this, it’s possible to render an expression with either explicit or implicit multiplication operators, see math.js | an extensive math library for JavaScript and Node.js

would it make more sense to expose that as an option for the widget (and get either no mult. operator, or \times), instead of choosing between \cdot and \times?

So a simple example would be here.

https://hwh.stephenteacher.com/txtbook.html#A%3A%20Block%20and%20Tackle%2F1

Or you can see a more complex example at the bottom of this tiddler which might benifit from a multi step explanation.

https://hwh.stephenteacher.com/txtbook.html#A%3A%20Change%20in%20Viscosity%20for%20a%20Temperature%20Change%2F1

I’m happy for it to be multiply. I rarely use dot multiplication but some people must like it!

I believe some people, scientists and mathematicians have to use the “dot product” to comply with standards. Not me though :nerd_face:

1 Like