core

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SDNAMESPACE is the speedata XTS layout rules namespace
	SDNAMESPACE string = "urn:speedata.de/2021/xts/en"
)

Variables

View Source
var (

	// Version is a semantic version
	Version string
)

Functions

func AddDir

func AddDir(dirname string) error

AddDir recursively adds a directory to the file list

func FindFile

func FindFile(filename string) (string, error)

FindFile returns the full path to the file name.

func FindFontFiles

func FindFontFiles() []string

FindFontFiles returns a list of all font files (otf,ttf)

func FontFolder

func FontFolder() (string, error)

FontFolder

func InitDirs

func InitDirs(basedir string) error

InitDirs starts indexing the files.

func RunXTS

func RunXTS(cfg *XTSConfig) error

RunXTS is the entry point

Types

type TypesettingError added in v0.0.3

type TypesettingError struct {
	Logged bool
	Msg    string
}

A TypesettingError contains the information if it has been logged, so it does not appear more than once in the output.

func (TypesettingError) Error added in v0.0.3

func (te TypesettingError) Error() string

type VTrace

type VTrace int

VTrace determines the type of visual tracing

const (
	// VTraceGrid shows the page grid
	VTraceGrid VTrace = iota
	// VTraceHyphenation shows hyphenation points
	VTraceHyphenation
	// VTraceAllocation shows allocated cells
	VTraceAllocation
)

type XTSConfig

type XTSConfig struct {
	Layoutfile  io.ReadCloser
	Datafile    io.ReadCloser
	FindFile    func(string) (string, error)
	Mode        []string
	Outfile     io.WriteCloser
	OutFilename string
	DumpFile    io.Writer
	Variables   map[string]any
	Tracing     []string
}

XTSConfig is the configuration file for PDF generation.

Jump to

Keyboard shortcuts

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