Hello!

I have two somewhat related questions about the kantorsite MathJax plugin. 
I posted a question here awhile ago asking how I could ensure that MathJax 
(via the kantorsite plugin) was made aware of a list of custom LaTeX macros 
whenever it renders tiddler content. Based on the suggestions in that 
thread, I defined a tiddler containing a macro of the form

<div style="display:none">
\define loadTeXcommands()
\(
    \(
        \def\macro1{...}

        \def\macro2{...}

        \def\macro3{...}

    ...
    \)
\)
\end
</div>


and added a custom "New Math Tiddler" button for the sidebar that creates a 
new tiddler whose body begins with <<loadTeXcommands>>. (The outer div 
ensures that calling loadTeXcommands doesn't lead to blank lines being 
added to the beginning of each tiddler.)


*Question 1:*

So far this solution works OK but it's definitely not ideal. In particular, 
my two major gripes with it are the following:

(1) When I load my TW5, the macros defined in loadTeXcommands are undefined 
until I manually open the tiddler containing the above code, edit it, and 
save it (and edit and save any math tiddlers were opened at startup).

(2) Inserting a <<loadTeXcommands>> line over and over again, into 
essentially every one of my tiddlers, instead of somehow defining these 
macros at startup and whenever MathJax is called to render a new tiddler 
seems like a bit of a kludge to me. The MathJax documentation 
<http://docs.mathjax.org/en/latest/tex.html#tex-macros> indicates that this 
can be done by including a configuration file (or inline) when MathJax 
initializes, which brings me to my question for anyone more familiar with 
configuring MathJax and the kantorsite plugin: Is it feasible to tweak the 
plugin to include a (probably long) list of TeX macros (written in the 
"escaped", Javascript-friendly syntax mentioned in the MathJax 
documentation) whenever MathJax is loaded?


*Question 2:*

Another problem I'm having with the MathJax plugin from kantorsite is that 
it fails to render math inside, *e.g.*, a reveal widget when the contents 
of the widget starts out as hidden (or when it is manually hidden and then 
displayed again). This seems to be because the kantorsite plugin is 
queueing up MathJax to render tiddlers when they are initially loaded into 
the story river but not when their contents is changed "programatically" 
(that is, by a process other than editing and resaving the tiddler). Has 
anyone else out there found this to be a problem/found a fix for this? 
Alternatively, is there another MathJax plugin out there for TW5 that 
supports this?

Thanks in advance for any help you can provide! I'll be looking more into 
solving these problems if there aren't known solutions but figured it 
couldn't hurt to ask about these issues here first.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to