Formula editor
The Formula editor lets you insert and refine a mathematical formula using LaTeX notation. The AI provides a draft based on your request; you can correct the expression or adjust the title in the widget before saving.
How to invoke it
Ask the AI to add a formula in natural language:
- “Show the quadratic formula”
- “Add the formula for Einstein’s mass-energy equivalence”
- “Display the integral definition of the Fourier transform”
The AI calls edit_formula with a pre-filled draft and opens the widget.
Data fields
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | Yes | A descriptive label for the formula (e.g. “Quadratic formula”, “Newton’s second law”) |
latex | string | Yes | The formula in LaTeX notation |
LaTeX notation
The latex field uses standard LaTeX math syntax. Common examples:
| Expression | LaTeX |
|---|---|
| Quadratic formula | x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} |
| Mass-energy equivalence | E = mc^2 |
| Pythagorean theorem | a^2 + b^2 = c^2 |
| Euler’s identity | e^{i\pi} + 1 = 0 |
| Integral | \int_{a}^{b} f(x)\,dx |
| Summation | \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} |
You do not need to wrap the expression in $...$ or \[...\] delimiters — the component handles rendering automatically.
Tips
- Use the widget to verify rendering. The formula editor renders the LaTeX in real time, so you can confirm the expression looks correct before saving.
- Title should describe, not repeat. Write “Quadratic formula”, not “x equals negative b plus or minus…”.
- Ask the AI by name. If you know the formula you want, just name it — the AI will look it up and write the correct LaTeX.