Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion mathjax3-ts/output/chtml/Wrappers/msqrt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class CHTMLmsqrt extends CHTMLWrapper {
},
'mjx-sqrt > mjx-box': {
'border-top': '.07em solid'
},
'mjx-sqrt.mjx-tall > mjx-box': {
'padding-left': '.3em',
'margin-left': '-.3em'
}
};

Expand Down Expand Up @@ -126,7 +130,7 @@ export class CHTMLmsqrt extends CHTMLWrapper {
* @override
*/
public toCHTML(parent: HTMLElement) {
const surd = this.childNodes[this.surd];
const surd = this.childNodes[this.surd] as CHTMLmo;
const base = this.childNodes[this.base];
//
// Get the parameters for the spacing of the parts
Expand All @@ -153,6 +157,14 @@ export class CHTMLmsqrt extends CHTMLWrapper {
this.addRoot(ROOT, root, sbox);
surd.toCHTML(SURD);
base.toCHTML(BASE);
if (surd.size < 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put a comment here that contains the gist of the explanation for the PR, for future reference?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

//
// size < 0 means surd is multi-character. The angle glyph at the
// top is hard to align with the horizontal line, so overlap them
// using CSS.
//
SQRT.classList.add('mjx-tall');
}
}

/*
Expand Down