Awesome-Agent-Skills-for-Empirical-Research latex-to-typst
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.
install
source · Clone the upstream repo
git clone https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/22-christopherkenny-skills/skills/latex-to-typst" ~/.claude/skills/brycewang-stanford-awesome-agent-skills-for-empirical-research-latex-to-typst && rm -rf "$T"
manifest:
skills/22-christopherkenny-skills/skills/latex-to-typst/SKILL.mdsource content
LaTeX to Typst Translation Guide
A comprehensive reference for converting LaTeX article-class documents to Typst.
When to Use This Skill
- User asks to convert, port, or translate a
file to.tex.typ - User wants to know the Typst equivalent of a LaTeX command
- User is migrating an academic paper or report from LaTeX to Typst
- User needs help with specific LaTeX environments in Typst
Quick Navigation: Use What Reference
| 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 |
, , numbering | 04-headings-sections.md |
, , | 05-lists.md |
| Math mode, equations, aligned, matrices, operators | 06-math.md |
| Symbol table: arrows, Greek, operators, sets, logic | 07-math-symbols.md |
, environment, subfigures | 08-figures.md |
, , , multirow/multicolumn | 09-tables.md |
BibTeX, biblatex, natbib → , | 10-bibliography.md |
, , , | 11-cross-references.md |
| TikZ → CeTZ diagrams | 12-diagrams-cetz.md |
, , ; footnotes, links | 13-misc.md |
Key Conceptual Differences
Preamble → set
and show
Rules
setshowLaTeX 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.
% LaTeX \documentclass[12pt,a4paper]{article} \usepackage[margin=1in]{geometry} \usepackage{fontenc} \setmainfont{Times New Roman}
// Typst equivalent #set page(paper: "a4", margin: 1in) #set text(font: "Times New Roman", size: 12pt)
No \begin
/\end
Environments
\begin\endMost LaTeX environments have direct Typst function equivalents. For example:
| LaTeX | Typst |
|---|---|
| (block, with space) |
| |
| |
| (markup) |
Content vs. Code Mode
In Typst,
# switches from markup mode into code mode. Inside #{ } blocks or function arguments, you write code. Markup is the default.
Units
| LaTeX | Typst | Notes |
|---|---|---|
| | Same |
| | Same |
| | Same |
| | Same |
| | Same |
| (relative to container) | — |
| | — |
Minimal Article Template
% 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 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.
Workflow for Full Document Conversion
- Convert preamble →
,#set page()
,#set text()
(see 03-page-layout.md, 02-text-formatting.md)#set par() - Convert sectioning →
,=
,==
(see 04-headings-sections.md)=== - Convert math → inline
, block$...$
(see 06-math.md, 07-math-symbols.md)$ ... $ - Convert figures →
(see 08-figures.md)#figure(image(...), caption: [...]) - Convert tables →
or#table(...)
(see 09-tables.md)#figure(table(...), ...) - Convert bibliography →
+#bibliography("refs.bib")
citations (see 10-bibliography.md)@key - Convert TikZ →
with CeTZ (see 12-diagrams-cetz.md)#canvas({...}) - Fix cross-references →
+<label>
(see 11-cross-references.md)@label