mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Fix laps
* 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:
@@ -2,7 +2,7 @@
|
||||
id: browser
|
||||
title: Browser
|
||||
---
|
||||
> KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9–11.
|
||||
> KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.
|
||||
|
||||
## Starter template
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
BIN
test/screenshotter/images/Lap-chrome.png
Normal file
BIN
test/screenshotter/images/Lap-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
test/screenshotter/images/Lap-firefox.png
Normal file
BIN
test/screenshotter/images/Lap-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@@ -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.
|
||||
|
Reference in New Issue
Block a user