Subsection#

class aastex.Subsection(title=None, numbering=None, *, label=True, **kwargs)[source]#

Bases: Section, Subsection

Attributes

begin_paragraph

Start a new paragraph before this environment.

content_separator

end_paragraph

A section should normally start in its own paragraph

escape

Determine whether or not to escape content of this class.

latex_name

Return the name of the class used in LaTeX.

marker_prefix

Default prefix to use with Marker

numbering

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

packages

separate_paragraph

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

Methods

__init__([title, numbering, label])

append(item)

S.append(value) -- append value to the end of the sequence

clear()

copy()

count(value)

create(child)

Add a LaTeX object to current container, context-manager style.

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

dumps_as_content()

Create a string representation of the object as content.

dumps_content(**kwargs)

Represent the container as a string in LaTeX syntax.

dumps_packages()

Represent the packages needed as a string in LaTeX syntax.

extend(other)

S.extend(iterable) -- extend sequence by appending elements from the iterable

generate_tex(filepath)

Generate a .tex file.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

insert(i, item)

S.insert(index, value) -- insert value before index

pop([index])

Raise IndexError if list is empty or index is out of range.

remove(item)

S.remove(value) -- remove first occurrence of value.

reverse()

S.reverse() -- reverse IN PLACE

sort(*args, **kwds)

Inheritance Diagram

Inheritance diagram of aastex.Subsection
Parameters:
append(item)#

S.append(value) – append value to the end of the sequence

clear() None -- remove all items from S#
copy()#
count(value) integer -- return number of occurrences of value#
create(child)#

Add a LaTeX object to current container, context-manager style.

Parameters:

child (~.Container) – An object to be added to the current container

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

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_content(**kwargs)#

Represent the container as a string in LaTeX syntax.

Parameters:

**kwargs – Arguments that can be passed to ~.dumps_list

Returns:

A LaTeX string representing the container

Return type:

string

dumps_packages()#

Represent the packages needed as a string in LaTeX syntax.

Returns:

A LaTeX string representing the packages of the container

Return type:

string

extend(other)#

S.extend(iterable) – extend sequence by appending elements from the iterable

generate_tex(filepath)#

Generate a .tex file.

Parameters:

filepath (str) – The name of the file (without .tex)

index(value[, start[, stop]]) integer -- return first index of value.#

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(i, item)#

S.insert(index, value) – insert value before index

pop([index]) item -- remove and return item at index (default last).#

Raise IndexError if list is empty or index is out of range.

remove(item)#

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

reverse()#

S.reverse() – reverse IN PLACE

sort(*args, **kwds)#
begin_paragraph = False#

Start a new paragraph before this environment.

content_separator = '%\n'#
end_paragraph = True#

A section should normally start in its own paragraph

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.

marker_prefix = 'subsec'#

Default prefix to use with Marker

numbering = True#

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

packages = OrderedSet()#
separate_paragraph = False#

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