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

Method add_subscript

src/__init__.py:2299–2308  ·  view source on GitHub ↗

Add a subscript ("sub" tag)

(self, text=None)

Source from the content-addressed store, hash-verified

2297 return self
2298
2299 def add_subscript(self, text=None):
2300 """Add a subscript ("sub" tag)"""
2301 child = self.create_element("sub")
2302 if type(text) is str:
2303 child.append_child(self.create_text_node(text))
2304 prev = self.span_bottom()
2305 if prev is None:
2306 prev = self
2307 prev.append_child(child)
2308 return self
2309
2310 def add_superscript(self, text=None):
2311 """Add a superscript ("sup" tag)"""

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