Documentation
¶
Index ¶
- Constants
- func KeyValue(raw string) (map[string]string, error)
- func Measure(raw string) (float32, string, error)
- func MeasurePixels(raw string) (float32, error)
- func Render(w io.Writer, node *Node) error
- func String(node *Node) (out string)
- func ToPixels(value float32, unit string) (float32, error)
- type ColumnSpec
- type Command
- type EnvironmentEnd
- type EnvironmentStart
- type Kind
- type Node
- type OptionalEnd
- type OptionalStart
- type ParameterEnd
- type ParameterStart
- type Parser
- type Scanner
- type Symbol
- type Text
- type Tokenizer
- type Verbatim
Constants ¶
View Source
const ( TextKind = iota DocumentKind ElementKind )
Variables ¶
This section is empty.
Functions ¶
func Measure ¶
Measure parses measurement value, a number and units, for example: 5.1cm, 6em, 0.25\textwidth
func MeasurePixels ¶
Types ¶
type ColumnSpec ¶
type ColumnSpec struct { BorderLeft bool // column should have left border BorderRight bool // column should have right border Align string // column alignment: c, l or r }
func ColumnSpecs ¶
func ColumnSpecs(raw string) (spec []ColumnSpec)
ColumnSpecs parses column spec in tabular environment todo: add support for repeated syntax *{x}{...} todo: if not support, at least correctly handle @{} and !{}
type EnvironmentEnd ¶
type EnvironmentEnd struct {
Name string
}
type EnvironmentStart ¶
type EnvironmentStart struct {
Name string
}
type OptionalEnd ¶
type OptionalEnd struct { }
type OptionalStart ¶
type OptionalStart struct { }
type ParameterEnd ¶
type ParameterEnd struct { }
type ParameterStart ¶
type ParameterStart struct { }
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewStrictParser ¶
Click to show internal directories.
Click to hide internal directories.