Math formulas
You can write math in any text field of a card using LaTeX. Medkit renders it, both in the editor and when studying.
How to insert a formula
- In any rich text field (the front or back of a card, additional info, hidden words) open the formatting bar and tap the Σ button.
- Write the LaTeX code in the field. You'll see a live preview as you type.
- Pick Inline (within the text, like ) or Block (centered and on its own line, for large equations) and tap Insert formula.
- To edit a formula you already created, click on it in the editor and the popover reopens with its code.
There's no need to write
$...$. The Inline or Block selector handles the formatting. Shortcut: Cmd or Ctrl + Enter inserts without going to the button.The golden rule
For an exponent or a subscript to hold more than one character, it goes in braces {}:
The basics
Common symbols
Advanced (better as a block)
These look better as a Block, centered and at a good size.
Complete examples
Three finished formulas, with the code that produces them. You can copy any of them and adapt it.
Quadratic formula
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}pH
pH = -\log[H^+]Area of a circle
A = \pi r^2If the formula doesn't show up
If the LaTeX code is invalid nothing breaks. KaTeX shows the part with the error in red, both in the preview and on the card. The full syntax is in the KaTeX documentation.