pylatex.section

This module implements the section type classes.

class Section(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.base_classes.containers.Container

A class that represents a section.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
marker_prefix = 'sec'[source]

Default prefix to use with Marker

numbering = True[source]

Number the sections when the section element is compatible, by changing the Section class default all subclasses will also have the new default.

class Part(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a part.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
marker_prefix = 'part'[source]
numbering = True
class Chapter(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a chapter.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
marker_prefix = 'chap'[source]
numbering = True
class Subsection(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a subsection.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
marker_prefix = 'subsec'[source]
numbering = True
class Subsubsection(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a subsubsection.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
numbering = True
marker_prefix = 'ssubsec'[source]
class Paragraph(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a paragraph.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
numbering = True
marker_prefix = 'para'[source]
class Subparagraph(title, numbering=None, *, label=True, **kwargs)[source]

Bases: pylatex.section.Section

A class that represents a subparagraph.

Parameters:
  • title (str) – The section title.
  • numbering (bool) – Add a number before the section title.
  • label (Label or bool or str) – Can set a label manually or use a boolean to set preference between automatic or no label
numbering = True
marker_prefix = 'subpara'[source]