Back to blog
March 2, 2026 · 5 min read

Writing Math and Science Notes
with KaTeX in Claspt

VS
Varinder Singh
Founder, Claspt
Person solving geometry examples on a tablet

If you work with equations, formulas, or chemical notation, most note-taking apps leave you with two options: paste images of your formulas, or use a separate LaTeX editor and copy the output. Claspt renders KaTeX natively — write your formulas in markdown and see them rendered instantly.

Why KaTeX?

KaTeX is the fastest LaTeX math rendering library available. It renders on the client side in milliseconds, supports the vast majority of LaTeX math syntax, and produces high-quality typeset output identical to what you would see in a published paper.

Claspt uses KaTeX as a built-in markdown extension — enabled by default. There is nothing to install, configure, or toggle. Write LaTeX math syntax in your notes and it renders in the preview.

Inline Math

Wrap math in single dollar signs for inline formulas that flow with your text:

markdown
The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ where
$a \neq 0$.

Einstein's famous equation $E = mc^2$ relates energy and mass.

The probability is $P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$ by Bayes' theorem.

Inline math renders at text size, aligned with the surrounding words. Use it for referencing variables, short formulas, or mathematical notation within explanatory text.

Block Math

For standalone equations that need their own line, use double dollar signs:

markdown
$$
\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}
$$

$$
\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}
$$

$$
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
$$

Block equations render centered on their own line, at a larger size. Use them for key results, derivation steps, or any formula that deserves visual emphasis.

Chemical Formulas

Claspt also includes a dedicated chemical formula extension. Write chemical equations and see properly formatted notation with subscripts, superscripts, and reaction arrows:

markdown
Photosynthesis:
$$
6CO_2 + 6H_2O \xrightarrow{light} C_6H_{12}O_6 + 6O_2
$$

Combustion of methane:
$$
CH_4 + 2O_2 \rightarrow CO_2 + 2H_2O
$$

The chemical formula extension renders subscripts and reaction arrows correctly, without needing the full mhchem LaTeX package syntax for simple equations.

Real Use Cases

Academic Research Notes

You are reading a paper on neural network optimization. Your Claspt page has the key equations, your commentary, and the API key for the GPU compute service you use for experiments — all on one page, encrypted where it needs to be:

research-notes.md
# Attention Is All You Need — Notes

## Scaled Dot-Product Attention

The attention function maps a query and key-value pairs to an output:

$$
Attention(Q, K, V) = softmax\left(\frac{QK^T}{\sqrt{d_k}}\right)V
$$

Where $d_k$ is the dimension of the key vectors.
The scaling factor $\frac{1}{\sqrt{d_k}}$ prevents softmax
saturation for large $d_k$.

:::secret[GPU Compute API]
provider: Lambda Cloud
api_key:  lc_abc123def456
:::

Engineering Calculations

An engineer documenting stress analysis can write the formulas inline with material specifications and project credentials:

stress-analysis.md
# Bridge Load Analysis

## Bending Stress

$$
\sigma = \frac{M \cdot y}{I}
$$

Where:
- $M$ = bending moment (N·m)
- $y$ = distance from neutral axis (m)
- $I$ = second moment of area (m⁴)

For our steel I-beam (W310x97):
$I = 222 \times 10^6 \text{ mm}^4$

Teaching and Tutoring

A tutor keeping student progress notes with lesson-specific formulas and the student's login credentials for the learning platform — private notes that only the tutor can access, with biometric unlock on a tablet.

Math Is Enabled by Default

KaTeX is one of the 5 extensions enabled by default in Claspt, alongside Mermaid, Callouts, Wiki-links, and Footnotes. You do not need to configure anything. Write $...$ or $$...$$ and it renders.

The chemical formula extension is available as a separate toggle in Settings → Markdown Extensions. Both are free on every tier — no Pro subscription needed for math rendering.

Same Rendering Everywhere

A formula you write on macOS renders identically on Windows and Linux. Claspt uses the same KaTeX engine across all desktop platforms. When mobile apps arrive, the same rendering engine will ensure your equations look identical there too.

Try Claspt Free

Free on desktop. KaTeX math rendering enabled by default. Chemical formulas included.

Download Free