Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1 | \documentclass{howto} |
| 2 | \usepackage{ltxmarkup} |
| 3 | |
| 4 | \title{Documenting Python} |
| 5 | |
| 6 | \input{boilerplate} |
| 7 | |
Fred Drake | c7c9a64 | 1999-04-28 18:24:02 +0000 | [diff] [blame] | 8 | % Now override the stuff that includes author information; |
| 9 | % Guido did *not* write this one! |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 10 | |
| 11 | \author{Fred L. Drake, Jr.} |
| 12 | \authoraddress{ |
| 13 | Corporation for National Research Initiatives (CNRI) \\ |
| 14 | 1895 Preston White Drive, Reston, Va 20191, USA \\ |
| 15 | E-mail: \email{fdrake@acm.org} |
| 16 | } |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 17 | |
| 18 | |
| 19 | \begin{document} |
| 20 | |
| 21 | \maketitle |
| 22 | |
| 23 | \begin{abstract} |
| 24 | \noindent |
| 25 | The Python language documentation has a substantial body of |
| 26 | documentation, much of it contributed by various authors. The markup |
| 27 | used for the Python documentation is based on \LaTeX{} and requires a |
| 28 | significant set of macros written specifically for documenting Python. |
Fred Drake | 5eb992b | 1999-06-11 14:25:45 +0000 | [diff] [blame] | 29 | This document describes the macros introduced to support Python |
| 30 | documentation and how they should be used to support a wide range of |
| 31 | output formats. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 32 | |
| 33 | This document describes the document classes and special markup used |
| 34 | in the Python documentation. Authors may use this guide, in |
| 35 | conjunction with the template files provided with the |
| 36 | distribution, to create or maintain whole documents or sections. |
| 37 | \end{abstract} |
| 38 | |
| 39 | \tableofcontents |
| 40 | |
| 41 | |
| 42 | \section{Introduction} |
| 43 | |
| 44 | Python's documentation has long been considered to be good for a |
| 45 | free programming language. There are a number of reasons for this, |
| 46 | the most important being the early commitment of Python's creator, |
| 47 | Guido van Rossum, to providing documentation on the language and its |
| 48 | libraries, and the continuing involvement of the user community in |
| 49 | providing assistance for creating and maintaining documentation. |
| 50 | |
| 51 | The involvement of the community takes many forms, from authoring to |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 52 | bug reports to just plain complaining when the documentation could |
| 53 | be more complete or easier to use. All of these forms of input from |
| 54 | the community have proved useful during the time I've been involved |
| 55 | in maintaining the documentation. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 56 | |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 57 | This document is aimed at authors and potential authors of |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 58 | documentation for Python. More specifically, it is for people |
| 59 | contributing to the standard documentation and developing additional |
| 60 | documents using the same tools as the standard documents. This |
| 61 | guide will be less useful for authors using the Python documentation |
| 62 | tools for topics other than Python, and less useful still for |
| 63 | authors not using the tools at all. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 64 | |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 65 | The material in this guide is intended to assist authors using the |
| 66 | Python documentation tools. It includes information on the source |
| 67 | distribution of the standard documentation, a discussion of the |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 68 | document types, reference material on the markup defined in the |
| 69 | document classes, a list of the external tools needed for processing |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 70 | documents, and reference material on the tools provided with the |
| 71 | documentation resources. At the end, there is also a section |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 72 | discussing future directions for the Python documentation and where |
| 73 | to turn for more information. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 74 | |
| 75 | \section{Directory Structure} |
| 76 | |
| 77 | The source distribution for the standard Python documentation |
| 78 | contains a large number of directories. While third-party documents |
| 79 | do not need to be placed into this structure or need to be placed |
| 80 | within a similar structure, it can be helpful to know where to look |
| 81 | for examples and tools when developing new documents using the |
| 82 | Python documentation tools. This section describes this directory |
| 83 | structure. |
| 84 | |
| 85 | The documentation sources are usually placed within the Python |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 86 | source distribution as the top-level directory \file{Doc/}, but |
| 87 | are not dependent on the Python source distribution in any way. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 88 | |
| 89 | The \file{Doc/} directory contains a few files and several |
| 90 | subdirectories. The files are mostly self-explanatory, including a |
| 91 | \file{README} and a \file{Makefile}. The directories fall into |
| 92 | three categories: |
| 93 | |
| 94 | \begin{definitions} |
| 95 | \term{Document Sources} |
| 96 | The \LaTeX{} sources for each document are placed in a |
| 97 | separate directory. These directories are given short, |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 98 | three-character names: |
| 99 | |
| 100 | \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Document Title} |
Fred Drake | 698d520 | 1999-11-10 15:54:57 +0000 | [diff] [blame] | 101 | \lineii{api/}{\citetitle[../api/api.html]{The Python/C API}} |
| 102 | \lineii{doc/}{\citetitle[../doc/doc.html]{Documenting Python}} |
| 103 | \lineii{ext/}{\citetitle[../ext/ext.html]{Extending and Embedding the Python Interpreter}} |
| 104 | \lineii{lib/}{\citetitle[../lib/lib.html]{Python Library Reference}} |
| 105 | \lineii{mac/}{\citetitle[../mac/mac.html]{Macintosh Module Reference}} |
| 106 | \lineii{ref/}{\citetitle[../ref/ref.html]{Python Reference Manual}} |
| 107 | \lineii{tut/}{\citetitle[../tut/tut.html]{Python Tutorial}} |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 108 | \end{tableii} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 109 | |
| 110 | \term{Format-Specific Output} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 111 | Most output formats have a directory which contains a |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 112 | \file{Makefile} which controls the generation of that format |
| 113 | and provides storage for the formatted documents. The only |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 114 | variations within this category are the Portable Document |
| 115 | Format (PDF) and PostScript versions are placed in the |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 116 | directories \file{paper-a4/} and \file{paper-letter/} (this |
| 117 | causes all the temporary files created by \LaTeX{} to be kept |
| 118 | in the same place for each paper size, where they can be more |
| 119 | easily ignored). |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 120 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 121 | \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Output Formats} |
| 122 | \lineii{html/}{HTML output} |
| 123 | \lineii{info/}{GNU info output} |
| 124 | \lineii{paper-a4/}{PDF and PostScript, A4 paper} |
| 125 | \lineii{paper-letter/}{PDF and PostScript, US-Letter paper} |
| 126 | \end{tableii} |
| 127 | |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 128 | \term{Supplemental Files} |
| 129 | Some additional directories are used to store supplemental |
| 130 | files used for the various processes. Directories are |
| 131 | included for the shared \LaTeX{} document classes, the |
| 132 | \LaTeX2HTML support, template files for various document |
| 133 | components, and the scripts used to perform various steps in |
| 134 | the formatting processes. |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 135 | |
| 136 | \begin{tableii}{p{.75in}|p{3in}}{filenq}{Directory}{Contents} |
| 137 | \lineii{perl/}{Support for \LaTeX2HTML processing} |
| 138 | \lineii{templates/}{Example files for source documents} |
| 139 | \lineii{texinputs/}{Style implementation for \LaTeX} |
| 140 | \lineii{tools/}{Custom processing scripts} |
| 141 | \end{tableii} |
| 142 | |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 143 | \end{definitions} |
| 144 | |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 145 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 146 | \section{\LaTeX{} Primer \label{latex-primer}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 147 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 148 | This section is a brief introduction to \LaTeX{} concepts and |
| 149 | syntax, to provide authors enough information to author documents |
| 150 | productively without having to become ``\TeX{}nicians.'' |
| 151 | |
Fred Drake | 5eb992b | 1999-06-11 14:25:45 +0000 | [diff] [blame] | 152 | Perhaps the most important concept to keep in mind while marking up |
| 153 | Python documentation is the while \TeX{} is unstructured, \LaTeX{} was |
| 154 | designed as a layer on top of \TeX{} which specifically supports |
| 155 | structured markup. The Python-specific markup is intended to extend |
| 156 | the structure provided by standard \LaTeX{} document classes to |
| 157 | support additional information specific to Python. |
| 158 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 159 | \LaTeX{} documents contain two parts: the preamble and the body. |
| 160 | The preamble is used to specify certain metadata about the document |
| 161 | itself, such as the title, the list of authors, the date, and the |
| 162 | \emph{class} the document belongs to. Additional information used |
| 163 | to control index generation and the use of bibliographic databases |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 164 | can also be placed in the preamble. For most authors, the preamble |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 165 | can be most easily created by copying it from an existing document |
| 166 | and modifying a few key pieces of information. |
| 167 | |
| 168 | The \dfn{class} of a document is used to place a document within a |
| 169 | broad category of documents and set some fundamental formatting |
| 170 | properties. For Python documentation, two classes are used: the |
| 171 | \code{manual} class and the \code{howto} class. These classes also |
| 172 | define the additional markup used to document Python concepts and |
| 173 | structures. Specific information about these classes is provided in |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 174 | section \ref{classes}, ``Document Classes,'' below. The first thing |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 175 | in the preamble is the declaration of the document's class. |
| 176 | |
| 177 | After the class declaration, a number of \emph{macros} are used to |
| 178 | provide further information about the document and setup any |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 179 | additional markup that is needed. No output is generated from the |
| 180 | preamble; it is an error to include free text in the preamble |
| 181 | because it would cause output. |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 182 | |
| 183 | The document body follows the preamble. This contains all the |
| 184 | printed components of the document marked up structurally. |
| 185 | |
| 186 | XXX This section will discuss what the markup looks like, and |
| 187 | explain the difference between an environment and a macro. |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 188 | |
| 189 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 190 | \section{Document Classes \label{classes}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 191 | |
| 192 | Two \LaTeX{} document classes are defined specifically for use with |
| 193 | the Python documentation. The \code{manual} class is for large |
| 194 | documents which are sectioned into chapters, and the \code{howto} |
| 195 | class is for smaller documents. |
| 196 | |
| 197 | The \code{manual} documents are larger and are used for most of the |
| 198 | standard documents. This document class is based on the standard |
| 199 | \LaTeX{} \code{report} class and is formatted very much like a long |
Fred Drake | 698d520 | 1999-11-10 15:54:57 +0000 | [diff] [blame] | 200 | technical report. The \citetitle[../ref/ref.html]{Python Reference |
| 201 | Manual} is a good example of a \code{manual} document, and the |
| 202 | \citetitle[../lib/lib.html]{Python Library Reference} is a large |
| 203 | example. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 204 | |
| 205 | The \code{howto} documents are shorter, and don't have the large |
| 206 | structure of the \code{manual} documents. This class is based on |
| 207 | the standard \LaTeX{} \code{article} class and is formatted somewhat |
| 208 | like the Linux Documentation Project's ``HOWTO'' series as done |
| 209 | originally using the LinuxDoc software. The original intent for the |
| 210 | document class was that it serve a similar role as the LDP's HOWTO |
| 211 | series, but the applicability of the class turns out to be somewhat |
| 212 | more broad. This class is used for ``how-to'' documents (this |
| 213 | document is an example) and for shorter reference manuals for small, |
| 214 | fairly cohesive module libraries. Examples of the later use include |
Fred Drake | 698d520 | 1999-11-10 15:54:57 +0000 | [diff] [blame] | 215 | the standard \citetitle[../mac/mac.html]{Macintosh Library Modules} |
| 216 | and |
| 217 | \citetitle[http://starship.python.org/crew/fdrake/manuals/krb5py/krb5py.html]{Using |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 218 | Kerberos from Python}, which contains reference material for an |
| 219 | extension package. These documents are roughly equivalent to a |
| 220 | single chapter from a larger work. |
| 221 | |
| 222 | |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 223 | \section{Special Markup Constructs} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 224 | |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 225 | The Python document classes define a lot of new environments and |
| 226 | macros. This section contains the reference material for these |
| 227 | facilities. |
| 228 | |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 229 | \subsection{Meta-information Markup \label{meta-info}} |
| 230 | |
| 231 | \begin{macrodesc}{sectionauthor}{\p{author}\p{email}} |
| 232 | Identifies the author of the current section. \var{author} |
| 233 | should be the author's name such that it can be used for |
| 234 | presentation (though it isn't), and \var{email} should be the |
| 235 | author's email address. The domain name portion of |
| 236 | the address should be lower case. |
| 237 | |
| 238 | No presentation is generated from this markup, but it is used to |
| 239 | help keep track of contributions. |
| 240 | \end{macrodesc} |
| 241 | |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 242 | \subsection{Information Units \label{info-units}} |
| 243 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 244 | XXX Explain terminology, or come up with something more ``lay.'' |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 245 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 246 | There are a number of environments used to describe specific |
| 247 | features provided by modules. Each environment requires |
| 248 | parameters needed to provide basic information about what is being |
| 249 | described, and the environment content should be the description. |
| 250 | Most of these environments make entries in the general index (if |
| 251 | one is being produced for the document); if no index entry is |
| 252 | desired, non-indexing variants are available for many of these |
| 253 | environments. The environments have names of the form |
| 254 | \code{\var{feature}desc}, and the non-indexing variants are named |
| 255 | \code{\var{feature}descni}. The available variants are explicitly |
| 256 | included in the list below. |
| 257 | |
| 258 | For each of these environments, the first parameter, \var{name}, |
| 259 | provides the name by which the feature is accessed. |
| 260 | |
| 261 | Environments which describe features of objects within a module, |
| 262 | such as object methods or data attributes, allow an optional |
| 263 | \var{type name} parameter. When the feature is an attribute of |
| 264 | class instances, \var{type name} only needs to be given if the |
| 265 | class was not the most recently described class in the module; the |
| 266 | \var{name} value from the most recent \env{classdesc} is implied. |
| 267 | For features of built-in or extension types, the \var{type name} |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 268 | value should always be provided. Another special case includes |
| 269 | methods and members of general ``protocols,'' such as the |
| 270 | formatter and writer protocols described for the |
| 271 | \module{formatter} module: these may be documented without any |
| 272 | specific implementation classes, and will always require the |
| 273 | \var{type name} parameter to be provided. |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 274 | |
| 275 | \begin{envdesc}{datadesc}{\p{name}} |
| 276 | This environment is used to document global data in a module, |
| 277 | including both variables and values used as ``defined |
| 278 | constants.'' Class and object attributes are not documented |
| 279 | using this environment. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 280 | \end{envdesc} |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 281 | \begin{envdesc}{datadescni}{\p{name}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 282 | Like \env{datadesc}, but without creating any index entries. |
| 283 | \end{envdesc} |
| 284 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 285 | \begin{envdesc}{excdesc}{\p{name}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 286 | Describe an exception. This may be either a string exception or |
| 287 | a class exception. |
| 288 | \end{envdesc} |
| 289 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 290 | \begin{envdesc}{funcdesc}{\p{name}\p{parameters}} |
| 291 | Describe a module-level function. \var{parameters} should |
| 292 | not include the parentheses used in the call syntax. Object |
| 293 | methods are not documented using this environment. Bound object |
| 294 | methods placed in the module namespace as part of the public |
| 295 | interface of the module are documented using this, as they are |
| 296 | equivalent to normal functions for most purposes. |
| 297 | |
| 298 | The description should include information about the parameters |
| 299 | required and how they are used (especially whether mutable |
| 300 | objects passed as parameters are modified), side effects, and |
| 301 | possible exceptions. A small example may be provided. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 302 | \end{envdesc} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 303 | \begin{envdesc}{funcdescni}{\p{name}\p{parameters}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 304 | Like \env{funcdesc}, but without creating any index entries. |
| 305 | \end{envdesc} |
| 306 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 307 | \begin{envdesc}{classdesc}{\p{name}\p{constructor parameters}} |
| 308 | Describe a class and its constructor. \var{constructor |
| 309 | parameters} should not include the \var{self} parameter or |
| 310 | the parentheses used in the call syntax. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 311 | \end{envdesc} |
| 312 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 313 | \begin{envdesc}{memberdesc}{\op{type name}\p{name}} |
| 314 | Describe an object data attribute. The description should |
| 315 | include information about the type of the data to be expected |
| 316 | and whether it may be changed directly. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 317 | \end{envdesc} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 318 | \begin{envdesc}{memberdescni}{\op{type name}\p{name}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 319 | Like \env{memberdesc}, but without creating any index entries. |
| 320 | \end{envdesc} |
| 321 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 322 | \begin{envdesc}{methoddesc}{\op{type name}\p{name}\p{parameters}} |
| 323 | Describe an object method. \var{parameters} should not include |
| 324 | the \var{self} parameter or the parentheses used in the call |
| 325 | syntax. The description should include similar information to |
| 326 | that described for \env{funcdesc}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 327 | \end{envdesc} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 328 | \begin{envdesc}{methoddescni}{\op{type name}\p{name}\p{parameters}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 329 | Like \env{methoddesc}, but without creating any index entries. |
| 330 | \end{envdesc} |
| 331 | |
| 332 | |
Fred Drake | 5eb992b | 1999-06-11 14:25:45 +0000 | [diff] [blame] | 333 | \subsection{Showing Code Examples} |
| 334 | |
| 335 | Examples of Python source code or interactive sessions are |
| 336 | represented as \env{verbatim} environments. This environment |
| 337 | is a standard part of \LaTeX{}. It is important to only use |
| 338 | spaces for indentation in code examples since \TeX{} drops tabs |
| 339 | instead of converting them to spaces. |
| 340 | |
| 341 | Representing an interactive session requires including the prompts |
| 342 | and output along with the Python code. No special markup is |
| 343 | required for interactive sessions. |
| 344 | |
| 345 | Within the \env{verbatim} environment, characters special to |
| 346 | \LaTeX{} do not need to be specially marked in any way. The entire |
| 347 | example will be presented in a monospaced font; no attempt at |
| 348 | ``pretty-printing'' is made, as the environment must work for |
| 349 | non-Python code and non-code displays. |
| 350 | |
| 351 | The Python Documentation Special Interest Group has discussed a |
| 352 | number of approaches to creating pretty-printed code displays and |
| 353 | interactive sessions; see the Doc-SIG area on the Python Web site |
| 354 | for more information on this topic. |
| 355 | |
| 356 | |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 357 | \subsection{Inline Markup} |
| 358 | |
Fred Drake | 87f768e | 1999-05-17 15:22:45 +0000 | [diff] [blame] | 359 | The macros described in this section are used to mark just about |
| 360 | anything interesting in the document text. They may be used in |
| 361 | headings (though anything involving hyperlinks should be avoided |
| 362 | there) as well as in the body text. |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 363 | |
| 364 | \begin{macrodesc}{bfcode}{\p{text}} |
| 365 | Like \macro{code}, but also makes the font bold-face. |
| 366 | \end{macrodesc} |
| 367 | |
| 368 | \begin{macrodesc}{cdata}{\p{name}} |
| 369 | The name of a C-language variable. |
| 370 | \end{macrodesc} |
| 371 | |
| 372 | \begin{macrodesc}{cfunction}{\p{name}} |
| 373 | The name of a C-language function. \var{name} should include the |
| 374 | function name and the trailing parentheses. |
| 375 | \end{macrodesc} |
| 376 | |
| 377 | \begin{macrodesc}{character}{\p{char}} |
| 378 | A character when discussing the character rather than a one-byte |
| 379 | string value. The character will be typeset as with \macro{samp}. |
| 380 | \end{macrodesc} |
| 381 | |
Fred Drake | 29a710f | 1999-11-10 22:51:18 +0000 | [diff] [blame] | 382 | \begin{macrodesc}{citetitle}{\op{url}\p{title}} |
| 383 | A title for a referenced publication. If \var{url} is specified, |
| 384 | the title will be made into a hyperlink when formatted as HTML. |
| 385 | \end{macrodesc} |
| 386 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 387 | \begin{macrodesc}{class}{\p{name}} |
| 388 | A class name; a dotted name may be used. |
| 389 | \end{macrodesc} |
| 390 | |
| 391 | \begin{macrodesc}{code}{\p{text}} |
| 392 | A short code fragment or literal constant value. Typically, it |
| 393 | should not include any spaces since no quotation marks are |
| 394 | added. |
| 395 | \end{macrodesc} |
| 396 | |
| 397 | \begin{macrodesc}{constant}{\p{name}} |
| 398 | The name of a ``defined'' constant. This may be a C-language |
| 399 | \code{\#define} or a Python variable that is not intended to be |
| 400 | changed. |
| 401 | \end{macrodesc} |
| 402 | |
| 403 | \begin{macrodesc}{ctype}{\p{name}} |
| 404 | The name of a C \keyword{typedef} or structure. For structures |
| 405 | defined without a \keyword{typedef}, use \code{\e ctype\{struct |
| 406 | struct_tag\}} to make it clear that the \keyword{struct} is |
| 407 | required. |
| 408 | \end{macrodesc} |
| 409 | |
| 410 | \begin{macrodesc}{deprecated}{\p{version}\p{what to do}} |
| 411 | Declare whatever is being described as being deprecated starting |
| 412 | with release \var{version}. The text given as \var{what to do} |
| 413 | should recommend something to use instead. |
| 414 | \end{macrodesc} |
| 415 | |
| 416 | \begin{macrodesc}{dfn}{\p{term}} |
| 417 | Mark the defining instance of \var{term} in the text. (No index |
| 418 | entries are generated.) |
| 419 | \end{macrodesc} |
| 420 | |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 421 | \begin{macrodesc}{e}{} |
| 422 | Produces a backslash. This is convenient in \macro{code} and |
Fred Drake | 2b85341 | 2000-04-11 19:08:30 +0000 | [diff] [blame^] | 423 | similar macros, and is only defined there. The create a |
| 424 | backslash in ordinary text (such as the contents of the |
| 425 | \macro{file} macro), use the standard \macro{textbackslash} macro. |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 426 | \end{macrodesc} |
| 427 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 428 | \begin{macrodesc}{email}{\p{address}} |
| 429 | An email address. Note that this is \emph{not} hyperlinked in |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 430 | any of the possible output formats. The domain name portion of |
| 431 | the address should be lower case. |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 432 | \end{macrodesc} |
| 433 | |
| 434 | \begin{macrodesc}{emph}{\p{text}} |
| 435 | Emphasized text; this will be presented in an italic font. |
| 436 | \end{macrodesc} |
| 437 | |
| 438 | \begin{macrodesc}{envvar}{\p{name}} |
| 439 | An environment variable. Index entries are generated. |
| 440 | \end{macrodesc} |
| 441 | |
| 442 | \begin{macrodesc}{exception}{\p{name}} |
| 443 | The name of an exception. A dotted name may be used. |
| 444 | \end{macrodesc} |
| 445 | |
| 446 | \begin{macrodesc}{file}{\p{file or dir}} |
| 447 | The name of a file or directory. In the PDF and PostScript |
| 448 | outputs, single quotes and a font change are used to indicate |
| 449 | the file name, but no quotes are used in the HTML output. |
| 450 | \end{macrodesc} |
| 451 | |
| 452 | \begin{macrodesc}{filenq}{\p{file or dir}} |
| 453 | Like \macro{file}, but single quotes are never used. This can |
| 454 | be used in conjunction with tables if a column will only contain |
| 455 | file or directory names. |
| 456 | \end{macrodesc} |
| 457 | |
| 458 | \begin{macrodesc}{function}{\p{name}} |
| 459 | The name of a Python function; dotted names may be used. |
| 460 | \end{macrodesc} |
| 461 | |
| 462 | \begin{macrodesc}{kbd}{\p{key sequence}} |
| 463 | Mark a sequence of keystrokes. What form \var{key sequence} |
| 464 | takes may depend on platform- or application-specific |
| 465 | conventions. For example, an \program{xemacs} key sequence |
| 466 | may be marked like \code{\e kbd\{C-x C-f\}}. |
| 467 | \end{macrodesc} |
| 468 | |
| 469 | \begin{macrodesc}{keyword}{\p{name}} |
| 470 | The name of a keyword in a programming language. |
| 471 | \end{macrodesc} |
| 472 | |
| 473 | \begin{macrodesc}{makevar}{\p{name}} |
| 474 | The name of a \program{make} variable. |
| 475 | \end{macrodesc} |
| 476 | |
| 477 | \begin{macrodesc}{manpage}{\p{name}\p{section}} |
| 478 | A reference to a \UNIX{} manual page. |
| 479 | \end{macrodesc} |
| 480 | |
| 481 | \begin{macrodesc}{member}{\p{name}} |
| 482 | The name of a data attribute of an object. |
| 483 | \end{macrodesc} |
| 484 | |
| 485 | \begin{macrodesc}{method}{\p{name}} |
| 486 | The name of a method of an object. \var{name} should include the |
| 487 | method name and the trailing parentheses. A dotted name may be |
| 488 | used. |
| 489 | \end{macrodesc} |
| 490 | |
| 491 | \begin{macrodesc}{mimetype}{\p{name}} |
| 492 | The name of a MIME type. |
| 493 | \end{macrodesc} |
| 494 | |
| 495 | \begin{macrodesc}{module}{\p{name}} |
Fred Drake | 2b85341 | 2000-04-11 19:08:30 +0000 | [diff] [blame^] | 496 | The name of a module; a dotted name may be used. This should |
| 497 | also be used for package names. |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 498 | \end{macrodesc} |
| 499 | |
| 500 | \begin{macrodesc}{newsgroup}{\p{name}} |
| 501 | The name of a USENET newsgroup. |
| 502 | \end{macrodesc} |
| 503 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 504 | \begin{macrodesc}{program}{\p{name}} |
| 505 | The name of an executable program. This may differ from the |
| 506 | file name for the executable for some platforms. In particular, |
| 507 | the \file{.exe} (or other) extension should be omitted for DOS |
| 508 | and Windows programs. |
| 509 | \end{macrodesc} |
| 510 | |
Fred Drake | 29a710f | 1999-11-10 22:51:18 +0000 | [diff] [blame] | 511 | \begin{macrodesc}{programopt}{\p{option}} |
Fred Drake | ce44498 | 2000-04-11 18:52:52 +0000 | [diff] [blame] | 512 | A command-line option to an executable program. Use this only |
| 513 | for ``shot'' options, and include the leading hyphen. |
| 514 | \end{macrodesc} |
| 515 | |
| 516 | \begin{macrodesc}{longprogramopt}{\p{option}} |
| 517 | A long command-line option to an executable program. This |
| 518 | should only be used for long option names which will be prefixed |
| 519 | by two hyphens; the hyphens should not be provided as part of |
| 520 | \var{option}. |
Fred Drake | 29a710f | 1999-11-10 22:51:18 +0000 | [diff] [blame] | 521 | \end{macrodesc} |
| 522 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 523 | \begin{macrodesc}{refmodule}{\op{key}\p{name}} |
| 524 | Like \macro{module}, but create a hyperlink to the documentation |
| 525 | for the named module. Note that the corresponding |
| 526 | \macro{declaremodule} must be in the same document. If the |
| 527 | \macro{declaremodule} defines a module key different from the |
| 528 | module name, it must also be provided as \var{key} to the |
| 529 | \macro{refmodule} macro. |
| 530 | \end{macrodesc} |
| 531 | |
| 532 | \begin{macrodesc}{regexp}{\p{string}} |
| 533 | Mark a regular expression. |
| 534 | \end{macrodesc} |
| 535 | |
| 536 | \begin{macrodesc}{rfc}{\p{number}} |
| 537 | A reference to an Internet Request for Comments. This generates |
| 538 | appropriate index entries. The text \samp{RFC \var{number}} is |
| 539 | generated; in the HTML output, this text is a hyperlink to an |
| 540 | online copy of the specified RFC. |
| 541 | \end{macrodesc} |
| 542 | |
| 543 | \begin{macrodesc}{samp}{\p{text}} |
| 544 | A short code sample, but possibly longer than would be given |
| 545 | using \macro{code}. Since quotation marks are added, spaces are |
| 546 | acceptable. |
| 547 | \end{macrodesc} |
| 548 | |
| 549 | \begin{macrodesc}{strong}{\p{text}} |
| 550 | Strongly emphasized text; this will be presented using a bold |
| 551 | font. |
| 552 | \end{macrodesc} |
| 553 | |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 554 | \begin{macrodesc}{url}{\p{url}} |
| 555 | A URL (or URN). The URL will be presented as text. In the HTML |
| 556 | and PDF formatted versions, the URL will also be a hyperlink. |
| 557 | This can be used when referring to external resources. Note |
| 558 | that many characters are special to \LaTeX{} and this macro |
| 559 | does not always do the right thing. In particular, the tilde |
| 560 | character (\character{\~}) is mis-handled; encoding it as a |
| 561 | hex-sequence does work, use \samp{\%7e} in place of the tilde |
| 562 | character. |
| 563 | \end{macrodesc} |
| 564 | |
Fred Drake | 2f4bebd | 1999-04-28 16:43:11 +0000 | [diff] [blame] | 565 | \begin{macrodesc}{var}{\p{name}} |
| 566 | The name of a variable or formal parameter in running text. |
| 567 | \end{macrodesc} |
| 568 | |
| 569 | \begin{macrodesc}{version}{} |
| 570 | The version number for the documentation, as specified using |
| 571 | \macro{release} in the preamble. |
| 572 | \end{macrodesc} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 573 | |
| 574 | |
| 575 | \subsection{Module-specific Markup} |
| 576 | |
| 577 | The markup described in this section is used to provide information |
| 578 | about a module being documented. A typical use of this markup |
| 579 | appears at the top of the section used to document a module. A |
| 580 | typical example might look like this: |
| 581 | |
| 582 | \begin{verbatim} |
| 583 | \section{\module{spam} --- |
| 584 | Access to the SPAM facility} |
| 585 | |
| 586 | \declaremodule{extension}{spam} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 587 | \platform{Unix} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 588 | \modulesynopsis{Access to the SPAM facility of \UNIX{}.} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 589 | \moduleauthor{Jane Doe}{jane.doe@frobnitz.org} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 590 | \end{verbatim} |
| 591 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 592 | \begin{macrodesc}{declaremodule}{\op{key}\p{type}\p{name}} |
Fred Drake | 87f768e | 1999-05-17 15:22:45 +0000 | [diff] [blame] | 593 | Requires two parameters: module type (\samp{standard}, |
| 594 | \samp{builtin}, \samp{extension}, or \samp{}), and the module |
| 595 | name. An optional parameter should be given as the basis for the |
| 596 | module's ``key'' used for linking to or referencing the section. |
| 597 | The ``key'' should only be given if the module's name contains any |
| 598 | underscores, and should be the name with the underscores stripped. |
| 599 | Note that the \var{type} parameter must be one of the values |
| 600 | listed above or an error will be printed. For modules which are |
| 601 | contained in packages, the fully-qualified name should be given as |
| 602 | \var{name} parameter. This should be the first thing after the |
| 603 | \macro{section} used to introduce the module. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 604 | \end{macrodesc} |
| 605 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 606 | \begin{macrodesc}{platform}{\p{specifier}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 607 | Specifies the portability of the module. \var{specifier} is a |
| 608 | comma-separated list of keys that specify what platforms the |
| 609 | module is available on. The keys are short identifiers; |
| 610 | examples that are in use include \samp{IRIX}, \samp{Mac}, |
| 611 | \samp{Windows}, and \samp{Unix}. It is important to use a key |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 612 | which has already been used when applicable. This is used to |
| 613 | provide annotations in the Module Index and the HTML and GNU info |
| 614 | output. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 615 | \end{macrodesc} |
| 616 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 617 | \begin{macrodesc}{modulesynopsis}{\p{text}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 618 | The \var{text} is a short, ``one line'' description of the |
| 619 | module that can be used as part of the chapter introduction. |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 620 | This is must be placed after \macro{declaremodule}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 621 | The synopsis is used in building the contents of the table |
| 622 | inserted as the \macro{localmoduletable}. No text is |
| 623 | produced at the point of the markup. |
| 624 | \end{macrodesc} |
| 625 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 626 | \begin{macrodesc}{moduleauthor}{\p{name}\p{email}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 627 | This macro is used to encode information about who authored a |
| 628 | module. This is currently not used to generate output, but can be |
| 629 | used to help determine the origin of the module. |
| 630 | \end{macrodesc} |
| 631 | |
| 632 | |
| 633 | \subsection{Library-level Markup} |
| 634 | |
| 635 | This markup is used when describing a selection of modules. For |
Fred Drake | 698d520 | 1999-11-10 15:54:57 +0000 | [diff] [blame] | 636 | example, the \citetitle[../mac/mac.html]{Macintosh Library |
| 637 | Modules} document uses this to help provide an overview of the |
| 638 | modules in the collection, and many chapters in the |
| 639 | \citetitle[../lib/lib.html]{Python Library Reference} use it for |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 640 | the same purpose. |
| 641 | |
| 642 | \begin{macrodesc}{localmoduletable}{} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 643 | If a \file{.syn} file exists for the current |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 644 | chapter (or for the entire document in \code{howto} documents), a |
| 645 | \env{synopsistable} is created with the contents loaded from the |
| 646 | \file{.syn} file. |
| 647 | \end{macrodesc} |
| 648 | |
| 649 | |
| 650 | \subsection{Table Markup} |
| 651 | |
| 652 | There are three general-purpose table environments defined which |
| 653 | should be used whenever possible. These environments are defined |
| 654 | to provide tables of specific widths and some convenience for |
| 655 | formatting. These environments are not meant to be general |
| 656 | replacements for the standard \LaTeX{} table environments, but can |
| 657 | be used for an advantage when the documents are processed using |
| 658 | the tools for Python documentation processing. In particular, the |
| 659 | generated HTML looks good! There is also an advantage for the |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 660 | eventual conversion of the documentation to SGML (see section |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 661 | \ref{futures}, ``Future Directions''). |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 662 | |
| 663 | Each environment is named \env{table\var{cols}}, where \var{cols} |
| 664 | is the number of columns in the table specified in lower-case |
| 665 | Roman numerals. Within each of these environments, an additional |
| 666 | macro, \macro{line\var{cols}}, is defined, where \var{cols} |
| 667 | matches the \var{cols} value of the corresponding table |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 668 | environment. These are supported for \var{cols} values of |
| 669 | \code{ii}, \code{iii}, and \code{iv}. These environments are all |
| 670 | built on top of the \env{tabular} environment. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 671 | |
Fred Drake | 2b85341 | 2000-04-11 19:08:30 +0000 | [diff] [blame^] | 672 | Note that all tables in the standard Python documentation use |
| 673 | vertical lines between columns, and this must be specified in the |
| 674 | markup for each table. A general border around the outside of the |
| 675 | table is not used, but would be the responsibility of the |
| 676 | processor. |
| 677 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 678 | \begin{envdesc}{tableii}{\p{colspec}\p{col1font}\p{heading1}\p{heading2}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 679 | Create a two-column table using the \LaTeX{} column specifier |
| 680 | \var{colspec}. The column specifier should indicate vertical |
| 681 | bars between columns as appropriate for the specific table, but |
| 682 | should not specify vertical bars on the outside of the table |
| 683 | (that is considered a stylesheet issue). The \var{col1font} |
| 684 | parameter is used as a stylistic treatment of the first column |
| 685 | of the table: the first column is presented as |
| 686 | \code{\e\var{col1font}\{column1\}}. To avoid treating the first |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 687 | column specially, \var{col1font} may be \samp{textrm}. The |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 688 | column headings are taken from the values \var{heading1} and |
| 689 | \var{heading2}. |
| 690 | \end{envdesc} |
| 691 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 692 | \begin{macrodesc}{lineii}{\p{column1}\p{column2}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 693 | Create a single table row within a \env{tableii} environment. |
| 694 | The text for the first column will be generated by applying the |
| 695 | macro named by the \var{col1font} value when the \env{tableii} |
| 696 | was opened. |
| 697 | \end{macrodesc} |
| 698 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 699 | \begin{envdesc}{tableiii}{\p{colspec}\p{col1font}\p{heading1}\p{heading2}\p{heading3}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 700 | Like the \env{tableii} environment, but with a third column. |
| 701 | The heading for the third column is given by \var{heading3}. |
| 702 | \end{envdesc} |
| 703 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 704 | \begin{macrodesc}{lineiii}{\p{column1}\p{column2}\p{column3}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 705 | Like the \macro{lineii} macro, but with a third column. The |
| 706 | text for the third column is given by \var{column3}. |
| 707 | \end{macrodesc} |
| 708 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 709 | \begin{envdesc}{tableiv}{\p{colspec}\p{col1font}\p{heading1}\p{heading2}\p{heading3}\p{heading4}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 710 | Like the \env{tableiii} environment, but with a fourth column. |
| 711 | The heading for the fourth column is given by \var{heading4}. |
| 712 | \end{envdesc} |
| 713 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 714 | \begin{macrodesc}{lineiv}{\p{column1}\p{column2}\p{column3}\p{column4}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 715 | Like the \macro{lineiii} macro, but with a fourth column. The |
| 716 | text for the fourth column is given by \var{column4}. |
| 717 | \end{macrodesc} |
| 718 | |
| 719 | |
| 720 | An additional table-like environment is \env{synopsistable}. The |
| 721 | table generated by this environment contains two columns, and each |
| 722 | row is defined by an alternate definition of |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 723 | \macro{modulesynopsis}. This environment is not normally used by |
| 724 | authors, but is created by the \macro{localmoduletable} macro. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 725 | |
| 726 | |
| 727 | \subsection{Reference List Markup \label{references}} |
| 728 | |
| 729 | Many sections include a list of references to module documentation |
| 730 | or external documents. These lists are created using the |
| 731 | \env{seealso} environment. This environment defines some |
| 732 | additional macros to support creating reference entries in a |
| 733 | reasonable manner. |
| 734 | |
| 735 | \begin{envdesc}{seealso}{} |
| 736 | This environment creates a ``See also:'' heading and defines the |
| 737 | markup used to describe individual references. |
| 738 | \end{envdesc} |
| 739 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 740 | \begin{macrodesc}{seemodule}{\op{key}\p{name}\p{why}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 741 | Refer to another module. \var{why} should be a brief |
| 742 | explanation of why the reference may be interesting. The module |
| 743 | name is given in \var{name}, with the link key given in |
| 744 | \var{key} if necessary. In the HTML and PDF conversions, the |
| 745 | module name will be a hyperlink to the referred-to module. |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 746 | \strong{Note:} The module must be documented in the same |
| 747 | document (the corresponding \macro{declaremodule} is required). |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 748 | \end{macrodesc} |
| 749 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 750 | \begin{macrodesc}{seetext}{\p{text}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 751 | Add arbitrary text \var{text} to the ``See also:'' list. This |
| 752 | can be used to refer to off-line materials or on-line materials |
| 753 | using the \macro{url} macro. |
| 754 | \end{macrodesc} |
| 755 | |
| 756 | |
| 757 | \subsection{Index-generating Markup \label{indexing}} |
| 758 | |
| 759 | Effective index generation for technical documents can be very |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 760 | difficult, especially for someone familiar with the topic but not |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 761 | the creation of indexes. Much of the difficulty arises in the |
| 762 | area of terminology: including the terms an expert would use for a |
| 763 | concept is not sufficient. Coming up with the terms that a novice |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 764 | would look up is fairly difficult for an author who, typically, is |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 765 | an expert in the area she is writing on. |
| 766 | |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 767 | The truly difficult aspects of index generation are not areas with |
| 768 | which the documentation tools can help. However, ease |
Fred Drake | e15956b | 2000-04-03 04:51:13 +0000 | [diff] [blame] | 769 | of producing the index once content decisions are made is within |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 770 | the scope of the tools. Markup is provided which the processing |
| 771 | software is able to use to generate a variety of kinds of index |
| 772 | entry with minimal effort. Additionally, many of the environments |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 773 | described in section \ref{info-units}, ``Information Units,'' will |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 774 | generate appropriate entries into the general and module indexes. |
| 775 | |
| 776 | The following macro can be used to control the generation of index |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 777 | data, and should be used in the document preamble: |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 778 | |
| 779 | \begin{macrodesc}{makemodindex}{} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 780 | This should be used in the document preamble if a ``Module |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 781 | Index'' is desired for a document containing reference material |
| 782 | on many modules. This causes a data file |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 783 | \code{lib\var{jobname}.idx} to be created from the |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 784 | \macro{declaremodule} macros. This file can be processed by the |
| 785 | \program{makeindex} program to generate a file which can be |
| 786 | \macro{input} into the document at the desired location of the |
| 787 | module index. |
| 788 | \end{macrodesc} |
| 789 | |
| 790 | There are a number of macros that are useful for adding index |
| 791 | entries for particular concepts, many of which are specific to |
| 792 | programming languages or even Python. |
| 793 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 794 | \begin{macrodesc}{bifuncindex}{\p{name}} |
Fred Drake | ec8b905 | 1999-04-23 20:01:17 +0000 | [diff] [blame] | 795 | Add an index entry referring to a built-in function named |
| 796 | \var{name}; parentheses should not be included after |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 797 | \var{name}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 798 | \end{macrodesc} |
| 799 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 800 | \begin{macrodesc}{exindex}{\p{exception}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 801 | Add a reference to an exception named \var{exception}. The |
| 802 | exception may be either string- or class-based. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 803 | \end{macrodesc} |
| 804 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 805 | \begin{macrodesc}{kwindex}{\p{keyword}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 806 | Add a reference to a language keyword (not a keyword parameter |
| 807 | in a function or method call). |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 808 | \end{macrodesc} |
| 809 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 810 | \begin{macrodesc}{obindex}{\p{object type}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 811 | Add an index entry for a built-in object type. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 812 | \end{macrodesc} |
| 813 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 814 | \begin{macrodesc}{opindex}{\p{operator}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 815 | Add a reference to an operator, such as \samp{+}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 816 | \end{macrodesc} |
| 817 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 818 | \begin{macrodesc}{refmodindex}{\op{key}\p{module}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 819 | Add an index entry for module \var{module}; if \var{module} |
| 820 | contains an underscore, the optional parameter \var{key} should |
| 821 | be provided as the same string with underscores removed. An |
| 822 | index entry ``\var{module} (module)'' will be generated. This |
| 823 | is intended for use with non-standard modules implemented in |
| 824 | Python. |
| 825 | \end{macrodesc} |
| 826 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 827 | \begin{macrodesc}{refexmodindex}{\op{key}\p{module}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 828 | As for \macro{refmodindex}, but the index entry will be |
| 829 | ``\var{module} (extension module).'' This is intended for use |
| 830 | with non-standard modules not implemented in Python. |
| 831 | \end{macrodesc} |
| 832 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 833 | \begin{macrodesc}{refbimodindex}{\op{key}\p{module}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 834 | As for \macro{refmodindex}, but the index entry will be |
| 835 | ``\var{module} (built-in module).'' This is intended for use |
| 836 | with standard modules not implemented in Python. |
| 837 | \end{macrodesc} |
| 838 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 839 | \begin{macrodesc}{refstmodindex}{\op{key}\p{module}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 840 | As for \macro{refmodindex}, but the index entry will be |
| 841 | ``\var{module} (standard module).'' This is intended for use |
| 842 | with standard modules implemented in Python. |
| 843 | \end{macrodesc} |
| 844 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 845 | \begin{macrodesc}{stindex}{\p{statement}} |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 846 | Add an index entry for a statement type, such as \keyword{print} |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 847 | or \keyword{try}/\keyword{finally}. |
| 848 | |
| 849 | XXX Need better examples of difference from \macro{kwindex}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 850 | \end{macrodesc} |
| 851 | |
| 852 | |
| 853 | Additional macros are provided which are useful for conveniently |
| 854 | creating general index entries which should appear at many places |
| 855 | in the index by rotating a list of words. These are simple macros |
| 856 | that simply use \macro{index} to build some number of index |
| 857 | entries. Index entries build using these macros contain both |
| 858 | primary and secondary text. |
| 859 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 860 | \begin{macrodesc}{indexii}{\p{word1}\p{word2}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 861 | Build two index entries. This is exactly equivalent to using |
| 862 | \code{\e index\{\var{word1}!\var{word2}\}} and |
| 863 | \code{\e index\{\var{word2}!\var{word1}\}}. |
| 864 | \end{macrodesc} |
| 865 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 866 | \begin{macrodesc}{indexiii}{\p{word1}\p{word2}\p{word3}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 867 | Build three index entries. This is exactly equivalent to using |
| 868 | \code{\e index\{\var{word1}!\var{word2} \var{word3}\}}, |
| 869 | \code{\e index\{\var{word2}!\var{word3}, \var{word1}\}}, and |
| 870 | \code{\e index\{\var{word3}!\var{word1} \var{word2}\}}. |
| 871 | \end{macrodesc} |
| 872 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 873 | \begin{macrodesc}{indexiv}{\p{word1}\p{word2}\p{word3}\p{word4}} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 874 | Build four index entries. This is exactly equivalent to using |
| 875 | \code{\e index\{\var{word1}!\var{word2} \var{word3} \var{word4}\}}, |
| 876 | \code{\e index\{\var{word2}!\var{word3} \var{word4}, \var{word1}\}}, |
| 877 | \code{\e index\{\var{word3}!\var{word4}, \var{word1} \var{word2}\}}, |
| 878 | and |
| 879 | \code{\e index\{\var{word4}!\var{word1} \var{word2} \var{word3}\}}. |
| 880 | \end{macrodesc} |
| 881 | |
| 882 | |
| 883 | \section{Special Names} |
| 884 | |
| 885 | Many special names are used in the Python documentation, including |
| 886 | the names of operating systems, programming languages, standards |
| 887 | bodies, and the like. Many of these were assigned \LaTeX{} macros |
| 888 | at some point in the distant past, and these macros lived on long |
| 889 | past their usefulness. In the current markup, these entities are |
| 890 | not assigned any special markup, but the preferred spellings are |
| 891 | given here to aid authors in maintaining the consistency of |
| 892 | presentation in the Python documentation. |
| 893 | |
| 894 | \begin{description} |
| 895 | \item[POSIX] |
| 896 | The name assigned to a particular group of standards. This is |
| 897 | always uppercase. |
| 898 | |
| 899 | \item[Python] |
| 900 | The name of our favorite programming language is always |
| 901 | capitalized. |
Fred Drake | 4293468 | 2000-04-03 15:00:28 +0000 | [diff] [blame] | 902 | |
| 903 | \item[Unicode] |
| 904 | The name of a character set and matching encoding. This is |
| 905 | always written capitalized. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 906 | \end{description} |
| 907 | |
| 908 | |
| 909 | \section{Processing Tools} |
| 910 | |
| 911 | \subsection{External Tools} |
| 912 | |
| 913 | Many tools are needed to be able to process the Python |
| 914 | documentation if all supported formats are required. This |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 915 | section lists the tools used and when each is required. Consult |
| 916 | the \file{Doc/README} file to see if there are specific version |
| 917 | requirements for any of these. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 918 | |
| 919 | \begin{description} |
| 920 | \item[\program{dvips}] |
| 921 | This program is a typical part of \TeX{} installations. It is |
| 922 | used to generate PostScript from the ``device independent'' |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 923 | \file{.dvi} files. It is needed for the conversion to |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 924 | PostScript. |
| 925 | |
| 926 | \item[\program{emacs}] |
| 927 | Emacs is the kitchen sink of programmers' editors, and a damn |
| 928 | fine kitchen sink it is. It also comes with some of the |
| 929 | processing needed to support the proper menu structures for |
| 930 | Texinfo documents when an info conversion is desired. This is |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 931 | needed for the info conversion. Using \program{xemacs} |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 932 | instead of FSF \program{emacs} may lead to instability in the |
| 933 | conversion, but that's because nobody seems to maintain the |
| 934 | Emacs Texinfo code in a portable manner. |
| 935 | |
| 936 | \item[\program{latex}] |
| 937 | This is a world-class typesetter by Donald Knuth. It is used |
| 938 | for the conversion to PostScript, and is needed for the HTML |
| 939 | conversion as well (\LaTeX2HTML requires one of the |
| 940 | intermediate files it creates). |
| 941 | |
| 942 | \item[\program{latex2html}] |
| 943 | Probably the longest Perl script anyone ever attempted to |
| 944 | maintain. This converts \LaTeX{} documents to HTML documents, |
| 945 | and does a pretty reasonable job. It is required for the |
| 946 | conversions to HTML and GNU info. |
| 947 | |
| 948 | \item[\program{lynx}] |
| 949 | This is a text-mode Web browser which includes an |
| 950 | HTML-to-plain text conversion. This is used to convert |
| 951 | \code{howto} documents to text. |
| 952 | |
| 953 | \item[\program{make}] |
| 954 | Just about any version should work for the standard documents, |
| 955 | but GNU \program{make} is required for the experimental |
| 956 | processes in \file{Doc/tools/sgmlconv/}, at least while |
| 957 | they're experimental. |
| 958 | |
| 959 | \item[\program{makeindex}] |
| 960 | This is a standard program for converting \LaTeX{} index data |
| 961 | to a formatted index; it should be included with all \LaTeX{} |
| 962 | installations. It is needed for the PDF and PostScript |
| 963 | conversions. |
| 964 | |
| 965 | \item[\program{makeinfo}] |
| 966 | GNU \program{makeinfo} is used to convert Texinfo documents to |
| 967 | GNU info files. Since Texinfo is used as an intermediate |
| 968 | format in the info conversion, this program is needed in that |
| 969 | conversion. |
| 970 | |
| 971 | \item[\program{pdflatex}] |
| 972 | pdf\TeX{} is a relatively new variant of \TeX, and is used to |
| 973 | generate the PDF version of the manuals. It is typically |
| 974 | installed as part of most of the large \TeX{} distributions. |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 975 | \program{pdflatex} is pdf\TeX{} using the \LaTeX{} format. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 976 | |
| 977 | \item[\program{perl}] |
| 978 | Perl is required for \LaTeX2HTML{} and one of the scripts used |
| 979 | to post-process \LaTeX2HTML output, as well as the |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 980 | HTML-to-Texinfo conversion. This is required for |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 981 | the HTML and GNU info conversions. |
| 982 | |
| 983 | \item[\program{python}] |
| 984 | Python is used for many of the scripts in the |
| 985 | \file{Doc/tools/} directory; it is required for all |
| 986 | conversions. This shouldn't be a problem if you're interested |
| 987 | in writing documentation for Python! |
| 988 | \end{description} |
| 989 | |
| 990 | |
| 991 | \subsection{Internal Tools} |
| 992 | |
| 993 | This section describes the various scripts that are used to |
| 994 | implement various stages of document processing or to orchestrate |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 995 | entire build sequences. Most of these tools are only useful |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 996 | in the context of building the standard documentation, but some |
| 997 | are more general. |
| 998 | |
| 999 | \begin{description} |
| 1000 | \item[\program{mkhowto}] |
Fred Drake | 87f768e | 1999-05-17 15:22:45 +0000 | [diff] [blame] | 1001 | This is the primary script used to format third-party |
| 1002 | documents. It contains all the logic needed to ``get it |
| 1003 | right.'' The proper way to use this script is to make a |
| 1004 | symbolic link to it or run it in place; the actual script file |
| 1005 | must be stored as part of the documentation source tree, |
| 1006 | though it may be used to format documents outside the |
Fred Drake | ce44498 | 2000-04-11 18:52:52 +0000 | [diff] [blame] | 1007 | tree. Use \program{mkhowto} \longprogramopt{help} |
Fred Drake | d290c10 | 1999-11-09 18:03:00 +0000 | [diff] [blame] | 1008 | for a list of |
Fred Drake | d2a727f | 1999-05-27 21:45:54 +0000 | [diff] [blame] | 1009 | command line options. |
Fred Drake | 87f768e | 1999-05-17 15:22:45 +0000 | [diff] [blame] | 1010 | |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 1011 | \program{mkhowto} can be used for both \code{howto} and |
| 1012 | \code{manual} class documents. (For the later, be sure to get |
| 1013 | the latest version from the Python CVS repository rather than |
| 1014 | the version distributed in the \file{latex-1.5.2.tgz} source |
| 1015 | archive.) |
| 1016 | |
Fred Drake | 87f768e | 1999-05-17 15:22:45 +0000 | [diff] [blame] | 1017 | XXX Need more here. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1018 | \end{description} |
| 1019 | |
| 1020 | |
| 1021 | \section{Future Directions \label{futures}} |
| 1022 | |
| 1023 | The history of the Python documentation is full of changes, most of |
| 1024 | which have been fairly small and evolutionary. There has been a |
| 1025 | great deal of discussion about making large changes in the markup |
| 1026 | languages and tools used to process the documentation. This section |
| 1027 | deals with the nature of the changes and what appears to be the most |
| 1028 | likely path of future development. |
| 1029 | |
| 1030 | \subsection{Structured Documentation \label{structured}} |
| 1031 | |
| 1032 | Most of the small changes to the \LaTeX{} markup have been made |
| 1033 | with an eye to divorcing the markup from the presentation, making |
| 1034 | both a bit more maintainable. Over the course of 1998, a large |
| 1035 | number of changes were made with exactly this in mind; previously, |
| 1036 | changes had been made but in a less systematic manner and with |
| 1037 | more concern for not needing to update the existing content. The |
| 1038 | result has been a highly structured and semantically loaded markup |
| 1039 | language implemented in \LaTeX. With almost no basic \TeX{} or |
| 1040 | \LaTeX{} markup in use, however, the markup syntax is about the |
| 1041 | only evidence of \LaTeX{} in the actual document sources. |
| 1042 | |
| 1043 | One side effect of this is that while we've been able to use |
| 1044 | standard ``engines'' for manipulating the documents, such as |
| 1045 | \LaTeX{} and \LaTeX2HTML, most of the actual transformations have |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 1046 | been created specifically for Python. The \LaTeX{} document |
| 1047 | classes and \LaTeX2HTML support are both complete implementations |
| 1048 | of the specific markup designed for these documents. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1049 | |
| 1050 | Combining highly customized markup with the somewhat esoteric |
| 1051 | systems used to process the documents leads us to ask some |
| 1052 | questions: Can we do this more easily? and, Can we do this |
| 1053 | better? After a great deal of discussion with the community, we |
| 1054 | have determined that actively pursuing modern structured |
Fred Drake | 2c4e009 | 1999-03-29 14:55:55 +0000 | [diff] [blame] | 1055 | documentation systems is worth some investment of time. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1056 | |
| 1057 | There appear to be two real contenders in this arena: the Standard |
| 1058 | General Markup Language (SGML), and the Extensible Markup Language |
| 1059 | (XML). Both of these standards have advantages and disadvantages, |
| 1060 | and many advantages are shared. |
| 1061 | |
| 1062 | SGML offers advantages which may appeal most to authors, |
| 1063 | especially those using ordinary text editors. There are also |
| 1064 | additional abilities to define content models. A number of |
| 1065 | high-quality tools with demonstrated maturity is available, but |
| 1066 | most are not free; for those which are, portability issues remain |
| 1067 | a problem. |
| 1068 | |
| 1069 | The advantages of XML include the availability of a large number |
| 1070 | of evolving tools. Unfortunately, many of the associated |
| 1071 | standards are still evolving, and the tools will have to follow |
| 1072 | along. This means that developing a robust tool set that uses |
| 1073 | more than the basic XML 1.0 recommendation is not possible in the |
| 1074 | short term. The promised availability of a wide variety of |
| 1075 | high-quality tools which support some of the most important |
| 1076 | related standards is not immediate. Many tools are likely to be |
| 1077 | free. |
| 1078 | |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 1079 | XXX Eventual migration to SGML/XML. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1080 | |
| 1081 | \subsection{Discussion Forums \label{discussion}} |
| 1082 | |
| 1083 | Discussion of the future of the Python documentation and related |
Fred Drake | 7a737df | 1999-04-23 14:41:44 +0000 | [diff] [blame] | 1084 | topics takes place in the Documentation Special Interest Group, or |
| 1085 | ``Doc-SIG.'' Information on the group, including mailing list |
| 1086 | archives and subscription information, is available at |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1087 | \url{http://www.python.org/sigs/doc-sig/}. The SIG is open to all |
| 1088 | interested parties. |
| 1089 | |
| 1090 | Comments and bug reports on the standard documents should be sent |
| 1091 | to \email{python-docs@python.org}. This may include comments |
Fred Drake | adade92 | 1999-04-22 13:05:27 +0000 | [diff] [blame] | 1092 | about formatting, content, grammatical and spelling errors, or |
Fred Drake | d1fb779 | 1999-05-17 16:33:54 +0000 | [diff] [blame] | 1093 | this document. You can also send comments on this document |
| 1094 | directly to the author at \email{fdrake@acm.org}. |
Fred Drake | acffaee | 1999-03-16 16:09:13 +0000 | [diff] [blame] | 1095 | |
| 1096 | \end{document} |