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 | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 7 | The Python Reference Manual is no longer maintained in LaTeX. It is |
| 8 | now a FrameMaker document. The FrameMaker 5.0 files (ref.book, |
| 9 | ref*.doc) as well as PostScript generated (ref.ps) from it are in the |
Guido van Rossum | 3990042 | 1996-12-18 19:55:49 +0000 | [diff] [blame^] | 10 | subdirectory ref/. (See ftp://ftp.adobe.com/pub/adobe/framereader for |
| 11 | a free reader for FrameMaker documents, for some platforms.) |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 12 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 13 | If you don't have LaTeX, you can ftp a tar file containing PostScript |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 14 | of the 3 main documents. It should be in the same place where you |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 15 | fetched the main Python distribution, in a file named |
| 16 | "pythondoc-ps<version>.tar.gz". (See "../Misc/FAQ" for more |
| 17 | information about ftp-ing Python files.) |
| 18 | |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 19 | The following are the LaTeX source files: |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 20 | |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 21 | tut.tex The tutorial |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 22 | lib.tex, lib*.tex The library reference |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 23 | ext.tex How to extend Python |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 24 | qua.tex, quabib.bib Article published in CWI Quarterly |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 25 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 26 | All except qua.tex (which isn't built by the default target) use the |
| 27 | style option file "myformat.sty". This contains some macro |
| 28 | definitions and sets some style parameters. |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 29 | |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 30 | You need the makeindex utility to produce the index for lib.tex; you |
| 31 | need bibtex to produce the references list for qua.tex. |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 32 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 33 | There's a Makefile to call LaTeX and the other utilities in the right |
| 34 | order and the right number of times. This will produce DVI files for |
| 35 | each document made; to preview them, use xdvi. PostScript is produced |
| 36 | by the same Makefile target that produces the DVI files. This uses |
| 37 | the dvips tool. Printing depends on local conventions; at my site, I |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 38 | use lp. For example: |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 39 | |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 40 | make lib # create lib.dvi and lib.ps |
| 41 | xdvi lib # preview lib.dvi |
| 42 | lp lib.ps # print on default printer |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 43 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 44 | |
| 45 | Making HTML files |
| 46 | ----------------- |
| 47 | |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 48 | The Tutorial and Extensions manual can be converted to HTML using |
| 49 | Nikos Drakos' LaTeX2HTML converter. See the Makefile; after some |
| 50 | twiddling, "make l2h" should do the trick. |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 51 | |
| 52 | The Library manual doesn't work well with LaTeX2HTML; instead, there's |
| 53 | a Python script texi2html.py in this directory that can be run on the |
| 54 | texinfo generated as an intermediate step for generating the INFO |
| 55 | files as described in the next section. The command "make libwww" |
| 56 | should do this. |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 57 | |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 58 | |
| 59 | Making the INFO version of the Library Reference |
| 60 | ------------------------------------------------ |
| 61 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 62 | 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] | 63 | Emacs INFO system. This uses Texinfo format as an intermediate step. |
| 64 | It requires texinfo version 2 (we have used 2.14). |
| 65 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 66 | 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] | 67 | takes a while, even on a machine with a 100 MHz clock and 64 Mbytes of |
| 68 | RAM :-). Please ignore the output, which appears like error messages |
| 69 | but really is debugging output only. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 70 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 71 | You may have to change a site dependency in fix.el: if texinfo 2.xx |
| 72 | isn'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 |
| 74 | install it in the standard Emacs load path, uncomment the line |
| 75 | containing a "(setq load-path ...)" statement, and fill in the path |
| 76 | where you put it. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 77 | |
| 78 | The files used by the conversion process are: |
| 79 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 80 | partparse.py Python script that converts LaTeX sources to |
| 81 | texi files. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 82 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 83 | texi{pre,post}.dat Files placed before and after the result. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 84 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 85 | fix.el Elisp file executed by Emacs. Two calls to |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 86 | 'texinfo-all-menus-update are necessary in |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 87 | some cases. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 88 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 89 | fix_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 Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 93 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 94 | whichlibs Shell script to print a list of lib*.tex files |
| 95 | to be processed. |
Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 96 | |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 97 | Thanks for Jan-Hein B\"uhrman for writing and debugging the convertor |
| 98 | and related scripts, and for fixing the LaTeX sources and writing new |
| 99 | macros for myformat.sty! More thanks to Dave Ascher for adapting |
| 100 | myformat.sty to the new LaTeX release, to Fred Drake for revamping the |
| 101 | partparse.py and texi2html.py scripts, to the many anonymous authors |
| 102 | of library manual sections and corrections (too many to mention). |
| 103 | |
| 104 | Many thanks to Robin Friedrich for the conversion of the Reference |
| 105 | Manual to FrameMaker and his work on its index. |