File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
unpacked/jax/output/HTML-CSS/autoload Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -139,14 +139,14 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
139
139
var w = box [ k + 1 ] . bbox . w - box [ k ] . bbox . w ;
140
140
if ( w > 0 ) {
141
141
if ( isPre ) {
142
- box [ k ] . style . paddingLeft = HTMLCSS . Em ( w / ( box [ k ] . scale || 1 ) ) ;
142
+ this . HTMLmoveColor ( box [ k ] , w , 1 ) ;
143
143
BOX [ k ] . w += w ;
144
144
} else {
145
145
HTMLCSS . createBlank ( sub , w ) ;
146
146
}
147
147
} else if ( w < 0 ) {
148
148
if ( isPre ) {
149
- box [ k + 1 ] . style . paddingLeft = HTMLCSS . Em ( - w / ( box [ k + 1 ] . scale || 1 ) ) ;
149
+ this . HTMLmoveColor ( box [ k + 1 ] , - w , - 1 ) ;
150
150
BOX [ k + 1 ] . w += - w ;
151
151
} else {
152
152
HTMLCSS . createBlank ( sup , - w ) ;
@@ -179,6 +179,16 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
179
179
}
180
180
return BOX ;
181
181
} ,
182
+ HTMLmoveColor : function ( box , w , sign ) {
183
+ var W = w / ( box . scale || 1 ) ;
184
+ box . style . paddingLeft = HTMLCSS . Em ( W ) ;
185
+ var color = box . previousSibling ;
186
+ if ( color && ( color . id || "" ) . match ( / ^ M a t h J a x - C o l o r - / ) ) {
187
+ color . style . marginLeft = HTMLCSS . Em ( W + parseFloat ( color . style . marginLeft ) ) ;
188
+ color . style . marginRight = HTMLCSS . Em ( sign * ( W - parseFloat ( color . style . marginRight ) ) ) ;
189
+ }
190
+
191
+ } ,
182
192
HTMLstretchH : MML . mbase . HTMLstretchH ,
183
193
HTMLstretchV : MML . mbase . HTMLstretchV
184
194
} ) ;
You can’t perform that action at this time.
0 commit comments