latex

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package latex deterministically projects a renderer-neutral composition manifest into a main LaTeX document and content-addressed fragment files. It performs no filesystem or process effects.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidManifest  = errors.New("invalid render manifest")
	ErrNestedSection    = errors.New("section fragments must be document roots")
	ErrUnsupportedAsset = errors.New("unsupported artifact media type")
)

Functions

This section is empty.

Types

type AssetBinding

type AssetBinding struct {
	ComponentID string `json:"componentId"`
	AssetID     string `json:"assetId"`
	SourceURI   string `json:"sourceUri"`
	MediaType   string `json:"mediaType,omitempty"`
	Digest      string `json:"digest,omitempty"`
	Path        string `json:"path"`
}

AssetBinding tells an effectful collector where an inert asset must land.

type File

type File struct {
	Path    string `json:"path"`
	Content []byte `json:"content"`
}

File is one generated, workspace-relative source file.

type Options

type Options struct {
	TrustedPreamble []byte
	FocusSections   []string
}

Options controls trusted document-level LaTeX and focused section builds.

type Projection

type Projection struct {
	Main      string                    `json:"main"`
	Files     []File                    `json:"files"`
	Assets    []AssetBinding            `json:"assets"`
	SourceMap map[string]SourceLocation `json:"sourceMap"`
	Hash      string                    `json:"hash"`
}

Projection is a complete, deterministic input to an effectful compiler.

func Project

func Project(manifest composition.RenderManifest, options Options) (Projection, error)

Project maps domain composition modes to safe LaTeX source boundaries: flow -> input, top-level section -> include, artifact -> embedded asset.

type SourceLocation

type SourceLocation struct {
	Path string `json:"path"`
	Line int    `json:"line"`
}

SourceLocation maps editor identity to generated LaTeX.

Jump to

Keyboard shortcuts

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