* Fix lap with flex

* Fix lint error

* Fix more lint errors

* Fix indentation in test spec

* Update screenshots

* remove .glue class
This commit is contained in:
Ron Kok
2019-10-31 10:23:28 -07:00
committed by ylemkimon
parent d10f375eed
commit a92e39d810
6 changed files with 34 additions and 15 deletions

View File

@@ -2,7 +2,7 @@
id: browser
title: Browser
---
> KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 911.
> KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.
## Starter template

View File

@@ -44,19 +44,16 @@ defineFunction({
// two items involved in the lap.
// Next, use a strut to set the height of the HTML bounding box.
// Otherwise, a tall argument may be misplaced.
// This code resolved issue #1153
const strut = buildCommon.makeSpan(["strut"]);
strut.style.height = (node.height + node.depth) + "em";
strut.style.verticalAlign = -node.depth + "em";
node.children.unshift(strut);
// Next, prevent vertical misplacement when next to something tall.
node = buildCommon.makeVList({
positionType: "firstBaseline",
children: [{type: "elem", elem: node}],
}, options);
// Get the horizontal spacing correct relative to adjacent items.
return buildCommon.makeSpan(["mord"], [node], options);
// This code resolves issue #1234
node = buildCommon.makeSpan(["thinbox"], [node], options);
return buildCommon.makeSpan(["mord", "vbox"], [node], options);
},
mathmlBuilder: (group, options) => {
// mathllap, mathrlap, mathclap

View File

@@ -215,6 +215,29 @@
min-width: 2px;
}
.vbox {
display: -ms-inline-flexbox;
display: inline-flex;
-ms-flex-direction: column;
flex-direction: column;
align-items: baseline;
}
.hbox {
display: -ms-inline-flexbox;
display: inline-flex;
-ms-flex-direction: row;
flex-direction: row;
width: 100%;
}
.thinbox {
display: inline-flex;
flex-direction: row;
width: 0;
max-width: 0; // necessary for Safari
}
.msupsub {
text-align: left;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -164,13 +164,12 @@ KaTeX:
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.”
# The following test, Lap, is commented out pending a successful screenshotter test.
# Lap: |
# \begin{array}{l}
# ab\mathllap{f}cd\mathrlap{g}hij\mathclap{k}lm \; ab\llap{f}cd\rlap{g}hij\clap{k}lm \\
# \mathrlap{\frac a b} \frac a b \\
# \mathrlap{\overbrace{\phantom{a_0+a_1+a_2}}^m}a_0+a_1+a_2
# \end{array}
Lap: |
\begin{array}{l}
ab\mathllap{f}cd\mathrlap{g}hij\mathclap{k}lm \; ab\llap{f}cd\rlap{g}hij\clap{k}lm \\
\mathrlap{\frac a b} \frac a b \\
\mathrlap{\overbrace{\phantom{a_0+a_1+a_2}}^m}a_0+a_1+a_2
\end{array}
LargeRuleNumerator: \frac{\textcolor{blue}{\rule{1em}{2em}}}{x}
LaTeX: \text{\LaTeX}, \text{\TeX}, \large \text{\LaTeX}, \text{\TeX}
LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.