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