# TeX class

Namespace: [Grasshopper2.UI.Typography](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.typography.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class TeX
```

Provides a set of constants and utility methods used during TeX typesetting.

## Fields

- [Aleph0](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/aleph0.md): (static) Indicates infinite level 0 demerits.
- [Aleph1](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/aleph1.md): (static) Indicates infinite level 1 demerits.
- [Aleph2](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/aleph2.md): (static) Indicates infinite level 2 demerits.
- [RunBreakPenalty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/runbreakpenalty.md): (static) Penalty for breaking a line inside a code or mathematics run. A formula reads far better whole, so this is set high enough that the breaker will exhaust every alternative first, yet below [TeX.Aleph0](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/aleph0.md) so that it stays legal. An outright prohibition would produce overfull lines for formulae too wide to fit, whereas a steep price degrades gracefully.
- [SubscriptScale](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/subscriptscale.md): (static) Represents the scaling factor for a subscript or superscript font.

## Methods

- [ComputeBadnessDemerits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/computebadnessdemerits.md): (static) Compute the TeX badness metric for a line based on the amount of shrinking/stretching it is subject to.
- [ComputeFlaggedDemerits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/computeflaggeddemerits.md): (static) Compute the demerit factor due to two consecutive lines both ending in discretionaries.
- [ComputeStretchCategory](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/computestretchcategory.md): (static) Compute the stretching category of a line as controlled by the glue adjustment ratio. TeX tries to avoid having adjacent lines with wildly differing stretch categories.
- [ComputeStretchDemerits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/computestretchdemerits.md): (static) Compute the demerits due to differing stretch categories of adjacent lines.
- [FontMatchXHeight](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/fontmatchxheight.md): (static) Ensure a specific font is resized to match a given x-height.
- [FontToSuperScript](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/fonttosuperscript.md): (static) Shrink a font to subscript or superscript size.
- [InfinityClass](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/infinityclass.md): (static) Gets the infinity class of a value.
- [IsInfinite](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.typography.tex/isinfinite.md): (2 overloads, static) Tests whether a value is considered infinite.
