blob: a846a46c67c1e4aa19eacf96ed06d6585315b671 [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 Drake34eefe51998-03-03 21:41:22 +00004This directory contains the LaTeX sources to the Python documentation.
5They now require LaTeX2e (LaTeX 2.09 compatibility is dropped).
Guido van Rossum7f777ed1990-08-09 14:25:15 +00006
Fred Drake34eefe51998-03-03 21:41:22 +00007The Python Reference Manual is no longer maintained in LaTeX. It is
Guido van Rossum71ec03b1996-10-23 16:23:47 +00008now a FrameMaker document. The FrameMaker 5.0 files (ref.book,
9ref*.doc) as well as PostScript generated (ref.ps) from it are in the
Fred Drake71472a51998-03-04 15:21:02 +000010subdirectory ref/. (See <ftp://ftp.adobe.com/pub/adobe/framereader>
11for a free reader for FrameMaker documents, for some platforms.) Many
Guido van Rossuma417b661997-12-08 20:51:26 +000012thanks to Robin Friedrich for the conversion of the Reference Manual
13to FrameMaker and his work on its index.
Guido van Rossum71ec03b1996-10-23 16:23:47 +000014
Fred Drake34eefe51998-03-03 21:41:22 +000015If you don't have LaTeX, or if you'd rather not format the
16documentation yourself, you can ftp a tar file containing HTML, PDF,
17or PostScript versions of all documents. Additional formats may be
18available. These should be in the same place where you fetched the
Fred Drake71472a51998-03-04 15:21:02 +000019main Python distribution (try <http://www.python.org> or
20<ftp://ftp.python.org>).
Guido van Rossumf1245a81995-03-20 13:00:53 +000021
Fred Drake34eefe51998-03-03 21:41:22 +000022The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000023
Guido van Rossum676d6da1992-02-11 15:51:36 +000024 tut.tex The tutorial
Guido van Rossum6938f061994-08-01 12:22:53 +000025 lib.tex, lib*.tex The library reference
Guido van Rossum6938f061994-08-01 12:22:53 +000026 ext.tex How to extend Python
Guido van Rossuma417b661997-12-08 20:51:26 +000027 api.tex Reference for the Python/C API
Guido van Rossum7f777ed1990-08-09 14:25:15 +000028
Fred Drake34eefe51998-03-03 21:41:22 +000029All use the "manual" document class and "python" package, derived from
30the old "myformat.sty" style file. These contains many macro
31definitions useful in documenting Python, and set some style parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000032
Fred Drake34eefe51998-03-03 21:41:22 +000033There's a Makefile to call LaTeX and the other utilities in the right
Guido van Rossumf1245a81995-03-20 13:00:53 +000034order and the right number of times. This will produce DVI files for
35each document made; to preview them, use xdvi. PostScript is produced
36by the same Makefile target that produces the DVI files. This uses
Fred Drake71472a51998-03-04 15:21:02 +000037the dvips tool. Printing depends on local conventions; at our site,
38we use lpr. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000039
Guido van Rossum71ec03b1996-10-23 16:23:47 +000040 make lib # create lib.dvi and lib.ps
41 xdvi lib # preview lib.dvi
Fred Drake34eefe51998-03-03 21:41:22 +000042 lpr lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000043
Guido van Rossumf1245a81995-03-20 13:00:53 +000044
Fred Drake71472a51998-03-04 15:21:02 +000045What if I find a bug?
46---------------------
47
48First, check that the bug is present in the online version of the
49documentation at <http://www.python.org/docs/>; we may have already
50fixed it.
51
52If we haven't, tell us about it. We'd like the documentation to be
53complete and accurate, but have limited time. If you discover any
54inconsistencies between the documentation and implementation, or just
55have suggestions as to how to improve the documentation, let is know!
56Send comments and patches to the Python Documentation Team:
57
58 python-docs@python.org
59
60Thanks!
61
62
Fred Drake34eefe51998-03-03 21:41:22 +000063What tools do I need?
64---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000065
Fred Drake34eefe51998-03-03 21:41:22 +000066You need to install Python; some of the scripts used to produce the
67documentation are written in Python.
Guido van Rossuma417b661997-12-08 20:51:26 +000068
Fred Drake34eefe51998-03-03 21:41:22 +000069The simplest way to get the rest of the tools in the configuration we
70used is to install the teTeX TeX distribution, version 0.9. More
Fred Drake71472a51998-03-04 15:21:02 +000071information is available on teTeX at <http://www.tug.org/tetex/>.
72This is a UNIX-only TeX distribution at this time.
Fred Drake34eefe51998-03-03 21:41:22 +000073
74If you don't want to get teTeX, or if you're not using UNIX, here is
75what you'll need:
76
77To create DVI, PDF, or PostScript files:
78
79 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
80 choke.
81
82 - makeindex. This is used to produce the indexes for the
83 library reference and Python/C API reference.
84
85To create PDF files:
86
87 - pdflatex. We used the one in the teTeX 0.9 distribution
88 (version 0.11 at the time of this writing).
89
90To create PostScript files:
91
92 - dvips. Most TeX installations include this. If you don't
Fred Drake71472a51998-03-04 15:21:02 +000093 have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>).
Fred Drake34eefe51998-03-03 21:41:22 +000094
95To create info files:
96
97 - makeinfo. This is available from any GNU mirror.
98
99To create HTML files:
100
Fred Drake71472a51998-03-04 15:21:02 +0000101 - Perl 5.004_04 or newer. Find the software at
102 <http://language.perl.com/info/software.html>.
Fred Drake34eefe51998-03-03 21:41:22 +0000103
104 - LaTeX2HTML 98.1p1, or newer. Releases are available at
Fred Drake71472a51998-03-04 15:21:02 +0000105 <http://www-dsed.llnl.gov/files/programs/unix/latex2html/>.
Fred Drake34eefe51998-03-03 21:41:22 +0000106
107
108What if Times fonts are not available?
109--------------------------------------
110
111As distributed, the LaTeX documents use PostScript Times fonts. This
112is done since they are much better looking and produce smaller
113PostScript files. If, however, your TeX installation does not support
Fred Drake4912beb1998-03-11 17:07:35 +0000114them, they may be easily disabled. Edit the file
115texiinputs/manual.cls and comment out the line that starts
116"\RequirePackage{times}" using a "%" character at the beginning of the
117line. An alternative is to install the right fonts and LaTeX style
118file.
119
120
121What if I want to use A4 paper?
122-------------------------------
123
124Edit the file texinputs/manual.cls. Change the line that reads:
125
126 \LoadClass[twoside,openright]{report}
127
128to say:
129
130 \LoadClass[a4paper,twoside,openright]{report}
131
132Now do a "make clean all" to generate PostScript files.
Guido van Rossuma417b661997-12-08 20:51:26 +0000133
134
Guido van Rossumf1245a81995-03-20 13:00:53 +0000135Making HTML files
136-----------------
137
Fred Drake34eefe51998-03-03 21:41:22 +0000138The LaTeX documents can be converted to HTML using Nikos Drakos'
139LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Guido van Rossuma417b661997-12-08 20:51:26 +0000140l2h" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000141
Fred Drake71472a51998-03-04 15:21:02 +0000142For the reference manual, we use Harlequin's webmaker. We're not very
Guido van Rossuma417b661997-12-08 20:51:26 +0000143happy with it and hope that eventually FrameMaker will be able to
144produce HTML without third party help.
Fred Drake4912beb1998-03-11 17:07:35 +0000145
146
147Copyright notice
148================
149
150The Python source is copyrighted, but you can freely use and copy it
151as long as you don't change or remove the copyright notice:
152
153----------------------------------------------------------------------
154Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
155The Netherlands.
156
157 All Rights Reserved
158
159Permission to use, copy, modify, and distribute this software and its
160documentation for any purpose and without fee is hereby granted,
161provided that the above copyright notice appear in all copies and that
162both that copyright notice and this permission notice appear in
163supporting documentation, and that the names of Stichting Mathematisch
164Centrum or CWI or Corporation for National Research Initiatives or
165CNRI not be used in advertising or publicity pertaining to
166distribution of the software without specific, written prior
167permission.
168
169While CWI is the initial source for this software, a modified version
170is made available by the Corporation for National Research Initiatives
171(CNRI) at the Internet address ftp://ftp.python.org.
172
173STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
174REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
175MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
176CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
177DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
178PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
179TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
180PERFORMANCE OF THIS SOFTWARE.
181----------------------------------------------------------------------