Section#

Qualified name: rsm.nodes.Section

class rsm.nodes.Section(title='', **kwargs)[source]#

Bases: Heading

Methods

Attributes

autonumber

Whether to automatically assign a number to this node during transform step.

level

nodeid

Node id - always exists (unlike label), automatically assigned, unique within the tree.

label

Unique identifier.

classes

CSS classes for this node.

handrail_depth

The number of ancestors of this node that have a handrail.

number

Node number.

nonum

Whether this node should be automatically given a number.

reftext_template

Reftext template, or "" to use classreftext.

start_point

The start point of the corresponding concrete syntax tree node.

end_point

The end point of the corresponding concrete syntax tree node.

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)