(self, s, loc, toks)
| 2740 | ) (set(_accent_map)) |
| 2741 | |
| 2742 | def accent(self, s, loc, toks): |
| 2743 | assert len(toks)==1 |
| 2744 | state = self.get_state() |
| 2745 | thickness = state.font_output.get_underline_thickness( |
| 2746 | state.font, state.fontsize, state.dpi) |
| 2747 | if len(toks[0]) != 2: |
| 2748 | raise ParseFatalException("Error parsing accent") |
| 2749 | accent, sym = toks[0] |
| 2750 | if accent in self._wide_accents: |
| 2751 | accent_box = AutoWidthChar( |
| 2752 | '\\' + accent, sym.width, state, char_class=Accent) |
| 2753 | else: |
| 2754 | accent_box = Accent(self._accent_map[accent], state) |
| 2755 | if accent == 'mathring': |
| 2756 | accent_box.shrink() |
| 2757 | accent_box.shrink() |
| 2758 | centered = HCentered([Hbox(sym.width / 4.0), accent_box]) |
| 2759 | centered.hpack(sym.width, 'exactly') |
| 2760 | return Vlist([ |
| 2761 | centered, |
| 2762 | Vbox(0., thickness * 2.0), |
| 2763 | Hlist([sym]) |
| 2764 | ]) |
| 2765 | |
| 2766 | def function(self, s, loc, toks): |
| 2767 | self.push_state() |
nothing calls this directly
no test coverage detected