blob: 313aa12216b7ee22bb1ec361f4a496bad72519ab [file] [log] [blame]
Fred Drake34eefe51998-03-03 21:41:22 +00001Python main documentation -- in LaTeX
Guido van Rossumcd7bf391992-04-05 15:06:03 +00002-------------------------------------
3
Fred Drake697c1c71998-08-12 17:13:28 +00004This directory contains the LaTeX sources to the Python documentation
5and tools required to support the formatting process. The documents
6now require LaTeX2e; LaTeX 2.09 compatibility has been dropped.
Guido van Rossum7f777ed1990-08-09 14:25:15 +00007
Fred Drake34eefe51998-03-03 21:41:22 +00008If you don't have LaTeX, or if you'd rather not format the
9documentation yourself, you can ftp a tar file containing HTML, PDF,
10or PostScript versions of all documents. Additional formats may be
11available. These should be in the same place where you fetched the
Fred Drake71472a51998-03-04 15:21:02 +000012main Python distribution (try <http://www.python.org> or
13<ftp://ftp.python.org>).
Guido van Rossumf1245a81995-03-20 13:00:53 +000014
Fred Drake34eefe51998-03-03 21:41:22 +000015The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000016
Fred Drake099b76c1998-05-11 16:31:32 +000017 api/*.tex Python/C API Reference Manual
18 ext/*.tex Extending and Embedding the Python Interpreter
19 lib/*.tex Python Library Reference
Fred Drake697c1c71998-08-12 17:13:28 +000020 mac/*.tex Macintosh Library Modules
Fred Drake099b76c1998-05-11 16:31:32 +000021 ref/*.tex Python Reference Manual
22 tut/*.tex Python Tutorial
Guido van Rossum7f777ed1990-08-09 14:25:15 +000023
Fred Drake697c1c71998-08-12 17:13:28 +000024Most use the "manual" document class and "python" package, derived from
25the old "myformat.sty" style file. The Macintosh Library Modules
26document uses the "howto" document class instead. These contains many
27macro definitions useful in documenting Python, and set some style
28parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000029
Fred Drake34eefe51998-03-03 21:41:22 +000030There's a Makefile to call LaTeX and the other utilities in the right
Guido van Rossumf1245a81995-03-20 13:00:53 +000031order and the right number of times. This will produce DVI files for
32each document made; to preview them, use xdvi. PostScript is produced
33by the same Makefile target that produces the DVI files. This uses
Fred Drake71472a51998-03-04 15:21:02 +000034the dvips tool. Printing depends on local conventions; at our site,
35we use lpr. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000036
Fred Drake099b76c1998-05-11 16:31:32 +000037 make lib # create lib.dvi and lib.ps
38 xdvi lib # preview lib.dvi
39 lpr lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000040
Guido van Rossumf1245a81995-03-20 13:00:53 +000041
Fred Drake71472a51998-03-04 15:21:02 +000042What if I find a bug?
43---------------------
44
45First, check that the bug is present in the online version of the
46documentation at <http://www.python.org/docs/>; we may have already
47fixed it.
48
49If we haven't, tell us about it. We'd like the documentation to be
50complete and accurate, but have limited time. If you discover any
51inconsistencies between the documentation and implementation, or just
52have suggestions as to how to improve the documentation, let is know!
53Send comments and patches to the Python Documentation Team:
54
55 python-docs@python.org
56
57Thanks!
58
59
Fred Drake4190fae1998-05-11 19:05:36 +000060What happened to the Macintosh chapter of the Python Library Reference?
61-----------------------------------------------------------------------
62
63The directory mac/ contains the LaTeX sources for the "Macintosh
Fred Drakebd400941998-08-11 17:41:20 +000064Library Modules" manual; this is built using the standard build
65targets, so check the proper output directory for your chosen format
66and paper size.
Fred Drake4190fae1998-05-11 19:05:36 +000067
68
Fred Drake34eefe51998-03-03 21:41:22 +000069What tools do I need?
70---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000071
Fred Drake34eefe51998-03-03 21:41:22 +000072You need to install Python; some of the scripts used to produce the
Fred Drakebd400941998-08-11 17:41:20 +000073documentation are written in Python. You don't need this
74documentation to install Python; instructions are included in the
75README file in the Python distribution.
Guido van Rossuma417b661997-12-08 20:51:26 +000076
Fred Drake34eefe51998-03-03 21:41:22 +000077The simplest way to get the rest of the tools in the configuration we
Fred Drake099b76c1998-05-11 16:31:32 +000078used is to install the teTeX TeX distribution, version 0.4 or 0.9. More
Fred Drake71472a51998-03-04 15:21:02 +000079information is available on teTeX at <http://www.tug.org/tetex/>.
Fred Drake41dee841999-03-03 21:39:19 +000080This is a Unix-only TeX distribution at this time. Note that the 0.9
Fred Drake6355bd41998-03-27 05:17:21 +000081release is still in testing; this documentation release was tested
Fred Drake41dee841999-03-03 21:39:19 +000082with the 9 Feb 1999 release. We'll be upgrading to the final version
83when it becomes available. Except for the PDF generation, there are
84no known problems with using the ("stable") teTeX 0.4 release.
Fred Drake34eefe51998-03-03 21:41:22 +000085
Fred Drake099b76c1998-05-11 16:31:32 +000086If you don't want to get teTeX, here is what you'll need:
Fred Drake34eefe51998-03-03 21:41:22 +000087
88To create DVI, PDF, or PostScript files:
89
90 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
91 choke.
92
93 - makeindex. This is used to produce the indexes for the
94 library reference and Python/C API reference.
95
96To create PDF files:
97
98 - pdflatex. We used the one in the teTeX 0.9 distribution
Fred Draked8ee0e61999-03-03 21:44:10 +000099 (pdfTeX version 3.14159-13b (Web2C 7.3beta4) at the time of
100 this writing). Versions even a couple of patchlevels
101 earlier are highly likely to fail due to syntax changes for
102 some of the pdftex primitives.
Fred Drake34eefe51998-03-03 21:41:22 +0000103
104To create PostScript files:
105
106 - dvips. Most TeX installations include this. If you don't
Fred Drake71472a51998-03-04 15:21:02 +0000107 have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>).
Fred Drake34eefe51998-03-03 21:41:22 +0000108
109To create info files:
110
Fred Drakeda71e311999-01-13 23:02:38 +0000111 Note that info support is currently being revised using new
112 conversion tools by Michael Ernst <mernst@cs.washington.edu>.
Fred Drake45084ed1998-04-09 15:19:41 +0000113
Fred Drake34eefe51998-03-03 21:41:22 +0000114 - makeinfo. This is available from any GNU mirror.
115
Fred Drake45084ed1998-04-09 15:19:41 +0000116 - emacs or xemacs. Emacs is available from the same place as
117 makeinfo, and xemacs is available from ftp.xemacs.org.
118
Fred Drakeda71e311999-01-13 23:02:38 +0000119 - Perl. Find the software at
120 <http://language.perl.com/info/software.html>.
121
Fred Drake34eefe51998-03-03 21:41:22 +0000122To create HTML files:
123
Fred Drake71472a51998-03-04 15:21:02 +0000124 - Perl 5.004_04 or newer. Find the software at
125 <http://language.perl.com/info/software.html>.
Fred Drake34eefe51998-03-03 21:41:22 +0000126
Fred Drake8d7e11a1999-01-04 18:25:38 +0000127 - LaTeX2HTML 98.2b6. Older version will fail with the new
128 directory layout. Version 98.2b8 specifically does not
129 work; it translates `` and '' to &ldquo; and &rdquo;, which
Fred Drake41dee841999-03-03 21:39:19 +0000130 are not supported by popular Web browsers. This also screws
131 up code fragments. ;-( Releases are available at:
Fred Drake3494e4a1998-09-10 17:55:32 +0000132 <http://cdc-server.cdc.informatik.tu-darmstadt.de/~latex2html/>.
Fred Drake34eefe51998-03-03 21:41:22 +0000133
134
135What if Times fonts are not available?
136--------------------------------------
137
138As distributed, the LaTeX documents use PostScript Times fonts. This
139is done since they are much better looking and produce smaller
140PostScript files. If, however, your TeX installation does not support
Fred Drake4912beb1998-03-11 17:07:35 +0000141them, they may be easily disabled. Edit the file
142texiinputs/manual.cls and comment out the line that starts
Fred Drake41dee841999-03-03 21:39:19 +0000143"\RequirePackage{times}" by inserting a "%" character at the beginning
144of the line. An alternative is to install the right fonts and LaTeX
145style file.
Fred Drake4912beb1998-03-11 17:07:35 +0000146
147
148What if I want to use A4 paper?
149-------------------------------
150
Fred Drake099b76c1998-05-11 16:31:32 +0000151Instead of building the PostScript by giving the command "make", give
152the command "make PAPER=a4"; the output will be produced in the
153paper-a4/ subdirectory.
Guido van Rossuma417b661997-12-08 20:51:26 +0000154
155
Guido van Rossumf1245a81995-03-20 13:00:53 +0000156Making HTML files
157-----------------
158
Fred Drake34eefe51998-03-03 21:41:22 +0000159The LaTeX documents can be converted to HTML using Nikos Drakos'
160LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Fred Drake697c1c71998-08-12 17:13:28 +0000161html" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000162
Fred Drake4912beb1998-03-11 17:07:35 +0000163
Fred Drake6355bd41998-03-27 05:17:21 +0000164What else is in here?
165---------------------
166
167There is a new LaTeX document class called "howto". This is used for
Fred Drakebd400941998-08-11 17:41:20 +0000168the new series of Python HOWTO documents which is being coordinated by
169Andrew Kuchling <amk@acm.org>. The file templates/howto.tex is a
170commented example which may be used a template. A script to "do the
171right thing" to format a howto document is included as
Fred Drake41dee841999-03-03 21:39:19 +0000172tools/mkhowto. These documents can be formatted as HTML, PDF,
Fred Drake00c468b1998-08-12 17:53:46 +0000173PostScript, or ASCII files. Support for this document class is
Fred Drake41dee841999-03-03 21:39:19 +0000174still new, but is expected to evolve rapidly. Use "mkhowto --help"
Fred Drake00c468b1998-08-12 17:53:46 +0000175for information on using the formatting tool.
Fred Drakebd400941998-08-11 17:41:20 +0000176
177For authors of module documentation, there is a file
178templates/module.tex which may be used as a template for a module
179section. This may be used in conjunction with either the howto or
180manual document class. Create the documentation for a new module by
181copying the template to lib<mymodule>.tex and editing according to the
182instructions in the comments.
Fred Drake6355bd41998-03-27 05:17:21 +0000183
184
Fred Drake4912beb1998-03-11 17:07:35 +0000185Copyright notice
186================
187
188The Python source is copyrighted, but you can freely use and copy it
189as long as you don't change or remove the copyright notice:
190
191----------------------------------------------------------------------
192Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
193The Netherlands.
194
195 All Rights Reserved
196
197Permission to use, copy, modify, and distribute this software and its
198documentation for any purpose and without fee is hereby granted,
199provided that the above copyright notice appear in all copies and that
200both that copyright notice and this permission notice appear in
201supporting documentation, and that the names of Stichting Mathematisch
202Centrum or CWI or Corporation for National Research Initiatives or
203CNRI not be used in advertising or publicity pertaining to
204distribution of the software without specific, written prior
205permission.
206
207While CWI is the initial source for this software, a modified version
208is made available by the Corporation for National Research Initiatives
209(CNRI) at the Internet address ftp://ftp.python.org.
210
211STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
212REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
213MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
214CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
215DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
216PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
217TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
218PERFORMANCE OF THIS SOFTWARE.
219----------------------------------------------------------------------