blob: 74d32085b8e861c55baeb7406a2164452bda6fc9 [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
Greg Ward0862f802000-04-28 16:53:36 +000023 inst/*.tex Installing Python Modules
24 dist/*.tex Distributing Python Modules
Guido van Rossum7f777ed1990-08-09 14:25:15 +000025
Fred Drake697c1c71998-08-12 17:13:28 +000026Most use the "manual" document class and "python" package, derived from
27the old "myformat.sty" style file. The Macintosh Library Modules
28document uses the "howto" document class instead. These contains many
29macro definitions useful in documenting Python, and set some style
30parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000031
Fred Drake34eefe51998-03-03 21:41:22 +000032There's a Makefile to call LaTeX and the other utilities in the right
Guido van Rossumf1245a81995-03-20 13:00:53 +000033order and the right number of times. This will produce DVI files for
34each document made; to preview them, use xdvi. PostScript is produced
35by the same Makefile target that produces the DVI files. This uses
Fred Drake71472a51998-03-04 15:21:02 +000036the dvips tool. Printing depends on local conventions; at our site,
37we use lpr. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000038
Fred Drake099b76c1998-05-11 16:31:32 +000039 make lib # create lib.dvi and lib.ps
40 xdvi lib # preview lib.dvi
41 lpr lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000042
Guido van Rossumf1245a81995-03-20 13:00:53 +000043
Fred Drake71472a51998-03-04 15:21:02 +000044What if I find a bug?
45---------------------
46
Fred Drakeda6daee2001-01-22 21:38:09 +000047First, check that the bug is present in the development version of the
48documentation at <http://python.sourceforge.net/devel-docs/>; we may
49have already fixed it.
Fred Drake71472a51998-03-04 15:21:02 +000050
51If we haven't, tell us about it. We'd like the documentation to be
52complete and accurate, but have limited time. If you discover any
53inconsistencies between the documentation and implementation, or just
54have suggestions as to how to improve the documentation, let is know!
Fred Drakeda6daee2001-01-22 21:38:09 +000055Specific bugs and patches should be reported using our bug & patch
56databases at:
Fred Drake71472a51998-03-04 15:21:02 +000057
Fred Drakeda6daee2001-01-22 21:38:09 +000058 http://sourceforge.net/projects/python
59
60Other suggestions or questions should be sent to the Python
61Documentation Team:
62
63 python-docs@python.org
Fred Drake71472a51998-03-04 15:21:02 +000064
65Thanks!
66
67
Fred Drake4190fae1998-05-11 19:05:36 +000068What happened to the Macintosh chapter of the Python Library Reference?
69-----------------------------------------------------------------------
70
71The directory mac/ contains the LaTeX sources for the "Macintosh
Fred Drakebd400941998-08-11 17:41:20 +000072Library Modules" manual; this is built using the standard build
73targets, so check the proper output directory for your chosen format
74and paper size.
Fred Drake4190fae1998-05-11 19:05:36 +000075
76
Fred Drake34eefe51998-03-03 21:41:22 +000077What tools do I need?
78---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000079
Fred Drake34eefe51998-03-03 21:41:22 +000080You need to install Python; some of the scripts used to produce the
Fred Drakebd400941998-08-11 17:41:20 +000081documentation are written in Python. You don't need this
82documentation to install Python; instructions are included in the
83README file in the Python distribution.
Guido van Rossuma417b661997-12-08 20:51:26 +000084
Fred Drake34eefe51998-03-03 21:41:22 +000085The simplest way to get the rest of the tools in the configuration we
Fred Drake7e861bd2000-08-31 15:29:38 +000086used is to install the teTeX TeX distribution, versions 0.9 or newer.
87More information is available on teTeX at <http://www.tug.org/tetex/>.
88This is a Unix-only TeX distribution at this time. This documentation
89release was tested with the 1.0.7 release, but there have been no
90substantial changes since late in the 0.9 series, which we used
91extensively for previous versions without any difficulty.
Fred Drake34eefe51998-03-03 21:41:22 +000092
Fred Drake099b76c1998-05-11 16:31:32 +000093If you don't want to get teTeX, here is what you'll need:
Fred Drake34eefe51998-03-03 21:41:22 +000094
95To create DVI, PDF, or PostScript files:
96
97 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
98 choke.
99
100 - makeindex. This is used to produce the indexes for the
101 library reference and Python/C API reference.
102
103To create PDF files:
104
Fred Drake7e861bd2000-08-31 15:29:38 +0000105 - pdflatex. We used the one in the teTeX distribution (pdfTeX
106 version 3.14159-13d (Web2C 7.3.1) at the time of this
107 writing). Versions even a couple of patchlevels earlier are
108 highly likely to fail due to syntax changes for some of the
109 pdftex primitives.
Fred Drake34eefe51998-03-03 21:41:22 +0000110
111To create PostScript files:
112
113 - dvips. Most TeX installations include this. If you don't
Fred Drake71472a51998-03-04 15:21:02 +0000114 have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>).
Fred Drake34eefe51998-03-03 21:41:22 +0000115
116To create info files:
117
Fred Drakeda71e311999-01-13 23:02:38 +0000118 Note that info support is currently being revised using new
119 conversion tools by Michael Ernst <mernst@cs.washington.edu>.
Fred Drake45084ed1998-04-09 15:19:41 +0000120
Fred Drake34eefe51998-03-03 21:41:22 +0000121 - makeinfo. This is available from any GNU mirror.
122
Fred Drake45084ed1998-04-09 15:19:41 +0000123 - emacs or xemacs. Emacs is available from the same place as
124 makeinfo, and xemacs is available from ftp.xemacs.org.
125
Fred Drakeda71e311999-01-13 23:02:38 +0000126 - Perl. Find the software at
127 <http://language.perl.com/info/software.html>.
128
Fred Drake95669882000-10-26 19:01:46 +0000129 - HTML::Element. If you don't have this installed, you can get
130 this from CPAN. Use the command:
131
132 perl -e 'use CPAN; CPAN::install("HTML::Element");'
133
134 You may need to be root to do this.
135
Fred Drake34eefe51998-03-03 21:41:22 +0000136To create HTML files:
137
Fred Drake71472a51998-03-04 15:21:02 +0000138 - Perl 5.004_04 or newer. Find the software at
139 <http://language.perl.com/info/software.html>.
Fred Drake34eefe51998-03-03 21:41:22 +0000140
Fred Drakee7aa5dc2000-07-31 17:56:58 +0000141 - LaTeX2HTML 99.2b8. Older versions are not supported; each
142 version changes enough that supporting multiple versions is not
143 likely to work. Many older versions don't work with Perl
144 5.6 as well. This also screws up code fragments. ;-(
Fred Drakecf069da2001-01-25 17:25:28 +0000145 Releases are available at: <http://www.latex2html.org/>.
Fred Drake34eefe51998-03-03 21:41:22 +0000146
147
148What if Times fonts are not available?
149--------------------------------------
150
151As distributed, the LaTeX documents use PostScript Times fonts. This
152is done since they are much better looking and produce smaller
153PostScript files. If, however, your TeX installation does not support
Fred Drake4912beb1998-03-11 17:07:35 +0000154them, they may be easily disabled. Edit the file
155texiinputs/manual.cls and comment out the line that starts
Fred Drake41dee841999-03-03 21:39:19 +0000156"\RequirePackage{times}" by inserting a "%" character at the beginning
157of the line. An alternative is to install the right fonts and LaTeX
158style file.
Fred Drake4912beb1998-03-11 17:07:35 +0000159
160
161What if I want to use A4 paper?
162-------------------------------
163
Fred Drake099b76c1998-05-11 16:31:32 +0000164Instead of building the PostScript by giving the command "make", give
Fred Drakeda6daee2001-01-22 21:38:09 +0000165the command "make PAPER=a4 ps"; the output will be produced in the
166paper-a4/ subdirectory. (You can use "make PAPER=a4 pdf" if you'd
167rather have PDF output.)
Guido van Rossuma417b661997-12-08 20:51:26 +0000168
169
Guido van Rossumf1245a81995-03-20 13:00:53 +0000170Making HTML files
171-----------------
172
Fred Drake34eefe51998-03-03 21:41:22 +0000173The LaTeX documents can be converted to HTML using Nikos Drakos'
174LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Fred Drake697c1c71998-08-12 17:13:28 +0000175html" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000176
Fred Drake4912beb1998-03-11 17:07:35 +0000177
Fred Drake6355bd41998-03-27 05:17:21 +0000178What else is in here?
179---------------------
180
181There is a new LaTeX document class called "howto". This is used for
Fred Drakebd400941998-08-11 17:41:20 +0000182the new series of Python HOWTO documents which is being coordinated by
Fred Drakeda6daee2001-01-22 21:38:09 +0000183Andrew Kuchling <akuchlin@mems-exchange.org>. The file
184templates/howto.tex is a commented example which may be used as a
185template. A Python script to "do the right thing" to format a howto
186document is included as tools/mkhowto. These documents can be
187formatted as HTML, PDF, PostScript, or ASCII files. Use "mkhowto
188--help" for information on using the formatting tool.
Fred Drakebd400941998-08-11 17:41:20 +0000189
190For authors of module documentation, there is a file
191templates/module.tex which may be used as a template for a module
192section. This may be used in conjunction with either the howto or
193manual document class. Create the documentation for a new module by
194copying the template to lib<mymodule>.tex and editing according to the
195instructions in the comments.
Fred Drake6355bd41998-03-27 05:17:21 +0000196
197
Fred Drake4912beb1998-03-11 17:07:35 +0000198Copyright notice
199================
200
201The Python source is copyrighted, but you can freely use and copy it
202as long as you don't change or remove the copyright notice:
203
204----------------------------------------------------------------------
Fred Drakeda6daee2001-01-22 21:38:09 +0000205Copyright (c) 2000, 2001 Guido van Rossum.
Guido van Rossumfd71b9e2000-06-30 23:50:40 +0000206All rights reserved.
Fred Drake4912beb1998-03-11 17:07:35 +0000207
Fred Drakeda6daee2001-01-22 21:38:09 +0000208Copyright (c) 2000 BeOpen.com.
209All rights reserved.
210
211Copyright (c) 1995-2000 Corporation for National Research Initiatives.
212All rights reserved.
213
214Copyright (c) 1991-1995 Stichting Mathematisch Centrum.
215All rights reserved.
216
217See the file "LICENSE" for information on usage and
Guido van Rossumfd71b9e2000-06-30 23:50:40 +0000218redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Fred Drake4912beb1998-03-11 17:07:35 +0000219----------------------------------------------------------------------