Skip to content

Node Reference

Felix Schultz edited this page Aug 12, 2026 · 1 revision

Node Reference

Compile nodes

Display name Stable ID Input Output
Typst Source to PDF typst_source_to_pdf source PDF FlowPath
Typst File to PDF typst_file_to_pdf source_file PDF FlowPath
Typst Source to SVG typst_source_to_svg source SVG FlowPath
Typst File to SVG typst_file_to_svg source_file SVG FlowPath
Typst Source to PDF + SVG typst_source_to_pdf_svg source PDF and SVG FlowPaths
Typst File to PDF + SVG typst_file_to_pdf_svg source_file PDF and SVG FlowPaths

Template nodes

Display name Stable ID Body input Output
Typst Source with Template to PDF typst_template_to_pdf source PDF FlowPath
Typst File with Template to PDF typst_template_file_to_pdf source_file PDF FlowPath
Typst Source with Template to SVG typst_template_to_svg source SVG FlowPath
Typst File with Template to SVG typst_template_file_to_svg source_file SVG FlowPath
Typst Source with Template to PDF + SVG typst_template_to_pdf_svg source PDF and SVG FlowPaths
Typst File with Template to PDF + SVG typst_template_file_to_pdf_svg source_file PDF and SVG FlowPaths

See Using Templates for the complete contract and example.

Conversion and validation nodes

Display name Stable ID Purpose
Markdown to Typst typst_markdown_to_typst Convert FlowLike Markdown into a safe Typst body fragment
Validate Typst Source typst_validate_source Compile source without exporting and report validity
Validate Typst File typst_validate_file Read and compile a stored file without exporting

Common input pins

Pin Type Meaning
exec execution Trigger an impure compile/validate node
source string Main Typst document source
source_file FlowPath Stored main .typ document file
source_folder FlowPath Project root for relative imports and assets
allow_universe_packages boolean Permit @preview/... downloads; defaults to true
output_file FlowPath Single PDF or SVG destination
pdf_output_file FlowPath PDF destination for combined nodes
svg_output_file FlowPath SVG destination for combined nodes
padding_pt float Extra SVG padding in points

Template-only pins

Pin Type Meaning
template_file FlowPath Optional .typ module exporting the reusable function
template_function string Exported function name; defaults to template
template_data JSON string Object whose top-level keys become named function arguments

template_function accepts Typst identifiers, including valid Unicode names. It is used only when template_file is connected.

Outputs

Single-format nodes return a pdf_file or svg_file FlowPath. Combined nodes return both. Compile and validation nodes also return a structured report:

Field Meaning
success Whether compilation succeeded
format pdf, svg, pdf+svg, or typst
page_count Number of compiled pages
warning_count Number of Typst warnings
warnings Warning/error text
output_bytes Total output size written for successful export

Successful impure nodes activate exec_out exactly once. Validation nodes report invalid Typst through valid: false plus the report, allowing the graph to continue and inspect the result.

Combined output rule

The PDF and SVG outputs must be different FlowPaths. The node checks this before compilation or writing so it cannot overwrite the PDF with SVG data.

Permissions

Compilation nodes request storage read access for project files and network HTTP for optional Typst Universe packages. Export nodes also request storage write. The pure Markdown conversion node requests no host permissions.

Clone this wiki locally