Hello!
First I would like to thank the developers of FoldingText for a really awesome application! Now on to my question.
I use FoldingText a lot for taking notes in scientific and mathematical subjects. I have therefore built up a great need to use latex for typesetting formulas in FoldingText. After a long period of frustration and looking at a lot of options I finally found a javascript package that is able to take a latex string and return a html version of the formula: Katex
I have verified that it works as expected within FoldingText, but my current set up is not very elegant. Right now my extension typesets any line with a @katex tag and leaves the original latex-string visible. This is of course not optimal.
What I would like to do is to mimic what FoldingText is doing for **
, that is to replace any string within some delimiter characters with the typeset formula and show the latex code, as well as allow editing whenever the cursor enters the delimited region. Is this possible to do within an extension/plugin? I tried to look through the source for examples of how to do this but failed.
Any pointers to extensions that solve my original typesetting problem, extensions that have examples of what I want to do or pointers to examples in the source would be greatly appreciated!
// Jonatan