跳到正文
cccskills
免费在 GitHub 公开

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.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(14)

  • SKILL.md5.3 KB
  • references/01-document-structure.md4.1 KB
  • references/02-text-formatting.md5.9 KB
  • references/03-page-layout.md4.6 KB
  • references/04-headings-sections.md4.1 KB
  • references/05-lists.md4.1 KB
  • references/06-math.md8.2 KB
  • references/07-math-symbols.md11.2 KB
  • references/08-figures.md5.0 KB
  • references/09-tables.md6.4 KB
  • references/10-bibliography.md4.0 KB
  • references/11-cross-references.md4.4 KB
  • references/12-diagrams-cetz.md6.5 KB
  • references/13-misc.md7.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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 .tex file to .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

TaskReference File
Overall document structure, preamble → set rules01-document-structure.md
Bold, italic, fonts, font sizes, colors02-text-formatting.md
Margins, page size, columns, headers/footers03-page-layout.md
\section, \subsection, numbering04-headings-sections.md
itemize, enumerate, description05-lists.md
Math mode, equations, aligned, matrices, operators06-math.md
Symbol table: arrows, Greek, operators, sets, logic07-math-symbols.md
\includegraphics, figure environment, subfigures08-figures.md
tabular, booktabs, tabularx, multirow/multicolumn09-tables.md
BibTeX, biblatex, natbib → bibliography, cite10-bibliography.md
\label, \ref, \eqref, \autoref11-cross-references.md
TikZ → CeTZ diagrams12-diagrams-cetz.md
verbatim, lstlisting, minted; footnotes, links13-misc.md

Key Conceptual Differences

Preamble → set and show Rules

LaTeX 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

Most LaTeX environments have direct Typst function equivalents. For example:

LaTeXTypst
\begin{equation}...\end{equation}$ ... $ (block, with space)
\begin{figure}...\end{figure}#figure(...)
\begin{tabular}...\end{tabular}#table(...)
\begin{itemize}...\end{itemize}- item (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

LaTeXTypstNotes
ptptSame
ememSame
cmcmSame
mmmmSame
ininSame
\textwidth100% (relative to container)—
0.5\textwidth50%—

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

  1. Convert preamble → #set page(), #set text(), #set par() (see 03-page-layout.md, 02-text-formatting.md)
  2. Convert sectioning → =, ==, === (see 04-headings-sections.md)
  3. Convert math → inline $...$, block $ ... $ (see 06-math.md, 07-math-symbols.md)
  4. Convert figures → #figure(image(...), caption: [...]) (see 08-figures.md)
  5. Convert tables → #table(...) or #figure(table(...), ...) (see 09-tables.md)
  6. Convert bibliography → #bibliography("refs.bib") + @key citations (see 10-bibliography.md)
  7. Convert TikZ → #canvas({...}) with CeTZ (see 12-diagrams-cetz.md)
  8. Fix cross-references → <label> + @label (see 11-cross-references.md)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

APSA style checker for Quarto (.qmd) files. Checks numbers, capitalization, abbreviations, italics, in-text citations, titles of works, neutral and unbiased language, and APSA-specific terminology against the APSA Style Manual for Political Science (2018, updated 2023). Produces a structured markdown report organized by document section — never modifies the source file. Use when asked to check APSA style, fix citations, review capitalization, check number formatting, or flag biased language in a .qmd document. For grammar, spelling, and punctuation, use the proofread skill instead. Supports an optional output-file argument and an optional @sec-label argument to restrict checking to one section.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

Assesses a research paper outline (.qmd file) against structured criteria from Kosuke Imai's empirical research guide. Evaluates the abstract and section outline for: research question clarity, stated contributions, hypotheses and testable implications, data description, planned results and inferential approach, and robustness checks. Detects causal papers from the abstract and conditionally assesses identification strategy only when causal framing is present. Produces a structured markdown report with PASS/PARTIAL/FAIL assessments and actionable suggestions. Use when asked to assess, evaluate, review, or check a paper outline, abstract-and-outline, or research plan in a .qmd file.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

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.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

Unwraps hard-wrapped markdown files so that each sentence ends with a newline instead of mid-sentence line breaks. Joins continuation lines within a paragraph into single lines, then re-breaks at sentence boundaries (period, question mark, exclamation point). Preserves blank lines, headings, fenced code blocks, block quotes, and list items. Use when asked to unwrap text, fix line breaks, reflow sentences, or clean up hard-wrapped markdown or .qmd files.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

Writes expert academic paper summaries for social science research, particularly political science and applied statistics. Use when asked to summarize, review, or create a reading summary of an academic paper, PDF, or research article. Accepts a file (PDF or text format) or a directory of papers. Produces a structured markdown summary — approximately 400–600 words — covering primary contributions, major questions and answers with point estimates, methods and data, and limitations and robustness. Includes BibTeX citation retrieved from Google Scholar and keyword metadata.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

proofread

免费

Expert copy editor for Quarto (.qmd) files. Checks grammar, spelling, punctuation, and academic writing quality. Produces a structured markdown report organized by document section — never modifies the source file. Use when asked to proofread, check grammar, fix typos, or review prose in a .qmd document. For APSA style rules (numbers, citations, capitalization, abbreviations, neutral language), use the apsa-style skill instead. Supports an optional output-file argument and an optional @sec-label argument to restrict checking to one section.

中文简介正在准备中。当前显示原文说明。

christopherkenny/skills262026年7月9日 更新

查看 christopherkenny 的全部技能

报告此技能的问题