MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / add_superscript

Method add_superscript

src/__init__.py:2310–2319  ·  view source on GitHub ↗

Add a superscript ("sup" tag)

(self, text=None)

Source from the content-addressed store, hash-verified

2308 return self
2309
2310 def add_superscript(self, text=None):
2311 """Add a superscript ("sup" tag)"""
2312 child = self.create_element("sup")
2313 if type(text) is str:
2314 child.append_child(self.create_text_node(text))
2315 prev = self.span_bottom()
2316 if prev is None:
2317 prev = self
2318 prev.append_child(child)
2319 return self
2320
2321 def add_text(self, text):
2322 """Add text. Line breaks are honored."""

Callers

nothing calls this directly

Calls 4

create_elementMethod · 0.95
create_text_nodeMethod · 0.95
span_bottomMethod · 0.95
append_childMethod · 0.80

Tested by

no test coverage detected