Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Translates LaTeX documents (.tex) to Typst (.typ), focusing on article-class documents. Use when asked to convert, port, migrate, or translate LaTeX to Typst. Covers document structure, text formatting, page layout, math equations and symbols, figures, tables, TikZ-to-CeTZ diagrams, bibliography, cross-references, footnotes, and code blocks. Includes comprehensive symbol mapping tables.
.claude/skills/brycewang-stanford-latex-to-typst/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-22 | ✓→✗ | ▼ Worse | 28% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 82% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 96% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 184% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 63% | 0% |
A comprehensive reference for converting LaTeX article-class documents to Typst.
.tex file to .typ| Task | Reference File | |------|---------------| | Overall document structure, preamble → set rules | 01-document-structure.md | | Bold, italic, fonts, font sizes, colors | 02-text-formatting.md | | Margins, page size, columns, headers/footers | 03-page-layout.md | | \section, \subsection, numbering | 04-headings-sections.md | | itemize, enumerate, description | 05-lists.md | | Math mode, equations, aligned, matrices, operators | 06-math.md | | Symbol table: arrows, Greek, operators, sets, logic | 07-math-symbols.md | | \includegraphics, figure environment, subfigures | 08-figures.md | | tabular, booktabs, tabularx, multirow/multicolumn | 09-tables.md | | BibTeX, biblatex, natbib → bibliography, cite | 10-bibliography.md | | \label, \ref, \eqref, \autoref | 11-cross-references.md | | TikZ → CeTZ diagrams | 12-diagrams-cetz.md | | verbatim, lstlisting, minted; footnotes, links | 13-misc.md |
set and show RulesLaTeX uses a \documentclass{article} preamble with \usepackage calls. Typst replaces this with set rules (for properties) and show rules (for transformations), placed at the top of the document.
tex% LaTeX \documentclass[12pt,a4paper]{article} \usepackage[margin=1in]{geometry} \usepackage{fontenc} \setmainfont{Times New Roman}
typst// Typst equivalent #set page(paper: "a4", margin: 1in) #set text(font: "Times New Roman", size: 12pt)
\begin/\end EnvironmentsMost LaTeX environments have direct Typst function equivalents. For example:
| LaTeX | Typst | |-------|-------| | \begin{equation}...\end{equation} | $ ... $ (block, with space) | | \begin{figure}...\end{figure} | #figure(...) | | \begin{tabular}...\end{tabular} | #table(...) | | \begin{itemize}...\end{itemize} | - item (markup) |
In Typst, # switches from markup mode into code mode. Inside #{ } blocks or function arguments, you write code. Markup is the default.
| LaTeX | Typst | Notes | |-------|-------|-------| | pt | pt | Same | | em | em | Same | | cm | cm | Same | | mm | mm | Same | | in | in | Same | | \textwidth | 100% (relative to container) | — | | 0.5\textwidth | 50% | — |
tex% LaTeX article \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \title{My Paper} \author{Jane Doe} \date{\today} \begin{document} \maketitle \begin{abstract} This paper... \end{abstract} \section{Introduction} Hello world. \end{document}
typst// Typst equivalent #set page(margin: 1in) #set text(size: 12pt) #align(center)[ = My Paper Jane Doe \ #datetime.today().display() ] #set par(justify: true) *Abstract.* This paper... = Introduction Hello world.
For a more polished article template with abstract box, see 01-document-structure.md.
#set page(), #set text(), #set par() (see 03-page-layout.md, 02-text-formatting.md)=, ==, === (see 04-headings-sections.md)$...$, block $ ... $ (see 06-math.md, 07-math-symbols.md)#figure(image(...), caption: [...]) (see 08-figures.md)#table(...) or #figure(table(...), ...) (see 09-tables.md)#bibliography("refs.bib") + @key citations (see 10-bibliography.md)#canvas({...}) with CeTZ (see 12-diagrams-cetz.md)<label> + @label (see 11-cross-references.md)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 6,059 | 2,937 | -52% | 1 | 1 | 0% | 1,149 | 2,090 | +82% | 0 | 0 | — |
case-02 | pass→pass | 7,044 | 5,096 | -28% | 1 | 1 | 0% | 1,298 | 2,542 | +96% | 0 | 0 | — |
case-03 | pass→pass | 3,984 | 1,947 | -51% | 1 | 1 | 0% | 699 | 1,983 | +184% | 0 | 0 | — |
case-04 | pass→pass | 7,028 | 3,094 | -56% | 1 | 1 | 0% | 1,365 | 2,221 | +63% | 0 | 0 | — |
case-05 | pass→pass | 8,464 | 4,061 | -52% | 1 | 1 | 0% | 1,547 | 2,320 | +50% | 0 | 0 | — |
case-06 | pass→pass | 4,520 | 3,230 | -29% | 1 | 1 | 0% | 872 | 2,162 | +148% | 0 | 0 | — |
case-07 | pass→pass | 5,316 | 3,299 | -38% | 1 | 1 | 0% | 933 | 2,147 | +130% | 0 | 0 | — |
case-08 | pass→pass | 5,411 | 3,914 | -28% | 1 | 1 | 0% | 1,019 | 2,271 | +123% | 0 | 0 | — |
case-09 | pass→pass | 3,491 | 1,865 | -47% | 1 | 1 | 0% | 661 | 1,914 | +190% | 0 | 0 | — |
case-10 | pass→pass | 9,488 | 6,595 | -30% | 1 | 1 | 0% | 1,698 | 2,887 | +70% | 0 | 0 | — |
case-11 | pass→pass | 7,663 | 4,294 | -44% | 1 | 1 | 0% | 1,443 | 2,426 | +68% | 0 | 0 | — |
case-12 | pass→pass | 7,702 | 6,236 | -19% | 1 | 1 | 0% | 1,499 | 2,778 | +85% | 0 | 0 | — |
case-13 | pass→pass | 6,743 | 5,290 | -22% | 1 | 1 | 0% | 1,278 | 2,568 | +101% | 0 | 0 | — |
case-14 | pass→pass | 7,951 | 5,429 | -32% | 1 | 1 | 0% | 1,476 | 2,496 | +69% | 0 | 0 | — |
case-15 | pass→pass | 4,541 | 1,816 | -60% | 1 | 1 | 0% | 767 | 1,872 | +144% | 0 | 0 | — |
case-16 | pass→pass | 5,016 | 2,375 | -53% | 1 | 1 | 0% | 891 | 2,055 | +131% | 0 | 0 | — |
case-17 | pass→pass | 5,867 | 4,546 | -23% | 1 | 1 | 0% | 1,086 | 2,479 | +128% | 0 | 0 | — |
case-18 | pass→pass | 1,891 | 1,962 | +4% | 1 | 1 | 0% | 276 | 1,913 | +593% | 0 | 0 | — |
case-19 | pass→pass | 6,419 | 7,126 | +11% | 1 | 1 | 0% | 1,213 | 3,043 | +151% | 0 | 0 | — |
case-20 | pass→pass | 5,776 | 4,026 | -30% | 1 | 1 | 0% | 1,095 | 2,392 | +118% | 0 | 0 | — |
case-21 | pass→pass | 5,896 | 3,554 | -40% | 1 | 1 | 0% | 1,031 | 2,263 | +119% | 0 | 0 | — |
case-22 | pass→fail | 14,829 | 9,812 | -34% | 1 | 1 | 0% | 2,744 | 3,522 | +28% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of -100 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Other measured skills in the registry, with their headline benchmark lift.