Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompileOpts ¶
type CompileOpts struct {
// Input file path
InputFile string
// Output file name (optional, if not provided a temp file will be created)
OutputFile string
// Font paths to include
FontDirs []string
// Additional command-line arguments
ExtraArgs []string
}
CompileOpts contains options for compiling a Typst document
type CompileOptsBuilder ¶
type CompileOptsBuilder func(c *CompileOpts)
func WithExtraArgs ¶
func WithExtraArgs(extraArgs ...string) CompileOptsBuilder
func WithFontDirs ¶
func WithFontDirs(fontDirs ...string) CompileOptsBuilder
func WithInputFile ¶
func WithInputFile(inputFile string) CompileOptsBuilder
func WithOutputFile ¶
func WithOutputFile(outputFile string) CompileOptsBuilder
type Compiler ¶
type Compiler interface {
Compile(opts CompileOpts) (string, error)
CompileToBytes(opts CompileOpts) ([]byte, error)
CompileTemplate(templateName string, data []byte, opts ...CompileOptsBuilder) ([]byte, error)
CleanupGeneratedFiles(files ...string)
}
func DefaultCompiler ¶
DefaultCompiler creates a compiler with default settings
Click to show internal directories.
Click to hide internal directories.