passing-values

command
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 5 Imported by: 0

README

Passing values example

This example demonstrates how to pass values to Typst, which can be useful in rendering custom documents such as reports, invoices, and more.

How it works

This example follows the template pattern described in the Typst documentation. Here is a short overview of the files:

  • template.typ defines a Typst template function that constructs a document based on parameters.
  • main.go shows how to convert/encode Go values into Typst markup, and how to call/render the template with these converted values.
  • template-preview.typ also invokes the template while providing mock data. This is useful when you want to preview, update or debug the template.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL