TeX
Provides a set of constants and utility methods used during TeX typesetting.
Fields
RunBreakPenalty
#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 Aleph0 so that it stays legal. An outright prohibition would produce overfull lines for formulae too wide to fit, whereas a steep price degrades gracefully.
Methods
ComputeBadnessDemerits
#Compute the TeX badness metric for a line based on the amount of shrinking/stretching it is subject to.
Parameters:
| ratio (double) | Adjustment ratio. |
ComputeFlaggedDemerits
#Compute the demerit factor due to two consecutive lines both ending in discretionaries.
Parameters:
| a (ITeXElement) | Last element on line A. |
| b (ITeXElement) | Last element on line B. |
ComputeStretchCategory
#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.
Parameters:
| ratio (double) |
ComputeStretchDemerits
#Compute the demerits due to differing stretch categories of adjacent lines.
Parameters:
| a (LineStretchClass) | |
| b (LineStretchClass) |
FontMatchXHeight
#Ensure a specific font is resized to match a given x-height.
Parameters:
| font (Font) | |
| x (float) |
FontToSuperScript
#public static Font FontToSuperScript(Font font)
Shrink a font to subscript or superscript size.
Parameters:
| font (Font) |
InfinityClass
#Gets the infinity class of a value.
Parameters:
| value (long) | Value to test. |
Returns:
Negative Aleph 2 = -3
Negative Aleph 1 = -2
Negative Aleph 0 = -1
Not infinite = 0
Positive Aleph 0 = +1
Positive Aleph 1 = +2
Positive Aleph 2 = +3