File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1679
1679
}
1680
1680
var text = string . substr ( this . i , i - this . i ) ;
1681
1681
if ( ! text . match ( / ^ \s * \\ t e x t [ ^ a - z A - Z ] / ) ) {
1682
- this . Push . apply ( this , this . InternalMath ( text ) ) ;
1682
+ this . Push . apply ( this , this . InternalMath ( text , 0 ) ) ;
1683
1683
this . i = i ;
1684
1684
}
1685
1685
}
2054
2054
if ( match !== '' ) TEX . Error ( [ "MathNotTerminated" , "Math not terminated in text box" ] ) ;
2055
2055
}
2056
2056
if ( k < text . length ) mml . push ( this . InternalText ( text . slice ( k ) , def ) ) ;
2057
- var mml = [ MML . mstyle . apply ( MML , mml ) . With ( { displaystyle :false } ) ] ;
2058
- if ( level != null ) mml [ 0 ] . scriptlevel = level ;
2057
+ if ( level != null ) {
2058
+ mml = [ MML . mstyle . apply ( MML , mml ) . With ( { displaystyle :false , scriptlevel :level } ) ] ;
2059
+ } else if ( mml . length > 1 ) {
2060
+ mml = [ MML . mrow . apply ( MML , mml ) ] ;
2061
+ }
2059
2062
return mml ;
2060
2063
} ,
2061
2064
InternalText : function ( text , def ) {
You can’t perform that action at this time.
0 commit comments