blob: 31a39990023d81fa5c068b38896ac0ca9d0357cb [file] [log] [blame]
Guido van Rossumcd7bf391992-04-05 15:06:03 +00001Python main documentation -- in LaTeX
2-------------------------------------
3
4This directory contains the LaTeX sources to the Python documentation
5and a published article about Python.
Guido van Rossum7f777ed1990-08-09 14:25:15 +00006
Guido van Rossum71ec03b1996-10-23 16:23:47 +00007The Python Reference Manual is no longer maintained in LaTeX. It is
8now 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
11a free reader for FrameMaker documents, for some platforms.)
Guido van Rossum71ec03b1996-10-23 16:23:47 +000012
Guido van Rossumf1245a81995-03-20 13:00:53 +000013If you don't have LaTeX, you can ftp a tar file containing PostScript
Guido van Rossum71ec03b1996-10-23 16:23:47 +000014of the 3 main documents. It should be in the same place where you
Guido van Rossumf1245a81995-03-20 13:00:53 +000015fetched the main Python distribution, in a file named
16"pythondoc-ps<version>.tar.gz". (See "../Misc/FAQ" for more
17information about ftp-ing Python files.)
18
Guido van Rossum676d6da1992-02-11 15:51:36 +000019The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000020
Guido van Rossum676d6da1992-02-11 15:51:36 +000021 tut.tex The tutorial
Guido van Rossum6938f061994-08-01 12:22:53 +000022 lib.tex, lib*.tex The library reference
Guido van Rossum6938f061994-08-01 12:22:53 +000023 ext.tex How to extend Python
Guido van Rossum676d6da1992-02-11 15:51:36 +000024 qua.tex, quabib.bib Article published in CWI Quarterly
Guido van Rossum7f777ed1990-08-09 14:25:15 +000025
Guido van Rossum6938f061994-08-01 12:22:53 +000026All except qua.tex (which isn't built by the default target) use the
27style option file "myformat.sty". This contains some macro
28definitions and sets some style parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000029
Guido van Rossum71ec03b1996-10-23 16:23:47 +000030You need the makeindex utility to produce the index for lib.tex; you
31need bibtex to produce the references list for qua.tex.
Guido van Rossumcd7bf391992-04-05 15:06:03 +000032
Guido van Rossumf1245a81995-03-20 13:00:53 +000033There's a Makefile to call LaTeX and the other utilities in the right
34order 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
Guido van Rossum71ec03b1996-10-23 16:23:47 +000038use lp. 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
42 lp lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000043
Guido van Rossumf1245a81995-03-20 13:00:53 +000044
45Making HTML files
46-----------------
47
Guido van Rossum71ec03b1996-10-23 16:23:47 +000048The Tutorial and Extensions manual can be converted to HTML using
49Nikos Drakos' LaTeX2HTML converter. See the Makefile; after some
50twiddling, "make l2h" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +000051
52The Library manual doesn't work well with LaTeX2HTML; instead, there's
53a Python script texi2html.py in this directory that can be run on the
54texinfo generated as an intermediate step for generating the INFO
55files as described in the next section. The command "make libwww"
56should do this.
Guido van Rossum6938f061994-08-01 12:22:53 +000057
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000058
59Making the INFO version of the Library Reference
60------------------------------------------------
61
Guido van Rossumf1245a81995-03-20 13:00:53 +000062The Library Reference can also be read in hypertext form using the
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000063Emacs INFO system. This uses Texinfo format as an intermediate step.
64It requires texinfo version 2 (we have used 2.14).
65
Guido van Rossum6938f061994-08-01 12:22:53 +000066To build the info files (python-lib.info*), say "make lib.info". This
Guido van Rossumf1245a81995-03-20 13:00:53 +000067takes a while, even on a machine with a 100 MHz clock and 64 Mbytes of
68RAM :-). Please ignore the output, which appears like error messages
69but really is debugging output only.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000070
Guido van Rossumf1245a81995-03-20 13:00:53 +000071You may have to change a site dependency in fix.el: if texinfo 2.xx
72isn't installed by default at your site, you'll have to install it
73(use archie to locate a version and ftp to fetch it). If you can't
74install it in the standard Emacs load path, uncomment the line
75containing a "(setq load-path ...)" statement, and fill in the path
76where you put it.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000077
78The files used by the conversion process are:
79
Guido van Rossum6938f061994-08-01 12:22:53 +000080partparse.py Python script that converts LaTeX sources to
81 texi files.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000082
Guido van Rossum6938f061994-08-01 12:22:53 +000083texi{pre,post}.dat Files placed before and after the result.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000084
Guido van Rossum6938f061994-08-01 12:22:53 +000085fix.el Elisp file executed by Emacs. Two calls to
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000086 'texinfo-all-menus-update are necessary in
Guido van Rossum6938f061994-08-01 12:22:53 +000087 some cases.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000088
Guido van Rossum6938f061994-08-01 12:22:53 +000089fix_hack Shell script to fix the results of the
90 "underscore hack". {\ptt \char'137} is
91 back-translated to a simple underscore. This
92 is needed for the texindex program.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000093
Guido van Rossum6938f061994-08-01 12:22:53 +000094whichlibs Shell script to print a list of lib*.tex files
95 to be processed.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000096
Guido van Rossum71ec03b1996-10-23 16:23:47 +000097Thanks for Jan-Hein B\"uhrman for writing and debugging the convertor
98and related scripts, and for fixing the LaTeX sources and writing new
99macros for myformat.sty! More thanks to Dave Ascher for adapting
100myformat.sty to the new LaTeX release, to Fred Drake for revamping the
101partparse.py and texi2html.py scripts, to the many anonymous authors
102of library manual sections and corrections (too many to mention).
103
104Many thanks to Robin Friedrich for the conversion of the Reference
105Manual to FrameMaker and his work on its index.