Anyone Currently Using MathJax with node.js TW

195 views
Skip to first unread message

Kevin Kleinfelter

unread,
May 1, 2018, 5:23:33 PM5/1/18
to TiddlyWiki
Is anyone *currently* using MathJax with the *current* node.js TW?  What's the secret sauce?

When I try http://mathjax-tw5.kantorsite.net/ directly, I get proper rendering but also an error "Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'."

When I try https://gist.github.com/kpe/cc0547b318e6f8d4ddaa, I get no render and "Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'."  

When I try https://gist.github.com/kpe/cc0547b318e6f8d4ddaa plus the fix suggested in its comments, I get no render and "TypeError: Argument 1 ('target') to MutationObserver.observe must be an instance of Node."  

TIA

Kevin Kleinfelter

unread,
May 1, 2018, 6:07:15 PM5/1/18
to TiddlyWiki
Found a solution: 

Use https://gist.github.com/kpe/cc0547b318e6f8d4ddaa plus the fix suggested in its comments.  He describes two ways to install it. The trick is to use the manually-created files in the plugins directory, not to create a startup tiddler.  It looks to me like maybe there are no tc-story-river nodes at the time the code is executed as a startup tiddler.

Ste Wilson

unread,
May 2, 2018, 6:00:19 AM5/2/18
to TiddlyWiki
Just out of interest what advantage/ difference is there using mathjax over the katex plugin?

PMario

unread,
May 2, 2018, 10:31:59 AM5/2/18
to TiddlyWiki
On Wednesday, May 2, 2018 at 12:00:19 PM UTC+2, Ste Wilson wrote:
Just out of interest what advantage/ difference is there using mathjax over the katex plugin?

TiddlyWiki switched to katex, since it is 100% offline.

-m

Jeremy Ruston

unread,
May 2, 2018, 12:32:33 PM5/2/18
to tiddl...@googlegroups.com
TiddlyWiki switched to katex, since it is 100% offline.

The other factor is that MathJax only runs in the browser, and so can’t be used (for example) under Node.js to generate static HTML pages.

Best wishes

Jeremy.


-m

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2b91aa96-76af-44e0-b5d3-a4445de44be3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John

unread,
May 8, 2018, 4:03:39 AM5/8/18
to TiddlyWiki
MathJax can be fully offline too.

As to the question asked: I find that for pure rendering purposes, Katex is clearly the best, but it doesn't allow for macro definitions. I use them a lot to generate the Latex I need.

So I write with the MathJax plugin and for publishing use Katex.

Paul Netsaver

unread,
May 17, 2018, 3:35:38 PM5/17/18
to TiddlyWiki
Katex is much faster and nowadays covers most of math symbols.
Nevertheless, Katex has no inline equations and this is a turning point both for rendering and publishing.
If you have to write a complex text interleaving text and math symbols, you cannot use block equations only.
For what I know something like ${...}$ is not yet implemented in katex.
I've read about html classes + javascript solutions, anyway it's annoying adding a class to every math fragment.

Anyway on release 5.1.17 of TW5, mathjax plugin is not working so well (requires refresh at every update for rendering), so at the moment I've no complete alternatives...
Reply all
Reply to author
Forward
0 new messages