]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/Add_nicer_math_formatting.mdwn
po: Add `LANG_CODE` and `LANG_NAME` template variables. (intrigeri)
[ikiwiki.git] / doc / todo / Add_nicer_math_formatting.mdwn
1 It would be nice to add nicer math formatting.  I currently use the
2 [[plugins/teximg]] plugin, but I wonder if
3 [jsMath](http://www.math.union.edu/~dpvc/jsMath/) wouldn't be a better option.
4
5 [[Will]]
6
7 > I've looked at jsmath (which is nicely packaged in Debian), and 
8 > I agree that this is nicer than TeX images. That text-mode browsers
9 > get to see LaTeX as a fallback is actually a nice feature (better
10 > than nothing, right? :) That browsers w/o javascript will not be able to
11 > see the math either is probably ok.
12
13 > A plugin would probably be a pretty trivial thing to write.
14 > It just needs to include the javascript files,
15 > and slap a `<div class="math"> avound the user's code`, then 
16 > call `jsMath.Process(document);` at the end of the page.
17
18 > My only concern is security: Has jsMath's parser been written 
19 > to be safe when processing untrusted input? Could a user abuse the 
20 > parser to cause it to emit/run arbitrary javascript code?
21 > I've posted a question about this to its forum:  --[[Joey]] 
22 > <https://sourceforge.net/projects/jsmath/forums/forum/592273/topic/3831574> 
23
24 I think [mathjax](http://www.mathjax.org/) would be the best option. This is the math rendering engine used in mathoverflow.
25
26 > I've updated Jason Blevin's pandoc plugin to permit tighter integration between Ikiwiki and Pandoc. Given the features Pandoc has added over the past 6-12 months, this makes for a very powerful combination, e.g. with code block syntax highlighting and lots of options for how to process and display inline TeX. Both jsMath and MathJaX are supported, along with many other methods. See https://github.com/profjim/pandoc-iki for details. --Profjim
27
28 [[!tag wishlist]]