vscode-hackmd icon indicating copy to clipboard operation
vscode-hackmd copied to clipboard

MathJax integration

Open Yukaii opened this issue 4 years ago • 3 comments

Replace Katex with MathJax for matching our online version.

Yukaii avatar Mar 12 '20 09:03 Yukaii

This is really important.

Also it would be great if the Extension will be single extension instead of installing many other extensions.

RoyiAvital avatar Mar 12 '20 13:03 RoyiAvital

MathJax just released its latest version 3.0. With a complete rewrite of modern tooling (and even TypeScript), it should be easier to bundle using webpack now :)

https://github.com/mathjax/MathJax-src

Yukaii avatar Mar 15 '20 23:03 Yukaii

Any chance to support AsciiMath along with LaTeX? MathJax supports it. and AsciiMath is far, far easier to write, and much shorter, too.

Just to make a point, see the difference between TeX and asciiMath with these examples:

  • Cauchy-Schwarz Inequality, this is terrific:
    • TeX: \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \]
    • asciiMath: (sum_(k=1)^n a_kb_k)^2 <= (sum_(k=1)^n a_k^2) (sum_(k=1)^n b_k^2)

captura de pantalla de 2016-07-14 17 01 13

  • Lorenz:
    • TeX: \dot{x} = \sigma(y-x) \\ \dot{y} = \rho x - y - xz \\ \dot{z} = -\beta z + xy
    • asciiMath dotx = sigma(y-x) \doty = rho x-y - xz \dotz = -beta z + xy
  • Probability:
    • TeX: \[P(E) = {n \choose k} p^k (1-p)^{ n-k } \]
    • asciiMath: P(E) = ((n),(k)) p^k (1-p)^(n-k)

captura de pantalla de 2016-07-14 17 18 59

  • And, of course, the quadratic formula:
    • TeX: -b \pm \sqrt{b^2 - 4ac} \over 2a
    • asciiMath x=-b+- sqrt(b^2-4ac)/2a

captura de pantalla de 2016-07-14 17 18 33

mlopezgva avatar Nov 08 '22 15:11 mlopezgva