pyexlatex.models.format package¶
Subpackages¶
- pyexlatex.models.format.code package
- pyexlatex.models.format.paragraph package
- pyexlatex.models.format.text package
- Subpackages
- Submodules
- pyexlatex.models.format.text.bold module
- pyexlatex.models.format.text.italics module
- pyexlatex.models.format.text.linespacing module
- pyexlatex.models.format.text.monospace module
- pyexlatex.models.format.text.nohyphens module
- pyexlatex.models.format.text.smallcaps module
- pyexlatex.models.format.text.text module
- pyexlatex.models.format.text.underline module
Submodules¶
pyexlatex.models.format.adjustbox module¶
pyexlatex.models.format.breaks module¶
- class pyexlatex.models.format.breaks.OutputLineBreak(size_adjustment=None)[source]¶
Bases:
pyexlatex.models.format.breaks.Break
,mixins.repr.ReprMixin
Create an intentional line break in text
pyexlatex.models.format.centering module¶
- class pyexlatex.models.format.centering.Center(content, **kwargs)[source]¶
Bases:
pyexlatex.models.section.base.TextAreaBase
Align the passed contents to the center of the container
- name = 'center'¶
pyexlatex.models.format.fills module¶
- class pyexlatex.models.format.fills.HFill[source]¶
Bases:
pyexlatex.models.item.NoOptionsNoContentsItem
Horizontal fill, put between items to put horizontal spacing between them.
- name = 'hfill'¶
pyexlatex.models.format.hangindent module¶
pyexlatex.models.format.hline module¶
- class pyexlatex.models.format.hline.HLine(thickness=0.4)[source]¶
Bases:
pyexlatex.models.format.rule.Rule
Draws a horizontal line across the text width.
pyexlatex.models.format.hspace module¶
pyexlatex.models.format.join module¶
- class pyexlatex.models.format.join.Joined(contents, join_with='')[source]¶
Bases:
pyexlatex.models.section.base.TextAreaMixin
,pyexlatex.models.item.ItemBase
Applies string.join on contents when output string is created, but retains content objects.
pyexlatex.models.format.noindent module¶
- class pyexlatex.models.format.noindent.NoIndent(contents, **kwargs)[source]¶
Bases:
pyexlatex.models.section.base.TextAreaMixin
,pyexlatex.models.item.NoOptionsNoContentsItem
Do not have an indent for the current paragraph
- name = 'noindent'¶
pyexlatex.models.format.nolinebreak module¶
- class pyexlatex.models.format.nolinebreak.NoLineBreak(contents, alternative='ragged')[source]¶
Bases:
pyexlatex.models.template.Template
Prevents a line break within text, where a hyphen would normally be placed.
- Notes:
Using this will have side effects to the entire paragraph, depending on the alternative chosen. See the docstring for alternative.
- __init__(contents, alternative='ragged')[source]¶
- Parameters
contents¶ –
alternative¶ (
str
) – ‘ragged’ or ‘sloppy’. As the word won’t be broken, there must be some alternative. Passing ‘ragged’ will make all the other words on the first line stay in the same position, so that a gap will appear at the end of the line where the NoLineBreak word would have started originally. Passing ‘sloppy’ will make it so that the first line’s words spacing gets stretched so that there is still right alignment on that line, despite the NoLineBreak word being moved to the next line. Note: This will affect the entire paragraph, not just the NoLineBreak word.
- name = 'nohyphens'¶
pyexlatex.models.format.nopagebreak module¶
- class pyexlatex.models.format.nopagebreak.NoPageBreak(contents, **kwargs)[source]¶
Bases:
pyexlatex.models.environmenttemplate.EnvironmentTemplate
Contents within this environment will not have a page break come in the middle. Contents will instead be moved onto the next page if a break would have occurred.
- begin_def = '\\par\\nobreak\\vfil\\penalty0\\vfilneg\\vtop\\bgroup'¶
- end_def = '\\par\\xdef\\tpd{\\the\\prevdepth}\\egroup\\prevdepth=\\tpd'¶
- name = 'absolutelynopagebreak'¶
pyexlatex.models.format.paragraphindent module¶
- class pyexlatex.models.format.paragraphindent.ParagraphIndent(contents, left_adjust=1, right_adjust=0)[source]¶
Bases:
pyexlatex.models.section.base.TextAreaBase
,pyexlatex.models.item.Item
Used for setting paragraph indents, from the left or right.
- name = 'adjustwidth'¶
pyexlatex.models.format.raw module¶
- class pyexlatex.models.format.raw.Raw(contents)[source]¶
Bases:
pyexlatex.models.mixins.IsSpecificClassMixin
,pyexlatex.models.item.IsLatexItemMixin
,mixins.attrequals.EqOnAttrsMixin
Don’t replace latex characters in this blocks such as or %, useful for adding latex commands or comments manually.
- equal_attrs = ('contents',)¶
pyexlatex.models.format.rule module¶
pyexlatex.models.format.sectionnum module¶
- class pyexlatex.models.format.sectionnum.SectionNumberingFormatter(section_type, section_format)[source]¶
Bases:
pyexlatex.models.commands.renewcommand.ReNewCommand
applies formatting for section numbers