Quickly inspect TeX Source in the Browser
You can parse TeX code or a single .tex file with a custom Parser in the Browser and check limited HTML/MathML Preview and syntax diagnostics. Source is not sent to or stored on the DevelopTools Server.
Enter and check formula delimitersConclusion: Separate simple preview from full LaTeX compile
Check pairs of $...$, \(...\), and \[...\], and limit commands to those supported by the current tool. $$ is not guaranteed as display syntax.
Even a valid standard LaTeX expression may be unsupported by the current limited Renderer.
Check with a minimal example
Inline: \( \alpha + \beta \)
Display: \[ \frac{a}{b} \]
Check the delimiters, command, and environment one at a time using a minimal source, then return to the original source from the point where the issue disappears.
Eliminate causes of non-display from the top down.
- Missing delimiter
- Missing brace
- Unsupported Commands
- Unsupported environments
- Package and Macro dependencies
- Differences from the production engine
This Viewer is a custom lightweight TeX parser
The current tool does not run KaTeX, MathJax, pdfLaTeX, XeLaTeX, or LuaLaTeX. It is a simple viewer that parses part of TeX with JavaScript in the repository and converts it into safe HTML and MathML. It does not reproduce a complete document compile, PDF generation, or package execution in TeX Live or Overleaf.
| Algorithm | Main output | Current tool |
|---|---|---|
| Custom lightweight parser | Limited TeX to HTML and MathML | Use it. It is not a versioned external renderer |
| KaTeX | Render formulas in the supported range as HTML, MathML, or similar formats | Unused |
| MathJax | Web-oriented output from the TeX Input Processor | Unused |
| LaTeX Engine | Typeset a document and generate a PDF or similar output. | Unused |
Do not conclude that "it works in Overleaf, so it renders the same in this viewer" or "there is no error, so the production compile succeeded." Perform the final verification using the specified engine, packages, fonts, and build procedure.
Supported scope of the current TeX and LaTeX preview
| Category | Supported | Current boundary |
|---|---|---|
| Input | Direct input; select or drop one .tex or .txt file; UTF-8 or Shift_JIS | Multiple-file projects, URL retrieval, and include are not supported. |
| Display | Split and single display for Source/Preview, Light/Dark, wrapping, and size adjustment | PDF Preview and image Export are not supported. |
| Document | Headings, paragraphs, emphasis, lists, quotes, verbatim text, tabular content, and some references | Do not typeset document classes or page layouts |
| formula | Limited conversion of $...$, \(...\), \[...\], and equation, align, and gather | Do not guarantee $$...$$ as display syntax; aligned, matrix, cases, and array are unsupported. |
| Diagnostics | Display braces, single $, begin/end, and unsupported commands with line numbers. | Does not diagnose Missing $ inserted, Undefined control sequence, column counts, or Overfull hbox like an actual compiler |
| Package and Macro | You can write \usepackage, but packages are not executed. | Does not expand newcommand, def, BibTeX, TikZ, graphicx, and similar items |
| output | TeX Copy / save, Preview HTML save / separate Tab / print | Standalone Copy of PDF, SVG, PNG, and MathML is not supported. |
Do not provide guidance that assumes features absent from the screen. A warning for an unsupported command does not conclusively mean invalid LaTeX; it indicates that this custom lightweight renderer does not support it.
Check formula delimiters and environments within the implementation scope
| Input | Purpose | Current tool |
|---|---|---|
| $ E = mc^2 $ | Inline math | Supported |
| \( E = mc^2 \) | Inline math | Supported |
| \[ E = mc^2 \] | Display formulas | Supported |
| $$ E = mc^2 $$ | Alternative line notation derived from Plain TeX | Unsupported as display syntax |
| equation, align, and gather | Multi-line formulas | Limited support |
| aligned, matrix, pmatrix, cases, and array | Structure within a formula | Not supported by the current renderer |
An inline formula is \( E = mc^2 \).
\[
\sum_{n=1}^{\infty} \frac{1}{n^2}
\]
Correct standard LaTeX syntax, syntax supported by KaTeX/MathJax, and syntax supported by the current tool are different. If a formula does not render, check delimiters, commands, environments, and brackets in order.
Read errors separately from unsupported warnings
| Display | What the current tool detects | judgment |
|---|---|---|
| Error | Extra or unclosed curly braces, unclosed inline $, and begin/end mismatches | Move to the input location and fix the source. |
| Warning | No document environment; unsupported command | Distinguish whether it is valid in full LaTeX or unsupported by the tool |
| Unsupported diagnostics | Missing $ inserted, Extra alignment tab, Overfull hbox, File not found, and similar errors | Check in production engine logs. |
Diagnostics include line numbers and source start positions, and selecting an item moves to the applicable line. Column numbers and the full compiler log are not displayed. Input source is retained even when an error occurs, and you can preview again after fixing it.
\begin{align}
a &= b
\end{equation}
Displayed text is diagnostic output from the current parser. It does not reproduce LaTeX engine errors such as Undefined control sequence or Missing $ inserted verbatim.
Verify Packages, images, Macros, and Engines in the production environment.
- Entries such as \usepackage{amsmath} are retained as source, but package code is not loaded.
- Image files in \includegraphics{figure.png}, BibTeX, and split sources are not loaded together.
- Custom macros created with \newcommand or \def are not defined or expanded.
- There is no Engine selection feature for pdfLaTeX, XeLaTeX, or LuaLaTeX. Japanese typesetting and Font settings are not reproduced either.
- Overfull \hbox is a Box overflow Warning rather than a Compile-stopping Error, but the current Viewer does not detect it.
Quick preview: DevelopTools custom parser → HTML / MathML
Final check: project LaTeX engine + packages + fonts + resources → PDF
Japanese text can be displayed as HTML using browser fonts, but that does not mean Japanese LaTeX typesetting is supported. Check documents using LuaTeX-ja and similar tools in an environment where the required package and engine are installed.
The boundary for safely handling input TeX in the browser
TeX Source, formulas, author names, and diagnostic targets are parsed in the Browser, and the Tool itself does not fetch or send Source externally through sendBeacon. Only settings such as Theme and Editor Size are stored in LocalStorage; Source and history are not stored.
- Preview is displayed in srcdoc of a sandboxed iframe separate from the Application DOM.
- Set a Content Security Policy of default-src none for the generated preview.
- Escape Raw HTML and diagnostic messages; do not execute input scripts.
- Make only https, http, and mailto links from \href and \url; do not turn javascript: or data: into links.
- Do not unconditionally allow external images or HTML extension commands.
Avoid stating that “there is absolutely no communication,” including site-wide ads and Analytics, Browser Extensions, and organizational Networks. For unpublished papers or internal materials, prioritize organizational Policy.
Check Realtime Preview, large Sources, and Mobile.
Realtime Preview waits 220ms after input before updating; for Sources exceeding 500,000 bytes, it stops automatic updates and prompts for manual updates. Issue display is also limited to 100 items. Input is not cleared, so you can continue editing.
- Measure render time incrementally, starting with about 1 KB, 10 KB, and 100 KB.
- Check whether the page remains operable with deeply nested braces or many unsupported commands.
- Scroll horizontally within the preview for long formulas; do not shrink them excessively.
- At 900 px or below, arrange Source and Preview vertically and allow switching display modes.
- Adjust font size, editor height, and left-right ratio to compare source with results.
Macro expansion itself is not implemented, so KaTeX maxExpand and maxSize settings are not used. Reduce UI load through custom parser input size, diagnostic count, and debounce.
Separate checks by purpose within DevelopTools
- Check the entire Markdown document in Markdown Viewer
- Convert between Markdown and HTML
- Compare the TeX source before and after the fix with a text diff
- Check Unicode symbols and Code Points
Simple Preview of TeX formulas and Source, Markdown document display, HTML conversion, Text Diff, and Unicode references are separate features. This does not claim that TeX can be fully converted to Markdown or HTML.
Use primary sources appropriately for LaTeX, KaTeX, and MathJax
- The LaTeX Project
- LaTeX2e unofficial reference manual
- KaTeX: Supported Functions
- KaTeX: Options
- MathJax: TeX and LaTeX Support
- MathJax: Safe Extension
- CTAN: LuaTeX-ja
- Overleaf: Errors
Prioritize the LaTeX Project for LaTeX syntax and engines, CTAN and providers for packages, and their respective official documentation for KaTeX and MathJax. The current tool uses neither library, so it does not republish supported functions as the current tool's compatibility list.
Summary
- Check start and end delimiters as a pair
- View the mapping table for inline and display
- Distinguish valid LaTeX from unsupported tool features
Check Source, Math Mode, Command, Environment, Renderer, and Package/Engine in that order to distinguish input Errors from unsupported Web simple Preview features.
Example: identify why a LaTeX formula does not display
Prepare the minimum source that reproduces the issue: “Inline: \( \alpha + \beta \) / Display: \[ \frac{a}{b} \]”, then check the source and diagnostics together.
Do not determine full LaTeX success or failure from the lightweight preview alone; compare production engine logs with official documentation.
- Keep the original Source and enter a minimal Copy that reproduces the issue.
- Check diagnostics for delimiters, braces, begin/end, and unsupported commands.
- Go from the diagnostic item to the relevant line and fix only one location at a time.
- Confirm changes with Realtime Preview or a manual update.
- Save the corrected version and perform the final compile with the specified LaTeX engine and package.
The current tool does not modify or supplement source and does not generate PDFs. Retain the original source, and use production build errors and warnings for the final decision.
Frequently asked questions
- Do you use KaTeX, MathJax, or TeX Live?
- It is not used. Custom JavaScript in the Repository performs a simple conversion of limited TeX to HTML and MathML. It is not a full LaTeX Compiler.
- Can Packages, images, Custom Macros, and multiple tex files also be displayed?
- Cannot display. Only basic syntax from a single Source is supported; Package execution, image Files, BibTeX, include, and expansion of newcommand / def are unsupported.
- Are input Sources and diagnostic details sent to or stored externally?
- The Tool does not transmit data externally and does not store Source or history in LocalStorage. Only Files explicitly saved and display settings are stored.