Am 18.12.2013 12:01, schrieb Victor Ivrii:
>
> You need to remember that MathJax is not a LaTeX and does not work in
> text mode. You are trying to create a really bad LaTeX and a really bad
> html. First, you need to look at switches in pandoc and to try to run
> pandoc in the modes which make good LaTeX and good html.
I agree with you that pandoc should produce correct MathML-LaTeX code,
but I won't bother if MathJax would recognize at least the following
escape sequences inside \text: \& \% \$ \# \_ \{ \}.
Note that \$ is already recognized and this change would need only three
lines to differ:
diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js
index f0b85ae..d2ee4d4 100644
--- a/unpacked/jax/input/TeX/jax.js
+++ b/unpacked/jax/input/TeX/jax.js
@@ -1963 +1963 @@
- if (!text.match(/\\?\$|\\\(|\\(eq)?ref\s*\{/)) {return
[this.InternalText(text,def)]}
+ if (!text.match(/\\?(&|%|\$|#|_|\{|\})|\\\(|\\(eq)?ref\s*\{/))
{return [this.InternalText(text,def)]}
@@ -1991,2 +1991,2 @@
- } else if (c === '$' && match === '') {
- i--; text = text.substr(0,i-1) + text.substr(i); //
remove \ from \$
+ } else if ("&%$#_{}".indexOf(c) != -1 && match === '') {
+ i--; text = text.substr(0,i-1) + text.substr(i); //
remove \ from \c
Regards,
Bj�rn