MathJax Cheatsheet: Unterschied zwischen den Versionen
Aus MattWiki
Matt (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Matt (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
(10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
This is a cheat sheet on which code / markdown notation leads to which MathJax output | This is a cheat sheet on which code / markdown notation leads to which MathJax output. | ||
[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> | |||
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 == | ||
{| | {| class="wikitable" style="background-color:#ffffff;" | ||
!Description | !Description | ||
!Example | !Example | ||
!Code / Markdown | !LaTeX Code / Markdown | ||
|- | |||
|Fractions | |||
|<math>\frac{km}{h}</math> | |||
|<code>\frac{km}{h}</code> | |||
|- | |||
|Text with spaces | |||
|<math>\text{kilometers or miles}</math> | |||
|<code>\text{kilometers or miles}</code> | |||
|- | |||
|Superscript / Exponent | |||
|<math>a^2 + b^2 = c^2</math> | |||
|<code>a^2 + b^2 = c^2</code> | |||
|- | |- | ||
|Subscript | |Subscript | ||
|<math>a_1..a_n</math> | |<math>a_1..a_n</math> | ||
| | |<code>a_1..a_n</code> | ||
|- | |- | ||
|Double Subscript | |Double Subscript | ||
Zeile 27: | Zeile 36: | ||
|<code>{r_{0_1} + r_{0_2} + ... + r_{0_n}</code> | |<code>{r_{0_1} + r_{0_2} + ... + r_{0_n}</code> | ||
|- | |- | ||
| | |Overline one character | ||
|<math>a^ | |<math>\overline a</math> | ||
| | |<code>\overline a</code> | ||
|- | |||
|Overline multiple characters | |||
|<math>\overline {AB}</math> | |||
|<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> | |||
|- | |||
|Sum of a set | |||
|<math>\sum_{i=1}^n a_i</math> | |||
|<code>\sum_{i=1}^n a_i</code> | |||
|- | |||
|Sum of a set (larger) | |||
|<math>\displaystyle \sum_{i=1}^n a_i</math> | |||
|<code>\displaystyle \sum_{i=1}^n a_i</code> | |||
|- | |- | ||
|Matrix | |Matrix with Parentheses | ||
|<math>\begin{pmatrix} | |||
0 & 1 \\ | |||
1 & 0 | |||
\end{pmatrix}</math> | |||
| | | | ||
\begin{pmatrix} | |||
0 & 1 \\ | |||
1 & 0 | |||
\end{pmatrix} | |||
|- | |||
|Matrix with Brackets | |||
|<math>\begin{bmatrix} | |||
0 & 1 \\ | |||
1 & 0 | |||
\end{bmatrix}</math> | |||
| | | | ||
\begin{bmatrix} | |||
0 & 1 \\ | |||
1 & 0 | |||
\end{bmatrix} | |||
|- | |- | ||
|Complex Matrix | |Complex Matrix with Parentheses | ||
|<math>\begin{pmatrix} | |<math>\begin{pmatrix} | ||
& Bob & Alice \\ | & Bob & Alice \\ | ||
Zeile 41: | Zeile 88: | ||
Alice & 1 & 0 | Alice & 1 & 0 | ||
\end{pmatrix}</math> | \end{pmatrix}</math> | ||
|\begin{pmatrix} & Bob & Alice \\ | | | ||
\begin{pmatrix} | |||
& Bob & Alice \\ | |||
Bob & 0 & 1 \\ | |||
Alice & 1 & 0 | |||
\end{pmatrix} | |||
|} | |} | ||
=== | == Sources == | ||
I found the following sources which helped me out: | |||
* https://de.wikipedia.org/wiki/Liste_mathematischer_Symbole (German) | |||
* https://en.wikipedia.org/wiki/Glossary_of_mathematical_symbols | |||
* https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference | |||
* https://easy-copy-mathjax.nakaken88.com/en/matrix/ | |||
* https://jojozhuang.github.io/tutorial/mathjax-cheat-sheet-for-mathematical-notation/ | |||
* https://bearnok.com/grva/en/knowledge/software/mathjax | |||
Aktuelle Version vom 3. Mai 2025, 23:59 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 |
---|---|---|
Fractions | \frac{km}{h}
| |
Text with spaces | \text{kilometers or miles}
| |
Superscript / Exponent | a^2 + b^2 = c^2
| |
Subscript | a_1..a_n
| |
Double Subscript | {r_{0_1} + r_{0_2} + ... + r_{0_n}
| |
Overline one character | \overline a
| |
Overline multiple characters | \overline {AB}
| |
Hat over one character | \hat a
| |
Hat over two characters | \widehat {ab}
| |
Sum of a set | \sum_{i=1}^n a_i
| |
Sum of a set (larger) | \displaystyle \sum_{i=1}^n a_i
| |
Matrix with Parentheses |
\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} | |
Matrix with Brackets |
\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} | |
Complex Matrix with Parentheses |
\begin{pmatrix} & Bob & Alice \\ Bob & 0 & 1 \\ Alice & 1 & 0 \end{pmatrix} |
Sources
I found the following sources which helped me out:
- https://de.wikipedia.org/wiki/Liste_mathematischer_Symbole (German)
- https://en.wikipedia.org/wiki/Glossary_of_mathematical_symbols
- https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference
- https://easy-copy-mathjax.nakaken88.com/en/matrix/
- https://jojozhuang.github.io/tutorial/mathjax-cheat-sheet-for-mathematical-notation/
- https://bearnok.com/grva/en/knowledge/software/mathjax