Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up
Online — no install

Convert LaTeX to responsive HTML

Definitions, theorems, exercises, tikz/pstricks figures, BibTeX bibliography, KaTeX formulas. Mobile-readable, with interactive quizzes, variation tables and runnable Python.

Conversion in under 30 seconds for 90% of math courses.

In: your .tex — Out: your course on the web

Sarmate reads LaTeX structures and translates them into mathpad tags (mp-chapter, mp-definition, mp-exercise, mp-figure…) for a responsive rendering with KaTeX, JSXGraph and Skulpt.

TEX LaTeX source
\chapter{Fonctions affines}

\section{Définition}
\begin{definition}
Une fonction $f$ est affine si
$f(x) = ax + b$ avec $a, b \in \mathbb{R}$.
\end{definition}

\begin{exercise}
Tracer la fonction $f(x) = 2x + 3$.
\end{exercise}
HTML Mathpad HTML
<mp-chapter>
  <mp-title>Fonctions affines</mp-title>
  <mp-section>
    <mp-title>Définition</mp-title>
    <mp-definition>
      Une fonction $f$ est affine si
      $f(x) = ax + b$…
    </mp-definition>
    <mp-exercise>…</mp-exercise>
  </mp-section>
</mp-chapter>

Example on a real course

Short example document (integral of a continuous function): definition, theorem, aligned equations, boxed blocks. Compare the original PDF and the converted web version.

LaTeX source

demo.tex — 92 lines — tcolorbox

Original PDF (reference)

pdflatex — 2 pages — 188 KB
PDF page 1 preview

And the result: Mathpad HTML

responsive — KaTeX — JSXGraph — Skulpt — mobile-readable
Mathpad HTML preview of the course

Want to try it with your own .tex file? Create a free account →

What the converter handles

KaTeX formulas

Inline $…$, display $$…$$, align, equation, array. Browser-rendered, with copy-as-LaTeX.

tikz, pstricks, pgfplots

Each figure is server-compiled to PDF then PNG (200 DPI) and embedded in mp-figure with caption.

BibTeX bibliography

.bib next to .tex: entries become mp-cite-entry, \cite{key} becomes clickable mp-cite with back-jump.

Course structures

chapter, section, subsection, definition, theorem, propriete, exercise, remarque… mapped to semantic mp- tags.

Responsive

Tables, figures and long formulas scroll automatically on phone. Readable from 320 to 1920 px.

Cross-references

\label / \ref / \pageref converted to mp-ref — clickable jumps in the document with back-link.

Two ways to get the HTML version

Directly in the LaTeX editor, or via the AI of your choice through the MCP protocol.

Path A — no AI

In the Sarmate LaTeX editor

  • Step 1If your file is not in your online drive, click « + Import a file ».
  • Step 2Open the .tex in the LaTeX editor.
  • Step 3Pick the sarmateWeb (HTML) compiler, then click Compile.
  • ResultA basename_sarmateweb.html file appears in the same folder.
Sign up to test
Path B — via MCP

From the AI of your choice, via MCP

  • PrincipleYou connect Claude, ChatGPT, Gemini, Mistral, Cursor or Le Chat to your Sarmate drive through the MCP protocol.
  • ActionYou ask the AI: « convert my .tex and check the rendering ». It calls the Sarmate tool.
  • Added valueThe AI can then refine: add quizzes, convert tikz into JSXGraph, translate, explain missing packages.
  • RequirementA Sarmate account with an active MCP token. Read the MCP documentation.
Plug an AI via MCP

What is MCP?

The Model Context Protocol is an open standard that lets AI assistants (Claude, ChatGPT, Gemini…) access external tools and data. On Sarmate, it exposes your drive and the LaTeX→HTML converter to the AI of your choice. Learn more about MCP on Sarmate.

Sarmate vs other tools

Comparison on the points that matter for a math course.

tikz/pstricks BibTeX Responsive Online AI / MCP
Sarmate ✓ PNG 200 DPI ✓ mp-cite
Pandoc ~ ~ ✗ local
LaTeXML ~ SVG
htlatex / tex4ht ~
Overleaf ✗ PDF only

Who the tool is designed for

Profiles we had concretely in mind when building the converter.

Secondary-school teachers Course materials to publish online without installing TeX Live or paying a web developer.
Prep / college / university Teachers or students who want to make a lecture handout reusable on tablet and phone.
Researchers in math / physics Articles or notes to share in web form, with BibTeX references and navigable cross-references.
Textbook authors Chapters and exercises as web preview before going to print, with interactive quizzes if needed.

Frequently asked questions

How do I convert a LaTeX file to HTML?

Upload your .tex file into your Sarmate drive, open it in the LaTeX editor, pick the sarmateWeb (HTML) compiler and click Compile. In a few seconds, a basename_sarmateweb.html file is generated in the same folder.

Are tikz and pstricks figures converted?

Yes. Each figure is isolated on the server, compiled to PDF then to PNG (200 DPI), and embedded in mp-figure with its caption. The output is pixel-identical to your PDF.

Do I need to install software?

No. Everything happens online. LaTeX compilation (pdflatex, dvips, pdfcrop, ImageMagick) runs on Sarmate servers.

What happens to my BibTeX bibliography?

Upload your .bib next to the .tex. The converter reads each entry and turns it into an mp-cite-entry. Your \cite{key} become clickable mp-cite with automatic back-jumps.

Can I use an AI to improve the result?

Yes, via the MCP server. Connect Claude, ChatGPT, Gemini, Mistral, Cursor or Le Chat to your drive. Three modes: converter only, hybrid converter+AI, or 100% AI from the .tex. MCP documentation.

Where is the full documentation?

Full guide for .tex → mathpad HTML conversion: compiler, editor steps, drive, common cases (missing packages, figures, .bib).

Your first conversion in under 1 minute

Create an account, upload your .tex, click sarmateWeb, read the result. No TeX Live, no local LaTeX compiler.

Sign up to test the tool Full guide