@@ -2859,32 +2859,32 @@ def binom(self, s, loc, toks):
2859
2859
return self ._genfrac ('(' , ')' , 0.0 , self ._MathStyle .TEXTSTYLE ,
2860
2860
num , den )
2861
2861
2862
- def _genset (self , state , body , annotation , overunder ):
2862
+ def _genset (self , state , annotation , body , overunder ):
2863
2863
thickness = state .font_output .get_underline_thickness (
2864
2864
state .font , state .fontsize , state .dpi )
2865
2865
2866
- body .shrink ()
2866
+ annotation .shrink ()
2867
2867
2868
- cbody = HCentered ([body ])
2869
2868
cannotation = HCentered ([annotation ])
2870
- width = max ( cbody . width , cannotation . width )
2871
- cbody . hpack ( width , 'exactly' )
2869
+ cbody = HCentered ([ body ] )
2870
+ width = max ( cannotation . width , cbody . width )
2872
2871
cannotation .hpack (width , 'exactly' )
2872
+ cbody .hpack (width , 'exactly' )
2873
2873
2874
2874
vgap = thickness * 3
2875
2875
if overunder == "under" :
2876
- vlist = Vlist ([cannotation , # annotation
2877
- Vbox (0 , vgap ), # space
2878
- cbody # body
2876
+ vlist = Vlist ([cbody , # body
2877
+ Vbox (0 , vgap ), # space
2878
+ cannotation # annotation
2879
2879
])
2880
- # Shift so the annotation sits in the same vertical position
2881
- shift_amount = cannotation .depth + cbody .height + vgap
2880
+ # Shift so the body sits in the same vertical position
2881
+ shift_amount = cbody .depth + cannotation .height + vgap
2882
2882
2883
2883
vlist .shift_amount = shift_amount
2884
2884
else :
2885
- vlist = Vlist ([cbody , # body
2886
- Vbox (0 , vgap ), # space
2887
- cannotation # annotation
2885
+ vlist = Vlist ([cannotation , # annotation
2886
+ Vbox (0 , vgap ), # space
2887
+ cbody # body
2888
2888
])
2889
2889
2890
2890
# To add horizontal gap between symbols: wrap the Vlist into
@@ -2956,18 +2956,18 @@ def overset(self, s, loc, toks):
2956
2956
assert len (toks [0 ]) == 2
2957
2957
2958
2958
state = self .get_state ()
2959
- body , annotation = toks [0 ]
2959
+ annotation , body = toks [0 ]
2960
2960
2961
- return self ._genset (state , body , annotation , overunder = "over" )
2961
+ return self ._genset (state , annotation , body , overunder = "over" )
2962
2962
2963
2963
def underset (self , s , loc , toks ):
2964
2964
assert len (toks ) == 1
2965
2965
assert len (toks [0 ]) == 2
2966
2966
2967
2967
state = self .get_state ()
2968
- body , annotation = toks [0 ]
2968
+ annotation , body = toks [0 ]
2969
2969
2970
- return self ._genset (state , body , annotation , overunder = "under" )
2970
+ return self ._genset (state , annotation , body , overunder = "under" )
2971
2971
2972
2972
def _auto_sized_delimiter (self , front , middle , back ):
2973
2973
state = self .get_state ()
0 commit comments