Label#

class aastex.Label(marker)[source]#

Bases: RefLabelBase

A class that represents a label.

Attributes

begin_paragraph

Start a new paragraph before this environment.

end_paragraph

Start a new paragraph after this environment.

escape

Determine whether or not to escape content of this class.

latex_name

Return the name of the class used in LaTeX.

packages

separate_paragraph

Same as enabling begin_paragraph and end_paragraph, so effectively placing this element in its own paragraph.

Methods

__init__(marker)

param marker:

The marker to use with the label/ref.

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 command as a string in LaTeX syntax.

dumps_as_content()

Create a string representation of the object as content.

dumps_packages()

Represent the packages needed as a string in LaTeX syntax.

generate_tex(filepath)

Generate a .tex file.

Inheritance Diagram

Inheritance diagram of aastex.Label
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 command as a string in LaTeX syntax.

Returns:

The LaTeX formatted command

Return type:

str

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.

dumps_packages()#

Represent the packages needed as a string in LaTeX syntax.

Return type:

list

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.