Title¶
- class kgpy.latex.Title(name)¶
Bases:
LatexObject- Parameters:
name (str) –
Attributes
Start a new paragraph before this environment.
Start a new paragraph after this environment.
Determine whether or not to escape content of this class.
Return the name of the class used in LaTeX.
Same as enabling begin_paragraph and end_paragraph, so effectively placing this element in its own paragraph.
Methods
__init__(name)dump(file_w)Write the LaTeX representation of the class to a file.
dump_packages(file_w)Write the LaTeX representation of the packages to a file.
dumps()Represent the class as a string in LaTeX syntax.
Create a string representation of the object as content.
Represent the packages needed as a string in LaTeX syntax.
generate_tex(filepath)Generate a .tex file.
Inheritance Diagram
digraph inheritanceb6e0d14c66 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "kgpy.latex.Title" [URL="kgpy.latex.Title.html#kgpy.latex.Title",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Title(name: str)"]; "pylatex.base_classes.latex_object.LatexObject" -> "kgpy.latex.Title" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pylatex.base_classes.latex_object.LatexObject" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="The class that every other LaTeX class is a subclass of."]; }- dump(file_w)¶
Write the LaTeX representation of the class to a file.
- Parameters:
file_w (io.TextIOBase) – The file object in which to save the data
- dump_packages(file_w)¶
Write the LaTeX representation of the packages to a file.
- Parameters:
file_w (io.TextIOBase) – The file object in which to save the data
- dumps()¶
Represent the class as a string in LaTeX syntax.
This method should be implemented by any class that subclasses this class.
- dumps_as_content()¶
Create a string representation of the object as content.
This is currently only used to add new lines before and after the output of the dumps function. These can be added or removed by changing the begin_paragraph, end_paragraph and separate_paragraph attributes of the class.
- generate_tex(filepath)¶
Generate a .tex file.
- Parameters:
filepath (str) – The name of the file (without .tex)
- begin_paragraph = False¶
Start a new paragraph before this environment.
- end_paragraph = False¶
Start a new paragraph after this environment.
- property escape¶
Determine whether or not to escape content of this class.
This defaults to True for most classes.
- property latex_name¶
Return the name of the class used in LaTeX.
It can be None when the class doesn’t have a name.
- packages = OrderedSet()¶
- separate_paragraph = False¶
Same as enabling begin_paragraph and end_paragraph, so effectively placing this element in its own paragraph.