mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
Set maxFontSize on rules. (#744)
This is needed in vlists, as in #646, to make fontsize-ensurer nodes big enough.
This commit is contained in:
committed by
Kevin Barabash
parent
f43b00b50f
commit
782484eb75
@@ -1330,6 +1330,10 @@ groupTypes.rule = function(group, options) {
|
||||
rule.width = width;
|
||||
rule.height = height + shift;
|
||||
rule.depth = -shift;
|
||||
// Font size is the number large enough that the browser will
|
||||
// reserve at least `absHeight` space above the baseline.
|
||||
// The 1.125 factor was empirically determined
|
||||
rule.maxFontSize = height * 1.125 * options.sizeMultiplier;
|
||||
|
||||
return rule;
|
||||
};
|
||||
|
BIN
test/screenshotter/images/LargeRuleNumerator-chrome.png
Normal file
BIN
test/screenshotter/images/LargeRuleNumerator-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
BIN
test/screenshotter/images/LargeRuleNumerator-firefox.png
Normal file
BIN
test/screenshotter/images/LargeRuleNumerator-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -102,6 +102,7 @@ Kern:
|
||||
tex: \frac{a\kern{1em}b}{c}a\kern{1em}b\kern{1ex}c\kern{-0.25em}d
|
||||
nolatex: LaTeX fails to typeset this, “Missing number, treated as zero.”
|
||||
Lap: ab\llap{f}cd\rlap{g}h
|
||||
LargeRuleNumerator: \frac{\textcolor{blue}{\rule{1em}{2em}}}{x}
|
||||
LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.
|
||||
LeftRightListStyling: a+\left(x+y\right)-x
|
||||
LeftRightMiddle: \left( x^2 \middle/ \right) \left\{ x^{x^{x^{x^x}}} \middle/ y \right.\left(x\middle|y\,\middle|\,z\right)
|
||||
|
Reference in New Issue
Block a user