Base class for document writing classes. Each subclass implements a
specific format (html, latex, rst, etc.).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
title(self,
title,
authors_and_institutions=[],
date='today')
Provide title and authors. |
source code
|
|
|
|
today_date(self)
Return a string with today's date suitably formatted. |
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
|
|
|
|
|
|
|
expandtext(self,
text,
tags,
tags_replacements)
In a string text, replace all occurences of strings defined in tags
by the corresponding strings defined in tags_replacements. |
source code
|
|
|
|
list(self,
items,
listtype='itemize')
Write list or nested lists. |
source code
|
|
|
|
unfold_list(self,
items,
item_handler,
listtype,
level=0)
Traverse a possibly nested list and call item_handler for each item. |
source code
|
|
|
|
|
|
|
verbatim(self,
code)
Write verbatim text in fixed-width form (typically for computer
code). |
source code
|
|
|
|
math(self,
text)
Write block of mathematical text (equations). |
source code
|
|
|
|
raw(self,
text)
Write text directly 'as is' to output. |
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
|
|