blob: 30cd5ce858622316970fdff506b84bebececafbc [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 +00007If you don't have LaTeX, or if you'd rather not format the
8documentation yourself, you can ftp a tar file containing HTML, PDF,
9or PostScript versions of all documents. Additional formats may be
10available. These should be in the same place where you fetched the
Fred Drake71472a51998-03-04 15:21:02 +000011main Python distribution (try <http://www.python.org> or
12<ftp://ftp.python.org>).
Guido van Rossumf1245a81995-03-20 13:00:53 +000013
Fred Drake34eefe51998-03-03 21:41:22 +000014The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000015
Fred Drake099b76c1998-05-11 16:31:32 +000016 api/*.tex Python/C API Reference Manual
17 ext/*.tex Extending and Embedding the Python Interpreter
18 lib/*.tex Python Library Reference
19 ref/*.tex Python Reference Manual
20 tut/*.tex Python Tutorial
Guido van Rossum7f777ed1990-08-09 14:25:15 +000021
Fred Drake34eefe51998-03-03 21:41:22 +000022All use the "manual" document class and "python" package, derived from
23the old "myformat.sty" style file. These contains many macro
24definitions useful in documenting Python, and set some style parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000025
Fred Drake34eefe51998-03-03 21:41:22 +000026There's a Makefile to call LaTeX and the other utilities in the right
Guido van Rossumf1245a81995-03-20 13:00:53 +000027order and the right number of times. This will produce DVI files for
28each document made; to preview them, use xdvi. PostScript is produced
29by the same Makefile target that produces the DVI files. This uses
Fred Drake71472a51998-03-04 15:21:02 +000030the dvips tool. Printing depends on local conventions; at our site,
31we use lpr. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000032
Fred Drake099b76c1998-05-11 16:31:32 +000033 make lib # create lib.dvi and lib.ps
34 xdvi lib # preview lib.dvi
35 lpr lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000036
Guido van Rossumf1245a81995-03-20 13:00:53 +000037
Fred Drake71472a51998-03-04 15:21:02 +000038What if I find a bug?
39---------------------
40
41First, check that the bug is present in the online version of the
42documentation at <http://www.python.org/docs/>; we may have already
43fixed it.
44
45If we haven't, tell us about it. We'd like the documentation to be
46complete and accurate, but have limited time. If you discover any
47inconsistencies between the documentation and implementation, or just
48have suggestions as to how to improve the documentation, let is know!
49Send comments and patches to the Python Documentation Team:
50
51 python-docs@python.org
52
53Thanks!
54
55
Fred Drake4190fae1998-05-11 19:05:36 +000056What happened to the Macintosh chapter of the Python Library Reference?
57-----------------------------------------------------------------------
58
59The directory mac/ contains the LaTeX sources for the "Macintosh
60Library Modules" manual; this is not currently included in the build
61system. To build, do the following:
62
63 cd Doc/mac
64 ../tools/mkhowto.sh --ps --pdf --html mac
65
66(Any combination of --ps, --pdf, and --html may be used depending on
67your needs; the default is --pdf.)
68
69
Fred Drake34eefe51998-03-03 21:41:22 +000070What tools do I need?
71---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000072
Fred Drake34eefe51998-03-03 21:41:22 +000073You need to install Python; some of the scripts used to produce the
74documentation are written in Python.
Guido van Rossuma417b661997-12-08 20:51:26 +000075
Fred Drake34eefe51998-03-03 21:41:22 +000076The simplest way to get the rest of the tools in the configuration we
Fred Drake099b76c1998-05-11 16:31:32 +000077used is to install the teTeX TeX distribution, version 0.4 or 0.9. More
Fred Drake71472a51998-03-04 15:21:02 +000078information is available on teTeX at <http://www.tug.org/tetex/>.
Fred Drake6355bd41998-03-27 05:17:21 +000079This is a UNIX-only TeX distribution at this time. Note that the 0.9
80release is still in testing; this documentation release was tested
Fred Drake099b76c1998-05-11 16:31:32 +000081with the 21 Apr 1998 release. We'll be upgrading to the final version
82when it becomes available. Except for the PDF generation, it also works
83with the (stable) teTeX 0.4 release.
Fred Drake34eefe51998-03-03 21:41:22 +000084
Fred Drake099b76c1998-05-11 16:31:32 +000085If you don't want to get teTeX, here is what you'll need:
Fred Drake34eefe51998-03-03 21:41:22 +000086
87To create DVI, PDF, or PostScript files:
88
89 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
90 choke.
91
92 - makeindex. This is used to produce the indexes for the
93 library reference and Python/C API reference.
94
95To create PDF files:
96
97 - pdflatex. We used the one in the teTeX 0.9 distribution
Fred Drake099b76c1998-05-11 16:31:32 +000098 (version 0.12h at the time of this writing). Versions even
99 a couple of patchlevels earlier are highly likely to fail
100 due to syntax changes for some of the pdftex primitives.
Fred Drake34eefe51998-03-03 21:41:22 +0000101
102To create PostScript files:
103
104 - dvips. Most TeX installations include this. If you don't
Fred Drake71472a51998-03-04 15:21:02 +0000105 have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>).
Fred Drake34eefe51998-03-03 21:41:22 +0000106
107To create info files:
108
Fred Drake45084ed1998-04-09 15:19:41 +0000109 (Note that info is not currently supported. If you need it,
110 please fix or replace tools/partparse.py and send the new
111 version to python-docs@python.org. We'll be glad to provide
112 free copies of the info files to anyone who can support the
113 process. ;-)
114
Fred Drake34eefe51998-03-03 21:41:22 +0000115 - makeinfo. This is available from any GNU mirror.
116
Fred Drake45084ed1998-04-09 15:19:41 +0000117 - emacs or xemacs. Emacs is available from the same place as
118 makeinfo, and xemacs is available from ftp.xemacs.org.
119
Fred Drake34eefe51998-03-03 21:41:22 +0000120To create HTML files:
121
Fred Drake71472a51998-03-04 15:21:02 +0000122 - Perl 5.004_04 or newer. Find the software at
123 <http://language.perl.com/info/software.html>.
Fred Drake34eefe51998-03-03 21:41:22 +0000124
Fred Drake8f7abed1998-07-29 04:45:53 +0000125 - LaTeX2HTML 98.2b2 or newer. Older version will fail with
Fred Drakee0a0fcd1998-05-15 17:03:00 +0000126 the new directory layout. Releases are available at
127 <http://dc-server.cdc.informatik.tu-darmstadt.de/~latex2html/>.
Fred Drake34eefe51998-03-03 21:41:22 +0000128
129
130What if Times fonts are not available?
131--------------------------------------
132
133As distributed, the LaTeX documents use PostScript Times fonts. This
134is done since they are much better looking and produce smaller
135PostScript files. If, however, your TeX installation does not support
Fred Drake4912beb1998-03-11 17:07:35 +0000136them, they may be easily disabled. Edit the file
137texiinputs/manual.cls and comment out the line that starts
138"\RequirePackage{times}" using a "%" character at the beginning of the
139line. An alternative is to install the right fonts and LaTeX style
140file.
141
142
143What if I want to use A4 paper?
144-------------------------------
145
Fred Drake099b76c1998-05-11 16:31:32 +0000146Instead of building the PostScript by giving the command "make", give
147the command "make PAPER=a4"; the output will be produced in the
148paper-a4/ subdirectory.
Guido van Rossuma417b661997-12-08 20:51:26 +0000149
150
Guido van Rossumf1245a81995-03-20 13:00:53 +0000151Making HTML files
152-----------------
153
Fred Drake34eefe51998-03-03 21:41:22 +0000154The LaTeX documents can be converted to HTML using Nikos Drakos'
155LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Guido van Rossuma417b661997-12-08 20:51:26 +0000156l2h" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000157
Fred Drake4912beb1998-03-11 17:07:35 +0000158
Fred Drake6355bd41998-03-27 05:17:21 +0000159What else is in here?
160---------------------
161
162There is a new LaTeX document class called "howto". This is used for
163the new series of Python HOWTO documents which is being coordinated by
164Andrew Kuchling <amk@acm.org>. The file howto.tex is a commented
Fred Drake099b76c1998-05-11 16:31:32 +0000165example which may be used a template. A script to "do the right
Fred Drake6355bd41998-03-27 05:17:21 +0000166thing" to format a howto document is included as tools/mkhowto.sh.
167Support for this document class is still new, but is expected to
Fred Drake16a19c41998-04-03 05:41:38 +0000168evolve rapidly. Use "mkhowto.sh --help" for information on using the
169formatting tool.
Fred Drake6355bd41998-03-27 05:17:21 +0000170
171
Fred Drake4912beb1998-03-11 17:07:35 +0000172Copyright notice
173================
174
175The Python source is copyrighted, but you can freely use and copy it
176as long as you don't change or remove the copyright notice:
177
178----------------------------------------------------------------------
179Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
180The Netherlands.
181
182 All Rights Reserved
183
184Permission to use, copy, modify, and distribute this software and its
185documentation for any purpose and without fee is hereby granted,
186provided that the above copyright notice appear in all copies and that
187both that copyright notice and this permission notice appear in
188supporting documentation, and that the names of Stichting Mathematisch
189Centrum or CWI or Corporation for National Research Initiatives or
190CNRI not be used in advertising or publicity pertaining to
191distribution of the software without specific, written prior
192permission.
193
194While CWI is the initial source for this software, a modified version
195is made available by the Corporation for National Research Initiatives
196(CNRI) at the Internet address ftp://ftp.python.org.
197
198STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
199REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
200MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
201CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
202DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
203PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
204TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
205PERFORMANCE OF THIS SOFTWARE.
206----------------------------------------------------------------------