latex-to-quarto
Converts LaTeX article-class .tex documents to Quarto .qmd format for multi-format publishing (HTML, PDF, Word)
Install / Use
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill latex-to-quartoInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Content & MediaSupported Platforms
Our assessment of latex-to-quarto
latex-to-quarto scores 91/100 on our quality scale, 159th of 574 Content & Media skills we index (top 28%).
Its SKILL.md is 8.9 KB long, well organised into 23 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
With 4,360 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 3 days ago, so latex-to-quarto is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-27. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
latex-to-quarto compared with similar skills
All 4 of these similar skills score higher than latex-to-quarto; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| latex-to-quarto (this skill)by brycewang-stanford | 91 | 4.4k | 3d ago | SKILL.md |
| siyuanby siyuan-note | 100 | 46.5k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install latex-to-quarto?
- Run
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill latex-to-quarto. The install tabs above show the steps for each supported agent. - Which AI agents does latex-to-quarto work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is latex-to-quarto safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is latex-to-quarto still maintained?
- The repository was last updated 3 days ago, so latex-to-quarto is actively maintained.
Skill content
View source on GitHubname: latex-to-quarto description: '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, and special characters.' metadata: author: Christopher T. Kenny version: 1.0
LaTeX to Quarto Conversion
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.
Input Arguments
| 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
Quick Navigation: Use Which Reference
| 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 |
Step-by-Step Workflow
1. Parse Arguments
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.
2. Read the File
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.
3. Extract and Convert the Preamble
Everything before \begin{document} is the preamble. Extract:
\documentclassoptions → YAMLformat:settings\title{},\author{},\date{}→ YAMLtitle:,author:,date:\bibliography{file}/\addbibresource{file}→ YAMLbibliography:- Package hints (
geometry,setspace,natbib,biblatex) → YAML format options
See 01-preamble-yaml.md for the full mapping table.
4. Strip Document Wrapper
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.
5. Apply All Body Transformations
Work through the full document body and apply every applicable rule. Key principles:
- Preserve math regions: Never alter content inside
$...$or$$...$$except to move\label{}outside display math and convert delimiters (\(...\)→$...$). - Handle nesting:
\textbf{\emph{text}}→***text***. Process inner commands first. - Be complete: Scan the entire file. Fix every instance of each pattern, not just the first.
- Apply all categories: Work through every reference file. A single paragraph may require rules from multiple categories.
Apply reference files in this order (structural → inline):
- 09-sections-lists.md — headings and lists
- 05-citations.md — citations
- 06-cross-references.md — labels and references
- 07-figures.md — figures
- 08-tables.md — tables
- 04-math.md — math environments and delimiters
- 03-text-formatting.md — inline formatting
- 10-misc.md — special characters and remaining patterns
6. Assemble the QMD File
Combine:
- YAML front matter (between
---delimiters) - Converted document body (blank line after closing
---)
7. Write the Output File
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.
8. Report to the User
Tell the user:
- Output path written
- Summary of conversions by category (citation count, figure count, table count, etc.)
- Items requiring manual review with approximate line numbers
- Reminder to run
quarto renderto verify the output
Key Conceptual Differences: LaTeX vs. Quarto
Preamble → YAML Front Matter
LaTeX uses a \documentclass preamble; Quarto uses YAML front matter between ---.
% LaTeX preamble
\documentclass[12pt,a4paper]{article}
\usepackage[margin=1in]{geometry}
\title{My Paper}
\author{Jane Doe}
\date{\today}
\bibliography{refs}
# 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
---
Math Content Is Preserved as LaTeX
Unlike conversion to Typst, Quarto uses LaTeX math directly.
Inline \(...\) → $...$; display \[...\] → $$...$$.
Math content (operators, symbols, matrices) stays unchanged.
Citations Use Pandoc Bracket Syntax
\citep{key} → [@key]; \citet{key} → @key.
The .bib file is referenced in YAML and left unchanged.
Cross-References Use @label Not \ref{}
\ref{fig:map} → @fig-map. Labels move from standalone \label{} commands
into element attribute blocks {#fig-map}.
Minimal Conversion Example
Input (paper.tex):
\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):
---
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"}
Patterns Requiring Manual Review
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 |
What to Preserve Unchanged
- LaTeX math content inside
$...$and$$...$$ - File paths in
\includegraphicsand\bibliography(adjust extension if needed) - Existing
@refand[@citation]patterns already in correct Quarto form - Content inside
\begin{verbatim}...\end{verbatim}(convert to fenced block, keep content)
Related Skills
siyuan
46.5kAn open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
