Package epydoc :: Module latex :: Class LatexFormatter
[show private | hide private]
[frames | no frames]

Class LatexFormatter


Documentation to LaTeX converter. The API documentation produced by LatexFormatter consists of a single LaTeX document, divided into several different files. In particular, LatexFormatter generates the following files: The methods write_module and write_class used to generate individual module and class documentation LaTeX files. These files can then be included as chapters or sections of other LaTeX documents (with "\include"). When using these methods, you may wish to disable the crossref option, which will turn off crossreferencing betweeen modules and classes, since some of these crossreference links will be broken if you only include some of the API documentation as chapters or sections of your document.
Method Summary
  __init__(self, docmap, **kwargs)
Construct a new LaTeX formatter, using the given documentation map.
int num_files(self)
Return the number of files that this LatexFormatter will generate.
None write(self, directory, progress_callback)
Write the API documentation for the entire project to the given directory.
  write_class(self, uid, filename)
Write the API documentation for the given class to filename.
  write_module(self, uid, filename)
Write the API documentation for the given module to filename.

Method Details

__init__(self, docmap, **kwargs)
(Constructor)

Construct a new LaTeX formatter, using the given documentation map.
Parameters:
docmap - The documentation to output.
           (type=DocMap)
kwargs - Keyword arguments:
  • prj_name: The name of the project. Defaults to none. (type=string)
  • private: Whether to create documentation for private objects. By default, private objects are documented. (type=boolean)
  • crossref: Whether to create crossreference links between classes and modules. By default, crossreference links are created. (type=boolean)
  • index: Whether to generate an index. If you generate an index, you will need to run makeindex to make the .idx file. By default, an index is generated. (type=boolean)
  • list_classes_separately: Whether to list classes in separate chapters, or to include them as sections of their modules' chapters. By default, they are not listed separately. (type=boolean)
  • exclude: Whether to exclude inherited objects and imported objects that are not defined by any of the modules that are being documented. By default, these objects are excluded. (type=boolean)
  • alphabetical: Whether to list modules in alphabetical order or in the order that they were specified in on the command line. By default, modules are listed in alphabetical order. (type=boolean)

num_files(self)

Returns:
The number of files that this LatexFormatter will generate.
           (type=int)

write(self, directory=None, progress_callback=None)

Write the API documentation for the entire project to the given directory.
Parameters:
directory - 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.
           (type=string)
progress_callback - A callback function that is called before each file is written, with the name of the created file.
           (type=function)
Returns:
None
Raises:
OSError - If directory cannot be created,
OSError - If any file cannot be created or written to.

write_class(self, uid, filename)

Write the API documentation for the given class to filename.
Parameters:
uid - The unique identifier of the class to document.
           (type=UID)
filename - The name of the file to write the documentation to.
           (type=string)
Raises:
OSError - If directory cannot be created,
OSError - If any file cannot be created or written to.
ValueError - If uid is not the identifier for a class.

write_module(self, uid, filename)

Write the API documentation for the given module to filename.
Parameters:
uid - The unique identifier of the module to document.
           (type=UID)
filename - The name of the file to write the documentation to.
           (type=string)
Raises:
OSError - If directory cannot be created,
OSError - If any file cannot be created or written to.
ValueError - If uid is not the identifier for a module.

Generated by Epydoc 2.1 on Sat Mar 20 17:46:19 2004 http://epydoc.sf.net