Skip to content

Commit

Permalink
Merge pull request JelteF#179 from Wddysr/add_sectioning_levels
Browse files Browse the repository at this point in the history
section.py : Add sectioning levels such as chapter
  • Loading branch information
JelteF authored May 22, 2017
2 parents da08b46 + 8cd4b4b commit 21a5694
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pylatex/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Section(Container):
#: A section should normally start in its own paragraph
end_paragraph = True

#: Number the sections, by changing the `~.Section` class default all
#: Number the sections when the section element is compatible,
#: by changing the `~.Section` class default all
#: subclasses will also have the new default.
numbering = True

Expand Down Expand Up @@ -57,9 +58,25 @@ def dumps(self):
return string


class Part(Section):
"""A class that represents a part."""


class Chapter(Section):
"""A class that represents a chapter."""


class Subsection(Section):
"""A class that represents a subsection."""


class Subsubsection(Section):
"""A class that represents a subsubsection."""


class Paragraph(Section):
"""A class that represents a paragraph."""


class Subparagraph(Section):
"""A class that represents a subparagraph."""

0 comments on commit 21a5694

Please sign in to comment.