File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change 868
868
mskip : 'Hskip' ,
869
869
mspace : 'Hskip' ,
870
870
mkern : 'Hskip' ,
871
+ rule : 'rule' ,
871
872
Rule : [ 'Rule' ] ,
872
873
Space : [ 'Rule' , 'blank' ] ,
873
874
1582
1583
d = this . GetDimen ( name ) ;
1583
1584
var mml , def = { width :w , height :h , depth :d } ;
1584
1585
if ( style !== 'blank' ) {
1585
- if ( parseFloat ( w ) && parseFloat ( h ) + parseFloat ( d ) )
1586
- { def . mathbackground = ( this . stack . env . color || "black" ) }
1587
- mml = MML . mpadded ( MML . mrow ( ) ) . With ( def ) ;
1588
- } else {
1589
- mml = MML . mspace ( ) . With ( def ) ;
1586
+ def . mathbackground = ( this . stack . env . color || "black" ) ;
1587
+ }
1588
+ this . Push ( MML . mspace ( ) . With ( def ) ) ;
1589
+ } ,
1590
+ rule : function ( name ) {
1591
+ var v = this . GetBrackets ( name ) ,
1592
+ w = this . GetDimen ( name ) ,
1593
+ h = this . GetDimen ( name ) ;
1594
+ var mml = MML . mspace ( ) . With ( {
1595
+ width : w , height :h ,
1596
+ mathbackground : ( this . stack . env . color || "black" )
1597
+ } ) ;
1598
+ if ( v ) {
1599
+ mml = MML . mpadded ( mml ) . With ( { voffset : v } ) ;
1600
+ if ( v . match ( / ^ \- / ) ) {
1601
+ mml . height = v ;
1602
+ mml . depth = '+' + v . substr ( 1 ) ;
1603
+ } else {
1604
+ mml . height = '+' + v ;
1605
+ }
1590
1606
}
1591
1607
this . Push ( mml ) ;
1592
1608
} ,
You can’t perform that action at this time.
0 commit comments