blob: 6757c107b2849b49a4ac87c19a7fce25c640e20a [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
10subdirectory ref/.
11
Guido van Rossumf1245a81995-03-20 13:00:53 +000012If you don't have LaTeX, you can ftp a tar file containing PostScript
Guido van Rossum71ec03b1996-10-23 16:23:47 +000013of the 3 main documents. It should be in the same place where you
Guido van Rossumf1245a81995-03-20 13:00:53 +000014fetched the main Python distribution, in a file named
15"pythondoc-ps<version>.tar.gz". (See "../Misc/FAQ" for more
16information about ftp-ing Python files.)
17
Guido van Rossum676d6da1992-02-11 15:51:36 +000018The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000019
Guido van Rossum676d6da1992-02-11 15:51:36 +000020 tut.tex The tutorial
Guido van Rossum6938f061994-08-01 12:22:53 +000021 lib.tex, lib*.tex The library reference
Guido van Rossum6938f061994-08-01 12:22:53 +000022 ext.tex How to extend Python
Guido van Rossum676d6da1992-02-11 15:51:36 +000023 qua.tex, quabib.bib Article published in CWI Quarterly
Guido van Rossum7f777ed1990-08-09 14:25:15 +000024
Guido van Rossum6938f061994-08-01 12:22:53 +000025All except qua.tex (which isn't built by the default target) use the
26style option file "myformat.sty". This contains some macro
27definitions and sets some style parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000028
Guido van Rossum71ec03b1996-10-23 16:23:47 +000029You need the makeindex utility to produce the index for lib.tex; you
30need bibtex to produce the references list for qua.tex.
Guido van Rossumcd7bf391992-04-05 15:06:03 +000031
Guido van Rossumf1245a81995-03-20 13:00:53 +000032There's a Makefile to call LaTeX and the other utilities in the right
33order 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
36the dvips tool. Printing depends on local conventions; at my site, I
Guido van Rossum71ec03b1996-10-23 16:23:47 +000037use lp. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000038
Guido van Rossum71ec03b1996-10-23 16:23:47 +000039 make lib # create lib.dvi and lib.ps
40 xdvi lib # preview lib.dvi
41 lp lib.ps # print on default printer
Guido van Rossumcd7bf391992-04-05 15:06:03 +000042
Guido van Rossumf1245a81995-03-20 13:00:53 +000043
44Making HTML files
45-----------------
46
Guido van Rossum71ec03b1996-10-23 16:23:47 +000047The Tutorial and Extensions manual can be converted to HTML using
48Nikos Drakos' LaTeX2HTML converter. See the Makefile; after some
49twiddling, "make l2h" should do the trick.
Guido van Rossumf1245a81995-03-20 13:00:53 +000050
51The Library manual doesn't work well with LaTeX2HTML; instead, there's
52a Python script texi2html.py in this directory that can be run on the
53texinfo generated as an intermediate step for generating the INFO
54files as described in the next section. The command "make libwww"
55should do this.
Guido van Rossum6938f061994-08-01 12:22:53 +000056
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000057
58Making the INFO version of the Library Reference
59------------------------------------------------
60
Guido van Rossumf1245a81995-03-20 13:00:53 +000061The Library Reference can also be read in hypertext form using the
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000062Emacs INFO system. This uses Texinfo format as an intermediate step.
63It requires texinfo version 2 (we have used 2.14).
64
Guido van Rossum6938f061994-08-01 12:22:53 +000065To build the info files (python-lib.info*), say "make lib.info". This
Guido van Rossumf1245a81995-03-20 13:00:53 +000066takes a while, even on a machine with a 100 MHz clock and 64 Mbytes of
67RAM :-). Please ignore the output, which appears like error messages
68but really is debugging output only.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000069
Guido van Rossumf1245a81995-03-20 13:00:53 +000070You may have to change a site dependency in fix.el: if texinfo 2.xx
71isn't installed by default at your site, you'll have to install it
72(use archie to locate a version and ftp to fetch it). If you can't
73install it in the standard Emacs load path, uncomment the line
74containing a "(setq load-path ...)" statement, and fill in the path
75where you put it.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000076
77The files used by the conversion process are:
78
Guido van Rossum6938f061994-08-01 12:22:53 +000079partparse.py Python script that converts LaTeX sources to
80 texi files.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000081
Guido van Rossum6938f061994-08-01 12:22:53 +000082texi{pre,post}.dat Files placed before and after the result.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000083
Guido van Rossum6938f061994-08-01 12:22:53 +000084fix.el Elisp file executed by Emacs. Two calls to
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000085 'texinfo-all-menus-update are necessary in
Guido van Rossum6938f061994-08-01 12:22:53 +000086 some cases.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000087
Guido van Rossum6938f061994-08-01 12:22:53 +000088fix_hack Shell script to fix the results of the
89 "underscore hack". {\ptt \char'137} is
90 back-translated to a simple underscore. This
91 is needed for the texindex program.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000092
Guido van Rossum6938f061994-08-01 12:22:53 +000093whichlibs Shell script to print a list of lib*.tex files
94 to be processed.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000095
Guido van Rossum71ec03b1996-10-23 16:23:47 +000096Thanks for Jan-Hein B\"uhrman for writing and debugging the convertor
97and related scripts, and for fixing the LaTeX sources and writing new
98macros for myformat.sty! More thanks to Dave Ascher for adapting
99myformat.sty to the new LaTeX release, to Fred Drake for revamping the
100partparse.py and texi2html.py scripts, to the many anonymous authors
101of library manual sections and corrections (too many to mention).
102
103Many thanks to Robin Friedrich for the conversion of the Reference
104Manual to FrameMaker and his work on its index.