How to write math equations in markdown using LaTeX syntax with dollar sign delimiters. GitHub, Obsidian, and Jupyter support.
Math expressions in markdown use LaTeX syntax wrapped in dollar sign delimiters. Inline math uses single dollar signs ($x^2$) and display math uses double dollar signs ($$). GitHub added native math rendering in 2022 using MathJax. Obsidian and Jupyter notebooks also support LaTeX math.
Single $ wraps inline math expressions within a sentence.
Double $$ creates a centered equation block on its own line.
Common LaTeX symbols: Greek letters, summation, roots.
| Platform | Supported | Notes |
|---|---|---|
| GitHub | Yes | Native MathJax rendering since 2022 |
| Obsidian | Yes | MathJax rendering built-in |
| Jupyter | Yes | First-class LaTeX support |
| GitLab | Yes | — |
| Discord | No | — |
| Notion | Partial | Inline math block available via /math command |
Spaces inside $ delimiters: $ x^2 $
$x^2$
Spaces immediately inside the dollar signs may prevent the math from rendering on some parsers.
If you write $100, some parsers try to interpret it as math. Write \$100 or use a code span `$100` to display dollar signs literally.
KaTeX (used by many renderers) supports a large subset of LaTeX. Their documentation at katex.org/docs/supported has a complete list of supported functions.
Everything you need to know.
Wrap LaTeX in single $ for inline: $E=mc^2$, or in $$ for a block equation. GitHub renders these with MathJax as of 2022.
Markdown supports two types of code formatting: inline code with single backticks (`) for short snippets, and fenced code blocks with triple backticks (```) for multi-line code with optional syntax highlighting.
Superscript text appears above the normal line of text at a smaller size, commonly used for exponents (x²), ordinals (1st), and footnote numbers. Markdown has no standard superscript syntax — platforms use either caret (^) notation or raw HTML.
Subscript text appears below the normal baseline at a smaller size, used for chemical formulas (H₂O), mathematical notation, and technical content. Like superscript, subscript has no standard markdown syntax and requires either extended markdown or raw HTML.
Paste your markdown and see math / latex rendered instantly with professional themes.