AgentSkillsCN

typst-creator

为文档、报告、论文和演示文稿生成 Typst 源代码,涵盖标记语言、数学公式、脚本编写,以及布局语法。

SKILL.md
--- frontmatter
name: typst-creator
description: Generate Typst source code for documents, reports, papers, and presentations, covering markup, math, scripting, and layout syntax.

Typst Document Creation Capability

This skill enables the agent to create Typst documents with correct syntax, styling, and mathematical formulas.

Version: Based on Typst v0.14.2

Core Capability

  • Function: Generate Typst source code for documents, reports, papers, and presentations
  • Output Format: .typ files with proper Typst syntax
  • Modes: Markup, Math, and Code modes

Typst Syntax Overview

ModeEntry SyntaxPurpose
MarkupDefaultText, headings, lists, emphasis
Math$...$Mathematical formulas
Code# prefixVariables, functions, logic

Domain Knowledge

TopicReference
SyntaxMarkup, math, and code mode syntax. See ./references/syntax.md
StylingSet rules and show rules for styling. See ./references/styling.md
ScriptingVariables, functions, control flow. See ./references/scripting.md
MathMathematical notation and symbols. See ./references/math.md
LayoutPage setup, grids, alignment. See ./references/layout.md

Key Differences from LaTeX

FeatureLaTeXTypst
Bold\textbf{text}*text*
Italic\textit{text}_text_
Heading\section{Title}= Title
Fraction\frac{a}{b}a/b or frac(a, b)
Function call\func{arg}#func(arg)
Set propertypreamble commands#set func(prop: value)

Constraints

  • File Extension: Output files use .typ extension
  • Unicode Support: Typst natively supports Unicode symbols
  • No Packages Required: Most features are built-in (unlike LaTeX)