@@ -1954,7 +1954,6 @@ def __init__(self):
19541954 p .auto_delim = Forward ()
19551955 p .binom = Forward ()
19561956 p .bslash = Forward ()
1957- p .c_over_c = Forward ()
19581957 p .customspace = Forward ()
19591958 p .end_group = Forward ()
19601959 p .float_literal = Forward ()
@@ -2031,11 +2030,6 @@ def __init__(self):
20312030
20322031 p .apostrophe <<= Regex ("'+" )
20332032
2034- p .c_over_c <<= (
2035- Suppress (p .bslash )
2036- + oneOf (list (self ._char_over_chars ))
2037- )
2038-
20392033 p .accent <<= Group (
20402034 Suppress (p .bslash )
20412035 + oneOf ([* self ._accent_map , * self ._wide_accents ])
@@ -2138,7 +2132,6 @@ def __init__(self):
21382132 | p .accent # Must be before symbol as all accents are symbols
21392133 | p .symbol # Must be third to catch all named symbols and single
21402134 # chars not in a group
2141- | p .c_over_c
21422135 | p .function
21432136 | p .group
21442137 | p .frac
@@ -2375,50 +2368,6 @@ def unknown_symbol(self, s, loc, toks):
23752368 c , = toks
23762369 raise ParseFatalException (s , loc , "Unknown symbol: %s" % c )
23772370
2378- _char_over_chars = {
2379- # The first 2 entries in the tuple are (font, char, sizescale) for
2380- # the two symbols under and over. The third element is the space
2381- # (in multiples of underline height)
2382- r'AA' : (('it' , 'A' , 1.0 ), (None , '\\ circ' , 0.5 ), 0.0 ),
2383- }
2384-
2385- def c_over_c (self , s , loc , toks ):
2386- sym , = toks
2387- state = self .get_state ()
2388- thickness = state .font_output .get_underline_thickness (
2389- state .font , state .fontsize , state .dpi )
2390-
2391- under_desc , over_desc , space = \
2392- self ._char_over_chars .get (sym , (None , None , 0.0 ))
2393- if under_desc is None :
2394- raise ParseFatalException ("Error parsing symbol" )
2395-
2396- over_state = state .copy ()
2397- if over_desc [0 ] is not None :
2398- over_state .font = over_desc [0 ]
2399- over_state .fontsize *= over_desc [2 ]
2400- over = Accent (over_desc [1 ], over_state )
2401-
2402- under_state = state .copy ()
2403- if under_desc [0 ] is not None :
2404- under_state .font = under_desc [0 ]
2405- under_state .fontsize *= under_desc [2 ]
2406- under = Char (under_desc [1 ], under_state )
2407-
2408- width = max (over .width , under .width )
2409-
2410- over_centered = HCentered ([over ])
2411- over_centered .hpack (width , 'exactly' )
2412-
2413- under_centered = HCentered ([under ])
2414- under_centered .hpack (width , 'exactly' )
2415-
2416- return Vlist ([
2417- over_centered ,
2418- Vbox (0. , thickness * space ),
2419- under_centered
2420- ])
2421-
24222371 _accent_map = {
24232372 r'hat' : r'\circumflexaccent' ,
24242373 r'breve' : r'\combiningbreve' ,
0 commit comments