TeXBreak

References
public sealed class TeXBreak
Represents a potential line break position within a TeXStream.

Constructors

TeXBreak

#
Create the initial root in a break sequence.
public TeXBreak(
stream
)

TeXBreak

#
Create a new break.
public TeXBreak(
root,
(int i0, int i1)
range,
lineWidth,
ratio
)

Properties

Aleph0GlueCount

#
Gets the number of glue elements with Aleph0 level infinite stretchability.
public int Aleph0GlueCount { get; }

Aleph1GlueCount

#
Gets the number of glue elements with Aleph1 level infinite stretchability.
public int Aleph1GlueCount { get; }

Boxes

#
Enumerate over all TeX boxes on this line.
public IEnumerable<TeXBox> Boxes { get; }

BreakSequence

#
Enumerate over all the breaks leading up to this one, starting with the oldest.
public IEnumerable<TeXBreak> BreakSequence { get; }

CumulativeBoxWidth

#
Gets the cumulative width of all boxes on this line.
public double CumulativeBoxWidth { get; }

CumulativeGlueWidth

#
Gets the cumulative ideal width of all glue on this line.
public double CumulativeGlueWidth { get; }

Elements

#
Enumerate over all TeX elements on this line.
public IEnumerable<ITeXElement> Elements { get; }

Glue

#
Enumerate over all TeX glue on this line.
public IEnumerable<TeXGlue> Glue { get; }

IdealWidth

#
Gets the ideal width of this line if all glue were to remain unmolested.
public double IdealWidth { get; }

Index0

#
Gets the index of the first TeX element on this break line.
public int Index0 { get; }

Index1

#
Gets the index of the last TeX element on this break line.
public int Index1 { get; }

LineIndex

#
Gets the line index this break represents.
public int LineIndex { get; }

LineWidth

#
Gets the line width this break is associated with.
public double LineWidth { get; }

LocalDemerits

#
Gets the demerits associated with this particular break.
public long LocalDemerits { get; }

MaximumGlueWidth

#
Gets the cumulative maximum width of all glue on this line.
public double MaximumGlueWidth { get; }

MaximumWidth

#
Gets the maximum width of this line if all glue were to be stretched as far as it allows itself to be stretched.
public double MaximumWidth { get; }

MinimumGlueWidth

#
Gets the cumulative minimum width of all glue on this line.
public double MinimumGlueWidth { get; }

MinimumWidth

#
Gets the minimum width of this line if all glue were to be shrunk as far as it allows itself to be shrunk.
public double MinimumWidth { get; }

Overfull

#
Geta whether this line is overfull, i.e. whether it contains too many items and not enough shrinkability to fit within the target width.
public bool Overfull { get; }

ParagraphIndex

#
Gets the paragraph index this break is associated with.
public int ParagraphIndex { get; }

Penalties

#
Enumerate over all TeX penalties on this line.
public IEnumerable<TeXPenalty> Penalties { get; }

PenaltyWidth

#
Gets the added width due to an ending penalty.
public double PenaltyWidth { get; }

Root

#
Gets the root break (if any) of this break.
public TeXBreak Root { get; }

Stream

#
Gets the TeX stream associated with this break.
public TeXBody Stream { get; }

StretchCategory

#
Gets the shrinkage/stretching category associated with the line leading up to this break.
public LineStretchClass StretchCategory { get; }

StretchRatio

#
Gets the glue adjustment ratio for the line leading up to this break.
public double StretchRatio { get; }

TotalDemerits

#
Gets the accumulated demerits for the entire break hierarchy up to this break.
public long TotalDemerits { get; }

UnderFull

#
Gets whether this line is underfull, i.e. whether it contains insufficient items and not enough stretchability to fit within the target width.
public bool UnderFull { get; }

Methods

BoxesAndOffsets

#
Position all boxes on this line.
public IEnumerable<(TeXBox box, double offset)> BoxesAndOffsets(
allowStretching,
If true, lines will be stretched so they are right-justified.
allowStretchingPastMaximum
If true, lines are allowed to be stretched past their maximum.
)
An enumeration of tuples with the relevant box and the horizontal offset for each.

RenderLines

#
Render a set of lines as defined by a break sequence.
public void RenderLines(
context,
Graphics context.
PointF
anchor,
Anchor for first line.
layout,
Spacing settings.
Action<Context, TeXBox, RectangleF>
customPainter = null
Optional painter for empty boxes.
)

ToString

#
public override string ToString()
Object.ToString

ToTeXCache

#
Cache the location of all the layout boxes. This is the best way of storing typeset glyphs for fast drawing.
public TeXCache ToTeXCache(
PointF
anchor,
layout
)
An array of boxes in no particular order to be drawn.