Instant MathJax preview of LaTeX typed into HTML textareas
I’ve completely rewritten my write maths, see maths library to be a little jQuery plugin that attaches itself to editable areas on pages, like contenteditable
elements, textareas, and input boxes. When your cursor is inside some LaTeX, a little preview box appears just above it with the LaTeX rendered through MathJax. I’ve made a demo page on GitHub, and the code itself is available there too. It also works in TinyMCE, if you’re into that sort of thing.
The first I thing I did with it was to write a WordPress plugin which applies the plugin to the comment boxes underneath posts (source code). I’ve installed it on this site and The Aperiodical, so you can use LaTeX with confidence, knowing that it’ll appear how you want on the page. Please try it in the comments box below!
Comments
Comments
snssswc
Awesome work!!
Thanks!!!
sean
Mauricio Piacentini
That is great! Let me test:
It would be cool to integrate with Aloha Editor in some way. The problem is how to define the workflow, but looks very cool…
Thieme Hennis (@hennis)
\lim_{n\rightarrow \infty}\sum_{i=0}^n \frac{1}{p_i}
Thieme Hennis (@hennis)
Andres Riofrio
Not bad if I can write Einstein’s equation!
HO AN De
Hi, great works.
May I have the link to the code where you integrate writemaths with wysiwyg editor? I cannot get it to work. Thanks for your help
Christian Perfect
Do you mean in WordPress? I haven’t got it to work in WordPress’s wysiwyg editor.
Alpha
Can you give me a link of demo to use it in Tinymce?
Houcem
Great work !
HO AN De
Are you able to get it work on any wysiwyg editor?
Navin
Navin
\iint _{ 2 }^{ 4 }{ x{ y }^{ 2 } } .dz
Testing
Jay
This is cool!
x^2
Jay
Again with dollar signs
demo
Dont Work
toak
cool man..
Bill
lonely_prince
demo
Drew
Let where so Let where so
Now assume that is nonempty. Then there exists some and such that for some and such that . Thus we have .
Note that is clearly true, and multiplying both sides of the equation by some integer gives us .
So let and , which implies , and thus as desired. This means that is guaranteed to be nonempty if we can divide any common factors from and and be left with only prime numbers.
(A) is out as is not prime. (B) is is out because if we divide and by their common factor , we are left with and , and is not prime. (D) is out because which is not prime. (E) is out because is not prime. (C) is correct as and , which are both prime.
Ada
Ada
Junny
amazing
Amazing !
I will try to install it on my own wordpress. Thanks a lot !
dsfds
$a^2+b^4
schartz
tets
a
akash
r
test
aaa
גכשדכשד
Rock
I wish music was as easy to work with as math…
Rock
Yash
test
test
\texttt{dst} (I) = \fork{\texttt{src}(I)^power}{if \texttt{power} is integer}{|\texttt{src}(I)|^power}{otherwise}
test wrote
y =
kom