DocWriter is a tool for writing documents in ASCII, HTML, LaTeX,
Doconce, and other formats based on input from Python datastructures.
The base class _BaseWriter defines common functions and data
structures, while subclasses HTML, Doconce, etc. implement (i.e., write
to) various formats.
|
|
makedocstr(parent_class,
subclass_method)
Compose a string (to be used as doc string) from a method's doc
string in a parent class and an additional doc string in a subclass
version of the method. |
source code
|
|
|
|
| func_to_method(func,
class_,
method_name=None) |
source code
|
|
|
|
html_movie(plotfiles,
interval_ms=300,
width=800,
height=600,
casename='movie')
Takes a list plotfiles which should be for example of the form: |
source code
|
|
|
|
html_movie_embed(moviefile,
width=400,
height=400)
Return HTML for embedding a moviefile using the default handling of
such files. |
source code
|
|
|
|
html_movie_embed_wmp(moviefile,
width=400,
height=400)
Return HTML text for embedding a movie file (Windows Media Player
code). |
source code
|
|
|
|
html_movie_embed_qt(moviefile,
width=400,
height=400)
Return HTML for embedding a moviefile (QuickTime code). |
source code
|
|
|
|
|
|
|
_figure(self,
filename,
caption,
width=None,
height=None,
label=None)
Insert a figure into the document. |
source code
|
|
|
|
_link(self,
link_text,
link_target)
Typeset a hyperlink. |
source code
|
|
|
|
|
|
|
_math(self,
text)
Write block of mathematical text (equations). |
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
|
|
|
|
_raw(self,
text)
Write text directly 'as is' to output. |
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
|
|
|
|
_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
|
|
|
|
|
|
|
_title(self,
title,
authors_and_institutions=[],
date='today')
Provide title and authors. |
source code
|
|
|
|
_url(self,
url_address,
link_text=None)
Typeset an URL (with an optional link). |
source code
|
|
|
|
_verbatim(self,
code)
Write verbatim text in fixed-width form (typically for computer
code). |
source code
|
|
|
|
|
|
|
inline_tag_begin = '(?P<begin>(^|[(\\s]))'
|
|
|
inline_tag_end = '(?P<end>($|[.,?!;:)\\s]))'
|
|
|
INLINE_TAGS = {'bold': '(?P<begin>(^|[(\\s]))_(?P<subst>[^ `][...
|
|
|
__package__ = 'doconce'
|
|
|
a = ArgSpec(args=['self', 'table', 'column_headline_pos', 'col...
|
|
|
allargs = ['self', 'table', 'column_headline_pos=\'c\'', 'colu...
|
|
|
arg = 'column_pos'
|
|
|
args = ['self', 'table']
|
|
|
code = 'def _table(self, table, column_headline_pos=\'c\', col...
|
|
|
docstring = '\n Translates a two-dimensional list of da...
|
|
|
kwargs = ['column_headline_pos=\'c\'', 'column_pos=\'c\'']
|
|
|
method = 'table'
|
|
|
signature_call = 'table(table, column_headline_pos, column_pos)'
|
|
|
signature_def = 'table(self, table, column_headline_pos=\'c\',...
|
|
|
value = 'c'
|