public sealed class TeXBox : ITeXElement
Provides a double-precision implementation of TeX-style line-breaking boxes in accordance with Donald Knuth and Michael Plass' seminal 1981 paper 'Breaking Paragraphs into Lines'.

Constructors

TeXBox

#
Create an empty box.
public TeXBox()

TeXBox

#
Create an empty box with a specific width.
public TeXBox(
width,
Width of box.
height,
Height of box.
id = null
Optional identifier to place in the TEXT of the box.
)

TeXBox

#
Create a new box with a word content.
public TeXBox(
text,
Font
font,
Color
colour = default(Color)
)

Properties

Colour

#
Gets the colour associated with this box.
public Color Colour { get; }

Font

#
Gets the font associated with this box, can be null.
public Font Font { get; }

Height

#
Gets the height of this box.
public double Height { get; }

Text

#
Gets the text associated with this box, can be null.
public string Text { get; }

Type

#
public TeXType Type { get; }
Type

VerticalOffset

#
Gets the vertical offset of this box in logical pixel coordinates. The offset isn't applied until the text is drawn.
public float VerticalOffset { get; }

Width

#
Gets the width of this box.
public double Width { get; }

Methods

Append

#
public TeXBox Append(
text
)

ToString

#
public override string ToString()
Object.ToString

WithLogicalOffset

#
Assign a vertical offset to this box.
public TeXBox WithLogicalOffset(
offset
Logical pixel offset.
)

WithTypographicOffset

#
Assign a vertical offset to this box.
public TeXBox WithTypographicOffset(
offset
Typographic offset in font units.
)