(self, toks: ParseResults)
| 2478 | _wide_accents = set(r"widehat widetilde widebar".split()) |
| 2479 | |
| 2480 | def accent(self, toks: ParseResults) -> T.Any: |
| 2481 | state = self.get_state() |
| 2482 | thickness = state.get_current_underline_thickness() |
| 2483 | accent = toks["accent"] |
| 2484 | sym = toks["sym"] |
| 2485 | accent_box: Node |
| 2486 | if accent in self._wide_accents: |
| 2487 | accent_box = AutoWidthChar( |
| 2488 | '\\' + accent, sym.width, state, char_class=Accent) |
| 2489 | centered = HCentered([accent_box]) |
| 2490 | else: |
| 2491 | accent_box = Accent(self._accent_map[accent], state) |
| 2492 | if accent == 'mathring': |
| 2493 | accent_box.shrink() |
| 2494 | accent_box.shrink() |
| 2495 | centered = HCentered([Hbox(sym.width / 4.0), accent_box]) |
| 2496 | centered.hpack(sym.width, 'exactly') |
| 2497 | return Vlist([ |
| 2498 | centered, |
| 2499 | Vbox(0., thickness * 2.0), |
| 2500 | Hlist([sym]) |
| 2501 | ]) |
| 2502 | |
| 2503 | def function(self, s: str, loc: int, toks: ParseResults) -> T.Any: |
| 2504 | hlist = self.operatorname(s, loc, toks) |
nothing calls this directly
no test coverage detected