LaTeX Support
Write mathematical equations and technical documents with LaTeX.
Inline Math
Use single dollar signs for inline equations:
The equation $E = mc^2$ describes mass-energy equivalence.
Display Math
Use double dollar signs for centered equations:
$$
\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$
Supported Packages
Longhand supports common LaTeX packages out of the box:
amsmath- Advanced math formattingamssymb- Mathematical symbolsmathtools- Additional math toolsphysics- Physics notation shortcuts
Examples
Fractions and Roots
$$
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
Matrices
$$
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
$$
Summations and Products
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$
Limits
$$
\lim_{x \to \infty} \frac{1}{x} = 0
$$
PDF Export
When exporting to PDF, LaTeX equations are rendered with full TeX quality. Longhand uses a local LaTeX installation if available, or falls back to MathJax rendering.
Troubleshooting
Equations not rendering
- Check your LaTeX syntax for errors
- Ensure dollar signs are properly matched
- Look for error messages in the preview panel
Installing LaTeX
For best PDF output, install a LaTeX distribution:
- Windows: MiKTeX or TeX Live
- macOS: MacTeX
- Linux: TeX Live