Documentation ¶
Overview ¶
Package ast declares the types used to represent syntax trees for LaTeX documents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Inspect ¶
Inspect traverses an AST in depth-first order: It starts by calling f(node); node must not be nil. If f returns true, Inspect invokes f recursively for each of the non-nil children of node, followed by a call of f(nil).
Types ¶
type Arg ¶
type Arg struct { Lbrace token.Pos // position of '{' List List // or stmt? Rbrace token.Pos // position of '}' }
Arg is an argument of a macro. ex:
{a} in \sqrt{a}
type MathExpr ¶
type MathExpr struct { Delim string // delimiter used for this math expression. Left token.Pos // position of opening '$', '\(', '\[' or '\begin{math}' List List Right token.Pos // position of closing '$', '\)', '\]' or '\end{math}' }
MathExpr is a math expression. ex:
$f(x) \doteq \sqrt[n]{x}$ \[ x^n + y^n = z^n \]
type Node ¶
type Node interface { Pos() token.Pos // position of first character belonging to the node. End() token.Pos // position of first character immediately after the node. // contains filtered or unexported methods }
Node is a node in a LaTeX document.
type OptArg ¶
type OptArg struct { Lbrack token.Pos // position of '[' List List Rbrack token.Pos // position of ']' }
OptArg is an optional argument of a macro ex:
[n] in \sqrt[n]{a}
Click to show internal directories.
Click to hide internal directories.