Skip to content

Commit d8e3912

Browse files
committed
Make sqrt line overlap with tall surd top corner glyph for better attachment
1 parent 8af0bbb commit d8e3912

File tree

1 file changed

+8
-1
lines changed
  • mathjax3-ts/output/chtml/Wrappers

1 file changed

+8
-1
lines changed

mathjax3-ts/output/chtml/Wrappers/msqrt.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export class CHTMLmsqrt extends CHTMLWrapper {
5353
},
5454
'mjx-sqrt > mjx-box': {
5555
'border-top': '.07em solid'
56+
},
57+
'mjx-sqrt.mjx-tall > mjx-box': {
58+
'padding-left': '.3em',
59+
'margin-left': '-.3em'
5660
}
5761
};
5862

@@ -126,7 +130,7 @@ export class CHTMLmsqrt extends CHTMLWrapper {
126130
* @override
127131
*/
128132
public toCHTML(parent: HTMLElement) {
129-
const surd = this.childNodes[this.surd];
133+
const surd = this.childNodes[this.surd] as CHTMLmo;
130134
const base = this.childNodes[this.base];
131135
//
132136
// Get the parameters for the spacing of the parts
@@ -153,6 +157,9 @@ export class CHTMLmsqrt extends CHTMLWrapper {
153157
this.addRoot(ROOT, root, sbox);
154158
surd.toCHTML(SURD);
155159
base.toCHTML(BASE);
160+
if (surd.size < 0) {
161+
SQRT.classList.add('mjx-tall');
162+
}
156163
}
157164

158165
/*

0 commit comments

Comments
 (0)