# Documenting Python

Fred L. Drake, Jr.

PythonLabs
Email: fdrake@acm.org

Release 2.3.2
October 3, 2003

### Abstract:

The Python language has a substantial body of documentation, much of it contributed by various authors. The markup used for the Python documentation is based on LATEX and requires a significant set of macros written specifically for documenting Python. This document describes the macros introduced to support Python documentation and how they should be used to support a wide range of output formats.

This document describes the document classes and special markup used in the Python documentation. Authors may use this guide, in conjunction with the template files provided with the distribution, to create or maintain whole documents or sections.

- Contents
- 1 Introduction
- 2 Directory Structure
- 3 Style Guide
- 4 LATEX Primer
  - 4.1 Syntax
  - 4.2 Hierarchical Structure
- 5 Document Classes
- 6 Special Markup Constructs
  - 6.1 Markup for the Preamble
  - 6.2 Meta-information Markup
  - 6.3 Information Units
  - 6.4 Showing Code Examples
  - 6.5 Inline Markup
  - 6.6 Miscellaneous Text Markup
  - 6.7 Module-specific Markup
  - 6.8 Library-level Markup
  - 6.9 Table Markup
  - 6.10 Reference List Markup
  - 6.11 Index-generating Markup
  - 6.12 Grammar Production Displays
  - 6.13 Graphical Interface Components
- 7 Processing Tools
  - 7.1 External Tools
  - 7.2 Internal Tools
  - 7.3 Working on Cygwin
- 8 Future Directions
  - 8.1 Structured Documentation
  - 8.2 Discussion Forums
- About this document ...