Package epydoc :: Package docwriter :: Module latex :: Class LatexWriter
[hide private]
[frames] | no frames]

ClassType LatexWriter

source code

Nested Classes [hide private]
    Docstring -> LaTeX Conversion
_LatexDocstringLinker
Instance Methods [hide private]
 
__init__(self, docindex, **kwargs) source code
None
write(self, directory=None)
Write the API documentation for the entire project to the given directory.
source code
 
_write_sty(self, directory, stylesheet)
Copy the requested LaTeX stylesheet to the target directory.
source code
 
_write(self, write_func, directory, filename, *args) source code
int
num_files(self)
Returns: The number of files that this LatexFormatter will generate.
source code
None
_mkdir(self, directory)
If the given directory does not exist, then attempt to create it.
source code
    Main Doc File
 
write_topfile(self, out) source code
 
write_preamble(self, out) source code
    Chapters
 
write_module(self, out, doc) source code
 
render_graph(self, graph) source code
 
write_class(self, out, doc) source code
    Module hierarchy trees
 
write_module_tree(self, out) source code
 
write_module_list(self, out, doc) source code
string
write_module_tree_item(self, out, doc, depth=0)
Helper function for write_module_tree and write_module_list.
source code
    Base class trees
 
base_tree(self, doc, width=None, linespec=None) source code
 
_base_name(self, doc) source code
 
_find_tree_width(self, doc) source code
 
_base_tree_line(self, doc, width, linespec) source code
    Class List
 
write_class_list(self, out, doc) source code
 
write_class_list_line(self, out, var_doc) source code
    Details Lists
 
write_list(self, out, heading, doc, list_type, value_type, seclevel=1) source code
 
write_list_group(self, out, doc, name, var_docs, grouped_inh_vars) source code
 
write_inheritance_list(self, out, doc, listed_inh_vars) source code
 
_parens_if_func(self, var_doc) source code
    Function Details
 
replace_par(self, out) source code
 
write_function(self, out, var_doc) source code
 
write_function_parameters(self, out, var_doc) source code
 
function_signature(self, var_doc, indent=6) source code
 
func_arg(self, name, default) source code
 
_arg_name(self, arg) source code
    Variable Details
 
write_var(self, out, var_doc) source code
    Property Details
 
write_property(self, out, var_doc) source code
    Standard Fields
 
metadata(self, doc, indent=0) source code
 
meatadata_field(self, doc, field, descrs, indent, arg='') source code
 
_descrlist(self, items, singular, plural=None, short=0, indent=0) source code
    Docstring -> LaTeX Conversion
 
docstring_to_latex(self, docstring, where, indent=0, breakany=0)
Return a latex string that renders the given docstring.
source code
    Helpers
 
write_header(self, out, where) source code
 
start_of(self, section_name, doc=None) source code
 
section(self, title, depth=0, ref=None) source code
 
sectionstar(self, title, depth, ref=None) source code
 
doc_kind(self, doc) source code
 
indexterm(self, doc, pos='only', indent=0)
Return a latex string that marks the given term or section for inclusion in the index.
source code
str
get_latex_encoding(self)
Returns: The LaTeX representation of the selected encoding.
source code
 
crossref(self, doc, indent=0) source code
 
_filter_deprecated(self, docs) source code
 
_is_deprecated(self, doc) source code
Class Variables [hide private]
  PREAMBLE = ['\\documentclass{article}', '\\usepackage[%s]{%s}']
Expects (options, epydoc_sty_package)
  SECTIONS = ['\\part{%s}', '\\chapter{%s}', '\\section{%s}', '\...
  STAR_SECTIONS = ['\\part*{%s}', '\\chapter*{%s}', '\\section*{...
    Docstring -> LaTeX Conversion
  _docstring_linker = _LatexDocstringLinker()
    Helpers
  latex_encodings = {'utf-8': 'utf8x'}
Map the Python encoding representation into mismatching LaTeX ones.
Instance Variables [hide private]
  _graph_types
Graphs that we should include in our output.
  _encoding
The Python representation of the encoding.
  class_list
The list of ClassDocs for the documented classes.
  class_set
The set of ClassDocs for the documented classes.
  module_list
The list of ModuleDocs for the documented modules.
  module_set
The set of ModuleDocs for the documented modules.
Method Details [hide private]

write(self, directory=None)

source code 

Write the API documentation for the entire project to the given directory.

Parameters:
  • directory (string) - The directory to which output should be written. If no directory is specified, output will be written to the current directory. If the directory does not exist, it will be created.
Returns: None
Raises:
  • OSError - If directory cannot be created,
  • OSError - If any file cannot be created or written to.

_write_sty(self, directory, stylesheet)

source code 

Copy the requested LaTeX stylesheet to the target directory. The stylesheet can be specified as a name (i.e., a key from the STYLESHEETS directory); a filename; or None for the default stylesheet. If any stylesheet *other* than the default stylesheet is selected, then the default stylesheet will be copied to 'epydoc-default.sty', which makes it possible to reference it via \RequirePackage.

num_files(self)

source code 
Returns: int
The number of files that this LatexFormatter will generate.

docstring_to_latex(self, docstring, where, indent=0, breakany=0)

source code 

Return a latex string that renders the given docstring. This string expects to start at the beginning of a line; and ends with a newline.

indexterm(self, doc, pos='only', indent=0)

source code 

Return a latex string that marks the given term or section for inclusion in the index. This string ends with a newline.

get_latex_encoding(self)

source code 
Returns: str
The LaTeX representation of the selected encoding.

Class Variable Details [hide private]

SECTIONS

Value:
['\\part{%s}',
 '\\chapter{%s}',
 '\\section{%s}',
 '\\subsection{%s}',
 '\\subsubsection{%s}',
 '\\textbf{%s}']

STAR_SECTIONS

Value:
['\\part*{%s}',
 '\\chapter*{%s}',
 '\\section*{%s}',
 '\\subsection*{%s}',
 '\\subsubsection*{%s}',
 '\\textbf{%s}']

Instance Variable Details [hide private]

_encoding

The Python representation of the encoding. Update latex_encodings in case of mismatch between it and the inputenc LaTeX package.