Getting Started

This guide will get you up and running with DocumenterTypst.jl in under a minute.

Installation

Add DocumenterTypst to your documentation project:

using Pkg
Pkg.add("DocumenterTypst")

Minimal Example

Create a docs/make.jl file:

using Documenter
using DocumenterTypst
using YourPackage

makedocs(
    sitename = "YourPackage",
    authors = "Your Name",
    format = DocumenterTypst.Typst(),
    pages = [
        "Home" => "index.md",
    ]
)

Create docs/src/index.md:

# YourPackage

Welcome to the documentation!

Run it:

julia --project=docs docs/make.jl

Output: docs/build/YourPackage.pdf

That's it! You now have a PDF version of your documentation.

Next Steps

Common Scenarios

Add a Version Number

makedocs(
    format = DocumenterTypst.Typst(version = "1.0.0"),
    ...
)

Output: YourPackage-1.0.0.pdf

Multi-Page Documentation

makedocs(
    pages = [
        "Home" => "index.md",
        "Tutorial" => "tutorial.md",
        "API Reference" => "api.md",
    ],
    ...
)

Generate Both HTML and PDF

Build HTML first, then PDF:

# Build HTML
makedocs(
    sitename = "YourPackage",
    format = Documenter.HTML(),
    ...
)

# Build PDF separately
makedocs(
    sitename = "YourPackage",
    format = DocumenterTypst.Typst(),
    ...
)

See Advanced Features for a complete example.

Project Structure

Typical documentation layout:

YourPackage/
├── src/
│   └── YourPackage.jl
├── docs/
│   ├── Project.toml          # Documentation dependencies
│   ├── make.jl               # Build script
│   └── src/
│       ├── index.md          # Home page
│       ├── tutorial.md       # User guide
│       └── api.md            # API reference
└── test/

Your docs/Project.toml should include:

[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTypst = "d7fd56dd-41bc-4b2d-b658-79a5840b2e09"
YourPackage = "..."

[compat]
Documenter = "1.11"
DocumenterTypst = "0.1"

Platform Options

DocumenterTypst works with three compilation backends:

PlatformDescriptionUse Case
"typst"Uses Typst_jll (default, recommended)Production, CI/CD
"native"Uses system-installed typst executableDevelopment
"none"Generate .typ source onlyTesting, debugging

Default configuration (recommended for most users):

format = DocumenterTypst.Typst()  # Uses Typst_jll automatically

Custom platform:

format = DocumenterTypst.Typst(platform = "native")

For detailed configuration options, see Configuration.