@@ -1932,36 +1932,43 @@ def factory(cls, glue_type):
1932
1932
# Some convenient ways to get common kinds of glue
1933
1933
1934
1934
1935
+ @cbook .deprecated ("3.3" , alternative = "Glue('fil')" )
1935
1936
class Fil (Glue ):
1936
1937
def __init__ (self ):
1937
1938
Glue .__init__ (self , 'fil' )
1938
1939
1939
1940
1941
+ @cbook .deprecated ("3.3" , alternative = "Glue('fill')" )
1940
1942
class Fill (Glue ):
1941
1943
def __init__ (self ):
1942
1944
Glue .__init__ (self , 'fill' )
1943
1945
1944
1946
1947
+ @cbook .deprecated ("3.3" , alternative = "Glue('filll')" )
1945
1948
class Filll (Glue ):
1946
1949
def __init__ (self ):
1947
1950
Glue .__init__ (self , 'filll' )
1948
1951
1949
1952
1953
+ @cbook .deprecated ("3.3" , alternative = "Glue('neg_fil')" )
1950
1954
class NegFil (Glue ):
1951
1955
def __init__ (self ):
1952
1956
Glue .__init__ (self , 'neg_fil' )
1953
1957
1954
1958
1959
+ @cbook .deprecated ("3.3" , alternative = "Glue('neg_fill')" )
1955
1960
class NegFill (Glue ):
1956
1961
def __init__ (self ):
1957
1962
Glue .__init__ (self , 'neg_fill' )
1958
1963
1959
1964
1965
+ @cbook .deprecated ("3.3" , alternative = "Glue('neg_filll')" )
1960
1966
class NegFilll (Glue ):
1961
1967
def __init__ (self ):
1962
1968
Glue .__init__ (self , 'neg_filll' )
1963
1969
1964
1970
1971
+ @cbook .deprecated ("3.3" , alternative = "Glue('ss')" )
1965
1972
class SsGlue (Glue ):
1966
1973
def __init__ (self ):
1967
1974
Glue .__init__ (self , 'ss' )
@@ -1974,8 +1981,7 @@ class HCentered(Hlist):
1974
1981
"""
1975
1982
1976
1983
def __init__ (self , elements ):
1977
- Hlist .__init__ (self , [SsGlue ()] + elements + [SsGlue ()],
1978
- do_kern = False )
1984
+ super ().__init__ ([Glue ('ss' ), * elements , Glue ('ss' )], do_kern = False )
1979
1985
1980
1986
1981
1987
class VCentered (Vlist ):
@@ -1985,7 +1991,7 @@ class VCentered(Vlist):
1985
1991
"""
1986
1992
1987
1993
def __init__ (self , elements ):
1988
- Vlist .__init__ (self , [ SsGlue ()] + elements + [ SsGlue ( )])
1994
+ super () .__init__ ([ Glue ( 'ss' ), * elements , Glue ( 'ss' )])
1989
1995
1990
1996
1991
1997
class Kern (Node ):
@@ -3216,12 +3222,8 @@ def sqrt(self, s, loc, toks):
3216
3222
depth = check .depth + check .shift_amount
3217
3223
3218
3224
# Put a little extra space to the left and right of the body
3219
- padded_body = Hlist ([Hbox (thickness * 2.0 ),
3220
- body ,
3221
- Hbox (thickness * 2.0 )])
3222
- rightside = Vlist ([Hrule (state ),
3223
- Fill (),
3224
- padded_body ])
3225
+ padded_body = Hlist ([Hbox (2 * thickness ), body , Hbox (2 * thickness )])
3226
+ rightside = Vlist ([Hrule (state ), Glue ('fill' ), padded_body ])
3225
3227
# Stretch the glue between the hrule and the body
3226
3228
rightside .vpack (height + (state .fontsize * state .dpi ) / (100.0 * 12.0 ),
3227
3229
'exactly' , depth )
@@ -3259,9 +3261,7 @@ def overline(self, s, loc, toks):
3259
3261
depth = body .depth + body .shift_amount
3260
3262
3261
3263
# Place overline above body
3262
- rightside = Vlist ([Hrule (state ),
3263
- Fill (),
3264
- Hlist ([body ])])
3264
+ rightside = Vlist ([Hrule (state ), Glue ('fill' ), Hlist ([body ])])
3265
3265
3266
3266
# Stretch the glue between the hrule and the body
3267
3267
rightside .vpack (height + (state .fontsize * state .dpi ) / (100.0 * 12.0 ),
0 commit comments