Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 1 | Python main documentation -- in LaTeX |
| 2 | ------------------------------------- |
| 3 | |
| 4 | This directory contains the LaTeX sources to the Python documentation |
| 5 | and a published article about Python. |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 7 | If you don't have LaTeX, you can ftp a tar file containing PostScript |
| 8 | of the 4 main documents. It should be in the same place where you |
| 9 | fetched the main Python distribution, in a file named |
| 10 | "pythondoc-ps<version>.tar.gz". (See "../Misc/FAQ" for more |
| 11 | information about ftp-ing Python files.) |
| 12 | |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 13 | The following are the LaTeX source files: |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 14 | |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 15 | tut.tex The tutorial |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 16 | lib.tex, lib*.tex The library reference |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 17 | ref.tex, ref[1-8].tex The reference manual |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 18 | ext.tex How to extend Python |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 19 | qua.tex, quabib.bib Article published in CWI Quarterly |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 20 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 21 | All except qua.tex (which isn't built by the default target) use the |
| 22 | style option file "myformat.sty". This contains some macro |
| 23 | definitions and sets some style parameters. |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | d18b8af | 1992-04-06 14:02:37 +0000 | [diff] [blame] | 25 | The style parameters are set up for European paper size (21 x 29.7 cm, |
| 26 | a.k.a. A4, or roughly 8.27 x 11.7 inch) by default. To use US paper, |
| 27 | comment out the line saying \input{a4wide.sty} in myformat.sty (you |
| 28 | may want to fiddle with lay-out parameters like \textwidth and |
| 29 | \textheight, since the default format uses rather wide margins). |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 30 | |
| 31 | You need the makeindex utility to produce the index for ref.tex |
| 32 | lib.tex; you need bibtex to produce the references list for qua.tex. |
| 33 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 34 | There's a Makefile to call LaTeX and the other utilities in the right |
| 35 | order and the right number of times. This will produce DVI files for |
| 36 | each document made; to preview them, use xdvi. PostScript is produced |
| 37 | by the same Makefile target that produces the DVI files. This uses |
| 38 | the dvips tool. Printing depends on local conventions; at my site, I |
| 39 | use lpr. For example: |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 40 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 41 | make ref # creates ref.dvi and ref.ps |
| 42 | xdvi ref # preview it ref.dvi |
| 43 | lpr -Ppsc ref.ps # print it on printer "psc". |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 44 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 45 | |
| 46 | Making HTML files |
| 47 | ----------------- |
| 48 | |
| 49 | The Reference, Tutorial and Extensions manual can all be converted to |
| 50 | HTML using Nikos Drakos' LaTeX2HTML converter. See the Makefile; |
| 51 | after some twiddling, "make l2h" should do the trick. |
| 52 | |
| 53 | The Library manual doesn't work well with LaTeX2HTML; instead, there's |
| 54 | a Python script texi2html.py in this directory that can be run on the |
| 55 | texinfo generated as an intermediate step for generating the INFO |
| 56 | files as described in the next section. The command "make libwww" |
| 57 | should do this. |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 58 | |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 59 | |
| 60 | Making the INFO version of the Library Reference |
| 61 | ------------------------------------------------ |
| 62 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 63 | The Library Reference can also be read in hypertext form using the |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 64 | Emacs INFO system. This uses Texinfo format as an intermediate step. |
| 65 | It requires texinfo version 2 (we have used 2.14). |
| 66 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 67 | To build the info files (python-lib.info*), say "make lib.info". This |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 68 | takes a while, even on a machine with a 100 MHz clock and 64 Mbytes of |
| 69 | RAM :-). Please ignore the output, which appears like error messages |
| 70 | but really is debugging output only. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 72 | You may have to change a site dependency in fix.el: if texinfo 2.xx |
| 73 | isn't installed by default at your site, you'll have to install it |
| 74 | (use archie to locate a version and ftp to fetch it). If you can't |
| 75 | install it in the standard Emacs load path, uncomment the line |
| 76 | containing a "(setq load-path ...)" statement, and fill in the path |
| 77 | where you put it. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 78 | |
| 79 | The files used by the conversion process are: |
| 80 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 81 | partparse.py Python script that converts LaTeX sources to |
| 82 | texi files. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 83 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 84 | texi{pre,post}.dat Files placed before and after the result. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 85 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 86 | fix.el Elisp file executed by Emacs. Two calls to |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 87 | 'texinfo-all-menus-update are necessary in |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 88 | some cases. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 89 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 90 | fix_hack Shell script to fix the results of the |
| 91 | "underscore hack". {\ptt \char'137} is |
| 92 | back-translated to a simple underscore. This |
| 93 | is needed for the texindex program. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 94 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 95 | whichlibs Shell script to print a list of lib*.tex files |
| 96 | to be processed. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 97 | |
| 98 | A Million thanks for Jan-Hein B\"uhrman for writing and debugging the |
| 99 | convertor and related scripts, and for fixing the LaTeX sources and |
| 100 | writing new macros for myformat.sty! |