document

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Title   string
	Author  string
	Date    string
	Body    template.HTML
	PreTOC  template.HTML
	Meta    map[string]any
	TOC     []TocEntry
	Figures []FigureEntry

	// Sections is the body split by h2 headings, keyed by heading text.
	// Available for bundle templates that use semantic Markdown.
	Sections map[string]Section
}

type FigureEntry

type FigureEntry struct {
	ID      string
	Caption string
}

type Section

type Section struct {
	HTML  template.HTML
	Table [][]string
}

Section is one h2-delimited block of a document body. Table holds the parsed rows of the first table found in the section (row 0 = headers, subsequent rows = data). Nil if no table is present.

type TocEntry

type TocEntry struct {
	Level    int
	Text     string
	ID       string
	NoNumber bool
}

Jump to

Keyboard shortcuts

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