Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Converts LaTeX article-class .tex documents to Quarto .qmd format for multi-format publishing (HTML, PDF, Word). Use when asked to convert, port, migrate, or translate a .tex LaTeX file to Quarto; when porting an academic paper or manuscript from LaTeX to Quarto; when a .tex document needs to render to HTML, Word, or Typst PDF. Covers preamble → YAML front matter, section headings, text formatting, math, citations (natbib/biblatex), cross-references, figures, tables, lists, footnotes, hyperlinks
.claude/skills/brycewang-stanford-latex-to-quarto/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 89% | 11 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 185% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 94% | 0% |
| case-22 | ✓→✗ | ▼ Worse | 98% | 0% |
| case-21 | ✓→✓ | = Same ✓ | 112% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 117% | 0% |
Convert a full LaTeX .tex article to a Quarto .qmd document that renders correctly to HTML, PDF (Typst or LaTeX), and Word. This skill handles the entire conversion pipeline: preamble extraction, document structure, and all inline/block transformations.
This skill writes the output file (overwriting the input or writing to a second path). Before writing, tell the user what file will be changed and remind them that git diff or file history can recover the original.
| Position | Required | Description | |----------|----------|-------------| | 1 | Yes | Path to the input .tex file (e.g., paper/paper.tex) | | 2 | No | Output .qmd path. Defaults to same directory, .qmd extension. |
Example invocations:
/latex-to-quarto paper/paper.tex
/latex-to-quarto paper/paper.tex paper/paper.qmd| Task | Reference File | |------|----------------| | \documentclass, \usepackage, \title, \author → YAML | 01-preamble-yaml.md | | \begin{document}, \maketitle, \begin{abstract}, \appendix | 02-document-structure.md | | \textbf, \emph, \texttt, \footnote, \href | 03-text-formatting.md | | equation, align, gather, inline math delimiters | 04-math.md | | \cite, \citep, \citet, natbib/biblatex commands | 05-citations.md | | \label, \ref, \autoref, \eqref, prefix mapping | 06-cross-references.md | | \includegraphics, figure environment, subfigures | 07-figures.md | | tabular, table, booktabs, \multicolumn | 08-tables.md | | \section, \subsection, itemize, enumerate | 09-sections-lists.md | | Special characters, \newpage, verbatim, \input | 10-misc.md |
Identify the input .tex path (arg 1) and output path (arg 2). If arg 2 is omitted, replace the .tex extension with .qmd in the same directory.
Use the Read tool to load the full .tex file. Hold the entire content in memory — you will produce one complete .qmd file at the end.
Everything before \begin{document} is the preamble. Extract:
\documentclass options → YAML format: settings\title{}, \author{}, \date{} → YAML title:, author:, date:\bibliography{file} / \addbibresource{file} → YAML bibliography:geometry, setspace, natbib, biblatex) → YAML format optionsSee 01-preamble-yaml.md for the full mapping table.
Remove \begin{document} and \end{document}. Remove \maketitle (title is rendered from YAML automatically). Convert \begin{abstract}...\end{abstract} to YAML abstract:. See 02-document-structure.md.
Work through the full document body and apply every applicable rule. Key principles:
$...$ or $$...$$ except tomove \label{} outside display math and convert delimiters (\(...\) → $...$).
\textbf{\emph{text}} → ***text***. Process inner commands first.require rules from multiple categories.
Apply reference files in this order (structural → inline):
Combine:
--- delimiters)---)Use the Write tool to write the complete .qmd file in one pass. Do not use Edit for individual substitutions — a single full write ensures nothing is missed.
Tell the user:
quarto render to verify the outputLaTeX uses a \documentclass preamble; Quarto uses YAML front matter between ---.
latex% LaTeX preamble \documentclass[12pt,a4paper]{article} \usepackage[margin=1in]{geometry} \title{My Paper} \author{Jane Doe} \date{\today} \bibliography{refs}
yaml# Quarto YAML front matter --- title: "My Paper" author: "Jane Doe" date: today bibliography: refs.bib format: html: default pdf: documentclass: article papersize: a4 fontsize: 12pt geometry: margin=1in ---
Unlike conversion to Typst, Quarto uses LaTeX math directly. Inline \(...\) → $...$; display \[...\] → $$...$$. Math content (operators, symbols, matrices) stays unchanged.
\citep{key} → [@key]; \citet{key} → @key. The .bib file is referenced in YAML and left unchanged.
@label Not \ref{}\ref{fig:map} → @fig-map. Labels move from standalone \label{} commands into element attribute blocks {#fig-map}.
Input (paper.tex):
latex\documentclass[12pt]{article} \usepackage{natbib} \title{My Study} \author{Jane Doe} \date{2025} \begin{document} \maketitle \begin{abstract} We examine the effect of X on Y. \end{abstract} \section{Introduction} Prior work \citep{smith2020} shows that $x > 0$. See Figure~\ref{fig:map} for an overview. \begin{figure}[h] \centering \includegraphics[width=0.8\textwidth]{figs/map.pdf} \caption{Study region.} \label{fig:map} \end{figure} \bibliography{refs} \end{document}
Output (paper.qmd):
markdown--- title: "My Study" author: "Jane Doe" date: 2025 bibliography: refs.bib --- ## Abstract We examine the effect of X on Y. # Introduction Prior work [@smith2020] shows that $x > 0$. See @fig-map for an overview. {#fig-map width=80% fig-align="center"}
Flag these in your report with a suggested fix but no automatic conversion:
| Pattern | Suggested Quarto Equivalent | |---------|------------------------------| | \begin{theorem}, \begin{proof}, \begin{lemma} | ::: {.callout-note} div, or install a theorem extension | | \newcommand{}{} / \renewcommand{}{} | Inline the macro expansion throughout; flag remaining uses | | \input{file} / \include{file} | Inline contents or use {{< include file.qmd >}} shortcode | | \vspace{} / \hspace{} | Remove or replace with CSS; no direct Quarto equivalent | | \multicolumn{}{}{} in tables | Requires manual table restructuring | | TikZ / PGF diagrams | Remove or replace with Mermaid/Observable JS | | Beamer \begin{frame} | Switch to format: revealjs with ## slide headings | | \bibliographystyle{} | Remove; use csl: in YAML if a specific citation style is needed | | Multiple \label in one align block | Each labeled row may need its own equation block |
$...$ and $$...$$\includegraphics and \bibliography (adjust extension if needed)@ref and [@citation] patterns already in correct Quarto form\begin{verbatim}...\end{verbatim} (convert to fenced block, keep content)| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | pass→pass | 10,485 | 8,483 | -19% | 1 | 1 | 0% | 2,044 | 4,329 | +112% | 0 | 0 | — |
case-22 | pass→fail | 10,077 | 7,809 | -23% | 1 | 1 | 0% | 2,064 | 4,084 | +98% | 0 | 0 | — |
case-10 | pass→pass | 8,381 | 5,225 | -38% | 1 | 1 | 0% | 1,729 | 3,746 | +117% | 0 | 0 | — |
case-01 | fail→fail | 3,190 | 2,826 | -11% | 1 | 1 | 0% | 463 | 2,940 | +535% | 0 | 0 | — |
case-02 | fail→fail | 13,524 | 1,663 | -88% | 1 | 1 | 0% | 2,681 | 2,859 | +7% | 0 | 0 | — |
case-03 | fail→fail | 10,731 | 2,853 | -73% | 1 | 1 | 0% | 2,581 | 2,880 | +12% | 0 | 0 | — |
case-04 | fail→fail | 9,351 | 11,808 | +26% | 1 | 1 | 0% | 1,832 | 5,043 | +175% | 0 | 0 | — |
case-05 | fail→fail | 7,850 | 10,744 | +37% | 1 | 1 | 0% | 1,528 | 4,685 | +207% | 0 | 0 | — |
case-06 | fail→fail | 9,503 | 4,555 | -52% | 1 | 1 | 0% | 2,021 | 2,771 | +37% | 0 | 0 | — |
case-07 | pass→pass | 1,964 | 2,048 | +4% | 1 | 1 | 0% | 393 | 2,914 | +641% | 0 | 0 | — |
case-08 | fail→pass | 5,487 | 2,980 | -46% | 1 | 1 | 0% | 1,094 | 3,113 | +185% | 0 | 0 | — |
case-09 | pass→pass | 5,165 | 3,176 | -39% | 1 | 1 | 0% | 1,074 | 3,114 | +190% | 0 | 0 | — |
case-11 | pass→pass | 7,159 | 4,465 | -38% | 1 | 1 | 0% | 1,746 | 3,497 | +100% | 0 | 0 | — |
case-12 | fail→pass | 8,410 | 4,992 | -41% | 1 | 1 | 0% | 1,864 | 3,608 | +94% | 0 | 0 | — |
case-13 | pass→pass | 4,226 | 3,282 | -22% | 1 | 1 | 0% | 852 | 3,244 | +281% | 0 | 0 | — |
case-14 | pass→pass | 7,761 | 3,524 | -55% | 1 | 1 | 0% | 1,409 | 3,251 | +131% | 0 | 0 | — |
case-20 | fail→fail | 12,833 | 8,413 | -34% | 1 | 1 | 0% | 2,460 | 4,278 | +74% | 0 | 0 | — |
case-15 | pass→pass | 7,242 | 4,293 | -41% | 1 | 1 | 0% | 1,271 | 3,275 | +158% | 0 | 0 | — |
case-16 | fail→fail | 8,773 | 6,519 | -26% | 1 | 1 | 0% | 1,950 | 3,813 | +96% | 0 | 0 | — |
case-17 | pass→pass | 10,533 | 5,594 | -47% | 1 | 1 | 0% | 1,935 | 3,623 | +87% | 0 | 0 | — |
case-18 | fail→fail | 13,158 | 6,747 | -49% | 1 | 1 | 0% | 2,565 | 3,959 | +54% | 0 | 0 | — |
case-19 | pass→pass | 5,090 | 3,242 | -36% | 1 | 1 | 0% | 947 | 3,102 | +228% | 0 | 0 | — |
case-23 | fail→fail | 8,880 | 1,386 | -84% | 1 | 1 | 0% | 1,542 | 2,750 | +78% | 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. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of 0 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.