class documentation

class LaTeXTranslator(nodes.NodeVisitor):

Known subclasses: docutils.writers.xetex.XeLaTeXTranslator

View In Hierarchy

Generate code for 8-bit LaTeX from a Docutils document tree.

See the docstring of docutils.writers._html_base.HTMLTranslator for notes on and examples of safe subclassing.

Method __init__ Undocumented
Method append​_hypertargets Append hypertargets for all ids of node
Method attval Cleanse, encode, and return attribute value text.
Method depart​_abbreviation Undocumented
Method depart​_acronym Undocumented
Method depart​_address Undocumented
Method depart​_admonition Undocumented
Method depart​_attribution Undocumented
Method depart​_author Undocumented
Method depart​_authors Undocumented
Method depart​_block​_quote Undocumented
Method depart​_bullet​_list Undocumented
Method depart​_caption Undocumented
Method depart​_citation Undocumented
Method depart​_citation​_reference Undocumented
Method depart​_classifier Undocumented
Method depart​_colspec Undocumented
Method depart​_comment Undocumented
Method depart​_compound Undocumented
Method depart​_contact Undocumented
Method depart​_container Undocumented
Method depart​_copyright Undocumented
Method depart​_date Undocumented
Method depart​_decoration Undocumented
Method depart​_definition Undocumented
Method depart​_definition​_list Undocumented
Method depart​_definition​_list​_item Undocumented
Method depart​_description Undocumented
Method depart​_docinfo Undocumented
Method depart​_docinfo​_item Undocumented
Method depart​_doctest​_block Undocumented
Method depart​_document Undocumented
Method depart​_emphasis Undocumented
Method depart​_entry Undocumented
Method depart​_enumerated​_list Undocumented
Method depart​_field Undocumented
Method depart​_field​_body Undocumented
Method depart​_field​_list Undocumented
Method depart​_field​_name Undocumented
Method depart​_figure Undocumented
Method depart​_footer Undocumented
Method depart​_footnote Undocumented
Method depart​_footnote​_reference Undocumented
Method depart​_generated Undocumented
Method depart​_header Undocumented
Method depart​_image Undocumented
Method depart​_inline Undocumented
Method depart​_label Undocumented
Method depart​_legend Undocumented
Method depart​_line Undocumented
Method depart​_line​_block Undocumented
Method depart​_list​_item Undocumented
Method depart​_literal Undocumented
Method depart​_literal​_block Undocumented
Method depart​_math Undocumented
Method depart​_math​_block Undocumented
Method depart​_meta Undocumented
Method depart​_option Undocumented
Method depart​_option​_argument Undocumented
Method depart​_option​_group Undocumented
Method depart​_option​_list Undocumented
Method depart​_option​_list​_item Undocumented
Method depart​_option​_string Undocumented
Method depart​_organization Undocumented
Method depart​_paragraph Undocumented
Method depart​_problematic Undocumented
Method depart​_raw Undocumented
Method depart​_reference Undocumented
Method depart​_revision Undocumented
Method depart​_row Undocumented
Method depart​_rubric Undocumented
Method depart​_section Undocumented
Method depart​_sidebar Undocumented
Method depart​_status Undocumented
Method depart​_strong Undocumented
Method depart​_subscript Undocumented
Method depart​_subtitle Undocumented
Method depart​_superscript Undocumented
Method depart​_system​_message Undocumented
Method depart​_table Undocumented
Method depart​_target Undocumented
Method depart​_tbody Undocumented
Method depart​_term Undocumented
Method depart_​Text Undocumented
Method depart​_tgroup Undocumented
Method depart​_thead Undocumented
Method depart​_title Undocumented
Method depart​_title​_reference Undocumented
Method depart​_topic Undocumented
Method depart​_transition Undocumented
Method depart​_version Undocumented
Method duclass​_close Close a group of class declarations.
Method duclass​_open Open a group and insert declarations for class values.
Method encode Return text with 'problematic' characters escaped.
Method has​_unbalanced​_braces Test whether there are unmatched '{' or '}' characters.
Method ids​_to​_labels Return list of label definitions for all ids of node
Method insert​_additional​_table​_colum​_delimiters Undocumented
Method insert​_align​_declaration Undocumented
Method is​_inline Check whether a node represents an inline or block-level element
Method is​_plaintext Check whether a node can be typeset verbatim
Method label​_delim Undocumented
Method language​_label Undocumented
Method pop​_output​_collector Undocumented
Method push​_output​_collector Undocumented
Method set​_align​_from​_classes Convert align-* class arguments into alignment args.
Method stylesheet​_call Return code to reference or embed stylesheet file path
Method term​_postfix Return LaTeX code required between term or field name and content.
Method thead​_depth Undocumented
Method to​_latex​_encoding Translate docutils encoding name into LaTeX's.
Method to​_latex​_length Convert length_str with rst length to LaTeX length
Method unimplemented​_visit Undocumented
Method visit​_abbreviation Undocumented
Method visit​_acronym Undocumented
Method visit​_address Undocumented
Method visit​_admonition Undocumented
Method visit​_attribution Undocumented
Method visit​_author Undocumented
Method visit​_authors Undocumented
Method visit​_block​_quote Undocumented
Method visit​_bullet​_list Undocumented
Method visit​_caption Undocumented
Method visit​_citation Undocumented
Method visit​_citation​_reference Undocumented
Method visit​_classifier Undocumented
Method visit​_colspec Undocumented
Method visit​_comment Undocumented
Method visit​_compound Undocumented
Method visit​_contact Undocumented
Method visit​_container Undocumented
Method visit​_contents Write the table of contents.
Method visit​_copyright Undocumented
Method visit​_date Undocumented
Method visit​_decoration Undocumented
Method visit​_definition Undocumented
Method visit​_definition​_list Undocumented
Method visit​_definition​_list​_item Undocumented
Method visit​_description Undocumented
Method visit​_docinfo Undocumented
Method visit​_docinfo​_item Undocumented
Method visit​_doctest​_block Undocumented
Method visit​_document Undocumented
Method visit​_emphasis Undocumented
Method visit​_entry Undocumented
Method visit​_enumerated​_list Undocumented
Method visit​_field Undocumented
Method visit​_field​_body Undocumented
Method visit​_field​_list Undocumented
Method visit​_field​_name Undocumented
Method visit​_figure Undocumented
Method visit​_footer Undocumented
Method visit​_footnote Undocumented
Method visit​_footnote​_reference Undocumented
Method visit​_generated Undocumented
Method visit​_header Undocumented
Method visit​_image Undocumented
Method visit​_inline Undocumented
Method visit​_label footnote or citation label: in brackets or as superscript
Method visit​_legend Undocumented
Method visit​_line Undocumented
Method visit​_line​_block Undocumented
Method visit​_list​_item Undocumented
Method visit​_literal Undocumented
Method visit​_literal​_block Render a literal block.
Method visit​_math math role
Method visit​_math​_block Undocumented
Method visit​_meta Undocumented
Method visit​_option Undocumented
Method visit​_option​_argument Append the delimiter between an option and its argument to body.
Method visit​_option​_group Undocumented
Method visit​_option​_list Undocumented
Method visit​_option​_list​_item Undocumented
Method visit​_option​_string Undocumented
Method visit​_organization Undocumented
Method visit​_paragraph Undocumented
Method visit​_problematic Undocumented
Method visit​_raw Undocumented
Method visit​_reference Undocumented
Method visit​_revision Undocumented
Method visit​_row Undocumented
Method visit​_rubric Undocumented
Method visit​_section Undocumented
Method visit​_sidebar Undocumented
Method visit​_status Undocumented
Method visit​_strong Undocumented
Method visit​_subscript Undocumented
Method visit​_substitution​_definition Undocumented
Method visit​_substitution​_reference Undocumented
Method visit​_subtitle Undocumented
Method visit​_superscript Undocumented
Method visit​_system​_message Undocumented
Method visit​_table Undocumented
Method visit​_target Undocumented
Method visit​_tbody Undocumented
Method visit​_term definition list term
Method visit_​Text Undocumented
Method visit​_tgroup Undocumented
Method visit​_thead Undocumented
Method visit​_title Append section and other titles.
Method visit​_title​_reference Undocumented
Method visit​_topic Undocumented
Method visit​_transition Undocumented
Method visit​_version Undocumented
Class Variable attribution​_formats Undocumented
Class Variable has​_latex​_toc Undocumented
Class Variable is​_xetex Undocumented
Class Variable section​_level Undocumented
Instance Variable abstract Undocumented
Instance Variable active​_table Undocumented
Instance Variable alltt Undocumented
Instance Variable author​_separator Undocumented
Instance Variable author​_stack Undocumented
Instance Variable babel Undocumented
Instance Variable bibtex Undocumented
Instance Variable body Undocumented
Instance Variable body​_pre​_docinfo Undocumented
Instance Variable compound​_enumerators Undocumented
Instance Variable context Heterogeneous stack.
Instance Variable d​_class Undocumented
Instance Variable date Undocumented
Instance Variable dedication Undocumented
Instance Variable docinfo Undocumented
Instance Variable documentoptions Undocumented
Instance Variable docutils​_footnotes Undocumented
Instance Variable error Undocumented
Instance Variable fallback​_stylesheet Undocumented
Instance Variable fallbacks Undocumented
Instance Variable font​_encoding Undocumented
Instance Variable graphicx​_package Undocumented
Instance Variable head​_prefix Undocumented
Instance Variable hyperlink​_color Undocumented
Instance Variable hyperref​_options Undocumented
Instance Variable insert​_newline Undocumented
Instance Variable insert​_non​_breaking​_blanks Undocumented
Instance Variable inside​_citation​_reference​_label Undocumented
Instance Variable language​_module Undocumented
Instance Variable latex​_encoding Undocumented
Instance Variable latex​_preamble Undocumented
Instance Variable literal Undocumented
Instance Variable literal​_block​_env Undocumented
Instance Variable literal​_block​_options Undocumented
Instance Variable out Undocumented
Instance Variable out​_stack Undocumented
Instance Variable pdfauthor Undocumented
Instance Variable pdfinfo Undocumented
Instance Variable pdfsetup Undocumented
Instance Variable requirements Undocumented
Instance Variable section​_enumerator​_separator Undocumented
Instance Variable section​_prefix​_for​_enumerators Undocumented
Instance Variable settings Undocumented
Instance Variable stylesheet Undocumented
Instance Variable subtitle Undocumented
Instance Variable subtitle​_labels Undocumented
Instance Variable table​_stack Undocumented
Instance Variable title Undocumented
Instance Variable title​_labels Undocumented
Instance Variable titledata Undocumented
Instance Variable use​_latex​_citations Undocumented
Instance Variable use​_latex​_docinfo Undocumented
Instance Variable use​_latex​_toc Undocumented
Instance Variable verbatim Undocumented
Instance Variable warn Undocumented
Class Variable ​_thead​_depth Undocumented
Instance Variable ​_bibitems Undocumented
Instance Variable ​_enumeration​_counters Undocumented
Instance Variable ​_max​_enumeration​_counters Undocumented
Instance Variable ​_reference​_label Undocumented
Instance Variable ​_section​_number Undocumented

Inherited from NodeVisitor:

Method dispatch​_departure Call self."depart_ + node class name" with node as parameter. If the depart_... method does not exist, call self.unknown_departure.
Method dispatch​_visit Call self."visit_ + node class name" with node as parameter. If the visit_... method does not exist, call self.unknown_visit.
Method unknown​_departure Called before exiting unknown Node types.
Method unknown​_visit Called when entering unknown Node types.
Class Variable optional Tuple containing node class names (as strings).
Instance Variable document Undocumented
def __init__(self, document, babel_class=Babel):
def append_hypertargets(self, node):
Append hypertargets for all ids of node
def attval(self, text, whitespace=re.compile('[\n\r\t\v\f]')):
Cleanse, encode, and return attribute value text.
def depart_abbreviation(self, node):

Undocumented

def depart_acronym(self, node):

Undocumented

def depart_address(self, node):

Undocumented

def depart_admonition(self, node):

Undocumented

def depart_attribution(self, node):

Undocumented

def depart_author(self, node):

Undocumented

def depart_authors(self, node):

Undocumented

def depart_block_quote(self, node):

Undocumented

def depart_bullet_list(self, node):

Undocumented

def depart_caption(self, node):

Undocumented

def depart_citation(self, node):

Undocumented

def depart_citation_reference(self, node):

Undocumented

def depart_classifier(self, node):

Undocumented

def depart_colspec(self, node):

Undocumented

def depart_comment(self, node):

Undocumented

def depart_compound(self, node):

Undocumented

def depart_contact(self, node):

Undocumented

def depart_container(self, node):

Undocumented

def depart_copyright(self, node):

Undocumented

def depart_date(self, node):

Undocumented

def depart_decoration(self, node):

Undocumented

def depart_definition(self, node):

Undocumented

def depart_definition_list(self, node):

Undocumented

def depart_definition_list_item(self, node):

Undocumented

def depart_description(self, node):

Undocumented

def depart_docinfo(self, node):

Undocumented

def depart_docinfo_item(self, node):

Undocumented

def depart_doctest_block(self, node):

Undocumented

def depart_document(self, node):

Undocumented

def depart_emphasis(self, node):

Undocumented

def depart_entry(self, node):

Undocumented

def depart_enumerated_list(self, node):

Undocumented

def depart_field(self, node):

Undocumented

def depart_field_body(self, node):

Undocumented

def depart_field_list(self, node):

Undocumented

def depart_field_name(self, node):

Undocumented

def depart_figure(self, node):

Undocumented

def depart_footer(self, node):

Undocumented

def depart_footnote(self, node):

Undocumented

def depart_footnote_reference(self, node):

Undocumented

def depart_generated(self, node):

Undocumented

def depart_header(self, node):

Undocumented

def depart_image(self, node):

Undocumented

def depart_inline(self, node):

Undocumented

def depart_label(self, node):

Undocumented

def depart_legend(self, node):

Undocumented

def depart_line(self, node):

Undocumented

def depart_line_block(self, node):

Undocumented

def depart_list_item(self, node):

Undocumented

def depart_literal(self, node):

Undocumented

def depart_literal_block(self, node):

Undocumented

def depart_math(self, node):

Undocumented

def depart_math_block(self, node):

Undocumented

def depart_meta(self, node):

Undocumented

def depart_option(self, node):

Undocumented

def depart_option_argument(self, node):

Undocumented

def depart_option_group(self, node):

Undocumented

def depart_option_list(self, node):

Undocumented

def depart_option_list_item(self, node):

Undocumented

def depart_option_string(self, node):

Undocumented

def depart_organization(self, node):

Undocumented

def depart_paragraph(self, node):

Undocumented

def depart_problematic(self, node):

Undocumented

def depart_raw(self, node):

Undocumented

def depart_reference(self, node):

Undocumented

def depart_revision(self, node):

Undocumented

def depart_row(self, node):

Undocumented

def depart_rubric(self, node):

Undocumented

def depart_section(self, node):

Undocumented

def depart_sidebar(self, node):

Undocumented

def depart_status(self, node):

Undocumented

def depart_strong(self, node):

Undocumented

def depart_subscript(self, node):

Undocumented

def depart_subtitle(self, node):

Undocumented

def depart_superscript(self, node):

Undocumented

def depart_system_message(self, node):

Undocumented

def depart_table(self, node):

Undocumented

def depart_target(self, node):

Undocumented

def depart_tbody(self, node):

Undocumented

def depart_term(self, node):

Undocumented

def depart_Text(self, node):

Undocumented

def depart_tgroup(self, node):

Undocumented

def depart_thead(self, node):

Undocumented

def depart_title(self, node):

Undocumented

def depart_title_reference(self, node):

Undocumented

def depart_topic(self, node):

Undocumented

def depart_transition(self, node):

Undocumented

def depart_version(self, node):

Undocumented

def duclass_close(self, node):
Close a group of class declarations.
def duclass_open(self, node):
Open a group and insert declarations for class values.
def encode(self, text):

Return text with 'problematic' characters escaped.

  • Escape the special printing characters # $ % & ~ _ ^ \ { }, square brackets [ ], double quotes and (in OT1) < | >.
  • Translate non-supported Unicode characters.
  • Separate - (and more in literal text) to prevent input ligatures.
def has_unbalanced_braces(self, string):
Test whether there are unmatched '{' or '}' characters.
def ids_to_labels(self, node, set_anchor=True, protect=False, newline=False):

Return list of label definitions for all ids of node

If set_anchor is True, an anchor is set with phantomsection. If protect is True, the label cmd is made robust. If newline is True, a newline is added if there are labels.

def insert_additional_table_colum_delimiters(self):

Undocumented

def insert_align_declaration(self, node, default=None):

Undocumented

def is_inline(self, node):
Check whether a node represents an inline or block-level element
def is_plaintext(self, node):
Check whether a node can be typeset verbatim
def label_delim(self, node, bracket, superscript):

Undocumented

def language_label(self, docutil_label):

Undocumented

def pop_output_collector(self):

Undocumented

def push_output_collector(self, new_out):

Undocumented

def set_align_from_classes(self, node):
Convert align-* class arguments into alignment args.
def stylesheet_call(self, path):
Return code to reference or embed stylesheet file path
def term_postfix(self, node):

Return LaTeX code required between term or field name and content.

In a LaTeX "description" environment (used for definition lists and non-docinfo field lists), a \leavevmode between an item's label and content ensures the correct placement of certain block constructs.

def thead_depth(self):

Undocumented

def to_latex_encoding(self, docutils_encoding):

Translate docutils encoding name into LaTeX's.

Default method is remove "-" and "_" chars from docutils_encoding.

def to_latex_length(self, length_str, pxunit=None):
Convert length_str with rst length to LaTeX length
def unimplemented_visit(self, node):

Undocumented

def visit_abbreviation(self, node):

Undocumented

def visit_acronym(self, node):

Undocumented

def visit_address(self, node):

Undocumented

def visit_admonition(self, node):

Undocumented

def visit_attribution(self, node):

Undocumented

def visit_author(self, node):

Undocumented

def visit_authors(self, node):

Undocumented

def visit_block_quote(self, node):

Undocumented

def visit_bullet_list(self, node):

Undocumented

def visit_caption(self, node):

Undocumented

def visit_citation(self, node):

Undocumented

def visit_citation_reference(self, node):

Undocumented

def visit_classifier(self, node):

Undocumented

def visit_colspec(self, node):

Undocumented

def visit_comment(self, node):

Undocumented

def visit_compound(self, node):

Undocumented

def visit_contact(self, node):

Undocumented

def visit_container(self, node):

Undocumented

def visit_contents(self, node):

Write the table of contents.

Called from visit_topic() for "contents" topics.

def visit_copyright(self, node):

Undocumented

def visit_date(self, node):

Undocumented

def visit_decoration(self, node):

Undocumented

def visit_definition(self, node):

Undocumented

def visit_definition_list(self, node):

Undocumented

def visit_definition_list_item(self, node):

Undocumented

def visit_description(self, node):

Undocumented

def visit_docinfo(self, node):

Undocumented

def visit_docinfo_item(self, node, name):

Undocumented

def visit_doctest_block(self, node):

Undocumented

def visit_document(self, node):

Undocumented

def visit_emphasis(self, node):

Undocumented

def visit_entry(self, node):

Undocumented

def visit_enumerated_list(self, node):

Undocumented

def visit_field(self, node):

Undocumented

def visit_field_body(self, node):

Undocumented

def visit_field_list(self, node):

Undocumented

def visit_field_name(self, node):

Undocumented

def visit_figure(self, node):

Undocumented

def visit_footer(self, node):

Undocumented

def visit_footnote(self, node):

Undocumented

def visit_footnote_reference(self, node):

Undocumented

def visit_generated(self, node):

Undocumented

def visit_header(self, node):

Undocumented

def visit_image(self, node):

Undocumented

def visit_inline(self, node):

Undocumented

def visit_label(self, node):
footnote or citation label: in brackets or as superscript
def visit_legend(self, node):

Undocumented

def visit_line(self, node):

Undocumented

def visit_line_block(self, node):

Undocumented

def visit_list_item(self, node):

Undocumented

def visit_literal(self, node):

Undocumented

def visit_literal_block(self, node):

Render a literal block.

Corresponding rST elements: literal block, parsed-literal, code.

def visit_math(self, node, math_env='$'):
math role
def visit_math_block(self, node):

Undocumented

def visit_meta(self, node):

Undocumented

def visit_option(self, node):

Undocumented

def visit_option_argument(self, node):
Append the delimiter between an option and its argument to body.
def visit_option_group(self, node):

Undocumented

def visit_option_list(self, node):

Undocumented

def visit_option_list_item(self, node):

Undocumented

def visit_option_string(self, node):

Undocumented

def visit_organization(self, node):

Undocumented

def visit_paragraph(self, node):

Undocumented

def visit_problematic(self, node):

Undocumented

def visit_raw(self, node):

Undocumented

def visit_reference(self, node):

Undocumented

def visit_revision(self, node):

Undocumented

def visit_row(self, node):

Undocumented

def visit_rubric(self, node):

Undocumented

def visit_section(self, node):

Undocumented

def visit_sidebar(self, node):

Undocumented

def visit_status(self, node):

Undocumented

def visit_strong(self, node):

Undocumented

def visit_subscript(self, node):

Undocumented

def visit_substitution_definition(self, node):

Undocumented

def visit_substitution_reference(self, node):

Undocumented

def visit_subtitle(self, node):

Undocumented

def visit_superscript(self, node):

Undocumented

def visit_system_message(self, node):

Undocumented

def visit_table(self, node):

Undocumented

def visit_target(self, node):

Undocumented

def visit_tbody(self, node):

Undocumented

def visit_term(self, node):
definition list term
def visit_Text(self, node):

Undocumented

def visit_tgroup(self, node):

Undocumented

def visit_thead(self, node):

Undocumented

def visit_title(self, node):
Append section and other titles.
def visit_title_reference(self, node):

Undocumented

def visit_topic(self, node):

Undocumented

def visit_transition(self, node):

Undocumented

def visit_version(self, node):

Undocumented

attribution_formats: dict =

Undocumented

has_latex_toc: bool =

Undocumented

is_xetex: bool =

Undocumented

section_level: int =

Undocumented

abstract: list =

Undocumented

active_table =

Undocumented

alltt: bool =

Undocumented

author_separator =

Undocumented

author_stack: list =

Undocumented

babel =

Undocumented

bibtex =

Undocumented

body: list =

Undocumented

body_pre_docinfo: list =

Undocumented

compound_enumerators =

Undocumented

context: list =

Heterogeneous stack.

Used by visit_* and depart_* functions in conjunction with the tree traversal. Make sure that the pops correspond to the pushes.

d_class =

Undocumented

date: list =

Undocumented

dedication: list =

Undocumented

docinfo: list =

Undocumented

documentoptions =

Undocumented

docutils_footnotes =

Undocumented

error =

Undocumented

fallback_stylesheet: bool =

Undocumented

fallbacks =

Undocumented

font_encoding =

Undocumented

graphicx_package: str =

Undocumented

head_prefix =

Undocumented

hyperlink_color =

Undocumented

hyperref_options: str =

Undocumented

insert_newline: bool =

Undocumented

insert_non_breaking_blanks: bool =

Undocumented

inside_citation_reference_label: int =

Undocumented

language_module =

Undocumented

latex_encoding =

Undocumented

latex_preamble =

Undocumented

literal: bool =

Undocumented

literal_block_env =

Undocumented

literal_block_options =

Undocumented

out =

Undocumented

out_stack: list =

Undocumented

pdfauthor: list =

Undocumented

pdfinfo: list =

Undocumented

pdfsetup: list =

Undocumented

requirements =

Undocumented

section_enumerator_separator =

Undocumented

section_prefix_for_enumerators =

Undocumented

settings =

Undocumented

stylesheet =

Undocumented

subtitle: list =

Undocumented

subtitle_labels: list =

Undocumented

table_stack: list =

Undocumented

title: list =

Undocumented

title_labels: list =

Undocumented

titledata: list =

Undocumented

use_latex_citations =

Undocumented

use_latex_docinfo =

Undocumented

use_latex_toc =

Undocumented

verbatim: bool =

Undocumented

warn =

Undocumented

_thead_depth: int =

Undocumented

_bibitems: list =

Undocumented

_enumeration_counters: list =

Undocumented

_max_enumeration_counters: int =

Undocumented

_reference_label =

Undocumented

_section_number: list[int] =

Undocumented