3333in the Python documentation. Authors may use this guide, in
3434conjunction with the template files provided with the
3535distribution, to create or maintain whole documents or sections.
36+
37+ [Notes and questions in brackets, like this, are notes to myself while
38+ developing this document.]
3639\end {abstract }
3740
3841\tableofcontents
@@ -53,9 +56,22 @@ \section{Introduction}
5356 from the community have proved useful during the time I've been
5457 involved in maintaining the documentation.
5558
56- [Who is this document for?]
57-
58- [What does it cover?]
59+ This document is aimed at authors and potential authors of
60+ documentation for Python. Among this group, it is aimed primarily
61+ at people contributing to the standard documentation and developing
62+ additional documents using the same tools as the standard
63+ documents. This guide will be less useful for authors using the
64+ Python documentation tools for topics other than Python, and less
65+ useful still for authors not using the tools at all.
66+
67+ The material in this guide is intended to assist authors using the
68+ Python documentation tools. It includes information on the source
69+ distribution of the standard documentation, a discussion of the
70+ Python document classes, reference material on the markup defined in
71+ the document classes, a list of the tools need for processing
72+ documents, and reference material on the tools provided with the
73+ documentation resources. At the end, there is also a section
74+ discussing future directions for the Python documentation.
5975
6076\section {Directory Structure }
6177
@@ -69,7 +85,7 @@ \section{Directory Structure}
6985
7086 The documentation sources are usually placed within the Python
7187 source distribution as the top-level subdirectory \file {Doc/}, but
72- is independent of the Python source distribution.
88+ are independent of the Python source distribution.
7389
7490 The \file {Doc/} directory contains a few files and several
7591 subdirectories. The files are mostly self-explanatory, including a
@@ -83,12 +99,12 @@ \section{Directory Structure}
8399 three-character names.
84100
85101 \term {Format-Specific Output}
86- Most output formats have a directory provided which contains a
102+ Most output formats have a directory which contains a
87103 \file {Makefile} which controls the generation of that format
88104 and provides storage for the formatted documents. The only
89- variation within this category is the Portable Document Format
90- (PDF) and PostScript versions are placed in the directories
91- \file {paper-a4/} and \file {paper-letter/}.
105+ variations within this category are the Portable Document
106+ Format (PDF) and PostScript versions are placed in the
107+ directories \file {paper-a4/} and \file {paper-letter/}.
92108
93109 \term {Supplemental Files}
94110 Some additional directories are used to store supplemental
@@ -99,6 +115,13 @@ \section{Directory Structure}
99115 the formatting processes.
100116 \end {definitions }
101117
118+
119+ \section {\LaTeX {} Syntax Primer \label {latex-primer } }
120+
121+ [This section will discuss what the markup looks like, and explain
122+ the difference between an environment and a macro.]
123+
124+
102125\section {Document Classes }
103126
104127 Two \LaTeX {} document classes are defined specifically for use with
@@ -129,6 +152,10 @@ \section{Document Classes}
129152
130153\section {Python-specific Markup }
131154
155+ The Python document classes define a lot of new environments and
156+ macros. This section contains the reference material for these
157+ facilities.
158+
132159 \subsection {Information Units \label {info-units } }
133160
134161 Most of the environments should be described here: \env {excdesc},
@@ -185,19 +212,19 @@ \section{\module{spam} ---
185212 Access to the SPAM facility}
186213
187214\declaremodule{extension}{spam}
188- \platform{SomeOS }
189- \modulesynopsis{Access to the SPAM facility of SomeOS .}
190- \moduleauthor{John Doe}{john .doe@frobnication .org}
215+ \platform{Unix }
216+ \modulesynopsis{Access to the SPAM facility of Unix .}
217+ \moduleauthor{Jane Doe}{jane .doe@frobnitz .org}
191218\end {verbatim }
192219
193220 \begin {macrodesc }{declaremodule}{{[}\var {key}{]}\{ \var {type}\}\{ \var {name}\} }
194221 Requires two parameters: module type (standard, builtin,
195222 extension), and the module name. An optional parameter should be
196223 given as the basis for the module's `` key'' used for linking to or
197224 referencing the section. The `` key'' should only be given if the
198- module's name contains underscores, and should be the name with the
199- underscore's stripped. This should be the first thing after the
200- \macro {section} used to introduce the module.
225+ module's name contains any underscores, and should be the name
226+ with the underscores stripped. This should be the first thing
227+ after the \macro {section} used to introduce the module.
201228 \end {macrodesc }
202229
203230 \begin {macrodesc }{platform}{\{ \var {specifier}\} }
@@ -234,7 +261,7 @@ \section{\module{spam} ---
234261 the same purpose.
235262
236263 \begin {macrodesc }{localmoduletable}{}
237- No parameters. If a \file {.syn} file exists for the current
264+ If a \file {.syn} file exists for the current
238265 chapter (or for the entire document in \code {howto} documents), a
239266 \env {synopsistable} is created with the contents loaded from the
240267 \file {.syn} file.
@@ -251,16 +278,17 @@ \section{\module{spam} ---
251278 be used for an advantage when the documents are processed using
252279 the tools for Python documentation processing. In particular, the
253280 generated HTML looks good! There is also an advantage for the
254- eventual conversion of the documentation to SGML; see Section
255- \ref {futures }, `` Future Directions. ''
281+ eventual conversion of the documentation to SGML ( see Section
282+ \ref {futures }, `` Future Directions'' ).
256283
257284 Each environment is named \env {table\var {cols}}, where \var {cols}
258285 is the number of columns in the table specified in lower-case
259286 Roman numerals. Within each of these environments, an additional
260287 macro, \macro {line\var {cols}}, is defined, where \var {cols}
261288 matches the \var {cols} value of the corresponding table
262- environment. These environments are all built on top of the
263- \env {tabular} environment.
289+ environment. These are supported for \var {cols} values of
290+ \code {ii}, \code {iii}, and \code {iv}. These environments are all
291+ built on top of the \env {tabular} environment.
264292
265293 \begin {envdesc }{tableii}{\{ \var {colspec}\}\{ \var {col1font}\}\{ \var {heading1}\}\{ \var {heading2}\} }
266294 Create a two-column table using the \LaTeX {} column specifier
@@ -346,11 +374,11 @@ \section{\module{spam} ---
346374 the creation of indexes. Much of the difficulty arises in the
347375 area of terminology: including the terms an expert would use for a
348376 concept is not sufficient. Coming up with the terms that a novice
349- would look up is fairly difficult for an author who, hopefully , is
377+ would look up is fairly difficult for an author who, typically , is
350378 an expert in the area she is writing on.
351379
352- The truly difficult aspects of index generation are not something
353- which the documentation tools can help with, unfortunately . Ease
380+ The truly difficult aspects of index generation are not areas with
381+ which the documentation tools can help. However, ease
354382 of producing the index once content decisions are make is within
355383 the scope of the tools. Markup is provided which the processing
356384 software is able to use to generate a variety of kinds of index
@@ -377,18 +405,27 @@ \section{\module{spam} ---
377405 programming languages or even Python.
378406
379407 \begin {macrodesc }{bifuncindex}{\{ \var {name}\} }
408+ Add a index entry referring to a built-in function named
409+ \var {name}; parenthesis should not be included after
410+ \var {name}.
380411 \end {macrodesc }
381412
382413 \begin {macrodesc }{exindex}{\{ \var {exception}\} }
414+ Add a reference to an exception named \var {exception}. The
415+ exception may be either string- or class-based.
383416 \end {macrodesc }
384417
385418 \begin {macrodesc }{kwindex}{\{ \var {keyword}\} }
419+ Add a reference to a language keyword (not a keyword parameter
420+ in a function or method call).
386421 \end {macrodesc }
387422
388423 \begin {macrodesc }{obindex}{\{ \var {object type}\} }
424+ Add an index entry for a built-in object type.
389425 \end {macrodesc }
390426
391427 \begin {macrodesc }{opindex}{\{ \var {operator}\} }
428+ Add a reference to an operator, such as \samp {+}.
392429 \end {macrodesc }
393430
394431 \begin {macrodesc }{refmodindex}{{[}\var {key}{]}\{ \var {module}\} }
@@ -419,6 +456,9 @@ \section{\module{spam} ---
419456 \end {macrodesc }
420457
421458 \begin {macrodesc }{stindex}{\{ \var {statement}\} }
459+ Add an index entry for a statement type, such as \keyword {print}
460+ or \keyword {try}/\keyword {finally}. [XXX Need better examples
461+ of difference from \macro {kwindex}.
422462 \end {macrodesc }
423463
424464
@@ -486,15 +526,15 @@ \section{Processing Tools}
486526 \item [\program {dvips}]
487527 This program is a typical part of \TeX {} installations. It is
488528 used to generate PostScript from the `` device independent''
489- \file {.dvi} files. It is only needed for the conversion to
529+ \file {.dvi} files. It is needed for the conversion to
490530 PostScript.
491531
492532 \item [\program {emacs}]
493533 Emacs is the kitchen sink of programmers' editors, and a damn
494534 fine kitchen sink it is. It also comes with some of the
495535 processing needed to support the proper menu structures for
496536 Texinfo documents when an info conversion is desired. This is
497- only needed for the info conversion. Using \program {xemacs}
537+ needed for the info conversion. Using \program {xemacs}
498538 instead of FSF \program {emacs} may lead to instability in the
499539 conversion, but that's because nobody seems to maintain the
500540 Emacs Texinfo code in a portable manner.
@@ -543,7 +583,7 @@ \section{Processing Tools}
543583 \item [\program {perl}]
544584 Perl is required for \LaTeX 2HTML{} and one of the scripts used
545585 to post-process \LaTeX 2HTML output, as well as the
546- HTML-to-Texinfo conversion. This is only required for
586+ HTML-to-Texinfo conversion. This is required for
547587 the HTML and GNU info conversions.
548588
549589 \item [\program {python}]
@@ -558,7 +598,7 @@ \section{Processing Tools}
558598
559599 This section describes the various scripts that are used to
560600 implement various stages of document processing or to orchestrate
561- entire build sequences. Most of these tools are still only useful
601+ entire build sequences. Most of these tools are only useful
562602 in the context of building the standard documentation, but some
563603 are more general.
564604
@@ -602,7 +642,7 @@ \section{Future Directions \label{futures}}
602642 questions: Can we do this more easily? and, Can we do this
603643 better? After a great deal of discussion with the community, we
604644 have determined that actively pursuing modern structured
605- documentation systems worth some investment of time.
645+ documentation systems is worth some investment of time.
606646
607647 There appear to be two real contenders in this arena: the Standard
608648 General Markup Language (SGML), and the Extensible Markup Language
@@ -639,6 +679,6 @@ \section{Future Directions \label{futures}}
639679
640680 Comments and bug reports on the standard documents should be sent
641681 to
\email {
[email protected] }. This may include comments
642- about formatting, content, or grammatical errors.
682+ about formatting, content, grammatical errors, or this document .
643683
644684\end {document }
0 commit comments