Package doconce :: Module DocWriter :: Class HTML
[hide private]
[frames] | no frames]

Class HTML

source code

_BaseWriter --+
              |
             HTML

Instance Methods [hide private]
 
__init__(self) source code
 
header(self)
Header as required by format.
source code
 
footer(self)
Footer as required by format.
source code
 
title(self, title, authors_and_institutions=[], date='today')
Provide title and authors.
source code
 
heading(self, level, title, label=None) source code
 
section(self, title, label=None)
Write a section heading with the given title and an optional label (for navigation).
source code
 
subsection(self, title, label=None)
Write a subsection heading with the given title and an optional label (for navigation).
source code
 
subsubsection(self, title, label=None)
Write a subsubsection heading with the given title and an optional label (for navigation).
source code
 
paragraph(self, title, ending='.', label=None)
Write a paragraph heading with the given title and an ending (period, question mark, colon) and an optional label (for navigation).
source code
 
paragraph_separator(self)
Add a (space) separator between running paragraphs.
source code
 
text(self, text, indent=0)
Write plain text.
source code
 
list(self, items, listtype='itemize')
Write list or nested lists.
source code
 
item_handler(self, item, listtype, level, keyword=None)
Write out the syntax for an item in a list.
source code
 
verbatim(self, code)
Write verbatim text in fixed-width form (typically for computer code).
source code
 
figure(self, filename, caption, width=None, height=None, label=None)
Insert a figure into the document.
source code
 
table(self, table, column_headline_pos='c', column_pos='c')
Translates a two-dimensional list of data, containing strings or numbers, to a suitable "tabular" environment in the output.
source code
 
url(self, url_address, link_text=None)
Typeset an URL (with an optional link).
source code
 
link(self, link_text, link_target)
Typeset a hyperlink.
source code
 
method(self, item, listtype, level, keyword=None)
Write out the syntax for an item in a list.
source code

Inherited from _BaseWriter: __str__, expandtext, figure_conversion, math, not_impl, raw, today_date, unfold_list, write_to_file

Class Variables [hide private]
  table_border = '2'
  table_cellpadding = '5'
  table_cellspacing = '2'
  INLINE_TAGS_SUBST = {'bold': '\\g<begin><b>\\g<subst></b>\\g<e...
Properties [hide private]

Inherited from _BaseWriter: document

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: _BaseWriter.__init__

header(self)

source code 

Header as required by format. Called in constructor.

Overrides: _BaseWriter.header
(inherited documentation)

footer(self)

source code 

Footer as required by format. Called in write_to_file.

Overrides: _BaseWriter.footer
(inherited documentation)

title(self, title, authors_and_institutions=[], date='today')

source code 

Provide title and authors.

Parameters:
  • title - document title (string).
  • authors_and_institutions - list of authors and their associated institutions, where each list item is a tuple/list with author as first element followed by the name of all institutions this author is associated with.
  • date - None implies no date, while 'today' generates the current date, otherwise a string is supplied.
Overrides: _BaseWriter.title

section(self, title, label=None)

source code 

Write a section heading with the given title and an optional label (for navigation).

Overrides: _BaseWriter.section

subsection(self, title, label=None)

source code 

Write a subsection heading with the given title and an optional label (for navigation).

Overrides: _BaseWriter.subsection

subsubsection(self, title, label=None)

source code 

Write a subsubsection heading with the given title and an optional label (for navigation).

Overrides: _BaseWriter.subsubsection

paragraph(self, title, ending='.', label=None)

source code 

Write a paragraph heading with the given title and an ending (period, question mark, colon) and an optional label (for navigation).

Overrides: _BaseWriter.paragraph

paragraph_separator(self)

source code 

Add a (space) separator between running paragraphs.

Overrides: _BaseWriter.paragraph_separator
(inherited documentation)

text(self, text, indent=0)

source code 

Write plain text. Each line can be idented by a given number of spaces.

Overrides: _BaseWriter.text

list(self, items, listtype='itemize')

source code 

Write list or nested lists.

Parameters:
  • items - list of items.
  • listtype - 'itemize', 'enumerate', or 'description'.
Overrides: _BaseWriter.list

item_handler(self, item, listtype, level, keyword=None)

source code 

Write out the syntax for an item in a list.

Parameters:
  • item - text assoicated with the current list item. If item equals '_begin' or '_end', appropriate begin/end formatting of the list is written instead of an ordinary item.
  • listtype - 'itemize, 'enumerate', or 'description'.
  • level - list level number, 0 is the mainlist, increased by 1 for each sublist (the level number implies the amount of indentation).
  • keyword - the keyword of the item in a 'description' list.
Overrides: _BaseWriter.item_handler

verbatim(self, code)

source code 

Write verbatim text in fixed-width form (typically for computer code).

Overrides: _BaseWriter.verbatim

figure(self, filename, caption, width=None, height=None, label=None)

source code 

Insert a figure into the document. filename should be without extension; a proper extension is added, and if the figure is not available in that image format, the convert utility from ImageMagick is called to convert the format.

Overrides: _BaseWriter.figure

table(self, table, column_headline_pos='c', column_pos='c')

source code 

Translates a two-dimensional list of data, containing strings or numbers, to a suitable "tabular" environment in the output.

Parameters:
  • table - list of list with rows/columns in table, including (optional) column-headline 1st row and row-headline 1st column.
  • column_pos - specify the l/c/r position of data entries in columns, give either (e.g.) 'llrrc' or one char (if all are equal).
  • column_headline_pos - position l/c/r for the headline row
Overrides: _BaseWriter.table

url(self, url_address, link_text=None)

source code 

Typeset an URL (with an optional link).

Overrides: _BaseWriter.url

link(self, link_text, link_target)

source code 

Typeset a hyperlink.

Overrides: _BaseWriter.link
(inherited documentation)

method(self, item, listtype, level, keyword=None)

source code 

Write out the syntax for an item in a list.

Parameters:
  • item - text assoicated with the current list item. If item equals '_begin' or '_end', appropriate begin/end formatting of the list is written instead of an ordinary item.
  • listtype - 'itemize, 'enumerate', or 'description'.
  • level - list level number, 0 is the mainlist, increased by 1 for each sublist (the level number implies the amount of indentation).
  • keyword - the keyword of the item in a 'description' list.

Class Variable Details [hide private]

INLINE_TAGS_SUBST

Value:
{'bold': '\\g<begin><b>\\g<subst></b>\\g<end>',
 'emphasize': '\\g<begin><em>\\g<subst></em>\\g<end>',
 'math': None,
 'math2': '\\g<begin>\\g<puretext>\\g<end>',
 'verbatim': '\\g<begin><tt>\\g<subst></tt>\\g<end>'}