If s is a formatted string, then it is placed untouched. If it is a plain string, then use the optional *style* or element *e* (using *e.css(name)*) for searching style parameters. Answer the new formatted string. Used e.g. to measure its size.
(self, sOrBs, e=None, style=None)
| 593 | self.htmlNode(node, end=True) |
| 594 | |
| 595 | def typesetString(self, sOrBs, e=None, style=None): |
| 596 | """If s is a formatted string, then it is placed untouched. If it is a |
| 597 | plain string, then use the optional *style* or element *e* (using |
| 598 | *e.css(name)*) for searching style parameters. Answer the new |
| 599 | formatted string. Used e.g. to measure its size.""" |
| 600 | # Only convert if not yet BabelString instance. |
| 601 | bs = self.context.newString(sOrBs, e=e, style=style) |
| 602 | self.append(bs) |
| 603 | return bs |
| 604 | |
| 605 | def typesetNode(self, node, e=None): |
| 606 | """Recursively typeset the etree *node*, using a reference to element |