Logo Search packages:      
Sourcecode: schoolbell version File versions  Download package

docutils::writers::html4css1::HTMLTranslator Class Reference

Inheritance diagram for docutils::writers::html4css1::HTMLTranslator:

docutils::nodes::NodeVisitor zope::app::renderer::rest::ZopeTranslator

List of all members.


Detailed Description

This HTML writer has been optimized to produce visually compact
lists (less vertical whitespace).  HTML's mixed content models
allow list items to contain "<li><p>body elements</p></li>" or
"<li>just text</li>" or even "<li>text<p>and body
elements</p>combined</li>", each with different effects.  It would
be best to stick with strict body elements in list items, but they
affect vertical spacing in browsers (although they really
shouldn't).

Here is an outline of the optimization:

- Check for and omit <p> tags in "simple" lists: list items
  contain either a single paragraph, a nested simple list, or a
  paragraph followed by a nested simple list.  This means that
  this list can be compact:

      - Item 1.
      - Item 2.

  But this list cannot be compact:

      - Item 1.

        This second paragraph forces space between list items.

      - Item 2.

- In non-list contexts, omit <p> tags on a paragraph if that
  paragraph is the only child of its parent (footnotes & citations
  are allowed a label first).

- Regardless of the above, in definitions, table cells, field bodies,
  option descriptions, and list items, mark the first child with
  'class="first"' and the last child with 'class="last"'.  The stylesheet
  sets the margins (top & bottom respectively) to 0 for these elements.

The ``no_compact_lists`` setting (``--no-compact-lists`` command-line
option) disables list whitespace optimization.

Definition at line 138 of file html4css1.py.


Public Member Functions

def __init__
def add_meta
def astext
def attval
def check_simple_list
def cloak_email
def cloak_mailto
def depart_abbreviation
def depart_acronym
def depart_address
def depart_admonition
def depart_attention
def depart_attribution
def depart_author
def depart_authors
def depart_block_quote
def depart_bullet_list
def depart_caption
def depart_caution
def depart_citation
def depart_citation_reference
def depart_classifier
def depart_colspec
def depart_compound
def depart_contact
def depart_copyright
def depart_danger
def depart_date
def depart_decoration
def depart_definition
def depart_definition_list
def depart_definition_list_item
def depart_description
def depart_docinfo
def depart_docinfo_item
def depart_doctest_block
def depart_document
def depart_emphasis
def depart_entry
def depart_enumerated_list
def depart_error
def depart_field
def depart_field_body
def depart_field_list
def depart_field_name
def depart_figure
def depart_footer
def depart_footnote
def depart_footnote_reference
def depart_generated
def depart_header
def depart_hint
def depart_image
def depart_important
def depart_inline
def depart_label
def depart_legend
def depart_line
def depart_line_block
def depart_list_item
def depart_literal_block
def depart_meta
def depart_note
def depart_option
def depart_option_argument
def depart_option_group
def depart_option_list
def depart_option_list_item
def depart_option_string
def depart_organization
def depart_paragraph
def depart_problematic
def depart_reference
def depart_revision
def depart_row
def depart_rubric
def depart_section
def depart_sidebar
def depart_status
def depart_strong
def depart_subscript
def depart_subtitle
def depart_superscript
def depart_system_message
def depart_table
def depart_target
def depart_tbody
def depart_term
def depart_Text
def depart_tgroup
def depart_thead
def depart_tip
def depart_title
def depart_title_reference
def depart_topic
def depart_transition
def depart_version
def depart_warning
def dispatch_departure
def dispatch_visit
def emptytag
def encode
def footnote_backrefs
def image_div_atts
def set_first_last
def should_be_compact_paragraph
def starttag
def unimplemented_visit
def unknown_departure
def unknown_visit
def visit_abbreviation
def visit_acronym
def visit_address
def visit_admonition
def visit_attention
def visit_attribution
def visit_author
def visit_authors
def visit_block_quote
def visit_bullet_list
def visit_caption
def visit_caution
def visit_citation
def visit_citation_reference
def visit_classifier
def visit_colspec
def visit_comment
def visit_compound
def visit_contact
def visit_copyright
def visit_danger
def visit_date
def visit_decoration
def visit_definition
def visit_definition_list
def visit_definition_list_item
def visit_description
def visit_docinfo
def visit_docinfo_item
def visit_doctest_block
def visit_document
def visit_emphasis
def visit_entry
def visit_enumerated_list
def visit_error
def visit_field
def visit_field_body
def visit_field_list
def visit_field_name
def visit_figure
def visit_footer
def visit_footnote
def visit_footnote_reference
def visit_generated
def visit_header
def visit_hint
def visit_image
def visit_important
def visit_inline
def visit_label
def visit_legend
def visit_line
def visit_line_block
def visit_list_item
def visit_literal
def visit_literal_block
def visit_meta
def visit_note
def visit_option
def visit_option_argument
def visit_option_group
def visit_option_list
def visit_option_list_item
def visit_option_string
def visit_organization
def visit_paragraph
def visit_problematic
def visit_raw
def visit_reference
def visit_revision
def visit_row
def visit_rubric
def visit_section
def visit_sidebar
def visit_status
def visit_strong
def visit_subscript
def visit_substitution_definition
def visit_substitution_reference
def visit_subtitle
def visit_superscript
def visit_system_message
def visit_table
def visit_target
def visit_tbody
def visit_term
def visit_Text
def visit_tgroup
def visit_thead
def visit_tip
def visit_title
def visit_title_reference
def visit_topic
def visit_transition
def visit_version
def visit_warning
def write_colspecs

Public Attributes

 body
 body_pre_docinfo
 body_prefix
 body_suffix
 colspecs
 compact_p
 compact_simple
 context
 docinfo
 document
 footer
 fragment
 head
 head_prefix
 header
 html_body
 html_head
 html_prolog
 html_subtitle
 html_title
 in_docinfo
 in_document_title
 in_mailto
 in_sidebar
 initial_header_level
 language
 meta
 section_level
 settings
 stylesheet
 subtitle
 title
 topic_classes

Static Public Attributes

dictionary attribution_formats
tuple content_type
tuple doctype
string embedded_stylesheet = '<style type="text/css">\n\n%s\n</style>\n'
tuple generator = ('<meta name="generator" content="Docutils %s: ' 'http://docutils.sourceforge.net/" />\n')
tuple head_prefix_template
list named_tags = ['a', 'applet', 'form', 'frame', 'iframe', 'img', 'map']
tuple optional = ()
string stylesheet_link = '<link rel="stylesheet" href="%s" type="text/css" />\n'
tuple words_and_spaces = re.compile(r'\S+| +|\n')
string xml_declaration = '<?xml version="1.0" encoding="%s" ?>\n'

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

Generated by  Doxygen 1.6.0   Back to index