blob: 5d5fb292b16afc612a8f0f7ff47701ae76963b79 [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 Rossum676d6da1992-02-11 15:51:36 +00007The following are the LaTeX source files:
Guido van Rossum7f777ed1990-08-09 14:25:15 +00008
Guido van Rossum676d6da1992-02-11 15:51:36 +00009 tut.tex The tutorial
Guido van Rossum6938f061994-08-01 12:22:53 +000010 lib.tex, lib*.tex The library reference
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000011 ref.tex, ref[1-8].tex The reference manual
Guido van Rossum6938f061994-08-01 12:22:53 +000012 ext.tex How to extend Python
Guido van Rossum676d6da1992-02-11 15:51:36 +000013 qua.tex, quabib.bib Article published in CWI Quarterly
Guido van Rossum7f777ed1990-08-09 14:25:15 +000014
Guido van Rossum6938f061994-08-01 12:22:53 +000015All except qua.tex (which isn't built by the default target) use the
16style option file "myformat.sty". This contains some macro
17definitions and sets some style parameters.
Guido van Rossum7f777ed1990-08-09 14:25:15 +000018
Guido van Rossumd18b8af1992-04-06 14:02:37 +000019The style parameters are set up for European paper size (21 x 29.7 cm,
20a.k.a. A4, or roughly 8.27 x 11.7 inch) by default. To use US paper,
21comment out the line saying \input{a4wide.sty} in myformat.sty (you
22may want to fiddle with lay-out parameters like \textwidth and
23\textheight, since the default format uses rather wide margins).
Guido van Rossumcd7bf391992-04-05 15:06:03 +000024
25You need the makeindex utility to produce the index for ref.tex
26lib.tex; you need bibtex to produce the references list for qua.tex.
27
28There's a Makefile to call latex and the other utilities in the right
29order and the right number of times. This will produce dvi files for
30each document made; to preview them, use xdvi. Printing depends on
31local conventions; at my site, I use dvips and lpr. For example:
Guido van Rossum7f777ed1990-08-09 14:25:15 +000032
Guido van Rossum0e5f0091992-03-06 10:56:17 +000033 make ref # creates ref.dvi
34 xdvi ref # preview it
35 dvips -Ppsc ref | lpr -Ppsc # print it on printer "psc".
Guido van Rossumcd7bf391992-04-05 15:06:03 +000036
37If you don't have latex, you can ftp the pre-formatted PosytScript
Guido van Rossum6938f061994-08-01 12:22:53 +000038versions of the documents. It should be in the same place where you
39fetched the main Python distribution, if you got it by ftp. (See
40"../Misc/FAQ" for information about ftp-ing Python files.)
41
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000042
43Making the INFO version of the Library Reference
44------------------------------------------------
45
46The Library Reference can now also be read in hypertext form using the
47Emacs INFO system. This uses Texinfo format as an intermediate step.
48It requires texinfo version 2 (we have used 2.14).
49
Guido van Rossum6938f061994-08-01 12:22:53 +000050To build the info files (python-lib.info*), say "make lib.info". This
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000051takes a while, even on machines with 33 MIPS and 16 Mbytes :-) You can
52ignore the output.
53
54But first you'll have to change a site dependency in fix.el: if
Guido van Rossum6938f061994-08-01 12:22:53 +000055texinfo 2.xx isn't installed by default at your site, you'll have to
56install it (use archie to locate a version and ftp to fetch it). If
57you can't install it in the standard Emacs load path, uncomment the
58line containing a "(setq load-path ...)" statement, and fill in the
59path where you put it.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000060
61The files used by the conversion process are:
62
Guido van Rossum6938f061994-08-01 12:22:53 +000063partparse.py Python script that converts LaTeX sources to
64 texi files.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000065
Guido van Rossum6938f061994-08-01 12:22:53 +000066texi{pre,post}.dat Files placed before and after the result.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000067
Guido van Rossum6938f061994-08-01 12:22:53 +000068fix.el Elisp file executed by Emacs. Two calls to
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000069 'texinfo-all-menus-update are necessary in
Guido van Rossum6938f061994-08-01 12:22:53 +000070 some cases.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000071
Guido van Rossum6938f061994-08-01 12:22:53 +000072fix_hack Shell script to fix the results of the
73 "underscore hack". {\ptt \char'137} is
74 back-translated to a simple underscore. This
75 is needed for the texindex program.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000076
Guido van Rossum6938f061994-08-01 12:22:53 +000077whichlibs Shell script to print a list of lib*.tex files
78 to be processed.
Guido van Rossum95cd2ef1992-12-08 14:37:55 +000079
80A Million thanks for Jan-Hein B\"uhrman for writing and debugging the
81convertor and related scripts, and for fixing the LaTeX sources and
82writing new macros for myformat.sty!