MathJax Cheatsheet: Unterschied zwischen den Versionen

Aus MattWiki
Keine Bearbeitungszusammenfassung
Markierungen: Manuelle Zurücksetzung Visuelle Bearbeitung
Keine Bearbeitungszusammenfassung
 
Zeile 3: Zeile 3:
[https://www.mathjax.org/ MathJax] is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.
[https://www.mathjax.org/ MathJax] is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.


== MathJax in Obsidian.md ==
When using MathJax inside Obsidian.md the markdown code representing the MathJax formula needs start and end with the dollar sign, i.e.: <code>$a_1..a_n$</code>
When using MathJax inside Obsidian.md the markdown code representing the MathJax formula needs start and end with the dollar sign, i.e.: <code>$a_1..a_n$</code>
In order to show fractions a little bit bigger and centered use two dollar signs, i.e.: <code><nowiki>$$a = \frac{\sqrt{b^2 + c^2}}{2}$$</nowiki></code>
Printing little bigger works too with <code>$\displaystyle$</code> ahead of the fraction


== Cheatsheet ==
== Cheatsheet ==
Zeile 30: Zeile 35:
|<math>\overline {AB}</math>
|<math>\overline {AB}</math>
|<code>\overline {AB}</code>
|<code>\overline {AB}</code>
|-
|Hat over one character
|<math>\hat a</math>
|<code>\hat a</code>
|-
|Hat over two characters
|<math>\widehat {ab}</math>
|<code>\widehat {ab}</code>
|-
|-
|Matrix with Parentheses
|Matrix with Parentheses

Aktuelle Version vom 26. Februar 2025, 08:15 Uhr

This is a cheat sheet on which code / markdown notation leads to which MathJax output.

MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.

MathJax in Obsidian.md

When using MathJax inside Obsidian.md the markdown code representing the MathJax formula needs start and end with the dollar sign, i.e.: $a_1..a_n$

In order to show fractions a little bit bigger and centered use two dollar signs, i.e.: $$a = \frac{\sqrt{b^2 + c^2}}{2}$$

Printing little bigger works too with $\displaystyle$ ahead of the fraction

Cheatsheet

Description Example LaTeX Code / Markdown
Subscript a1..an a_1..a_n
Double Subscript r01+r02+...+r0n {r_{0_1}​​ + r_{0_2} ​+ ... + r_{0_n}
Superscript / Exponent a2+b2=c2 a^2 + b^2 = c^2
Overline one character a \overline a
Overline multiple characters AB \overline {AB}
Hat over one character a^ \hat a
Hat over two characters ab^ \widehat {ab}
Matrix with Parentheses (0110)
\begin{pmatrix}
0 & 1 \\ 
1 & 0
\end{pmatrix}
Complex Matrix with Parentheses (BobAliceBob01Alice10)
\begin{pmatrix}
 & ​Bob & Alice \\
Bob & 0 & 1 \\
Alice & 1 & 0  
\end{pmatrix}


Sources

I found the following sources which helped me out: