Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 1 | Python standard documentation -- in LaTeX |
| 2 | ----------------------------------------- |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 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 | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 12 | main Python distribution (try <http://www.python.org/> or |
| 13 | <ftp://ftp.python.org/pub/python/>). |
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 |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 18 | doc/*.tex Documenting Python |
Fred Drake | 099b76c | 1998-05-11 16:31:32 +0000 | [diff] [blame] | 19 | ext/*.tex Extending and Embedding the Python Interpreter |
| 20 | lib/*.tex Python Library Reference |
Fred Drake | 697c1c7 | 1998-08-12 17:13:28 +0000 | [diff] [blame] | 21 | mac/*.tex Macintosh Library Modules |
Fred Drake | 099b76c | 1998-05-11 16:31:32 +0000 | [diff] [blame] | 22 | ref/*.tex Python Reference Manual |
| 23 | tut/*.tex Python Tutorial |
Greg Ward | 0862f80 | 2000-04-28 16:53:36 +0000 | [diff] [blame] | 24 | inst/*.tex Installing Python Modules |
| 25 | dist/*.tex Distributing Python Modules |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 26 | |
Fred Drake | 697c1c7 | 1998-08-12 17:13:28 +0000 | [diff] [blame] | 27 | Most use the "manual" document class and "python" package, derived from |
| 28 | the old "myformat.sty" style file. The Macintosh Library Modules |
| 29 | document uses the "howto" document class instead. These contains many |
| 30 | macro definitions useful in documenting Python, and set some style |
| 31 | 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 |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 34 | order and the right number of times. By default, it will build the |
| 35 | HTML version of the documnetation, but DVI, PDF, and PostScript can |
| 36 | also be made. To view the generated HTML, point your favorite browser |
| 37 | at the top-level index (html/index.html) after running "make". |
Guido van Rossum | 7f777ed | 1990-08-09 14:25:15 +0000 | [diff] [blame] | 38 | |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 39 | The Makefile can also produce DVI files for each document made; to |
| 40 | preview them, use xdvi. PostScript is produced by the same Makefile |
| 41 | target that produces the DVI files. This uses the dvips tool. |
| 42 | Printing depends on local conventions; at our site, we use lpr. For |
| 43 | example: |
| 44 | |
| 45 | make paper-letter/lib.ps # create lib.dvi and lib.ps |
| 46 | xdvi paper-letter/lib.dvi # preview lib.dvi |
| 47 | lpr paper-letter/lib.ps # print on default printer |
Guido van Rossum | cd7bf39 | 1992-04-05 15:06:03 +0000 | [diff] [blame] | 48 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 49 | |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 50 | What if I find a bug? |
| 51 | --------------------- |
| 52 | |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 53 | First, check that the bug is present in the development version of the |
| 54 | documentation at <http://python.sourceforge.net/devel-docs/>; we may |
| 55 | have already fixed it. |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 56 | |
| 57 | If we haven't, tell us about it. We'd like the documentation to be |
| 58 | complete and accurate, but have limited time. If you discover any |
| 59 | inconsistencies between the documentation and implementation, or just |
| 60 | have suggestions as to how to improve the documentation, let is know! |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 61 | Specific bugs and patches should be reported using our bug & patch |
| 62 | databases at: |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 63 | |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 64 | http://sourceforge.net/projects/python |
| 65 | |
| 66 | Other suggestions or questions should be sent to the Python |
| 67 | Documentation Team: |
| 68 | |
| 69 | python-docs@python.org |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 70 | |
| 71 | Thanks! |
| 72 | |
| 73 | |
Fred Drake | 4190fae | 1998-05-11 19:05:36 +0000 | [diff] [blame] | 74 | What happened to the Macintosh chapter of the Python Library Reference? |
| 75 | ----------------------------------------------------------------------- |
| 76 | |
| 77 | The directory mac/ contains the LaTeX sources for the "Macintosh |
Fred Drake | bd40094 | 1998-08-11 17:41:20 +0000 | [diff] [blame] | 78 | Library Modules" manual; this is built using the standard build |
| 79 | targets, so check the proper output directory for your chosen format |
| 80 | and paper size. |
Fred Drake | 4190fae | 1998-05-11 19:05:36 +0000 | [diff] [blame] | 81 | |
| 82 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 83 | What tools do I need? |
| 84 | --------------------- |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 85 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 86 | 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] | 87 | documentation are written in Python. You don't need this |
| 88 | documentation to install Python; instructions are included in the |
| 89 | README file in the Python distribution. |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 90 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 91 | The simplest way to get the rest of the tools in the configuration we |
Fred Drake | 7e861bd | 2000-08-31 15:29:38 +0000 | [diff] [blame] | 92 | used is to install the teTeX TeX distribution, versions 0.9 or newer. |
| 93 | More information is available on teTeX at <http://www.tug.org/tetex/>. |
| 94 | This is a Unix-only TeX distribution at this time. This documentation |
| 95 | release was tested with the 1.0.7 release, but there have been no |
| 96 | substantial changes since late in the 0.9 series, which we used |
| 97 | extensively for previous versions without any difficulty. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 98 | |
Fred Drake | 099b76c | 1998-05-11 16:31:32 +0000 | [diff] [blame] | 99 | 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] | 100 | |
| 101 | To create DVI, PDF, or PostScript files: |
| 102 | |
| 103 | - LaTeX2e, 1995/12/01 or newer. Older versions are likely to |
| 104 | choke. |
| 105 | |
| 106 | - makeindex. This is used to produce the indexes for the |
| 107 | library reference and Python/C API reference. |
| 108 | |
| 109 | To create PDF files: |
| 110 | |
Fred Drake | 7e861bd | 2000-08-31 15:29:38 +0000 | [diff] [blame] | 111 | - pdflatex. We used the one in the teTeX distribution (pdfTeX |
| 112 | version 3.14159-13d (Web2C 7.3.1) at the time of this |
| 113 | writing). Versions even a couple of patchlevels earlier are |
| 114 | highly likely to fail due to syntax changes for some of the |
| 115 | pdftex primitives. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 116 | |
| 117 | To create PostScript files: |
| 118 | |
| 119 | - dvips. Most TeX installations include this. If you don't |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 120 | have one, check CTAN (<ftp://ctan.tug.org/tex-archive/>). |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 121 | |
| 122 | To create info files: |
| 123 | |
Fred Drake | da71e31 | 1999-01-13 23:02:38 +0000 | [diff] [blame] | 124 | Note that info support is currently being revised using new |
| 125 | conversion tools by Michael Ernst <mernst@cs.washington.edu>. |
Fred Drake | 45084ed | 1998-04-09 15:19:41 +0000 | [diff] [blame] | 126 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 127 | - makeinfo. This is available from any GNU mirror. |
| 128 | |
Fred Drake | 45084ed | 1998-04-09 15:19:41 +0000 | [diff] [blame] | 129 | - emacs or xemacs. Emacs is available from the same place as |
| 130 | makeinfo, and xemacs is available from ftp.xemacs.org. |
| 131 | |
Fred Drake | da71e31 | 1999-01-13 23:02:38 +0000 | [diff] [blame] | 132 | - Perl. Find the software at |
| 133 | <http://language.perl.com/info/software.html>. |
| 134 | |
Fred Drake | 9566988 | 2000-10-26 19:01:46 +0000 | [diff] [blame] | 135 | - HTML::Element. If you don't have this installed, you can get |
| 136 | this from CPAN. Use the command: |
| 137 | |
| 138 | perl -e 'use CPAN; CPAN::install("HTML::Element");' |
| 139 | |
| 140 | You may need to be root to do this. |
| 141 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 142 | To create HTML files: |
| 143 | |
Fred Drake | 71472a5 | 1998-03-04 15:21:02 +0000 | [diff] [blame] | 144 | - Perl 5.004_04 or newer. Find the software at |
| 145 | <http://language.perl.com/info/software.html>. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 146 | |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 147 | - LaTeX2HTML 99.2b8 or newer. Older versions are not |
| 148 | supported; each version changes enough that supporting |
| 149 | multiple versions is not likely to work. Many older |
| 150 | versions don't work with Perl 5.6 as well. This also screws |
| 151 | up code fragments. ;-( Releases are available at: |
| 152 | <http://www.latex2html.org/>. |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 153 | |
| 154 | |
| 155 | What if Times fonts are not available? |
| 156 | -------------------------------------- |
| 157 | |
| 158 | As distributed, the LaTeX documents use PostScript Times fonts. This |
| 159 | is done since they are much better looking and produce smaller |
| 160 | PostScript files. If, however, your TeX installation does not support |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 161 | them, they may be easily disabled. Edit the file |
| 162 | texiinputs/manual.cls and comment out the line that starts |
Fred Drake | 41dee84 | 1999-03-03 21:39:19 +0000 | [diff] [blame] | 163 | "\RequirePackage{times}" by inserting a "%" character at the beginning |
| 164 | of the line. An alternative is to install the right fonts and LaTeX |
| 165 | style file. |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 166 | |
| 167 | |
| 168 | What if I want to use A4 paper? |
| 169 | ------------------------------- |
| 170 | |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 171 | Instead of building the PostScript by giving the command "make ps", |
| 172 | give the command "make PAPER=a4 ps"; the output will be produced in |
| 173 | the paper-a4/ subdirectory. (You can use "make PAPER=a4 pdf" if you'd |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 174 | rather have PDF output.) |
Guido van Rossum | a417b66 | 1997-12-08 20:51:26 +0000 | [diff] [blame] | 175 | |
| 176 | |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 177 | Making HTML files |
| 178 | ----------------- |
| 179 | |
Fred Drake | 34eefe5 | 1998-03-03 21:41:22 +0000 | [diff] [blame] | 180 | The LaTeX documents can be converted to HTML using Nikos Drakos' |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 181 | LaTeX2HTML converter. See the Makefile; after some twiddling, "make" |
| 182 | should do the trick. |
Guido van Rossum | f1245a8 | 1995-03-20 13:00:53 +0000 | [diff] [blame] | 183 | |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 184 | |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 185 | What else is in here? |
| 186 | --------------------- |
| 187 | |
| 188 | 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] | 189 | the new series of Python HOWTO documents which is being coordinated by |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 190 | Andrew Kuchling <akuchlin@mems-exchange.org>. The file |
| 191 | templates/howto.tex is a commented example which may be used as a |
| 192 | template. A Python script to "do the right thing" to format a howto |
| 193 | document is included as tools/mkhowto. These documents can be |
| 194 | formatted as HTML, PDF, PostScript, or ASCII files. Use "mkhowto |
| 195 | --help" for information on using the formatting tool. |
Fred Drake | bd40094 | 1998-08-11 17:41:20 +0000 | [diff] [blame] | 196 | |
| 197 | For authors of module documentation, there is a file |
| 198 | templates/module.tex which may be used as a template for a module |
| 199 | section. This may be used in conjunction with either the howto or |
| 200 | manual document class. Create the documentation for a new module by |
| 201 | copying the template to lib<mymodule>.tex and editing according to the |
| 202 | instructions in the comments. |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 203 | |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 204 | Documentation on the authoring Python documentation, including |
| 205 | information about both style and markup, is available in the |
| 206 | "Documenting Python" manual. |
| 207 | |
Fred Drake | 6355bd4 | 1998-03-27 05:17:21 +0000 | [diff] [blame] | 208 | |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 209 | Copyright notice |
| 210 | ================ |
| 211 | |
| 212 | The Python source is copyrighted, but you can freely use and copy it |
| 213 | as long as you don't change or remove the copyright notice: |
| 214 | |
| 215 | ---------------------------------------------------------------------- |
Michael W. Hudson | 494cdb6 | 2002-02-27 13:29:46 +0000 | [diff] [blame] | 216 | Copyright (c) 2000-2002 Python Software Foundation. |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 217 | All rights reserved. |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 218 | |
Fred Drake | da6daee | 2001-01-22 21:38:09 +0000 | [diff] [blame] | 219 | Copyright (c) 2000 BeOpen.com. |
| 220 | All rights reserved. |
| 221 | |
| 222 | Copyright (c) 1995-2000 Corporation for National Research Initiatives. |
| 223 | All rights reserved. |
| 224 | |
| 225 | Copyright (c) 1991-1995 Stichting Mathematisch Centrum. |
| 226 | All rights reserved. |
| 227 | |
Fred Drake | 6c29926 | 2001-07-18 20:01:15 +0000 | [diff] [blame] | 228 | See the file "texinputs/license.tex" for information on usage and |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 229 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Fred Drake | 4912beb | 1998-03-11 17:07:35 +0000 | [diff] [blame] | 230 | ---------------------------------------------------------------------- |