MathBlock#
Qualified name: rsm.nodes.MathBlock
- class rsm.nodes.MathBlock(isclaim=False, **kwargs)[source]#
Bases:
NodeWithChildren
Methods
Attributes
Whether to automatically assign a number to this node during transform step.
classreftext
Meta keys to add to those of the parent class.
- autonumber: ClassVar[bool] = True[source]#
Whether to automatically assign a number to this node during transform step.
Examples
>>> msc, thm1, thm2 = nodes.Manuscript(), nodes.Theorem(), nodes.Theorem() >>> (thm1.number, thm2.number) == (None, None) True >>> tform = rsm.transformer.Transformer() >>> tform.transform(msc.append([thm1, thm2])) >>> thm1.number, thm2.number (1, 2)
- newmetakeys: ClassVar[set] = {'isclaim'}[source]#
Meta keys to add to those of the parent class.
Important
Only use this when defining a new Node subclass. When dealing with Node isntances, do not access this attribute directly neither for reading nor writing. Always use
metakeys()
in that case.See also
metakeys()
Examples
The keys in newmetakeys are added to the meta keys of the parent class.
>>> nodes.Heading.newmetakeys {'title'} >>> nodes.Heading.metakeys() == nodes.Node.metakeys() | {"title"} True
The intended use, and only supported use, of newmetakeys is at the time of class definition.
>>> class NewNode(nodes.Node): ... newmetakeys = {"newkey"} >>> NewNode.metakeys() == nodes.Node.metakeys() | {"newkey"} True