LaTeX Editor
Write and preview LaTeX equations with useful notation menus, native source exports, structural checks, MathML and supported AsciiMath conversions.| Check | Status | Evidence | Next action | Copy |
|---|---|---|---|---|
| {{ row.check }} | {{ row.status }} | {{ row.evidence }} | {{ row.action }} |
{{ chartError }}
{{ asciiMathSource || (previewReady ? asciiProjection.issues.join(' ') : 'AsciiMath becomes available after the current equation renders.') }}
Unsupported structure or formatting keeps this conversion unavailable. The LaTeX source and rendered equation remain authoritative.
{{ mathmlSource || 'MathML becomes available after MathJax renders the current source.' }}
LaTeX math is source text that describes an equation's structure rather than its final pixels. Commands such as \frac, \sqrt, and \sum name mathematical constructs. Braces group their arguments, while superscripts, subscripts, and environments arrange parts that would be awkward to represent with plain text alone.
- Macros begin with a backslash and expand to a symbol, operator, structure, or formatting instruction.
- Grouping braces keep an argument together, as in
\frac{a}{b}. - Environments pair
\begin{name}with\end{name}for matrices, aligned equations, cases, and other multi-part structures. - Display math stands on its own line; inline math sits within prose and may place limits or spacing differently.
A rendered equation is an interpretation of the source under a particular command set. Package commands, custom macros, and full-document features can behave differently from one TeX system to another. For that reason, visual proofreading and lexical checks complement each other but do not replace a compile in the final destination.
Converting LaTeX to MathML or AsciiMath also changes representation. MathML can preserve a structured expression for browser and accessibility workflows. AsciiMath is lighter to type but cannot carry every LaTeX package command or formatting choice. Keep the original LaTeX whenever an exact round trip matters.
How to Use This Tool:
Edit one equation or math block, then compare the visual result with the source diagnostics before reusing a conversion.
- Type, paste, or load LaTeX source. A
.texor text file may be up to 250 KiB, and editable source is limited to 120,000 characters. - Choose Display or Inline to match the destination. Use direct construct buttons, categorized notation menus, or the matrix dimensions/brackets control. Select source before wrapping it; native Undo and Redo reverse insertions.
- Copy LaTeX or Download TEX beside the source to keep its exact text and whitespace.
- Compare the rendered equation with the source. Check grouping, limits, fractions, matrices, symbols, and text rather than treating a successful render as proof of correctness.
- Open Source diagnostics and resolve brace, environment, or macro review items. Use a supported AsciiMath conversion or read its unavailable reason; test MathML in its receiving system.
Interpreting Results:
The readiness summary combines lexical review with the current render. A zero-warning result means the bounded checks found no count mismatch or unknown macro; it does not mean the equation is mathematically true or accepted by every LaTeX compiler.
- Brace balance compares unescaped opening and closing brace counts. Equal counts do not prove correct nesting.
- Environment pairs compare detected begin and end counts by environment name. They do not validate nesting order or environment contents.
- Macro registry recognizes a bounded set of common math commands plus macros declared with
\newcommandor\renewcommand. A review item may simply require a package in the target document. - Rendered equation and MathML source come from the current browser render. The AsciiMath projection reads that MathML and is withheld when a structure or style cannot be preserved.
Technical Details:
TeX-style math parsing expands commands and groups their arguments into a mathematical tree. The selected display style changes how that tree is laid out, but it does not change source counts, macro classification, environment checks, or the AsciiMath projection.
Rule Core:
The lexical audit applies four bounded rules to the source.
| Check | Rule | Pass condition | What it does not prove |
|---|---|---|---|
| Brace balance | Count unescaped { and } | Counts are equal | Correct order, nesting, or command arity |
| Environment pairs | Count \begin{name} and \end{name} by name | Net count is zero for every detected name | Correct nesting or valid cells and alignment |
| Macro registry | Scan alphabetic commands, excluding structural controls | Each macro is recognized or declared in the source | Package availability or valid arguments |
| Conversion boundary | Label MathML rendering and AsciiMath projection separately | Always informational | Lossless conversion of advanced commands |
The warning total adds one item for unequal brace counts, one item for each unmatched environment name, and one item for each distinct unknown macro. Counts remain diagnostic evidence rather than a severity score.
Transformation Core:
Rendering and conversion start from the same accepted source but use different paths.
| Output | Transformation | Primary review |
|---|---|---|
| Rendered equation | LaTeX math to parsed tree to SVG | Visual structure, symbols, spacing, and display style |
| MathML | LaTeX math to parsed tree to serialized MathML | Receiving-browser and accessibility compatibility |
| AsciiMath draft | Supported projection from the current parsed MathML tree | Advanced macros, packages, nested groups, and formatting loss |
| Macro composition | Lexical macros grouped into structure, operator, relation, Greek, text/style, and other counts | Category counts are not a syntax or quality score |
The AsciiMath projection preserves supported tree structures and styles. Unsupported constructs produce an explicit unavailable result with a reason; they are never silently flattened or exported as a successful conversion. Keep the native source for exact reuse.
Raster background and 1× to 4× scale affect image and PDF export appearance only. They do not alter the equation source, diagnostics, SVG structure, MathML, or AsciiMath draft.
Limitations and Privacy Notes:
Editing, diagnostics, and rendering occur in the browser. The live URL contains changed source and settings; copying or sharing that URL shares those values. Clear sensitive expressions before sharing a link or using a shared device.
- The renderer supports a practical TeX/LaTeX math subset and selected extensions, not a complete LaTeX document build.
- Unknown macros can be valid custom or package commands; confirm them in the destination rather than deleting them solely to clear a warning.
- A render failure can come from unsupported syntax or an unavailable renderer. The original source remains editable in either case.
Worked Examples:
Missing end of an aligned block
Source beginning with \begin{aligned} a &= b + c \\ d &= e - f has one unmatched aligned environment. Environment pairs reports Review and asks for the missing end marker. Adding \end{aligned} clears that count, after which the two alignment rows still need visual proofreading.
References:
- LaTeX documentation, LaTeX Project.
- TeX and LaTeX Support, MathJax 3.2 documentation.
- MathML Support, MathJax 3.2 documentation.