Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 1 | Python main documentation -- in LaTeX |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 2 | ------------------------------------- |
| 3 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 4 | This directory contains the LaTeX sources to the Python documentation. |
| 5 | They now require LaTeX2e (LaTeX 2.09 compatibility is dropped). |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 6 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 7 | The Python Reference Manual is no longer maintained in LaTeX. It is |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 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 |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 10 | subdirectory ref/. (See <ftp://ftp.adobe.com/pub/adobe/framereader> |
| 11 | for a free reader for FrameMaker documents, for some platforms.) Many |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 12 | thanks to Robin Friedrich for the conversion of the Reference Manual |
| 13 | to FrameMaker and his work on its index. |
Guido van Rossum | 71ec03b | 1996-10-23 16:23:47 +0000 | [diff] [blame] | 14 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 15 | If you don't have LaTeX, or if you'd rather not format the |
| 16 | documentation yourself, you can ftp a tar file containing HTML, PDF, |
| 17 | or PostScript versions of all documents. Additional formats may be |
| 18 | available. These should be in the same place where you fetched the |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 19 | main Python distribution (try <http://www.python.org> or |
| 20 | <ftp://ftp.python.org>). |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 21 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 22 | The following are the LaTeX source files: |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 23 | |
Guido van Rossum | 676d6da | 1992-02-11 15:51:36 +0000 | [diff] [blame] | 24 | tut.tex The tutorial |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 25 | lib.tex, lib*.tex The library reference |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 26 | ext.tex How to extend Python |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 27 | api.tex Reference for the Python/C API |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 28 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 29 | All use the "manual" document class and "python" package, derived from |
| 30 | the old "myformat.sty" style file. These contains many macro |
| 31 | definitions useful in documenting Python, and set some style parameters. |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 32 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 33 | There's a Makefile to call LaTeX and the other utilities in the right |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 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 |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 37 | the dvips tool. Printing depends on local conventions; at our site, |
| 38 | we use lpr. 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 |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 42 | lpr 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 | |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 45 | What if I find a bug? |
| 46 | --------------------- |
| 47 | |
| 48 | First, check that the bug is present in the online version of the |
| 49 | documentation at <http://www.python.org/docs/>; we may have already |
| 50 | fixed it. |
| 51 | |
| 52 | If we haven't, tell us about it. We'd like the documentation to be |
| 53 | complete and accurate, but have limited time. If you discover any |
| 54 | inconsistencies between the documentation and implementation, or just |
| 55 | have suggestions as to how to improve the documentation, let is know! |
| 56 | Send comments and patches to the Python Documentation Team: |
| 57 | |
| 58 | python-docs@python.org |
| 59 | |
| 60 | Thanks! |
| 61 | |
| 62 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 63 | What tools do I need? |
| 64 | --------------------- |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 65 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 66 | You need to install Python; some of the scripts used to produce the |
| 67 | documentation are written in Python. |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 68 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 69 | The simplest way to get the rest of the tools in the configuration we |
| 70 | used is to install the teTeX TeX distribution, version 0.9. More |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 71 | information is available on teTeX at <http://www.tug.org/tetex/>. |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 72 | This is a UNIX-only TeX distribution at this time. Note that the 0.9 |
| 73 | release is still in testing; this documentation release was tested |
| 74 | with the 18 Mar 1998 release. We'll be upgrading to the final version |
| 75 | when it becomes available. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 76 | |
| 77 | If you don't want to get teTeX, or if you're not using UNIX, here is |
| 78 | what you'll need: |
| 79 | |
| 80 | To create DVI, PDF, or PostScript files: |
| 81 | |
| 82 | - LaTeX2e, 1995/12/01 or newer. Older versions are likely to |
| 83 | choke. |
| 84 | |
| 85 | - makeindex. This is used to produce the indexes for the |
| 86 | library reference and Python/C API reference. |
| 87 | |
| 88 | To create PDF files: |
| 89 | |
| 90 | - pdflatex. We used the one in the teTeX 0.9 distribution |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 91 | (version 0.12f at the time of this writing). Versions even |
| 92 | a couple of patchlevels different are highly likely to |
| 93 | fail due to syntax changes for some of the pdftex |
| 94 | primitives. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 95 | |
| 96 | To create PostScript files: |
| 97 | |
| 98 | - dvips. Most TeX installations include this. If you don't |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 99 | have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>). |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 100 | |
| 101 | To create info files: |
| 102 | |
Fred Drake | 45084ed | 1998-04-09 15:19:41 +0000 | [diff] [blame^] | 103 | (Note that info is not currently supported. If you need it, |
| 104 | please fix or replace tools/partparse.py and send the new |
| 105 | version to python-docs@python.org. We'll be glad to provide |
| 106 | free copies of the info files to anyone who can support the |
| 107 | process. ;-) |
| 108 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 109 | - makeinfo. This is available from any GNU mirror. |
| 110 | |
Fred Drake | 45084ed | 1998-04-09 15:19:41 +0000 | [diff] [blame^] | 111 | - emacs or xemacs. Emacs is available from the same place as |
| 112 | makeinfo, and xemacs is available from ftp.xemacs.org. |
| 113 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 114 | To create HTML files: |
| 115 | |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 116 | - Perl 5.004_04 or newer. Find the software at |
| 117 | <http://language.perl.com/info/software.html>. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 118 | |
| 119 | - LaTeX2HTML 98.1p1, or newer. Releases are available at |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 120 | <http://www-dsed.llnl.gov/files/programs/unix/latex2html/>. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 121 | |
| 122 | |
| 123 | What if Times fonts are not available? |
| 124 | -------------------------------------- |
| 125 | |
| 126 | As distributed, the LaTeX documents use PostScript Times fonts. This |
| 127 | is done since they are much better looking and produce smaller |
| 128 | PostScript files. If, however, your TeX installation does not support |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 129 | them, they may be easily disabled. Edit the file |
| 130 | texiinputs/manual.cls and comment out the line that starts |
| 131 | "\RequirePackage{times}" using a "%" character at the beginning of the |
| 132 | line. An alternative is to install the right fonts and LaTeX style |
| 133 | file. |
| 134 | |
| 135 | |
| 136 | What if I want to use A4 paper? |
| 137 | ------------------------------- |
| 138 | |
| 139 | Edit the file texinputs/manual.cls. Change the line that reads: |
| 140 | |
| 141 | \LoadClass[twoside,openright]{report} |
| 142 | |
| 143 | to say: |
| 144 | |
| 145 | \LoadClass[a4paper,twoside,openright]{report} |
| 146 | |
| 147 | Now do a "make clean all" to generate PostScript files. |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 148 | |
| 149 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 150 | Making HTML files |
| 151 | ----------------- |
| 152 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 153 | The LaTeX documents can be converted to HTML using Nikos Drakos' |
| 154 | LaTeX2HTML converter. See the Makefile; after some twiddling, "make |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 155 | l2h" should do the trick. |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 156 | |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 157 | For the reference manual, we use Harlequin's webmaker. We're not very |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 158 | happy with it and hope that eventually FrameMaker will be able to |
| 159 | produce HTML without third party help. |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 160 | |
| 161 | |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 162 | What else is in here? |
| 163 | --------------------- |
| 164 | |
| 165 | There is a new LaTeX document class called "howto". This is used for |
| 166 | the new series of Python HOWTO documents which is being coordinated by |
| 167 | Andrew Kuchling <amk@acm.org>. The file howto.tex is a commented |
| 168 | template which may be used an example. A script to "do the right |
| 169 | thing" to format a howto document is included as tools/mkhowto.sh. |
| 170 | Support for this document class is still new, but is expected to |
Fred Drake | 16a19c4 | 1998-04-03 05:41:38 +0000 | [diff] [blame] | 171 | evolve rapidly. Use "mkhowto.sh --help" for information on using the |
| 172 | formatting tool. |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 173 | |
| 174 | |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 175 | Copyright notice |
| 176 | ================ |
| 177 | |
| 178 | The Python source is copyrighted, but you can freely use and copy it |
| 179 | as long as you don't change or remove the copyright notice: |
| 180 | |
| 181 | ---------------------------------------------------------------------- |
| 182 | Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 183 | The Netherlands. |
| 184 | |
| 185 | All Rights Reserved |
| 186 | |
| 187 | Permission to use, copy, modify, and distribute this software and its |
| 188 | documentation for any purpose and without fee is hereby granted, |
| 189 | provided that the above copyright notice appear in all copies and that |
| 190 | both that copyright notice and this permission notice appear in |
| 191 | supporting documentation, and that the names of Stichting Mathematisch |
| 192 | Centrum or CWI or Corporation for National Research Initiatives or |
| 193 | CNRI not be used in advertising or publicity pertaining to |
| 194 | distribution of the software without specific, written prior |
| 195 | permission. |
| 196 | |
| 197 | While CWI is the initial source for this software, a modified version |
| 198 | is made available by the Corporation for National Research Initiatives |
| 199 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 200 | |
| 201 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 202 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 203 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 204 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 205 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 206 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 207 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 208 | PERFORMANCE OF THIS SOFTWARE. |
| 209 | ---------------------------------------------------------------------- |