Package docutils :: Package writers :: Module latex2e :: Class LaTeXTranslator
[show private | hide private]
[frames | no frames]

Class LaTeXTranslator

NodeVisitor --+
              |
             LaTeXTranslator


Method Summary
  __init__(self, document)
  astext(self)
  attval(self, text, whitespace)
Cleanse, encode, and return attribute value text.
  depart_address(self, node)
  depart_admonition(self)
  depart_attention(self, node)
  depart_attribution(self, node)
  depart_author(self, node)
  depart_authors(self, node)
  depart_block_quote(self, node)
  depart_bullet_list(self, node)
  depart_caption(self, node)
  depart_caution(self, node)
  depart_citation(self, node)
  depart_citation_reference(self, node)
  depart_classifier(self, node)
  depart_colspec(self, node)
  depart_contact(self, node)
  depart_copyright(self, node)
  depart_danger(self, node)
  depart_date(self, node)
  depart_decoration(self, node)
  depart_definition(self, node)
  depart_definition_list(self, node)
  depart_definition_list_item(self, node)
  depart_description(self, node)
  depart_docinfo(self, node)
  depart_docinfo_item(self, node)
  depart_doctest_block(self, node)
  depart_document(self, node)
  depart_emphasis(self, node)
  depart_entry(self, node)
  depart_enumerated_list(self, node)
  depart_error(self, node)
  depart_field(self, node)
  depart_field_argument(self, node)
  depart_field_body(self, node)
  depart_field_list(self, node)
  depart_field_name(self, node)
  depart_figure(self, node)
  depart_footer(self, node)
  depart_footnote(self, node)
  depart_footnote_reference(self, node)
  depart_generated(self, node)
  depart_header(self, node)
  depart_hint(self, node)
  depart_image(self, node)
  depart_important(self, node)
  depart_interpreted(self, node)
  depart_label(self, node)
  depart_legend(self, node)
  depart_line_block(self, node)
  depart_list_item(self, node)
  depart_literal(self, node)
  depart_literal_block(self, node)
  depart_meta(self, node)
  depart_note(self, node)
  depart_option(self, node)
  depart_option_argument(self, node)
  depart_option_group(self, node)
  depart_option_list(self, node)
  depart_option_list_item(self, node)
  depart_option_string(self, node)
  depart_organization(self, node)
  depart_paragraph(self, node)
  depart_problematic(self, node)
  depart_reference(self, node)
  depart_revision(self, node)
  depart_row(self, node)
  depart_rubric(self, node)
  depart_section(self, node)
  depart_sidebar(self, node)
  depart_status(self, node)
  depart_strong(self, node)
  depart_subtitle(self, node)
  depart_system_message(self, node)
  depart_table(self, node)
  depart_target(self, node)
  depart_tbody(self, node)
  depart_term(self, node)
  depart_Text(self, node)
  depart_tgroup(self, node)
  depart_thead(self, node)
  depart_tip(self, node)
  depart_title(self, node)
  depart_title_reference(self, node)
  depart_topic(self, node)
  depart_transition(self, node)
  depart_version(self, node)
  depart_warning(self, node)
  encode(self, text)
# $ % & ~ _ ^ { }
  get_colspecs(self)
Return column specification for longtable.
  get_stylesheet_reference(self)
  language_label(self, docutil_label)
  table_preamble(self)
  unimplemented_visit(self, node)
  visit_address(self, node)
  visit_admonition(self, node, name)
  visit_attention(self, node)
  visit_attribution(self, node)
  visit_author(self, node)
  visit_authors(self, node)
  visit_block_quote(self, node)
  visit_bullet_list(self, node)
  visit_caption(self, node)
  visit_caution(self, node)
  visit_citation(self, node)
  visit_citation_reference(self, node)
  visit_classifier(self, node)
  visit_colspec(self, node)
  visit_comment(self, node, sub)
Escape end of line by a ne comment start in comment text.
  visit_contact(self, node)
  visit_copyright(self, node)
  visit_danger(self, node)
  visit_date(self, node)
  visit_decoration(self, node)
  visit_definition(self, node)
  visit_definition_list(self, node)
  visit_definition_list_item(self, node)
  visit_description(self, node)
  visit_docinfo(self, node)
  visit_docinfo_item(self, node, name)
  visit_doctest_block(self, node)
  visit_document(self, node)
  visit_emphasis(self, node)
  visit_entry(self, node)
  visit_enumerated_list(self, node)
  visit_error(self, node)
  visit_field(self, node)
  visit_field_argument(self, node)
  visit_field_body(self, node)
  visit_field_list(self, node)
  visit_field_name(self, node)
  visit_figure(self, node)
  visit_footer(self, node)
  visit_footnote(self, node)
  visit_footnote_reference(self, node)
  visit_generated(self, node)
  visit_header(self, node)
  visit_hint(self, node)
  visit_image(self, node)
  visit_important(self, node)
  visit_interpreted(self, node)
  visit_label(self, node)
  visit_legend(self, node)
  visit_line_block(self, node)
line-block: * whitespace (including linebreaks) is significant * inline markup is supported.
  visit_list_item(self, node)
  visit_literal(self, node)
  visit_literal_block(self, node)
Content block expected for the "parsed-literal" directive; none found.
  visit_meta(self, node)
  visit_note(self, node)
  visit_option(self, node)
  visit_option_argument(self, node)
The delimiter betweeen an option and its argument.
  visit_option_group(self, node)
  visit_option_list(self, node)
  visit_option_list_item(self, node)
  visit_option_string(self, node)
  visit_organization(self, node)
  visit_paragraph(self, node)
  visit_problematic(self, node)
  visit_raw(self, node)
  visit_reference(self, node)
  visit_revision(self, node)
  visit_row(self, node)
  visit_rubric(self, node)
  visit_section(self, node)
  visit_sidebar(self, node)
  visit_status(self, node)
  visit_strong(self, node)
  visit_substitution_definition(self, node)
  visit_substitution_reference(self, node)
  visit_subtitle(self, node)
  visit_system_message(self, node)
  visit_table(self, node)
  visit_target(self, node)
  visit_tbody(self, node)
  visit_term(self, node)
  visit_Text(self, node)
  visit_tgroup(self, node)
  visit_thead(self, node)
  visit_tip(self, node)
  visit_title(self, node)
Only 3 section levels are supported by LaTeX article (AFAIR).
  visit_title_reference(self, node)
  visit_topic(self, node)
  visit_transition(self, node)
  visit_version(self, node)
  visit_warning(self, node)
    Inherited from NodeVisitor
  unknown_departure(self, node)
Called before exiting unknown Node types.
  unknown_visit(self, node)
Called when entering unknown Node types.

Class Variable Summary
dict attribution_formats = {'dash': ('---', ''), 'parens': ('...
str d_margins = '2cm'
str d_options = '10pt'
str d_paper = 'a4paper'
str encoding = '\\usepackage[latin1]{inputenc}\n'
str generator = '%% generator Docutils: http://docutils.sour...
str geometry = '\\usepackage[%s,margin=%s,nohead]{geometry}\...
str hyperlink_color = 'blue'
str latex_head = '\\documentclass[%s]{%s}\n'
str linking = '\\usepackage[colorlinks=%s,linkcolor=%s,urlco...
str stylesheet = '\\input{%s}\n'
int use_latex_toc = 0                                                                     
int use_longtable = 1                                                                     
int use_optionlist_for_docinfo = 0                                                                     
int use_optionlist_for_option_list = 1                                                                     

Method Details

attval(self, text, whitespace=<_sre.SRE_Pattern object at 0x8497de0>)

Cleanse, encode, and return attribute value text.

encode(self, text)

Encode special characters in text & return.
# $ % & ~ _ ^ { }

Escaping with a backslash does not help with backslashes, ~ and ^.

< > are only available in math-mode (really ?) $ starts math- mode.

AND quotes:

get_colspecs(self)

Return column specification for longtable.

Assumes reST line length being 80 characters.

visit_comment(self, node, sub=<built-in method sub of _sre.SRE_Pattern object at 0x846c...)

Escape end of line by a ne comment start in comment text.

visit_line_block(self, node)

line-block: * whitespace (including linebreaks) is significant * inline markup is supported. * serif typeface

visit_literal_block(self, node)

visit_option_argument(self, node)

The delimiter betweeen an option and its argument.

visit_title(self, node)

Only 3 section levels are supported by LaTeX article (AFAIR).

Class Variable Details

attribution_formats

Type:
dict
Value:
{'dash': ('---', ''),
 'none': ('', ''),
 'parens': ('(', ')'),
 'parentheses': ('(', ')')}                                            

d_margins

Type:
str
Value:
'2cm'                                                                  

d_options

Type:
str
Value:
'10pt'                                                                 

d_paper

Type:
str
Value:
'a4paper'                                                              

encoding

Type:
str
Value:
'''\\usepackage[latin1]{inputenc}
'''                                                                    

generator

Type:
str
Value:
'''%% generator Docutils: http://docutils.sourceforge.net/
'''                                                                    

geometry

Type:
str
Value:
'''\\usepackage[%s,margin=%s,nohead]{geometry}
'''                                                                    

hyperlink_color

Type:
str
Value:
'blue'                                                                 

latex_head

Type:
str
Value:
'''\\documentclass[%s]{%s}
'''                                                                    

linking

Type:
str
Value:
'''\\usepackage[colorlinks=%s,linkcolor=%s,urlcolor=%s]{hyperref}
'''                                                                    

stylesheet

Type:
str
Value:
'''\\input{%s}
'''                                                                    

use_latex_toc

Type:
int
Value:
0                                                                     

use_longtable

Type:
int
Value:
1                                                                     

use_optionlist_for_docinfo

Type:
int
Value:
0                                                                     

use_optionlist_for_option_list

Type:
int
Value:
1                                                                     

Generated by Epydoc 2.0 on Tue Jul 22 05:31:03 2003 http://epydoc.sf.net