¶¶Òõ̽̽

Markdown and TeX

Author

Clayton Cafiero

Published

2025-01-17

Markdown

Markdown has become the lingua franca for README files and all manner of text and documentation. For example, my entire textbook and the page you are reading now are written in Markdown.

What makes Markdown so appealing is its simple syntax.

# This is a level one heading, H1

## Here's an H2 heading

### Here's an H3 heading

This gets rendered as

You can create bullets with single asterisks or hyphens:

- These are bullets
- Another bullet
- Yet another
  - You can nest them by indenting with tab
  - Yay

This gets rendered as

You can format text with boldface, italics, etc.

You can format text as **boldface**, _italics_, etc.

This gets rendered as

That’s 90% of all the Markdown you’re likely to need. If you want more, Markdown does support tables and other goodies.

Here’s a sandbox you can play in, with syntax hints: .

Documentation is here .

There are many dialects of Markdown, but if you stick to the basics, you shouldn’t have any portability issues.

Most dialects support inline or blocked TeX snippets (e.g., KeTeX or other). For inline TeX (for typesetting math), delimit TeX with $.

The formula for the volume of a sphere is $V = \frac{4}{3} \pi r^3$.
A DFA is a five-tuple: $M = (Q, \Sigma, \delta, q_0, F)$
In TeX, the caret (^) is used to typeset exponents or superscripts, the underscore (\_) is used to typeset subscripts.
For Greek symbols, try these: $\alpha$, $\beta$, $\gamma$, or $\Sigma$, $\Pi$, $\Delta$, _etc_.

This gets rendered as

Here’s the code for some commonly used symbols:

$\cup$ set union
$\cap$ set intersection
$\in$ set membership
$\not\in$ not a member
$\geq$ greater than or equal to
$\leq$ less than or equal to

This gets rendered as

Tools

There are lots of tools you can use to work with Markdown and TeX:

  • MarkText (Markdown with built-in support for LaTeX)
  • Obsidian (Markdown with built-in support for LaTeX)
  • Zettlr (Markdown with built-in support for LaTeX)
  • Jupyter Notebook or JupyterLab (Markdown with built-in support for LaTeX)
  • TeXShop (for TeX only)

Most IDEs will have either built-in support or plugins (e.g., VS Code, JetBrains tools).

There are more heavyweight tools (which are probably more than you need and have a significant DIY element):

  • Pandoc
  • Quarto (which is what I use for book and web pages)

Find a solution that works for you. If you’re new to it, start with something simple.



Copyright © 2024–2025 Clayton Cafiero

Reuse