File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
mathjax3-ts/output/chtml/Wrappers Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff 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,14 @@ 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+ //
162+ // size < 0 means surd is multi-character. The angle glyph at the
163+ // top is hard to align with the horizontal line, so overlap them
164+ // using CSS.
165+ //
166+ SQRT . classList . add ( 'mjx-tall' ) ;
167+ }
156168 }
157169
158170 /*
You can’t perform that action at this time.
0 commit comments