blob: 28ad44f2a21da6d26575349a88691785080766e6 [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
47First, check that the bug is present in the online version of the
48documentation at <http://www.python.org/docs/>; we may have already
49fixed it.
50
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!
55Send comments and patches to the Python Documentation Team:
56
57 python-docs@python.org
58
59Thanks!
60
61
Fred Drake4190fae1998-05-11 19:05:36 +000062What happened to the Macintosh chapter of the Python Library Reference?
63-----------------------------------------------------------------------
64
65The directory mac/ contains the LaTeX sources for the "Macintosh
Fred Drakebd400941998-08-11 17:41:20 +000066Library Modules" manual; this is built using the standard build
67targets, so check the proper output directory for your chosen format
68and paper size.
Fred Drake4190fae1998-05-11 19:05:36 +000069
70
Fred Drake34eefe51998-03-03 21:41:22 +000071What tools do I need?
72---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000073
Fred Drake34eefe51998-03-03 21:41:22 +000074You need to install Python; some of the scripts used to produce the
Fred Drakebd400941998-08-11 17:41:20 +000075documentation are written in Python. You don't need this
76documentation to install Python; instructions are included in the
77README file in the Python distribution.
Guido van Rossuma417b661997-12-08 20:51:26 +000078
Fred Drake34eefe51998-03-03 21:41:22 +000079The simplest way to get the rest of the tools in the configuration we
Fred Drake099b76c1998-05-11 16:31:32 +000080used is to install the teTeX TeX distribution, version 0.4 or 0.9. More
Fred Drake71472a51998-03-04 15:21:02 +000081information is available on teTeX at <http://www.tug.org/tetex/>.
Fred Drake41dee841999-03-03 21:39:19 +000082This is a Unix-only TeX distribution at this time. Note that the 0.9
Fred Drake6355bd41998-03-27 05:17:21 +000083release is still in testing; this documentation release was tested
Fred Drake41dee841999-03-03 21:39:19 +000084with the 9 Feb 1999 release. We'll be upgrading to the final version
85when it becomes available. Except for the PDF generation, there are
86no known problems with using the ("stable") teTeX 0.4 release.
Fred Drake34eefe51998-03-03 21:41:22 +000087
Fred Drake099b76c1998-05-11 16:31:32 +000088If you don't want to get teTeX, here is what you'll need:
Fred Drake34eefe51998-03-03 21:41:22 +000089
90To create DVI, PDF, or PostScript files:
91
92 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
93 choke.
94
95 - makeindex. This is used to produce the indexes for the
96 library reference and Python/C API reference.
97
98To create PDF files:
99
100 - pdflatex. We used the one in the teTeX 0.9 distribution
Fred Draked8ee0e61999-03-03 21:44:10 +0000101 (pdfTeX version 3.14159-13b (Web2C 7.3beta4) at the time of
102 this writing). Versions even a couple of patchlevels
103 earlier are highly likely to fail due to syntax changes for
104 some of the pdftex primitives.
Fred Drake34eefe51998-03-03 21:41:22 +0000105
106To create PostScript files:
107
108 - dvips. Most TeX installations include this. If you don't
Fred Drake71472a51998-03-04 15:21:02 +0000109 have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>).
Fred Drake34eefe51998-03-03 21:41:22 +0000110
111To create info files:
112
Fred Drakeda71e311999-01-13 23:02:38 +0000113 Note that info support is currently being revised using new
114 conversion tools by Michael Ernst <mernst@cs.washington.edu>.
Fred Drake45084ed1998-04-09 15:19:41 +0000115
Fred Drake34eefe51998-03-03 21:41:22 +0000116 - makeinfo. This is available from any GNU mirror.
117
Fred Drake45084ed1998-04-09 15:19:41 +0000118 - emacs or xemacs. Emacs is available from the same place as
119 makeinfo, and xemacs is available from ftp.xemacs.org.
120
Fred Drakeda71e311999-01-13 23:02:38 +0000121 - Perl. Find the software at
122 <http://language.perl.com/info/software.html>.
123
Fred Drake34eefe51998-03-03 21:41:22 +0000124To create HTML files:
125
Fred Drake71472a51998-03-04 15:21:02 +0000126 - Perl 5.004_04 or newer. Find the software at
127 <http://language.perl.com/info/software.html>.
Fred Drake34eefe51998-03-03 21:41:22 +0000128
Fred Drakee7aa5dc2000-07-31 17:56:58 +0000129 - LaTeX2HTML 99.2b8. Older versions are not supported; each
130 version changes enough that supporting multiple versions is not
131 likely to work. Many older versions don't work with Perl
132 5.6 as well. This also screws up code fragments. ;-(
133 Releases are available at:
134 <http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/>.
Fred Drake34eefe51998-03-03 21:41:22 +0000135
136
137What if Times fonts are not available?
138--------------------------------------
139
140As distributed, the LaTeX documents use PostScript Times fonts. This
141is done since they are much better looking and produce smaller
142PostScript files. If, however, your TeX installation does not support
Fred Drake4912beb1998-03-11 17:07:35 +0000143them, they may be easily disabled. Edit the file
144texiinputs/manual.cls and comment out the line that starts
Fred Drake41dee841999-03-03 21:39:19 +0000145"\RequirePackage{times}" by inserting a "%" character at the beginning
146of the line. An alternative is to install the right fonts and LaTeX
147style file.
Fred Drake4912beb1998-03-11 17:07:35 +0000148
149
150What if I want to use A4 paper?
151-------------------------------
152
Fred Drake099b76c1998-05-11 16:31:32 +0000153Instead of building the PostScript by giving the command "make", give
154the command "make PAPER=a4"; the output will be produced in the
155paper-a4/ subdirectory.
Guido van Rossuma417b661997-12-08 20:51:26 +0000156
157
Guido van Rossumf1245a81995-03-20 13:00:53 +0000158Making HTML files
159-----------------
160
Fred Drake34eefe51998-03-03 21:41:22 +0000161The LaTeX documents can be converted to HTML using Nikos Drakos'
162LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Fred Drake697c1c71998-08-12 17:13:28 +0000163html" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000164
Fred Drake4912beb1998-03-11 17:07:35 +0000165
Fred Drake6355bd41998-03-27 05:17:21 +0000166What else is in here?
167---------------------
168
169There is a new LaTeX document class called "howto". This is used for
Fred Drakebd400941998-08-11 17:41:20 +0000170the new series of Python HOWTO documents which is being coordinated by
171Andrew Kuchling <amk@acm.org>. The file templates/howto.tex is a
172commented example which may be used a template. A script to "do the
173right thing" to format a howto document is included as
Fred Drake41dee841999-03-03 21:39:19 +0000174tools/mkhowto. These documents can be formatted as HTML, PDF,
Fred Drake00c468b1998-08-12 17:53:46 +0000175PostScript, or ASCII files. Support for this document class is
Fred Drake41dee841999-03-03 21:39:19 +0000176still new, but is expected to evolve rapidly. Use "mkhowto --help"
Fred Drake00c468b1998-08-12 17:53:46 +0000177for information on using the formatting tool.
Fred Drakebd400941998-08-11 17:41:20 +0000178
179For authors of module documentation, there is a file
180templates/module.tex which may be used as a template for a module
181section. This may be used in conjunction with either the howto or
182manual document class. Create the documentation for a new module by
183copying the template to lib<mymodule>.tex and editing according to the
184instructions in the comments.
Fred Drake6355bd41998-03-27 05:17:21 +0000185
186
Fred Drake4912beb1998-03-11 17:07:35 +0000187Copyright notice
188================
189
190The Python source is copyrighted, but you can freely use and copy it
191as long as you don't change or remove the copyright notice:
192
193----------------------------------------------------------------------
194Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
195The Netherlands.
196
197 All Rights Reserved
198
Guido van Rossumfd71b9e2000-06-30 23:50:40 +0000199Copyright (c) 2000, BeOpen.com.
200Copyright (c) 1995-2000, Corporation for National Research Initiatives.
201Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
202All rights reserved.
Fred Drake4912beb1998-03-11 17:07:35 +0000203
Guido van Rossumfd71b9e2000-06-30 23:50:40 +0000204See the file "Misc/COPYRIGHT" for information on usage and
205redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Fred Drake4912beb1998-03-11 17:07:35 +0000206----------------------------------------------------------------------