Commit Graph

1044 Commits

Author SHA1 Message Date
Fred Drake e8b46132e2 Massive changes. Fewer warnings from the Python Library Reference. Still
messy, but the thing seems to be working without bombing completely today.
Formatting lib.texi with TeX doesn't seem to do too badly, either!

Info formatting isn't quite there; that might just have to disappear this
time.
1998-02-17 05:54:46 +00:00
Fred Drake 7154d382c3 Update indexsubitem for file attributes correctly. 1998-02-17 02:11:21 +00:00
Fred Drake a200faac55 \nodename{} must appear immediately after \section{} for the info conversion. 1998-02-17 02:10:41 +00:00
Fred Drake 06e1664c77 Indent {verbatim} environments like in the printed version. 1998-02-16 22:50:06 +00:00
Fred Drake 76183c0ed8 Move optional package inclusions to the top, to make them easier to find.
Code elsewhere in this file tests for the inclusion of the package and does
not need to be uncommented.  Comments explain what they do and how to
disable them.

Added support for the optional "fancyhdr" package.  If used, page footers
include chapter information on the left and section information on the right.

Both optional packages, "fancyhdr" and "times", are enabled by default.  We
may want to disable them before shipping, but I'm not completely convinced.
(How many installations format their own documentation?)
1998-02-16 22:30:10 +00:00
Fred Drake fac431e7d5 NNTP.xgtitle() description: Add a missing ")" from the response value
description.

NNTP.xover() description:  Adjust some markup for consistency.
1998-02-16 21:57:37 +00:00
Fred Drake 009ab92c12 Made the area for wildcards in the description wider, so we don't invade the
left margin.
1998-02-16 21:37:58 +00:00
Fred Drake 75fc045bf5 Fixed formatting of the program name for crypt.
Added another index entry.
1998-02-16 21:36:57 +00:00
Fred Drake ad51192a4f In the example file name, use the current Python version, not a hardcoded
value.

Use logical markup.
1998-02-16 21:25:53 +00:00
Fred Drake 2705e801d9 For the lists which describe the regular expression syntax, increase the
width available so we don't run into the left page margin.
1998-02-16 21:21:13 +00:00
Fred Drake b0f77d65db Use \version to get the current Python version number, where possible. This
can only be done in the running text, and not in {verbatim} environments.
1998-02-16 20:58:58 +00:00
Fred Drake 7506298dfb Mark up filename extensions consistently.
Logical markup.
1998-02-16 20:40:37 +00:00
Fred Drake 3b26eeddea Added rule to generate the PDF format using pdflatex. Commented out since
this is still experimental software.  See the comment.
1998-02-16 17:06:10 +00:00
Fred Drake 9d20ac36a9 Removed various "(New in 1.5a?!)" constructs. Other notes pertaining to
versioning remain intact.
1998-02-16 15:27:08 +00:00
Fred Drake 70d289d04b Break up some long lines in the generated header & footer. 1998-02-16 15:23:11 +00:00
Fred Drake 1aedbd8b0a "--" --> "---" in two places. 1998-02-16 14:47:27 +00:00
Fred Drake 4de05a90be Place C typedef for Py_complex after brief description, to be more consistent
with the other example of a structure description (struct _frozen).

Added index entries for the modules referenced in the document.
1998-02-16 14:25:26 +00:00
Fred Drake 53fb7723ee Added index enties for the Python built-in functions, where appropriate. 1998-02-16 06:23:20 +00:00
Fred Drake e058b4f124 Lots of nitty-gritty stuff:
Use \emph{} when referring to title of any of the Python manuals, like is
done in the other manuals.

In some places, use \emph{} or \dfn{} instead of ``...''.

Use \samp{} instead of \code{} when marking identifier prefixes.

Use logical markup wherever it made sense.

Fixed a bunch of typos.

In several places, use "---" instead of "--" to get the emdash.

Start sentences with capital letters and end them with periods, as needed.

"it's" --> "its" in many places:  "it's" it *always* a contraction of "it is",
and "its" should always be used for the possessive.

"don't" --> "doesn't"

"should discards any" --> "should discard any"

In C function descriptions, use \var{} to mark parameters in the running
text instead of \code{}.  This matches usage in the other manauls better,
and is more consistent with the formatting of the function signatures.
Lots of little changes to implement this.

Lots of fixups needed due to appearant heavy cut-&-paste in the orignal
document.

Mention that the exception objects may be either classes or strings,
depending on the use of -X; they were unequivocally stated to be strings
in the section "Standard Exceptions".

"mkvalue()" --> "Py_BuildValue()"

Description of PyNumber_Power() indicates that the third value is option,
but not how to indicate that it was omitted.  Clarified.

Explain the behavior of PyString_FromStringAndSize() if the buffer is NULL.

Explain the Py_complex structure a little (tell what it's used for) and use
a {verbatim} environment for the structure definition itself.

Fix explanation of PyFile_SoftSpace().

Update the example version string to 1.5.

Combined the sections on defining new object types.
1998-02-16 06:15:35 +00:00
Fred Drake f1a4150b70 Make sure indexes begin on odd-numbered pages. 1998-02-16 05:30:27 +00:00
Fred Drake b666c15c4a Normalization of markup. 1998-02-13 22:22:36 +00:00
Fred Drake 6e99adb1c9 Don't capitalize identifiers at the beginning of the sentence; re-write to
place them elsewhere so they get the right capitalization.
1998-02-13 22:17:21 +00:00
Fred Drake 01dbb88831 Fix some markup so that the right characters are printed.
"EOF" --> "\EOF{}"
1998-02-13 22:13:07 +00:00
Fred Drake 4a1efb63a9 Capitalize subsection title. 1998-02-13 22:10:21 +00:00
Fred Drake ab875b9a32 Make one paragraph wrap a little better. 1998-02-13 22:07:33 +00:00
Fred Drake a19bb9bbcf Capitalize first word in sentences, use periods at end. 1998-02-13 21:57:33 +00:00
Fred Drake 86b5dcec86 Change {datadesc} environments with empty descriptions to \dataline{}s; this
removes extra vertical space from the list of names, and makes the display
more similar to that used in the socket module, where several constants share
a description.
1998-02-13 21:55:21 +00:00
Fred Drake fc931ecf92 In description of sound_similar(), break up the markup for long
\code{} at each embedded space, so that the words will wrap.  This keeps
it from being too ugly.
1998-02-13 21:49:12 +00:00
Fred Drake 315b5d8a7f In description of __import__, second paragraph, break up the markup for long
\code{} at each embedded space, so that the words will wrap.  This keeps it
from running off the side of the page, and is only slightly weird.
1998-02-13 21:26:35 +00:00
Fred Drake 83bd081920 Minor stuff:
Explain what happens when a negative shift count is used (what exception).

Mark the title "Python Reference Manual" as \emph{}, for consistency.

"info" --> "information"

Tell more about the data attributes of file objects, using the {datadesc}
environment.

When refering the user to the language reference for information about
internal types, tell what internal types to expect information on.
1998-02-13 20:59:25 +00:00
Fred Drake 4c6896304b Fix weirdness with single-page table of contents, reported by Guido. 1998-02-13 16:58:49 +00:00
Fred Drake 2549249f79 &do_env_datadescni,
&do_env_funcdescni:  New functions.  These support the non-indexing variety
	of the {datadesc} and {funcdesc} environments.

There's still some flakiness with the new indexsubitem support, but that's
low priority.
1998-02-13 15:08:36 +00:00
Fred Drake fb74a463ad Add "Pretty Good Privacy" as well as "PGP" to the index. 1998-02-13 14:52:17 +00:00
Fred Drake c9c456ef69 In add_label_data() description, use "\samp{}" instead of "``\code{...}''"
to indicate the interpreted letters from the format string.
1998-02-13 14:48:00 +00:00
Fred Drake 7f6e2c45ec Use "\samp{...}" instead of "``\code{...}''" when showing markup fragments
in the running text.

For computed attribute and method names (where there's a \var{} part to
the name), use the non-indexing forms of \datadesc{} and \funcdesc{}.
This doesn't change the printed output, but removes 3 rejections from the
makeindex run and allows the LaTeX2HTML support to exclude these from the
index.
1998-02-13 14:38:23 +00:00
Fred Drake b441eb84d3 Use "\samp{...}" instead of "``\code{...}''" when showing markup fragments
in the running text.

For computed method names (where there's a \var{} part to the name), use
the non-indexing form of \funcdesc{}.  This doesn't change the printed
output, but removes 3 rejections from the makeindex run and allows the
LaTeX2HTML support to exclude these from the index.
1998-02-13 14:37:12 +00:00
Fred Drake aebc6f399e Two new environments: datadescni and funcdescni. These are similar to
datadesc and funcdesc, but don't add entries to the index.
1998-02-13 14:34:04 +00:00
Fred Drake 00dcfb2bc3 &get_indexsubitem: This now has a chance of working, thanks to:
&do_cmd_setindexsubitem:  New function.  Set the indexsubitem value from
	\setindexsubitem{(...)}.

&do_env_opcodedesc:  By default, don't index byte codes.

$INDEX_OPCODES:  New flag.  If true, index the byte codes.  Default is off.

Normalize indentation to 4 spaces everywhere.

Minor nits.
1998-02-13 07:21:03 +00:00
Fred Drake 8842e867af Remove \bcode / \ecode everywhere.
Make all the indentations in {verbatim} environments have column 0 of the
listing in column 0 of the file.

Remove pagenumbering / pagestyle cruft.

Use more logical and less physical markup.
1998-02-13 07:16:30 +00:00
Fred Drake 1e11a5c117 Remove \bcode / \ecode everywhere.
Make all the indentations in {verbatim} environments have column 0 of the
listing in column 0 of the file.

Remove pagenumbering / pagestyle cruft.
1998-02-13 07:11:32 +00:00
Fred Drake 2a4646c660 Remove obsolete pagenumbering / pagestyle cruft. 1998-02-13 07:08:56 +00:00
Fred Drake 1947991c2f Remove all \bcode / \ecode cruft; this is no longer needed. See previous
checkin of myformat.sty.

Change "\renewcommand{\indexsubitem}{(...)}" to "\setindexsubitem{(...)}"
everywhere.

Some other minor nits that I happened to come across.
1998-02-13 06:58:54 +00:00
Fred Drake dc8af0acc1 Lots of stuff:
Handle most (all?) of the page style / numbering magic here so the documents
don't have to do it individually.

Revise the \bcode / \ecode stuff so that the {verbatim} environment handles
it right directly.  \bcode / \ecode will be completely removed from all files
(to be checked in momentarily).

Have the {verbatim} environment get the samples indented a bit; this
appearantly had been attempted in the old code, but didn't work because
paragraphs weren't indented.

Make all headers, from chapters on down to subparagraphs, have sans-serif
titles.

\setindexsubitem{}:  New macro.  Replaces \renewcommand{\indexsubitem{}(...)}
	everywhere.  This allows LaTeX2HTML to be made to work correctly for
	this.  That was near impossible with the old mechanisms.

For all {*desc} environments, make the name of the described thing bold as
well as monospaced.

{opcodedesc} environment:  Don't index the byte code names; that doesn't seem
	terribly useful, and there are a lot of them.

\var{}:  More magic to make sure that the size is right even if embedded in
	\file{} or some other macro that uses the sans-serif font in running
	text.

\bfcode{}:  New macro.  Makes the font \code{} and bold.  (Was unreasonable
	using old LaTeX 2.09.)

\file{}:  Adjust the size of the sans-serif font a little.

\email{}, \url{},  Make these use the same font as \file{}, but not the
	surrounding single-quotes.

Update many comments.

Lots of minor nits and a little cleanliness.
1998-02-13 06:48:05 +00:00
Fred Drake cffaebb621 parse_line(): Strip whitespace from the module name.
main():  Include a comma between the module name and page number, to make
	 the generated index more like the "standard" generated index.
1998-02-13 05:11:05 +00:00
Fred Drake 6eab2fb0f1 Clean up some of the definitions related to info generation. 1998-02-13 03:23:33 +00:00
Fred Drake e5bc49785c "ASCII" --> "\ASCII{}" 1998-02-12 23:36:49 +00:00
Fred Drake 04cf4dcf58 Added tarpdf target.
Don't remove *.texi & *.info for clean; only for clobber.

Don't remake tarballs if not needed (PDF & PS only).  HTML tarball is still
painful.
1998-02-12 22:33:50 +00:00
Fred Drake e5bf8b2c79 Reorganized a bit. No changed content.
Guido, please take a look at new structure, at least the ToC.
1998-02-12 21:22:28 +00:00
Fred Drake f44617d298 For sections describing the "Foo Protocol", consistently use the capitalized
"Protocol" and not "protocol".
1998-02-12 20:57:15 +00:00
Fred Drake faa1afe2d7 Py_Exit(status) calls exit(status), not exit(0). 1998-02-12 20:51:02 +00:00
Guido van Rossum da62398139 Correct description of BUILD_SLICE. 1998-02-12 03:53:02 +00:00
Fred Drake 63221124c0 Comment out the times package in the distributed version. 1998-02-12 03:48:50 +00:00
Fred Drake dd1f6cc402 Mark opcode arguments \var{} in the running text.
In IMPORT_NAME description:  "is not affect:" --> "is not affected:"
1998-02-12 03:32:18 +00:00
Fred Drake 8a72a7e344 Use new \authoraddress{}; author's name and address are now separate.
Use new \release{}; this is now separate from \date{}.

Use \email{} instead of \code{} for email addresses.
1998-02-12 03:16:04 +00:00
Fred Drake 71c1ef34bf Remove second index entry for UserList. 1998-02-12 03:10:55 +00:00
Fred Drake 06f169bb7f \rfcindex{}: Removed; no longer needed.
\file{}:  Use a sans-serif font for the filename itself.

Use the fncychap.sty package for fancy chapter headings.

Replace the \maketitle command with our own format.  This is new, but it
looks a lot better than the old one.

Use \renewcommand instead of \def when extending or overriding standard LaTeX
commands.  This makes it more LaTeX-like.
1998-02-11 23:08:20 +00:00
Fred Drake 0e823d2abd New file. Written by Ulf A. Lindgren <lindgren@ae.chalmers.se>; we have
permission to distribute this without modifications.  This is the latest
version, directly from Ulf.

CTAN:macros/latex/contrib/supported/fncychap/
1998-02-11 23:01:23 +00:00
Guido van Rossum 692b87db15 Added \nodename; added index entry for UserList. 1998-02-11 23:00:08 +00:00
Guido van Rossum f6a7b443c2 Added entries for stat, commands modules. 1998-02-11 22:58:55 +00:00
Guido van Rossum 6d659b3e51 Added entries for re, soundex modules. 1998-02-11 22:57:10 +00:00
Guido van Rossum 38e0df330b Some subtleties suggested by Tamito Kajiyama, including an added
\nodename macro for a section with a very underscriptive title.
1998-02-11 22:55:55 +00:00
Guido van Rossum f5370f4019 Turn the space in [\^ ...] into a hard space: [\^\ ...]. 1998-02-11 22:52:47 +00:00
Guido van Rossum 1c974db134 Split UserDict and UserList on two separate lines; added entries for
modules symbol and token.
1998-02-11 22:36:17 +00:00
Guido van Rossum ee833cca7b Don't break a long line at an unpleasant point. 1998-02-11 22:34:51 +00:00
Guido van Rossum 8b0927eddc Added missing entry for cmath. 1998-02-11 22:33:57 +00:00
Guido van Rossum c57aff20e3 Replace $math$ with \code{}. 1998-02-11 22:33:28 +00:00
Guido van Rossum c4452fd08f Swap ni and imp (so they are in the same order as their sections are). 1998-02-11 22:32:23 +00:00
Guido van Rossum 34122fa99c Remove a spurious space from the title. 1998-02-11 22:31:54 +00:00
Fred Drake ed68854b40 "lists objects" --> "list objects" (Section "More on Lists".) 1998-02-11 22:29:17 +00:00
Fred Drake 8d486b1779 In the appendix, all sections were marked as subsections, and so had section
numbers "A.0.#".  Fixed.
1998-02-11 22:12:18 +00:00
Fred Drake 5d8f0edc33 Add copyright.tex and boilerplate.tex to the common dependencies for .dvi
files.
1998-02-11 14:43:38 +00:00
Fred Drake a28eb3a8cb Mark the URL "ftp://ftp.python.org" with \url{}. 1998-02-11 14:42:06 +00:00
Fred Drake 4254363f25 &do_cmd_rfc: New function. Handles \rfc{}.
$STRIP_INDEX_TT:  New flag.  If set, the <tt>...</tt> around stuff in the index
	is dropped.  This is more O'Reilly-like.

&make_str_index_entry:  Honor $STRIP_INDEX_TT.

&make_mod_index_entry:  Honor $STRIP_INDEX_TT.
1998-02-10 22:11:07 +00:00
Fred Drake 526467ce0a Removed all references to the \rfcindex{} macro; now only \rfc{} is used. 1998-02-10 21:42:27 +00:00
Fred Drake a94d21f44e Minor performance nits. 1998-02-10 21:35:49 +00:00
Fred Drake 4be00713b8 Include indfix.py script in lib.dvi's processing. 1998-02-09 22:18:42 +00:00
Fred Drake dd244a0b9e Script to fix up the Library Reference index so it's less ugly. The docstring:
"""Combine similar index entries into an entry and subentries.

For example:

  \item {foobar} (in module flotz), 23
  \item {foobar} (in module whackit), 4323

becomes

  \item {foobar}
    \subitem in module flotz, 23
    \subitem in module whackit, 4323

Note that an item which matches the format of a collapsable item but which
isn't part of a group of similar items is not modified.
"""

This results in a much more readable index, with less repitition of text;
especially for common method names.
1998-02-09 22:17:52 +00:00
Fred Drake 1624a507e6 Oops, missed a \POSIX{} in an index entry. 1998-02-09 22:12:28 +00:00
Fred Drake 88223904c8 Add some index entries; switch to logical markup. 1998-02-09 20:52:48 +00:00
Fred Drake 65b32f7f74 Consistently use \POSIX{} to denote POSIX. There were at least two different
ways to do it previously (not counting module names).
1998-02-09 20:27:12 +00:00
Fred Drake 41785fb864 Do the right magic to make \ABC{} get sorted correctly in the index. 1998-02-09 20:16:46 +00:00
Fred Drake 19b97b13fa Do the right magic to make \UNIX{} get sorted correctly in the index. 1998-02-09 20:16:18 +00:00
Fred Drake c58912426e Use the new RFC macros wherever RFCs are referenced by number. No other
changes.
1998-02-09 19:16:20 +00:00
Fred Drake b16166e56f Add macros to insert RFC references much like the \manpage{} macro. Also a
macro to insert an RFC index reference.

(RFC references were formatted three different ways.)
1998-02-09 19:14:54 +00:00
Guido van Rossum 8083c176a3 Add a note about rounding up of readlines()' sizehint to 8K. 1998-02-08 22:51:09 +00:00
Guido van Rossum 6e91c6a344 Document getrefcount(). 1998-02-07 21:17:05 +00:00
Fred Drake b37a395231 \itembreak, \itemjoin: Remove unused macros.
\idxcode{}:  New macro; used to mark things that would be \code{} for entry
	into the index.  This allows easily switching things around for the
	font used in the index.  (O'Reilly seems to keep it all plain roman
	in the index.  Looks reasonable in the Python documentation as well.)

\*index{}:  Use \idxcode{} instead of {\codefont{}}.
1998-02-06 22:52:52 +00:00
Fred Drake 31c4ed75fc Remove commented-out \itembreak. 1998-02-06 22:26:04 +00:00
Fred Drake c660233cfb Update two of the \indexsubitem values to use singular rather than plural form
of "variable": each individual variable should be identified as a single
variable and not a collection in the index.
1998-02-06 22:19:23 +00:00
Guido van Rossum 8e1e68de49 Add ref to errno module, and change ref to posix.error to os.error. 1998-02-06 15:18:25 +00:00
Guido van Rossum f499e09f94 Add ref to errno module. 1998-02-06 15:18:05 +00:00
Guido van Rossum afcd589027 Retract the statement that all functions called by Python (even method
defs) need to be declared extern "C" -- it seems to have no basis in
truth (any more?).
1998-02-05 19:59:39 +00:00
Fred Drake 6b7fc6f267 Add *.pdf files to the clobber target (same target as *.ps). 1998-02-04 20:33:13 +00:00
Fred Drake baf700f398 Tell CVS to ignore PDF files. 1998-02-04 20:27:39 +00:00
Fred Drake b6e5032d9c Added description of "D" format for PyArg_ParseTuple(), including example
use with function name provided as well.

Wrapped up PyArg_ParseTupleAndKeywords() description and provided example
based on Geoff Philbrick's example to the mailing list.
1998-02-04 20:26:31 +00:00
Fred Drake 126d840d1a Use implicit rules to perform DVI->PS and PS->PDF conversions. PDF conversion
requires "distill" from a FrameMaker installation.  ;-)  Would probably need
to be different for Windows/Mac.
1998-02-04 19:54:40 +00:00
Fred Drake b19274704f \modindex{}: New macro; index module without declaring it "built-in" or
"standard".  This is mostly for documentation of modules outside the
	standard library.
1998-02-04 14:43:36 +00:00
Fred Drake 8aad4c80b3 Added missing "{" for "\code <?stuff?>}". 1998-02-03 23:12:13 +00:00
Guido van Rossum ad37e9e77d Clarify that capwords() removes leading/trailing whitespace.
Remove references to regsub, which is obsolescent.
1998-02-02 03:01:10 +00:00
Guido van Rossum c45c2f3dc1 Add S_ISBLK(). 1998-01-29 22:03:41 +00:00