blob: 4fb13f379ddac1197d01add0e0a93b62c95a1613 [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
Guido van Rossum39900421996-12-18 19:55:49 +000010subdirectory ref/. (See ftp://ftp.adobe.com/pub/adobe/framereader for
Guido van Rossuma417b661997-12-08 20:51:26 +000011a free reader for FrameMaker documents, for some platforms.) Many
12thanks 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
19main Python distribution (try http://www.python.org or
Guido van Rossuma417b661997-12-08 20:51:26 +000020ftp://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
37the dvips tool. Printing depends on local conventions; at my site, I
Fred Drake34eefe51998-03-03 21:41:22 +000038use 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 Drake34eefe51998-03-03 21:41:22 +000045What tools do I need?
46---------------------
Guido van Rossuma417b661997-12-08 20:51:26 +000047
Fred Drake34eefe51998-03-03 21:41:22 +000048You need to install Python; some of the scripts used to produce the
49documentation are written in Python.
Guido van Rossuma417b661997-12-08 20:51:26 +000050
Fred Drake34eefe51998-03-03 21:41:22 +000051The simplest way to get the rest of the tools in the configuration we
52used is to install the teTeX TeX distribution, version 0.9. More
53information is available on teTeX at http://www.tug.org/tetex/. This
54is a UNIX-only TeX distribution at this time.
55
56If you don't want to get teTeX, or if you're not using UNIX, here is
57what you'll need:
58
59To create DVI, PDF, or PostScript files:
60
61 - LaTeX2e, 1995/12/01 or newer. Older versions are likely to
62 choke.
63
64 - makeindex. This is used to produce the indexes for the
65 library reference and Python/C API reference.
66
67To create PDF files:
68
69 - pdflatex. We used the one in the teTeX 0.9 distribution
70 (version 0.11 at the time of this writing).
71
72To create PostScript files:
73
74 - dvips. Most TeX installations include this. If you don't
75 have one, check CTAN (ftp://ctan.tug.org/tex-archive/).
76
77To create info files:
78
79 - makeinfo. This is available from any GNU mirror.
80
81To create HTML files:
82
83 - Perl 5.004_04 or newer. Try www.perl.org for pointers.
84
85 - LaTeX2HTML 98.1p1, or newer. Releases are available at
86 http://www-dsed.llnl.gov/files/programs/unix/latex2html/.
87
88
89What if Times fonts are not available?
90--------------------------------------
91
92As distributed, the LaTeX documents use PostScript Times fonts. This
93is done since they are much better looking and produce smaller
94PostScript files. If, however, your TeX installation does not support
95them, they may be easily disabled. Edit the file manual.cls and
96comment out the line that starts "\RequirePackage{times}" using a "%"
97character at the beginning of the line. An alternative is to install
98the right fonts and LaTeX style file.
Guido van Rossuma417b661997-12-08 20:51:26 +000099
100
Guido van Rossumf1245a81995-03-20 13:00:53 +0000101Making HTML files
102-----------------
103
Fred Drake34eefe51998-03-03 21:41:22 +0000104The LaTeX documents can be converted to HTML using Nikos Drakos'
105LaTeX2HTML converter. See the Makefile; after some twiddling, "make
Guido van Rossuma417b661997-12-08 20:51:26 +0000106l2h" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +0000107
Guido van Rossuma417b661997-12-08 20:51:26 +0000108For the reference manual, I use Harlequin's webmaker. I'm not very
109happy with it and hope that eventually FrameMaker will be able to
110produce HTML without third party help.