Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
docutils.writers.latex2e.LaTeXTranslator Class Reference
Inheritance diagram for docutils.writers.latex2e.LaTeXTranslator:
Inheritance graph
[legend]
Collaboration diagram for docutils.writers.latex2e.LaTeXTranslator:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, document, babel_class=Babel)
 
 stylesheet_call (self, path)
 
 to_latex_encoding (self, docutils_encoding)
 
 language_label (self, docutil_label)
 
 encode (self, text)
 
 attval (self, text, whitespace=re.compile('[\n\r\t\v\f]'))
 
 is_inline (self, node)
 def astext(self): """Assemble document parts and return as string.""" head = '
'.join(self.head_prefix + self.stylesheet + self.head) body = ''.join(self.body_prefix + self.body + self.body_suffix) return head + '
' + body
 
 append_hypertargets (self, node)
 
 ids_to_labels (self, node, set_anchor=True, protect=False, newline=False)
 
 set_align_from_classes (self, node)
 
 insert_align_declaration (self, node, default=None)
 
 duclass_open (self, node)
 
 duclass_close (self, node)
 
 push_output_collector (self, new_out)
 
 pop_output_collector (self)
 
 term_postfix (self, node)
 
 visit_Text (self, node)
 
 depart_Text (self, node)
 
 visit_abbreviation (self, node)
 
 depart_abbreviation (self, node)
 
 visit_acronym (self, node)
 
 depart_acronym (self, node)
 
 visit_address (self, node)
 
 depart_address (self, node)
 
 visit_admonition (self, node)
 
 depart_admonition (self, node)
 
 visit_author (self, node)
 
 depart_author (self, node)
 
 visit_authors (self, node)
 
 depart_authors (self, node)
 
 visit_block_quote (self, node)
 
 depart_block_quote (self, node)
 
 visit_bullet_list (self, node)
 
 depart_bullet_list (self, node)
 
 visit_superscript (self, node)
 
 depart_superscript (self, node)
 
 visit_subscript (self, node)
 
 depart_subscript (self, node)
 
 visit_caption (self, node)
 
 depart_caption (self, node)
 
 visit_title_reference (self, node)
 
 depart_title_reference (self, node)
 
 visit_citation (self, node)
 
 depart_citation (self, node)
 
 visit_citation_reference (self, node)
 
 depart_citation_reference (self, node)
 
 visit_classifier (self, node)
 
 depart_classifier (self, node)
 
 visit_colspec (self, node)
 
 depart_colspec (self, node)
 
 visit_comment (self, node)
 
 depart_comment (self, node)
 
 visit_compound (self, node)
 
 depart_compound (self, node)
 
 visit_contact (self, node)
 
 depart_contact (self, node)
 
 visit_container (self, node)
 
 depart_container (self, node)
 
 visit_copyright (self, node)
 
 depart_copyright (self, node)
 
 visit_date (self, node)
 
 depart_date (self, node)
 
 visit_decoration (self, node)
 
 depart_decoration (self, node)
 
 visit_definition (self, node)
 
 depart_definition (self, node)
 
 visit_definition_list (self, node)
 
 depart_definition_list (self, node)
 
 visit_definition_list_item (self, node)
 
 depart_definition_list_item (self, node)
 
 visit_description (self, node)
 
 depart_description (self, node)
 
 visit_docinfo (self, node)
 
 depart_docinfo (self, node)
 
 visit_docinfo_item (self, node, name)
 
 depart_docinfo_item (self, node)
 
 visit_doctest_block (self, node)
 
 depart_doctest_block (self, node)
 
 visit_document (self, node)
 
 depart_document (self, node)
 
 make_title (self)
 
 append_bibliogaphy (self)
 
 visit_emphasis (self, node)
 
 depart_emphasis (self, node)
 
 insert_additional_table_colum_delimiters (self)
 
 visit_entry (self, node)
 
 depart_entry (self, node)
 
 visit_row (self, node)
 
 depart_row (self, node)
 
 visit_enumerated_list (self, node)
 
 depart_enumerated_list (self, node)
 
 visit_field (self, node)
 
 depart_field (self, node)
 
 visit_field_body (self, node)
 
 depart_field_body (self, node)
 
 visit_field_list (self, node)
 
 depart_field_list (self, node)
 
 visit_field_name (self, node)
 
 depart_field_name (self, node)
 
 visit_figure (self, node)
 
 depart_figure (self, node)
 
 visit_footer (self, node)
 
 depart_footer (self, node)
 
 visit_footnote (self, node)
 
 depart_footnote (self, node)
 
 visit_footnote_reference (self, node)
 
 depart_footnote_reference (self, node)
 
 label_delim (self, node, bracket, superscript)
 
 visit_label (self, node)
 
 depart_label (self, node)
 
 visit_generated (self, node)
 
 depart_generated (self, node)
 
 visit_header (self, node)
 
 depart_header (self, node)
 
 to_latex_length (self, length_str, pxunit=None)
 
 visit_image (self, node)
 
 depart_image (self, node)
 
 visit_inline (self, node)
 
 depart_inline (self, node)
 
 visit_legend (self, node)
 
 depart_legend (self, node)
 
 visit_line (self, node)
 
 depart_line (self, node)
 
 visit_line_block (self, node)
 
 depart_line_block (self, node)
 
 visit_list_item (self, node)
 
 depart_list_item (self, node)
 
 visit_literal (self, node)
 
 depart_literal (self, node)
 
 is_plaintext (self, node)
 
 visit_literal_block (self, node)
 
 depart_literal_block (self, node)
 
 visit_meta (self, node)
 
 depart_meta (self, node)
 
 visit_math (self, node, math_env='$')
 
 depart_math (self, node)
 
 visit_math_block (self, node)
 
 depart_math_block (self, node)
 
 visit_option (self, node)
 
 depart_option (self, node)
 
 visit_option_argument (self, node)
 
 depart_option_argument (self, node)
 
 visit_option_group (self, node)
 
 depart_option_group (self, node)
 
 visit_option_list (self, node)
 
 depart_option_list (self, node)
 
 visit_option_list_item (self, node)
 
 depart_option_list_item (self, node)
 
 visit_option_string (self, node)
 
 depart_option_string (self, node)
 
 visit_organization (self, node)
 
 depart_organization (self, node)
 
 visit_paragraph (self, node)
 
 depart_paragraph (self, node)
 
 visit_problematic (self, node)
 
 depart_problematic (self, node)
 
 visit_raw (self, node)
 
 depart_raw (self, node)
 
 has_unbalanced_braces (self, string)
 
 visit_reference (self, node)
 
 depart_reference (self, node)
 
 visit_revision (self, node)
 
 depart_revision (self, node)
 
 visit_rubric (self, node)
 
 depart_rubric (self, node)
 
 visit_section (self, node)
 
 depart_section (self, node)
 
 visit_sidebar (self, node)
 
 depart_sidebar (self, node)
 
 visit_attribution (self, node)
 
 depart_attribution (self, node)
 
 visit_status (self, node)
 
 depart_status (self, node)
 
 visit_strong (self, node)
 
 depart_strong (self, node)
 
 visit_substitution_definition (self, node)
 
 visit_substitution_reference (self, node)
 
 visit_subtitle (self, node)
 
 depart_subtitle (self, node)
 
 visit_system_message (self, node)
 
 depart_system_message (self, node)
 
 visit_table (self, node)
 
 depart_table (self, node)
 
 visit_target (self, node)
 
 depart_target (self, node)
 
 visit_tbody (self, node)
 
 depart_tbody (self, node)
 
 visit_term (self, node)
 
 depart_term (self, node)
 
 visit_tgroup (self, node)
 
 depart_tgroup (self, node)
 
 thead_depth (self)
 
 visit_thead (self, node)
 
 depart_thead (self, node)
 
 visit_title (self, node)
 
 depart_title (self, node)
 
 visit_contents (self, node)
 
 visit_topic (self, node)
 
 depart_topic (self, node)
 
 visit_transition (self, node)
 
 depart_transition (self, node)
 
 visit_version (self, node)
 
 depart_version (self, node)
 
 unimplemented_visit (self, node)
 
- Public Member Functions inherited from docutils.nodes.NodeVisitor
 dispatch_visit (self, node)
 
 dispatch_departure (self, node)
 
 unknown_visit (self, node)
 
 unknown_departure (self, node)
 

Public Attributes

 warn
 
 error
 
 settings
 
 latex_encoding
 
 use_latex_toc
 
 use_latex_docinfo
 
 use_latex_citations
 
 reference_label
 
 hyperlink_color
 
 compound_enumerators
 
 font_encoding
 
 section_prefix_for_enumerators
 
 section_enumerator_separator
 
 literal_block_env
 
 literal_block_options
 
 bibtex
 
 language_module
 
 babel
 
 author_separator
 
 documentoptions
 
 d_class
 
 graphicx_package
 
 docutils_footnotes
 
 head_prefix
 
 requirements
 
 latex_preamble
 
 fallbacks
 
 pdfsetup
 
 title
 
 subtitle
 
 titledata
 
 body_pre_docinfo
 self.body_prefix = ['\begin{document}
']
 
 docinfo
 
 dedication
 
 abstract
 
 body
 
 context
 self.body_suffix = ['\end{document}
']
 
 title_labels
 
 subtitle_labels
 
 author_stack
 
 date
 
 pdfauthor
 
 pdfinfo
 
 table_stack
 
 active_table
 
 out
 
 out_stack
 
 fallback_stylesheet
 
 stylesheet
 
 hyperref_options
 
 inside_citation_reference_label
 
 insert_newline
 
 literal
 
 verbatim
 
 alltt
 
 insert_non_breaking_blanks
 
 section_level
 
 has_latex_toc
 
- Public Attributes inherited from docutils.nodes.NodeVisitor
 document
 
 optional
 

Static Public Attributes

bool is_xetex = False
 
bool compound_enumerators = False
 use_optionlist_for_docinfo = False # TODO: NOT YET IN USE
 
bool section_prefix_for_enumerators = False
 
str section_enumerator_separator = '-'
 
bool has_latex_toc = False
 
int section_level = 0
 
bool inside_citation_reference_label = False
 
bool verbatim = False
 
bool insert_non_breaking_blanks = False
 
bool insert_newline = False
 
bool literal = False
 
bool alltt = False
 
dict attribution_formats
 
- Static Public Attributes inherited from docutils.nodes.NodeVisitor
tuple optional = ('meta',)
 

Protected Attributes

 _section_number
 
 _enumeration_counters
 
 _max_enumeration_counters
 
 _bibitems
 
 _thead_depth
 

Static Protected Attributes

int _thead_depth = 0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

docutils.writers.latex2e.LaTeXTranslator.__init__ (   self,
  document,
  babel_class = Babel 
)

Reimplemented from docutils.nodes.NodeVisitor.

Member Function Documentation

◆ append_hypertargets()

docutils.writers.latex2e.LaTeXTranslator.append_hypertargets (   self,
  node 
)
Append hypertargets for all ids of `node`

◆ attval()

docutils.writers.latex2e.LaTeXTranslator.attval (   self,
  text,
  whitespace = re.compile('[\n\r\t\v\f]') 
)
Cleanse, encode, and return attribute value text.

◆ duclass_close()

docutils.writers.latex2e.LaTeXTranslator.duclass_close (   self,
  node 
)
Close a group of class declarations.

◆ duclass_open()

docutils.writers.latex2e.LaTeXTranslator.duclass_open (   self,
  node 
)
Open a group and insert declarations for class values.

◆ encode()

docutils.writers.latex2e.LaTeXTranslator.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.

◆ has_unbalanced_braces()

docutils.writers.latex2e.LaTeXTranslator.has_unbalanced_braces (   self,
  string 
)
Test whether there are unmatched '{' or '}' characters.

◆ ids_to_labels()

docutils.writers.latex2e.LaTeXTranslator.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.

◆ is_inline()

docutils.writers.latex2e.LaTeXTranslator.is_inline (   self,
  node 
)

def astext(self): """Assemble document parts and return as string.""" head = '
'.join(self.head_prefix + self.stylesheet + self.head) body = ''.join(self.body_prefix + self.body + self.body_suffix) return head + '
' + body

Check whether a node represents an inline or block-level element

◆ is_plaintext()

docutils.writers.latex2e.LaTeXTranslator.is_plaintext (   self,
  node 
)
Check whether a node can be typeset verbatim

◆ set_align_from_classes()

docutils.writers.latex2e.LaTeXTranslator.set_align_from_classes (   self,
  node 
)
Convert ``align-*`` class arguments into alignment args.

◆ stylesheet_call()

docutils.writers.latex2e.LaTeXTranslator.stylesheet_call (   self,
  path 
)
Return code to reference or embed stylesheet file `path`

◆ term_postfix()

docutils.writers.latex2e.LaTeXTranslator.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.

◆ to_latex_encoding()

docutils.writers.latex2e.LaTeXTranslator.to_latex_encoding (   self,
  docutils_encoding 
)
Translate docutils encoding name into LaTeX's.

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

◆ to_latex_length()

docutils.writers.latex2e.LaTeXTranslator.to_latex_length (   self,
  length_str,
  pxunit = None 
)
Convert `length_str` with rst length to LaTeX length

◆ visit_contents()

docutils.writers.latex2e.LaTeXTranslator.visit_contents (   self,
  node 
)
Write the table of contents.

Called from visit_topic() for "contents" topics.

◆ visit_label()

docutils.writers.latex2e.LaTeXTranslator.visit_label (   self,
  node 
)
footnote or citation label: in brackets or as superscript

◆ visit_literal_block()

docutils.writers.latex2e.LaTeXTranslator.visit_literal_block (   self,
  node 
)
Render a literal block.

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

◆ visit_math()

docutils.writers.latex2e.LaTeXTranslator.visit_math (   self,
  node,
  math_env = '$' 
)
math role

◆ visit_option_argument()

docutils.writers.latex2e.LaTeXTranslator.visit_option_argument (   self,
  node 
)
Append the delimiter between an option and its argument to body.

◆ visit_term()

docutils.writers.latex2e.LaTeXTranslator.visit_term (   self,
  node 
)
definition list term

◆ visit_title()

docutils.writers.latex2e.LaTeXTranslator.visit_title (   self,
  node 
)
Append section and other titles.

Member Data Documentation

◆ attribution_formats

dict docutils.writers.latex2e.LaTeXTranslator.attribution_formats
static
Initial value:
= {'dash': ('—', ''), # EM DASH
'parentheses': ('(', ')'),
'parens': ('(', ')'),
'none': ('', '')}

The documentation for this class was generated from the following file: