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