Mercurial > cpython-lru_cache-weakref
annotate Doc/texinputs/python.sty @ 41554:06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r53954 | jeremy.hylton | 2007-02-26 10:41:18 -0800 (Mon, 26 Feb 2007) | 10 lines
Do not copy free variables to locals in class namespaces.
Fixes bug 1569356, but at the cost of a minor incompatibility in
locals(). Add test that verifies that the class namespace is not
polluted. Also clarify the behavior in the library docs.
Along the way, cleaned up the dict_to_map and map_to_dict
implementations and added some comments that explain what they do.
........
r53955 | jeremy.hylton | 2007-02-26 11:00:20 -0800 (Mon, 26 Feb 2007) | 2 lines
Fix assertion.
........
r53969 | neal.norwitz | 2007-02-26 14:41:45 -0800 (Mon, 26 Feb 2007) | 3 lines
When printing an unraisable error, don't print exceptions. before the name.
This duplicates the behavior whening normally printing exceptions.
........
r53970 | andrew.kuchling | 2007-02-26 15:02:47 -0800 (Mon, 26 Feb 2007) | 1 line
Markup fix
........
r53975 | neal.norwitz | 2007-02-26 15:48:27 -0800 (Mon, 26 Feb 2007) | 3 lines
SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
are gone.
........
r53976 | andrew.kuchling | 2007-02-26 15:54:17 -0800 (Mon, 26 Feb 2007) | 1 line
Add some items
........
r53981 | jeremy.hylton | 2007-02-26 17:01:59 -0800 (Mon, 26 Feb 2007) | 4 lines
Fix long-standing bug in name mangling for package imports
Reported by Mike Verdone.
........
r53993 | jeremy.hylton | 2007-02-27 08:00:06 -0800 (Tue, 27 Feb 2007) | 2 lines
tabify
........
r53994 | jeremy.hylton | 2007-02-27 08:13:23 -0800 (Tue, 27 Feb 2007) | 5 lines
tabify
Note that ast.c still has a mix of tabs and spaces, because it
attempts to use four-space indents for more of the new code.
........
r53996 | jeremy.hylton | 2007-02-27 09:24:48 -0800 (Tue, 27 Feb 2007) | 2 lines
whitespace normalization
........
r53997 | jeremy.hylton | 2007-02-27 10:29:45 -0800 (Tue, 27 Feb 2007) | 24 lines
Add checking for a number of metaclass error conditions.
We add some new rules that are required for preserving internal
invariants of types.
1. If type (or a subclass of type) appears in bases, it must appear
before any non-type bases. If a non-type base (like a regular
new-style class) occurred first, it could trick type into
allocating the new class an __dict__ which must be impossible.
2. There are several checks that are made of bases when creating a
type. Those checks are now repeated when assigning to __bases__.
We also add the restriction that assignment to __bases__ may not
change the metaclass of the type.
Add new tests for these cases and for a few other oddball errors that
were no previously tested. Remove a crasher test that was fixed.
Also some internal refactoring: Extract the code to find the most
derived metaclass of a type and its bases. It is now needed in two
places. Rewrite the TypeError checks in test_descr to use doctest.
The tests now clearly show what exception they expect to see.
........
r53998 | jeremy.hylton | 2007-02-27 10:33:31 -0800 (Tue, 27 Feb 2007) | 2 lines
Add news about changes to metaclasses and __bases__ error checking.
........
r54016 | armin.rigo | 2007-02-28 01:25:29 -0800 (Wed, 28 Feb 2007) | 3 lines
Modify the segfaulting example to show why r53997 is not a solution to
it.
........
r54022 | brett.cannon | 2007-02-28 10:15:00 -0800 (Wed, 28 Feb 2007) | 2 lines
Add a test for instantiating SyntaxError with no arguments.
........
r54026 | raymond.hettinger | 2007-02-28 10:27:41 -0800 (Wed, 28 Feb 2007) | 1 line
Docstring nit.
........
r54033 | raymond.hettinger | 2007-02-28 10:37:52 -0800 (Wed, 28 Feb 2007) | 1 line
Prepare collections module for pure python code entries.
........
r54053 | raymond.hettinger | 2007-02-28 22:16:43 -0800 (Wed, 28 Feb 2007) | 1 line
Add collections.NamedTuple
........
r54054 | neal.norwitz | 2007-02-28 23:04:41 -0800 (Wed, 28 Feb 2007) | 1 line
Add Pat and Eric for work on PEP 3101 in the sandbox
........
r54061 | andrew.kuchling | 2007-03-01 06:36:12 -0800 (Thu, 01 Mar 2007) | 1 line
Add NamedTuple
........
r54080 | georg.brandl | 2007-03-02 06:37:12 -0800 (Fri, 02 Mar 2007) | 2 lines
Bug #1628895: some better tries to find HTML documentation in pydoc.
........
r54086 | raymond.hettinger | 2007-03-02 11:20:46 -0800 (Fri, 02 Mar 2007) | 1 line
Fix embarrassing typo and fix constantification of None
........
r54088 | georg.brandl | 2007-03-02 12:30:14 -0800 (Fri, 02 Mar 2007) | 2 lines
Bugs #1668032, #1668036, #1669304: clarify behavior of PyMem_Realloc and _Resize.
........
r54114 | georg.brandl | 2007-03-04 09:18:54 -0800 (Sun, 04 Mar 2007) | 2 lines
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.
........
r54124 | skip.montanaro | 2007-03-04 12:52:28 -0800 (Sun, 04 Mar 2007) | 2 lines
Teach setup.py how to find Berkeley DB on Macs using MacPorts.
........
r54125 | skip.montanaro | 2007-03-04 12:54:12 -0800 (Sun, 04 Mar 2007) | 1 line
note MacPorts/BerkDB change in setup.py
........
r54136 | neal.norwitz | 2007-03-04 23:52:01 -0800 (Sun, 04 Mar 2007) | 1 line
Added Pete for 3101 too
........
r54138 | facundo.batista | 2007-03-05 08:31:54 -0800 (Mon, 05 Mar 2007) | 1 line
Minor corrections to docs, and an explanation comentary
........
r54139 | georg.brandl | 2007-03-05 14:28:08 -0800 (Mon, 05 Mar 2007) | 3 lines
Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
........
r54149 | georg.brandl | 2007-03-06 01:33:01 -0800 (Tue, 06 Mar 2007) | 3 lines
Nit: a struct field is set to GenericAlloc, not GenericAlloc().
........
r54150 | georg.brandl | 2007-03-06 02:02:47 -0800 (Tue, 06 Mar 2007) | 3 lines
Patch #1671450: add a section about subclassing builtin types to the
"extending and embedding" tutorial.
........
r54152 | martin.v.loewis | 2007-03-06 02:41:24 -0800 (Tue, 06 Mar 2007) | 2 lines
Patch #1121142: Implement ZipFile.open.
........
r54154 | georg.brandl | 2007-03-06 03:51:14 -0800 (Tue, 06 Mar 2007) | 2 lines
A test case for the fix in #1674228.
........
r54156 | georg.brandl | 2007-03-06 03:52:24 -0800 (Tue, 06 Mar 2007) | 2 lines
Patch #1672481: fix bug in idlelib.MultiCall.
........
r54159 | georg.brandl | 2007-03-06 04:17:50 -0800 (Tue, 06 Mar 2007) | 1 line
Bug #1674503: close the file opened by execfile() in an error condition.
........
r54160 | georg.brandl | 2007-03-06 05:32:52 -0800 (Tue, 06 Mar 2007) | 3 lines
Fix another reincarnation of bug #1576657 in defaultdict.
........
r54162 | georg.brandl | 2007-03-06 05:35:00 -0800 (Tue, 06 Mar 2007) | 2 lines
A test case for the defaultdict KeyError bug.
........
r54164 | georg.brandl | 2007-03-06 05:37:45 -0800 (Tue, 06 Mar 2007) | 3 lines
Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".
........
r54165 | martin.v.loewis | 2007-03-06 06:43:00 -0800 (Tue, 06 Mar 2007) | 3 lines
Patch #912410: Replace HTML entity references for attribute values
in HTMLParser.
........
r54166 | skip.montanaro | 2007-03-06 07:41:38 -0800 (Tue, 06 Mar 2007) | 1 line
patch 1673619 - identify extension modules which cannot be built
........
r54167 | guido.van.rossum | 2007-03-06 07:50:01 -0800 (Tue, 06 Mar 2007) | 5 lines
Patch #1646728: datetime.fromtimestamp fails with negative
fractional times. With unittest.
Somebody please backport to 2.5.
........
r54169 | georg.brandl | 2007-03-06 09:49:14 -0800 (Tue, 06 Mar 2007) | 2 lines
Fix cmp vs. key argument for list.sort.
........
r54170 | georg.brandl | 2007-03-06 10:21:32 -0800 (Tue, 06 Mar 2007) | 2 lines
Small nit, found by Neal.
........
r54171 | georg.brandl | 2007-03-06 10:29:58 -0800 (Tue, 06 Mar 2007) | 3 lines
Patch #1602128: clarify that richcmp methods can return NotImplemented
and should return True or False otherwise.
........
r54173 | georg.brandl | 2007-03-06 10:41:12 -0800 (Tue, 06 Mar 2007) | 2 lines
Patch #1638879: don't accept strings with embedded NUL bytes in long().
........
r54175 | georg.brandl | 2007-03-06 10:47:31 -0800 (Tue, 06 Mar 2007) | 2 lines
Patch #1673121: update README wrt. OSX default shell.
........
r54177 | georg.brandl | 2007-03-06 10:59:11 -0800 (Tue, 06 Mar 2007) | 3 lines
Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
........
r54180 | walter.doerwald | 2007-03-06 12:38:57 -0800 (Tue, 06 Mar 2007) | 4 lines
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
........
r54182 | walter.doerwald | 2007-03-06 13:15:24 -0800 (Tue, 06 Mar 2007) | 2 lines
Document change to curses.
........
r54188 | georg.brandl | 2007-03-06 16:34:46 -0800 (Tue, 06 Mar 2007) | 5 lines
Variant of patch #697613: don't exit the interpreter on a SystemExit
exception if the -i command line option or PYTHONINSPECT environment
variable is given, but break into the interactive interpreter just like
on other exceptions or normal program exit.
(backport)
........
r54189 | georg.brandl | 2007-03-06 16:40:28 -0800 (Tue, 06 Mar 2007) | 4 lines
Patch #703779: unset __file__ in __main__ after running a file. This
makes the filenames the warning module prints much more sensible when
a PYTHONSTARTUP file is used.
........
r54192 | george.yoshida | 2007-03-06 20:21:18 -0800 (Tue, 06 Mar 2007) | 2 lines
add versionadded info
........
r54195 | georg.brandl | 2007-03-06 23:39:06 -0800 (Tue, 06 Mar 2007) | 2 lines
Patch #812285: allow multiple auth schemes in AbstractBasicAuthHandler.
........
r54197 | georg.brandl | 2007-03-07 00:31:51 -0800 (Wed, 07 Mar 2007) | 3 lines
Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.
........
r54199 | georg.brandl | 2007-03-07 01:09:40 -0800 (Wed, 07 Mar 2007) | 3 lines
Patches #1550273, #1550272: fix a few bugs in unittest and add a
comprehensive test suite for the module.
........
r54201 | georg.brandl | 2007-03-07 01:21:06 -0800 (Wed, 07 Mar 2007) | 3 lines
Patch #787789: allow to pass custom TestRunner instances to unittest's
main() function.
........
r54202 | georg.brandl | 2007-03-07 01:34:45 -0800 (Wed, 07 Mar 2007) | 2 lines
Patch #1669331: clarify shutil.copyfileobj() behavior wrt. file position.
........
r54204 | martin.v.loewis | 2007-03-07 03:04:33 -0800 (Wed, 07 Mar 2007) | 2 lines
Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
........
r54206 | georg.brandl | 2007-03-07 03:37:42 -0800 (Wed, 07 Mar 2007) | 2 lines
Patch #1675471: convert test_pty to unittest.
........
r54207 | georg.brandl | 2007-03-07 03:54:49 -0800 (Wed, 07 Mar 2007) | 4 lines
Add some sanity checks to unittest.TestSuite's addTest(s) methods.
Fixes #878275.
........
r54209 | guido.van.rossum | 2007-03-07 07:16:29 -0800 (Wed, 07 Mar 2007) | 3 lines
Windows doesn't support negative timestamps. Skip the tests involving them
if os.name == "nt".
........
r54219 | martin.v.loewis | 2007-03-08 05:42:43 -0800 (Thu, 08 Mar 2007) | 2 lines
Add missing ) in parenthical remark.
........
r54220 | georg.brandl | 2007-03-08 09:49:06 -0800 (Thu, 08 Mar 2007) | 2 lines
Fix #1676656: \em is different from \emph...
........
r54222 | georg.brandl | 2007-03-08 10:37:31 -0800 (Thu, 08 Mar 2007) | 2 lines
Add a NEWS entry for rev. 54207,8.
........
r54225 | raymond.hettinger | 2007-03-08 11:24:27 -0800 (Thu, 08 Mar 2007) | 1 line
SF 1676321: empty() returned wrong result
........
r54227 | collin.winter | 2007-03-08 11:58:14 -0800 (Thu, 08 Mar 2007) | 1 line
Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order.
........
r54230 | raymond.hettinger | 2007-03-08 13:33:47 -0800 (Thu, 08 Mar 2007) | 1 line
SF #1637850: make_table in difflib did not work with unicode
........
r54232 | collin.winter | 2007-03-08 14:16:25 -0800 (Thu, 08 Mar 2007) | 1 line
Patch #1668482: don't use '-' in mkstemp
........
r54233 | brett.cannon | 2007-03-08 15:58:11 -0800 (Thu, 08 Mar 2007) | 10 lines
Introduce test.test_support.TransientResource. It's a context manager to
surround calls to resources that may or may not be available. Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.
This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches. It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).
........
r54234 | collin.winter | 2007-03-08 19:15:56 -0800 (Thu, 08 Mar 2007) | 1 line
Patch #1481079: Support of HTTP_REFERER in CGIHTTPServer.py
........
r54235 | collin.winter | 2007-03-08 19:26:32 -0800 (Thu, 08 Mar 2007) | 1 line
Add NEWS item for patch #1481079 (r54234).
........
r54237 | neal.norwitz | 2007-03-08 21:59:01 -0800 (Thu, 08 Mar 2007) | 1 line
Fix SF #1676971, Complex OverflowError has a typo
........
r54239 | georg.brandl | 2007-03-09 04:58:41 -0800 (Fri, 09 Mar 2007) | 2 lines
Typo.
........
r54240 | martin.v.loewis | 2007-03-09 07:35:55 -0800 (Fri, 09 Mar 2007) | 2 lines
Patch #957003: Implement smtplib.LMTP.
........
r54243 | collin.winter | 2007-03-09 10:09:10 -0800 (Fri, 09 Mar 2007) | 2 lines
Bug #1629566: clarify the docs on the return values of parsedate() and parsedate_tz() in email.utils and rfc822.
........
r54244 | thomas.heller | 2007-03-09 11:21:28 -0800 (Fri, 09 Mar 2007) | 3 lines
Fix bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
........
r54245 | martin.v.loewis | 2007-03-09 11:36:01 -0800 (Fri, 09 Mar 2007) | 2 lines
Add Ziga Seilnacht.
........
r54247 | collin.winter | 2007-03-09 12:33:07 -0800 (Fri, 09 Mar 2007) | 2 lines
Patch #1491866: change the complex() constructor to allow parthensized forms. This means complex(repr(x)) now works instead of raising a ValueError.
........
r54248 | thomas.heller | 2007-03-09 12:39:22 -0800 (Fri, 09 Mar 2007) | 7 lines
Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.
The crash was caused by a section of code that should have been
removed long ago, at that time ctypes had other ways to pass
parameters to function calls.
........
r54250 | collin.winter | 2007-03-09 15:30:39 -0800 (Fri, 09 Mar 2007) | 1 line
Hashing simplification pointed out by Thomas Wouters.
........
r54252 | collin.winter | 2007-03-09 18:23:40 -0800 (Fri, 09 Mar 2007) | 5 lines
* Unlink test files before and after each test; hopefully this will cut down on recent buildbot failures in test_islink.
* Drop safe_remove() in favor of test_support.unlink().
* Fix the indentation of test_samefile so that it runs.
........
r54253 | collin.winter | 2007-03-09 18:51:26 -0800 (Fri, 09 Mar 2007) | 3 lines
Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
........
r54254 | neal.norwitz | 2007-03-09 19:19:18 -0800 (Fri, 09 Mar 2007) | 4 lines
Simplify a little by handling the TCP case first.
Update to use predominant style of spaces around = in args list
and print to stderr if debugging.
........
r54256 | collin.winter | 2007-03-09 19:35:34 -0800 (Fri, 09 Mar 2007) | 1 line
Add proper attribution for a bug fix.
........
r54257 | georg.brandl | 2007-03-09 23:38:14 -0800 (Fri, 09 Mar 2007) | 2 lines
Typos.
........
r54260 | collin.winter | 2007-03-10 06:33:32 -0800 (Sat, 10 Mar 2007) | 1 line
Convert an assert to a raise so it works even in the presence of -O.
........
r54262 | collin.winter | 2007-03-10 06:41:48 -0800 (Sat, 10 Mar 2007) | 2 lines
Patch #1599845: Add an option to disable the implicit calls to server_bind() and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer and DocXMLRPCServer.
........
r54268 | georg.brandl | 2007-03-11 00:28:46 -0800 (Sun, 11 Mar 2007) | 2 lines
Add missing "return" statements in exception handler.
........
r54270 | ziga.seilnacht | 2007-03-11 08:54:54 -0700 (Sun, 11 Mar 2007) | 3 lines
Patch #1675981: remove unreachable code from type.__new__() method.
__dict__ and __weakref__ are removed from the slots tuple earlier
in the code, in the loop that mangles slot names. Will backport.
........
r54271 | collin.winter | 2007-03-11 09:00:20 -0700 (Sun, 11 Mar 2007) | 3 lines
Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap the IndexError caused by passing in an invalid breakpoint number.
Will backport.
........
r54274 | vinay.sajip | 2007-03-11 11:32:07 -0700 (Sun, 11 Mar 2007) | 1 line
Fix resource leak reported in SF #1516995.
........
r54278 | collin.winter | 2007-03-11 18:55:54 -0700 (Sun, 11 Mar 2007) | 4 lines
Patch #1678662: ftp.python.org does not exist. So the testcode in urllib.py must use a more
stable FTP.
Will backport.
........
r54280 | barry.warsaw | 2007-03-11 20:20:01 -0700 (Sun, 11 Mar 2007) | 8 lines
Tokio Kikuchi's fix for SF bug #1629369; folding whitespace allowed in the
display name of an email address, e.g.
Foo
\tBar <foo@example.com>
Test case added by Barry.
........
r54282 | skip.montanaro | 2007-03-11 20:30:50 -0700 (Sun, 11 Mar 2007) | 4 lines
Sane humans would call these invalid tests, but Andrew McNamara pointed out
that given the inputs in these tests Excel does indeed produce the output
these tests expect. Document that for future confused folks.
........
r54283 | martin.v.loewis | 2007-03-12 03:50:39 -0700 (Mon, 12 Mar 2007) | 2 lines
Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
........
r54285 | martin.v.loewis | 2007-03-12 04:01:10 -0700 (Mon, 12 Mar 2007) | 2 lines
Patch #1677862: Require a space or tab after import in .pth files.
........
r54287 | georg.brandl | 2007-03-12 06:17:36 -0700 (Mon, 12 Mar 2007) | 8 lines
Backport from Py3k branch:
Patch #1591665: implement the __dir__() special function lookup in PyObject_Dir.
Had to change a few bits of the patch because classobjs and __methods__ are still
in Py2.6.
........
r54288 | georg.brandl | 2007-03-12 07:30:05 -0700 (Mon, 12 Mar 2007) | 3 lines
Bug #1678647: write a newline after printing an exception in any
case, even when converting the value to a string failed.
........
r54290 | collin.winter | 2007-03-12 08:57:19 -0700 (Mon, 12 Mar 2007) | 1 line
Patch #1678088: convert test_operations to use unittest, fold the result into test_dict.
........
r54291 | collin.winter | 2007-03-12 09:11:39 -0700 (Mon, 12 Mar 2007) | 3 lines
Bug #742342: make Python stop segfaulting on infinitely-recursive reload()s. Fixed by patch #922167.
Will backport.
........
r54292 | georg.brandl | 2007-03-12 09:15:09 -0700 (Mon, 12 Mar 2007) | 2 lines
Typo fix.
........
r54295 | collin.winter | 2007-03-12 10:24:07 -0700 (Mon, 12 Mar 2007) | 1 line
Patch #1670993: Refactor test_threadedtempfile.py to use unittest.
........
r54296 | tim.peters | 2007-03-12 11:07:52 -0700 (Mon, 12 Mar 2007) | 2 lines
Whitespace normalization.
........
r54297 | tim.peters | 2007-03-12 11:09:22 -0700 (Mon, 12 Mar 2007) | 2 lines
Set missing svn:eol-style property on text files.
........
r54315 | brett.cannon | 2007-03-12 19:34:09 -0700 (Mon, 12 Mar 2007) | 8 lines
Add test.test_support.transient_internet . Returns a context manager that
nests test.test_support.TransientResource context managers that capture
exceptions raised when the Internet connection is flaky.
Initially using in test_socket_ssl but should probably be expanded to cover any
test that should not raise the captured exceptions if the Internet connection
works.
........
r54316 | brett.cannon | 2007-03-12 20:05:40 -0700 (Mon, 12 Mar 2007) | 2 lines
Fix a typo where the variable name was not updated.
........
r54318 | neal.norwitz | 2007-03-12 21:59:58 -0700 (Mon, 12 Mar 2007) | 1 line
Add Jerry Seutter for a bunch of his recent patches refactoring tests
........
r54319 | neal.norwitz | 2007-03-12 22:07:14 -0700 (Mon, 12 Mar 2007) | 7 lines
Add some other acks for recent checkins:
Brian Leair - 922167
Tomer Filiba - 1591665
Jeremy Jones - 1192590
........
r54321 | neal.norwitz | 2007-03-12 22:31:38 -0700 (Mon, 12 Mar 2007) | 9 lines
Fix some style nits:
* lines too long
* wrong indentation
* space after a function name
* wrong function name in error string
* simplifying some logic
Also add an error check to PyDict_SetItemString.
........
r54322 | georg.brandl | 2007-03-13 00:23:16 -0700 (Tue, 13 Mar 2007) | 2 lines
Typo and grammar fixes.
........
r54323 | georg.brandl | 2007-03-13 00:50:57 -0700 (Tue, 13 Mar 2007) | 2 lines
Patch #1679379: add documentation for fnmatch.translate().
........
r54325 | georg.brandl | 2007-03-13 00:57:51 -0700 (Tue, 13 Mar 2007) | 2 lines
Patch #1642844: comments to clarify the complexobject constructor.
........
r54326 | georg.brandl | 2007-03-13 01:14:27 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1668100: urllib2 now correctly raises URLError instead of
OSError if accessing a local file via the file:// protocol fails.
........
r54327 | georg.brandl | 2007-03-13 02:32:11 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1635454: the csv.DictWriter class now includes the offending
field names in its exception message if you try to write a record with
a dictionary containing fields not in the CSV field names list.
........
r54328 | georg.brandl | 2007-03-13 02:41:31 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1555098: use str.join() instead of repeated string
concatenation in robotparser.
........
r54329 | georg.brandl | 2007-03-13 03:06:48 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
........
r54331 | georg.brandl | 2007-03-13 03:19:22 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
........
r54333 | martin.v.loewis | 2007-03-13 03:24:00 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
Will backport.
........
r54335 | lars.gustaebel | 2007-03-13 03:47:19 -0700 (Tue, 13 Mar 2007) | 34 lines
This is the implementation of POSIX.1-2001 (pax) format read/write
support.
The TarInfo class now contains all necessary logic to process and
create tar header data which has been moved there from the TarFile
class. The fromtarfile() method was added. The new path and linkpath
properties are aliases for the name and linkname attributes in
correspondence to the pax naming scheme.
The TarFile constructor and classmethods now accept a number of
keyword arguments which could only be set as attributes before (e.g.
dereference, ignore_zeros). The encoding and pax_headers arguments
were added for pax support. There is a new tarinfo keyword argument
that allows using subclassed TarInfo objects in TarFile.
The boolean TarFile.posix attribute is deprecated, because now three
tar formats are supported. Instead, the desired format for writing is
specified using the constants USTAR_FORMAT, GNU_FORMAT and PAX_FORMAT
as the format keyword argument. This change affects TarInfo.tobuf()
as well.
The test suite has been heavily reorganized and partially rewritten.
A new testtar.tar was added that contains sample data in many formats
from 4 different tar programs.
Some bugs and quirks that also have been fixed:
Directory names do no longer have a trailing slash in TarInfo.name or
TarFile.getnames().
Adding the same file twice does not create a hardlink file member.
The TarFile constructor does no longer need a name argument.
The TarFile._mode attribute was renamed to mode and contains either
'r', 'w' or 'a'.
........
r54336 | georg.brandl | 2007-03-13 05:34:25 -0700 (Tue, 13 Mar 2007) | 3 lines
Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
........
r54338 | lars.gustaebel | 2007-03-13 08:47:07 -0700 (Tue, 13 Mar 2007) | 3 lines
Quick fix for tests that fail on systems with an encoding other
than 'iso8859-1'.
........
r54339 | georg.brandl | 2007-03-13 10:43:32 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1603688: ConfigParser.SafeConfigParser now checks values that
are set for invalid interpolation sequences that would lead to errors
on reading back those values.
........
r54341 | georg.brandl | 2007-03-13 11:15:41 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1581073: add a flag to textwrap that prevents the dropping of
whitespace while wrapping.
........
r54343 | georg.brandl | 2007-03-13 11:24:40 -0700 (Tue, 13 Mar 2007) | 2 lines
Patch #1605192: list allowed states in error messages for imaplib.
........
r54344 | georg.brandl | 2007-03-13 11:31:49 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
which can be set to False to prevent the default delete-on-close
behavior.
........
r54345 | collin.winter | 2007-03-13 11:53:04 -0700 (Tue, 13 Mar 2007) | 9 lines
Add acks for recent patch checkins:
Arvin Schnell - 1668482
S?\195?\169bastien Martini - 1481079
Heiko Wundram - 1491866
Damon Kohler - 1545011
Peter Parente - 1599845
Bjorn Lindqvist - 1678662
........
r54346 | georg.brandl | 2007-03-13 12:00:36 -0700 (Tue, 13 Mar 2007) | 2 lines
Acks for recent patches.
........
r54347 | georg.brandl | 2007-03-13 12:18:18 -0700 (Tue, 13 Mar 2007) | 3 lines
Fix a tab.
........
r54348 | georg.brandl | 2007-03-13 12:32:21 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1533909: the timeit module now accepts callables in addition to
strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its methods.
........
r54352 | georg.brandl | 2007-03-13 13:02:57 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1530482: add pydoc.render_doc() which returns the documentation
for a thing instead of paging it to stdout, which pydoc.doc() does.
........
r54357 | thomas.heller | 2007-03-13 13:42:52 -0700 (Tue, 13 Mar 2007) | 1 line
Patch #1649190: Adding support for _Bool to ctypes as c_bool, by David Remahl.
........
r54358 | georg.brandl | 2007-03-13 13:46:32 -0700 (Tue, 13 Mar 2007) | 2 lines
Patch #1444529: the builtin compile() now accepts keyword arguments.
(backport)
........
r54359 | thomas.heller | 2007-03-13 14:01:39 -0700 (Tue, 13 Mar 2007) | 1 line
Add versionadded marker for ctypes.c_bool.
........
r54360 | georg.brandl | 2007-03-13 14:08:15 -0700 (Tue, 13 Mar 2007) | 3 lines
Patch #1393667: pdb now has a "run" command which restarts the debugged
Python program, optionally with different arguments.
........
r54361 | georg.brandl | 2007-03-13 14:32:01 -0700 (Tue, 13 Mar 2007) | 3 lines
Deprecate commands.getstatus().
........
r54362 | georg.brandl | 2007-03-13 14:32:56 -0700 (Tue, 13 Mar 2007) | 2 lines
NEWS entry for getstatus() deprecation.
........
r54363 | georg.brandl | 2007-03-13 14:58:44 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #1429539: pdb now correctly initializes the __main__ module for
the debugged script, which means that imports from __main__ work
correctly now.
........
r54364 | georg.brandl | 2007-03-13 15:07:36 -0700 (Tue, 13 Mar 2007) | 4 lines
Patch #957650: "%var%" environment variable references are now properly
expanded in ntpath.expandvars(), also "~user" home directory references
are recognized and handled on Windows.
........
r54365 | georg.brandl | 2007-03-13 15:16:30 -0700 (Tue, 13 Mar 2007) | 2 lines
Patch #1194449: correctly detect unbound methods in pydoc.
........
r54367 | georg.brandl | 2007-03-13 15:49:43 -0700 (Tue, 13 Mar 2007) | 5 lines
Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
with ASCII value less than 32. Also, it correctly quotes dots only if
they occur on a single line, as opposed to the previous behavior of
quoting dots if they are the second character of any line.
........
r54368 | collin.winter | 2007-03-13 16:02:15 -0700 (Tue, 13 Mar 2007) | 1 line
Inline PyImport_GetModulesReloading().
........
r54371 | barry.warsaw | 2007-03-13 21:59:50 -0700 (Tue, 13 Mar 2007) | 6 lines
SF bug #1582282; decode_header() incorrectly splits not-conformant RFC
2047-like headers where there is no whitespace between encoded words. This
fix changes the matching regexp to include a trailing lookahead assertion that
the closing ?= must be followed by whitespace, newline, or end-of-string.
This also changes the regexp to add the MULTILINE flag.
........
r54372 | gregory.p.smith | 2007-03-14 00:17:40 -0700 (Wed, 14 Mar 2007) | 2 lines
correct order and names of the less often used keyword parameters.
........
r54373 | gregory.p.smith | 2007-03-14 00:19:50 -0700 (Wed, 14 Mar 2007) | 5 lines
Its time to stop listing (Unix, Windows) when we really mean "everything but Mac OS 9"
now that nobody is likely to use Python on Mac OS 9 and most of the (Mac) platform
items are all OS X special API specific since OS X is unixy enough for these modules
to be available out of the box.
........
r54376 | georg.brandl | 2007-03-14 01:27:52 -0700 (Wed, 14 Mar 2007) | 4 lines
Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response didn't
contain a valid HTTP status line.
........
r54378 | ziga.seilnacht | 2007-03-14 05:24:09 -0700 (Wed, 14 Mar 2007) | 4 lines
Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
name. Remove a reference leak that happened if the name could not be
converted to string. Will backport.
........
r54386 | martin.v.loewis | 2007-03-14 13:02:31 -0700 (Wed, 14 Mar 2007) | 3 lines
Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
Will backport.
........
r54389 | brett.cannon | 2007-03-14 14:40:13 -0700 (Wed, 14 Mar 2007) | 3 lines
Note how test_socket_ssl has various exceptions that deal with a flaky Net
connection are silenced.
........
r54390 | brett.cannon | 2007-03-14 14:44:15 -0700 (Wed, 14 Mar 2007) | 2 lines
Raise ResourceDenied in test_urllib2net when the Net connection goes bad.
........
r54391 | neal.norwitz | 2007-03-14 21:41:20 -0700 (Wed, 14 Mar 2007) | 1 line
Wrap a long line and fix a typo (is -> if)
........
r54392 | georg.brandl | 2007-03-15 00:38:14 -0700 (Thu, 15 Mar 2007) | 3 lines
Patch #1680978: consistently use "alive" instead of "active" in the
thread lib doc.
........
r54394 | georg.brandl | 2007-03-15 00:41:30 -0700 (Thu, 15 Mar 2007) | 3 lines
Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
........
r54397 | ziga.seilnacht | 2007-03-15 04:44:55 -0700 (Thu, 15 Mar 2007) | 3 lines
Patch #1462488: prevent a segfault in object_reduce_ex() by splitting
the implementation for __reduce__ and __reduce_ex__ into two separate
functions. Fixes bug #931877. Will backport.
........
r54404 | collin.winter | 2007-03-15 21:11:30 -0700 (Thu, 15 Mar 2007) | 3 lines
Patch #1642547: Fix an error/crash when encountering syntax errors in complex if statements.
Will backport.
........
r54406 | georg.brandl | 2007-03-16 00:55:09 -0700 (Fri, 16 Mar 2007) | 5 lines
Bug #1681228: the webbrowser module now correctly uses the default
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
(backport)
........
r54407 | georg.brandl | 2007-03-16 01:22:40 -0700 (Fri, 16 Mar 2007) | 4 lines
Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
True (which is not the default), it visits symlinks pointing to
directories.
........
r54408 | georg.brandl | 2007-03-16 01:24:21 -0700 (Fri, 16 Mar 2007) | 2 lines
Add \versionadded tag.
........
r54409 | georg.brandl | 2007-03-16 01:33:47 -0700 (Fri, 16 Mar 2007) | 2 lines
RFE #1670167: fix in isinstance() docs.
........
r54412 | ziga.seilnacht | 2007-03-16 04:59:38 -0700 (Fri, 16 Mar 2007) | 3 lines
Patch #1623563: allow __class__ assignment for classes with __slots__.
The old and the new class are still required to have the same slot
names, but the order in which they are specified is not relevant.
........
r54413 | ziga.seilnacht | 2007-03-16 05:11:11 -0700 (Fri, 16 Mar 2007) | 2 lines
Whitespace cleanup. Also remove the empty lines
from the previous check in.
........
r54414 | jeremy.hylton | 2007-03-16 07:49:11 -0700 (Fri, 16 Mar 2007) | 2 lines
Remove warning: funcion declaration isn't a prototype
........
r54415 | jeremy.hylton | 2007-03-16 08:59:47 -0700 (Fri, 16 Mar 2007) | 11 lines
Clean up formatting of this file.
The file should now follow PEP 7, except that it uses 4 space indents
(in the style of Py3k). This particular code would be really hard to
read with the regular tab idents.
Other changes:
- reflow long lines
- change multi-line conditionals to have test at end of line
........
r54417 | collin.winter | 2007-03-16 14:13:35 -0700 (Fri, 16 Mar 2007) | 1 line
Patch #1676994: Refactor test_popen2 to use unittest.
........
r54418 | collin.winter | 2007-03-16 14:15:35 -0700 (Fri, 16 Mar 2007) | 1 line
Remove test/output/test_popen2 (missed in r54417).
........
r54419 | collin.winter | 2007-03-16 15:16:08 -0700 (Fri, 16 Mar 2007) | 1 line
Patch 1339796: add a relpath() function to os.path.
........
r54421 | georg.brandl | 2007-03-17 09:08:45 -0700 (Sat, 17 Mar 2007) | 5 lines
Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
to complex using its __complex__() method before falling back to the
__float__() method. Therefore, the functions in the cmath module now
can operate on objects that define a __complex__() method.
(backport)
........
r54423 | gregory.p.smith | 2007-03-17 15:33:35 -0700 (Sat, 17 Mar 2007) | 2 lines
move note to the correct section
........
r54426 | georg.brandl | 2007-03-18 01:25:00 -0700 (Sun, 18 Mar 2007) | 2 lines
Patch #1682878: the new socket methods are recv_into and recvfrom_into, not *_buf.
........
r54432 | georg.brandl | 2007-03-18 11:28:25 -0700 (Sun, 18 Mar 2007) | 2 lines
Patch #1678339: test case for bug in difflib.
........
r54439 | collin.winter | 2007-03-19 11:52:08 -0700 (Mon, 19 Mar 2007) | 1 line
Patch #1630118: add a SpooledTemporaryFile class to tempfile.
........
r54441 | georg.brandl | 2007-03-19 12:02:48 -0700 (Mon, 19 Mar 2007) | 2 lines
Patch #1683328: fixes and enhancements for "unparse" demo.
........
r54456 | neal.norwitz | 2007-03-19 22:07:28 -0700 (Mon, 19 Mar 2007) | 1 line
Add some doc that was left out from some change to platform.py
........
r54457 | neal.norwitz | 2007-03-19 22:08:23 -0700 (Mon, 19 Mar 2007) | 1 line
Add a comment about 3k migration
........
r54458 | neal.norwitz | 2007-03-19 22:21:21 -0700 (Mon, 19 Mar 2007) | 1 line
Get rid of deprecation warning when testing commands.getstatus()
........
r54459 | neal.norwitz | 2007-03-19 22:23:09 -0700 (Mon, 19 Mar 2007) | 4 lines
Try backing out 54407 to see if it corrects the problems on the Windows
buildbots. This rev was backported, so we will need to keep both branches
in sync, pending the outcome of the test after this checkin.
........
r54460 | neal.norwitz | 2007-03-19 23:13:25 -0700 (Mon, 19 Mar 2007) | 1 line
Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-)
........
r54461 | neal.norwitz | 2007-03-19 23:16:26 -0700 (Mon, 19 Mar 2007) | 1 line
Try to make this test more resistant to dropping from previous runs (ie, files that may exist but cause the test to fail). Should be backported (assuming it works :-)
........
r54462 | neal.norwitz | 2007-03-19 23:53:17 -0700 (Mon, 19 Mar 2007) | 5 lines
Try to be a little more resilient to errors. This might help the test
pass, but my guess is that it won't. I'm guessing that some other
test is leaving this file open which means it can't be removed
under Windows AFAIK.
........
r54463 | neal.norwitz | 2007-03-20 01:14:57 -0700 (Tue, 20 Mar 2007) | 8 lines
Try to get test_urllib to pass on Windows by closing the file.
I'm guessing that's the problem. h.getfile() must be called *after*
h.getreply() and the fp can be None.
I'm not entirely convinced this is the best fix (or even correct).
The buildbots will tell us if things improve or not. I don't
know if this needs to be backported (assuming it actually works).
........
r54465 | raymond.hettinger | 2007-03-20 14:27:24 -0700 (Tue, 20 Mar 2007) | 1 line
Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability.
........
r54468 | georg.brandl | 2007-03-20 16:05:14 -0700 (Tue, 20 Mar 2007) | 2 lines
Fix for glob.py if filesystem encoding is None.
........
r54479 | neal.norwitz | 2007-03-20 23:39:48 -0700 (Tue, 20 Mar 2007) | 1 line
Remove unused file spotted by Paul Hankin
........
r54480 | georg.brandl | 2007-03-21 02:00:39 -0700 (Wed, 21 Mar 2007) | 3 lines
Patch #1682205: a TypeError while unpacking an iterable is no longer
masked by a generic one with the message "unpack non-sequence".
........
r54482 | georg.brandl | 2007-03-21 02:10:29 -0700 (Wed, 21 Mar 2007) | 2 lines
New test for rev. 54407 which only uses directories under TESTFN.
........
r54483 | georg.brandl | 2007-03-21 02:16:53 -0700 (Wed, 21 Mar 2007) | 2 lines
Patch #1684834: document some utility C API functions.
........
r54485 | georg.brandl | 2007-03-21 04:51:25 -0700 (Wed, 21 Mar 2007) | 2 lines
Fix #1684254: split BROWSER contents with shlex to avoid displaying 'URL'.
........
r54487 | andrew.kuchling | 2007-03-21 07:32:43 -0700 (Wed, 21 Mar 2007) | 1 line
Add comments on maintenance of this file
........
r54489 | andrew.kuchling | 2007-03-21 09:57:32 -0700 (Wed, 21 Mar 2007) | 1 line
Fix sentence, and fix typo in example
........
r54490 | andrew.kuchling | 2007-03-21 09:59:20 -0700 (Wed, 21 Mar 2007) | 1 line
Put code examples at left margin instead of indenting them
........
r54491 | facundo.batista | 2007-03-21 12:41:24 -0700 (Wed, 21 Mar 2007) | 1 line
Minor clarification, saying that blocking means no timeout (from bug #882297)
........
r54492 | ziga.seilnacht | 2007-03-21 13:07:56 -0700 (Wed, 21 Mar 2007) | 2 lines
Bug #1675967: re patterns pickled with older Python versions can
now be unpickled. Will backport.
........
r54495 | raymond.hettinger | 2007-03-21 13:33:57 -0700 (Wed, 21 Mar 2007) | 1 line
Add test and fix for fromkeys() optional argument.
........
r54524 | georg.brandl | 2007-03-22 01:05:45 -0700 (Thu, 22 Mar 2007) | 2 lines
Bug #1685704: use -m switch in timeit docs.
........
r54533 | thomas.heller | 2007-03-22 12:44:31 -0700 (Thu, 22 Mar 2007) | 5 lines
Back out "Patch #1643874: memory leak in ctypes fixed."
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
........
r54538 | thomas.heller | 2007-03-22 13:34:37 -0700 (Thu, 22 Mar 2007) | 2 lines
Explain the purpose of the b_needsfree flag (forward ported from release25-maint).
........
r54539 | guido.van.rossum | 2007-03-22 21:58:42 -0700 (Thu, 22 Mar 2007) | 12 lines
- Bug #1683368: The object.__init__() and object.__new__() methods are
now stricter in rejecting excess arguments. The only time when
either allows excess arguments is when it is not overridden and the
other one is. For backwards compatibility, when both are
overridden, it is a deprecation warning (for now; maybe a Py3k
warning later).
When merging this into 3.0, the warnings should become errors.
Note: without the change to string.py, lots of spurious warnings happen.
What's going on there?
........
r54540 | neal.norwitz | 2007-03-22 22:17:23 -0700 (Thu, 22 Mar 2007) | 1 line
Add Mark Dickinson for SF # 1675423.
........
r54541 | martin.v.loewis | 2007-03-23 03:35:49 -0700 (Fri, 23 Mar 2007) | 3 lines
Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Will backport.
........
r54543 | martin.v.loewis | 2007-03-23 06:27:15 -0700 (Fri, 23 Mar 2007) | 3 lines
Bug #978833: Revert r50844, as it broke _socketobject.dup.
Will backport.
........
r54545 | guido.van.rossum | 2007-03-23 11:53:03 -0700 (Fri, 23 Mar 2007) | 8 lines
Add a type.__init__() method that enforces the same signature as
type.__new__(), and then calls object.__init__(cls), just to be anal.
This allows us to restore the code in string.py's _TemplateMetaclass
that called super(...).__init__(name, bases, dct), which I commented
out yesterday since it broke due to the stricter argument checking
added to object.__init__().
........
r54546 | facundo.batista | 2007-03-23 11:54:07 -0700 (Fri, 23 Mar 2007) | 4 lines
Added a 'create_connect()' function to socket.py, which creates a
connection with an optional timeout, and modified httplib.py to
use this function in HTTPConnection. Applies patch 1676823.
........
r54547 | guido.van.rossum | 2007-03-23 12:39:01 -0700 (Fri, 23 Mar 2007) | 2 lines
Add note about type.__init__().
........
r54553 | thomas.heller | 2007-03-23 12:55:27 -0700 (Fri, 23 Mar 2007) | 5 lines
Prevent creation (followed by a segfault) of array types when the size
overflows the valid Py_ssize_t range. Check return values of
PyMem_Malloc.
Will backport to release25-maint.
........
r54555 | facundo.batista | 2007-03-23 13:23:08 -0700 (Fri, 23 Mar 2007) | 6 lines
Surrounded with try/finally to socket's default timeout setting
changes in the tests, so failing one test won't produce strange
results in others. Also relaxed the timeout settings in the test
(where actually the value didn't mean anything).
........
r54556 | collin.winter | 2007-03-23 15:24:39 -0700 (Fri, 23 Mar 2007) | 1 line
Make test_relpath() pass on Windows.
........
r54559 | ziga.seilnacht | 2007-03-24 07:24:26 -0700 (Sat, 24 Mar 2007) | 6 lines
Patch #1489771: update syntax rules in Python Reference Manual.
Python 2.5 added support for explicit relative import statements and
yield expressions, which were missing in the manual.
Also fix grammar productions that used the names from the Grammar file,
markup that broke the generated grammar.txt, and wrap some lines that
broke the pdf output. Will backport.
........
r54565 | georg.brandl | 2007-03-24 15:20:34 -0700 (Sat, 24 Mar 2007) | 2 lines
Remove typo accent.
........
r54566 | georg.brandl | 2007-03-24 15:27:56 -0700 (Sat, 24 Mar 2007) | 2 lines
Revert accidental change.
........
r54567 | brett.cannon | 2007-03-24 18:32:36 -0700 (Sat, 24 Mar 2007) | 3 lines
Change the docs to no longer claim that unittest is preferred over doctest for
regression tests.
........
r54568 | facundo.batista | 2007-03-24 18:53:21 -0700 (Sat, 24 Mar 2007) | 4 lines
Redone the tests, using the infrastructure already present
for threading and socket serving.
........
r54570 | facundo.batista | 2007-03-24 20:20:05 -0700 (Sat, 24 Mar 2007) | 3 lines
Closing the HTTP connection after each test, and listening more.
........
r54572 | georg.brandl | 2007-03-25 11:44:35 -0700 (Sun, 25 Mar 2007) | 2 lines
Markup fix.
........
r54573 | georg.brandl | 2007-03-25 12:04:55 -0700 (Sun, 25 Mar 2007) | 2 lines
Markup fix.
........
r54580 | facundo.batista | 2007-03-26 13:18:31 -0700 (Mon, 26 Mar 2007) | 5 lines
Added an optional timeout to FTP class. Also I started a test_ftplib.py
file to test the ftp lib (right now I included a basic test, the timeout
one, and nothing else).
........
r54581 | georg.brandl | 2007-03-26 13:28:28 -0700 (Mon, 26 Mar 2007) | 2 lines
Some nits.
........
r54582 | facundo.batista | 2007-03-26 13:56:09 -0700 (Mon, 26 Mar 2007) | 4 lines
Forgot to add the file before the previous commit, here go
the ftplib tests.
........
r54585 | facundo.batista | 2007-03-27 11:23:21 -0700 (Tue, 27 Mar 2007) | 5 lines
Added an optional timeout to poplib.POP3. Also created a
test_poplib.py file with a basic test and the timeout
ones. Docs are also updated.
........
r54586 | facundo.batista | 2007-03-27 11:50:29 -0700 (Tue, 27 Mar 2007) | 3 lines
The basic test cases of poplib.py.
........
r54594 | facundo.batista | 2007-03-27 20:45:20 -0700 (Tue, 27 Mar 2007) | 4 lines
Bug 1688393. Adds a control of negative values in
socket.recvfrom, which caused an ugly crash.
........
r54599 | facundo.batista | 2007-03-28 11:25:54 -0700 (Wed, 28 Mar 2007) | 5 lines
Added timeout to smtplib (to SMTP and SMTP_SSL). Also created
the test_smtplib.py file, with a basic test and the timeout
ones. Docs are updated too.
........
r54603 | collin.winter | 2007-03-28 16:34:06 -0700 (Wed, 28 Mar 2007) | 3 lines
Consolidate patches #1690164, 1683397, and 1690169, all of which refactor XML-related test suites. The patches are applied together because they use a common output/xmltests file.
Thanks to Jerry Seutter for all three patches.
........
r54604 | collin.winter | 2007-03-28 19:28:16 -0700 (Wed, 28 Mar 2007) | 1 line
Make test_zipfile clean up its temporary files properly.
........
r54605 | georg.brandl | 2007-03-29 00:41:32 -0700 (Thu, 29 Mar 2007) | 2 lines
These are actually methods.
........
r54606 | georg.brandl | 2007-03-29 05:42:07 -0700 (Thu, 29 Mar 2007) | 4 lines
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
........
r54608 | facundo.batista | 2007-03-29 11:22:35 -0700 (Thu, 29 Mar 2007) | 5 lines
Added timout parameter to telnetlib.Telnet. Also created
test_telnetlib.py with a basic test and timeout ones.
Docs are also updated.
........
r54613 | facundo.batista | 2007-03-30 06:00:35 -0700 (Fri, 30 Mar 2007) | 4 lines
Added the posibility to pass the timeout to FTP.connect, not only when
instantiating the class. Docs and tests are updated.
........
r54614 | collin.winter | 2007-03-30 07:01:25 -0700 (Fri, 30 Mar 2007) | 1 line
Bug #1688274: add documentation for C-level class objects.
........
r54615 | marc-andre.lemburg | 2007-03-30 08:01:42 -0700 (Fri, 30 Mar 2007) | 4 lines
Bump the patch level version of distutils since there were a few bug fixes since
the 2.5.0 release.
........
r54617 | georg.brandl | 2007-03-30 08:49:05 -0700 (Fri, 30 Mar 2007) | 2 lines
Markup fix.
........
r54618 | georg.brandl | 2007-03-30 10:39:39 -0700 (Fri, 30 Mar 2007) | 2 lines
Label name fix.
........
r54619 | georg.brandl | 2007-03-30 10:47:21 -0700 (Fri, 30 Mar 2007) | 2 lines
Duplicate label fix.
........
r54620 | georg.brandl | 2007-03-30 10:48:39 -0700 (Fri, 30 Mar 2007) | 2 lines
Markup fix.
........
r54623 | andrew.kuchling | 2007-03-30 11:00:15 -0700 (Fri, 30 Mar 2007) | 1 line
Add item. (Oops, accidentally checked this in on my branch)
........
r54624 | georg.brandl | 2007-03-30 12:01:38 -0700 (Fri, 30 Mar 2007) | 2 lines
Duplicate label fix.
........
r54625 | georg.brandl | 2007-03-30 12:14:02 -0700 (Fri, 30 Mar 2007) | 2 lines
Markup fix.
........
r54629 | georg.brandl | 2007-03-31 03:17:31 -0700 (Sat, 31 Mar 2007) | 2 lines
repair string literal.
........
r54630 | georg.brandl | 2007-03-31 04:54:58 -0700 (Sat, 31 Mar 2007) | 2 lines
Markup fix.
........
r54631 | georg.brandl | 2007-03-31 04:58:36 -0700 (Sat, 31 Mar 2007) | 2 lines
Duplicate label fix.
........
r54632 | georg.brandl | 2007-03-31 04:59:54 -0700 (Sat, 31 Mar 2007) | 2 lines
Typo fix.
........
r54633 | neal.norwitz | 2007-03-31 11:54:18 -0700 (Sat, 31 Mar 2007) | 1 line
Fix method names. Will backport.
........
r54634 | georg.brandl | 2007-03-31 11:56:11 -0700 (Sat, 31 Mar 2007) | 4 lines
Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
returned by python-config if Python was built with --enable-shared
because that prevented the shared library from being used.
........
r54637 | collin.winter | 2007-03-31 12:31:34 -0700 (Sat, 31 Mar 2007) | 1 line
Shut up an occaisonal buildbot error due to test files being left around.
........
r54644 | neal.norwitz | 2007-04-01 11:24:22 -0700 (Sun, 01 Apr 2007) | 11 lines
SF #1685563, MSVCCompiler creates redundant and long PATH strings
If MSVCCompiler.initialize() was called multiple times, the path
would get duplicated. On Windows, this is a problem because the
path is limited to 4k. There's no benefit in adding a path multiple
times, so prevent that from occuring. We also normalize the path
before checking for duplicates so things like /a and /a/ won't both
be stored.
Will backport.
........
r54646 | brett.cannon | 2007-04-01 11:47:27 -0700 (Sun, 01 Apr 2007) | 8 lines
time.strptime's caching of its locale object was being recreated when the
locale changed but not used during the function call it was recreated during.
The test in this checkin is untested (OS X does not have the proper locale
support for me to test), although the fix for the bug this deals with
was tested by the OP (#1290505). Once the buildbots verify the test at least
doesn't fail it becomes a backport candidate.
........
r54647 | brett.cannon | 2007-04-01 12:46:19 -0700 (Sun, 01 Apr 2007) | 3 lines
Fix the test for recreating the locale cache object by not worrying about if
one of the test locales cannot be set.
........
r54649 | georg.brandl | 2007-04-01 14:29:15 -0700 (Sun, 01 Apr 2007) | 2 lines
Fix a lot of markup and meta-information glitches.
........
r54650 | georg.brandl | 2007-04-01 14:39:52 -0700 (Sun, 01 Apr 2007) | 2 lines
Another fix.
........
r54651 | georg.brandl | 2007-04-01 15:39:10 -0700 (Sun, 01 Apr 2007) | 2 lines
Lots of explicit class names for method and member descs.
........
r54652 | georg.brandl | 2007-04-01 15:40:12 -0700 (Sun, 01 Apr 2007) | 2 lines
Explicit class names.
........
r54653 | georg.brandl | 2007-04-01 15:47:31 -0700 (Sun, 01 Apr 2007) | 2 lines
Some semantic fixes.
........
r54654 | georg.brandl | 2007-04-01 16:29:10 -0700 (Sun, 01 Apr 2007) | 2 lines
Remove bogus entry.
........
r54655 | georg.brandl | 2007-04-01 16:31:30 -0700 (Sun, 01 Apr 2007) | 2 lines
Fix the class name of strings.
........
r54658 | raymond.hettinger | 2007-04-02 10:29:30 -0700 (Mon, 02 Apr 2007) | 1 line
SF #1693079: Cannot save empty array in shelve
........
r54663 | raymond.hettinger | 2007-04-02 15:54:21 -0700 (Mon, 02 Apr 2007) | 3 lines
Array module's buffer interface can now handle empty arrays.
........
r54664 | guido.van.rossum | 2007-04-02 16:55:37 -0700 (Mon, 02 Apr 2007) | 5 lines
Fix warnings about object.__init__() signature.
Two (test_array and test_descr) were bug IMO; the third (copy_reg)
is a work-around which recognizes that object.__init__() doesn't do
anything.
........
r54666 | raymond.hettinger | 2007-04-02 17:02:11 -0700 (Mon, 02 Apr 2007) | 1 line
SF 1602378 Clarify docstrings for bisect
........
r54668 | raymond.hettinger | 2007-04-02 18:39:43 -0700 (Mon, 02 Apr 2007) | 3 lines
SF #1382213: Tutorial section 9.5.1 ignores MRO for new-style classes
........
r54669 | matthias.klose | 2007-04-02 21:35:59 -0700 (Mon, 02 Apr 2007) | 4 lines
- Fix an off-by-one bug in locale.strxfrm().
patch taken from http://bugs.debian.org/416934.
........
r54671 | georg.brandl | 2007-04-03 00:04:27 -0700 (Tue, 03 Apr 2007) | 9 lines
Fix the strange case of
\begin{methoddesc}[NNTP]{...}
where
\ifx#1\@undefined ended up comparing N and N, therefore executing
the true part of the conditional, blowing up at \@undefined.
........
r54672 | facundo.batista | 2007-04-03 07:05:08 -0700 (Tue, 03 Apr 2007) | 4 lines
Now using unittest for the tests infraestructure. Also split the
tests in those who need the network, and that who doesn't.
........
r54673 | walter.doerwald | 2007-04-03 09:08:10 -0700 (Tue, 03 Apr 2007) | 4 lines
Move the functionality for catching warnings in test_warnings.py into a separate
class to that reusing the functionality in test_structmembers.py doesn't rerun
the tests from test_warnings.py.
........
r54674 | walter.doerwald | 2007-04-03 09:16:24 -0700 (Tue, 03 Apr 2007) | 2 lines
Document that CatchWarningTests is reused by test_structmembers.py.
........
r54675 | walter.doerwald | 2007-04-03 09:53:43 -0700 (Tue, 03 Apr 2007) | 4 lines
Add tests for the filename.
Test that the stacklevel is handled correctly.
........
r54676 | facundo.batista | 2007-04-03 10:29:48 -0700 (Tue, 03 Apr 2007) | 6 lines
Added a SSL server to test_socket_ssl.py to be able to test
locally. Now, it checks if have openssl available and run
those specific tests (it starts openssl at the beggining of
all the tests and then kills it at the end).
........
r54677 | walter.doerwald | 2007-04-03 11:33:29 -0700 (Tue, 03 Apr 2007) | 6 lines
Implement a contextmanager test.test_support.catch_warning that can
be used to catch the last warning issued by the warning framework.
Change test_warnings.py and test_structmembers.py to use this
new contextmanager.
........
r54678 | facundo.batista | 2007-04-03 14:15:34 -0700 (Tue, 03 Apr 2007) | 4 lines
Changed the whole structure of startup and checking if the
server is available. Hope to not get more false alarms.
........
r54681 | facundo.batista | 2007-04-04 07:10:40 -0700 (Wed, 04 Apr 2007) | 4 lines
Fixed the way that the .pem files are looked for, and changed
how to kill the process in win32 to use the _handle attribute.
........
r54682 | guido.van.rossum | 2007-04-04 10:43:02 -0700 (Wed, 04 Apr 2007) | 4 lines
Fix a race condition in this test -- instead of assuming that it will take
the test server thread at most 0.5 seconds to get ready, use an event
variable.
........
r54683 | collin.winter | 2007-04-04 11:14:17 -0700 (Wed, 04 Apr 2007) | 1 line
Clean up imports.
........
r54684 | collin.winter | 2007-04-04 11:16:24 -0700 (Wed, 04 Apr 2007) | 1 line
Stop using test_support.verify().
........
r54685 | martin.v.loewis | 2007-04-04 11:30:36 -0700 (Wed, 04 Apr 2007) | 2 lines
Bug #1686475: Support stat'ing open files on Windows again.
Will backport to 2.5.
........
r54687 | collin.winter | 2007-04-04 11:33:40 -0700 (Wed, 04 Apr 2007) | 1 line
Make test_getopt use unittest.
........
r54688 | collin.winter | 2007-04-04 11:36:30 -0700 (Wed, 04 Apr 2007) | 1 line
Make test_softspace use unittest.
........
r54689 | ziga.seilnacht | 2007-04-04 11:38:47 -0700 (Wed, 04 Apr 2007) | 2 lines
Fix WalkTests.test_traversal() on Windows. The cleanup in
MakedirTests.setUp() can now be removed.
........
r54695 | raymond.hettinger | 2007-04-05 11:00:03 -0700 (Thu, 05 Apr 2007) | 3 lines
Bug #1563759: struct.unpack doens't support buffer protocol objects
........
r54697 | collin.winter | 2007-04-05 13:05:07 -0700 (Thu, 05 Apr 2007) | 1 line
Convert test_long_future to use unittest.
........
r54698 | collin.winter | 2007-04-05 13:08:56 -0700 (Thu, 05 Apr 2007) | 1 line
Convert test_normalization to use unittest.
........
r54699 | andrew.kuchling | 2007-04-05 18:11:58 -0700 (Thu, 05 Apr 2007) | 1 line
Some grammar fixes
........
r54704 | collin.winter | 2007-04-06 12:27:40 -0700 (Fri, 06 Apr 2007) | 1 line
Convert test_stringprep to use unittest.
........
r54705 | collin.winter | 2007-04-06 12:32:32 -0700 (Fri, 06 Apr 2007) | 1 line
Import cleanup in test_crypt.
........
r54706 | collin.winter | 2007-04-06 13:00:05 -0700 (Fri, 06 Apr 2007) | 1 line
Convert test_gc to use unittest.
........
r54707 | collin.winter | 2007-04-06 13:03:11 -0700 (Fri, 06 Apr 2007) | 1 line
Convert test_module to use unittest.
........
r54711 | collin.winter | 2007-04-06 21:40:43 -0700 (Fri, 06 Apr 2007) | 1 line
Convert test_fileinput to use unittest.
........
r54712 | brett.cannon | 2007-04-07 21:29:32 -0700 (Sat, 07 Apr 2007) | 5 lines
Doc that file.next() has undefined behaviour when called on a file opened with
'w'. Closes bug #1569057.
To be backported once 2.5 branch is unfrozen.
........
r54726 | vinay.sajip | 2007-04-09 09:16:10 -0700 (Mon, 09 Apr 2007) | 1 line
Added optional timeout to SocketHandler.makeSocket (SF #1695948)
........
r54727 | ziga.seilnacht | 2007-04-09 12:10:29 -0700 (Mon, 09 Apr 2007) | 3 lines
Patch #1695862: remove old test directory that causes test_urllib failures
on Windows buildbots. The change is a one time fix and will be removed
after a successful buildbot run.
........
r54729 | facundo.batista | 2007-04-09 20:00:37 -0700 (Mon, 09 Apr 2007) | 3 lines
Minor fix to the tests pass ok even with -O.
........
r54730 | collin.winter | 2007-04-09 21:44:49 -0700 (Mon, 09 Apr 2007) | 1 line
Typo fix.
........
r54732 | facundo.batista | 2007-04-10 05:58:45 -0700 (Tue, 10 Apr 2007) | 5 lines
General clean-up. Lot of margin corrections, comments, some typos.
Exceptions now are raised in the new style. And a mockup class is
now also new style. Thanks Santiago Pereson.
........
r54741 | georg.brandl | 2007-04-10 14:39:38 -0700 (Tue, 10 Apr 2007) | 2 lines
Repair a duplicate label and some obsolete uses of \setindexsubitem.
........
r54746 | andrew.kuchling | 2007-04-11 06:39:00 -0700 (Wed, 11 Apr 2007) | 1 line
Add window.chgat() method, submitted via e-mail by Fabian Kreutz
........
r54747 | andrew.kuchling | 2007-04-11 06:42:25 -0700 (Wed, 11 Apr 2007) | 1 line
Point readers at the patch submission instructions
........
r54748 | andrew.kuchling | 2007-04-11 06:47:13 -0700 (Wed, 11 Apr 2007) | 1 line
Describe undocumented third argument to touchline()
........
r54757 | georg.brandl | 2007-04-11 10:16:24 -0700 (Wed, 11 Apr 2007) | 3 lines
Add some missing NULL checks which trigger crashes on low-memory conditions.
Found by Victor Stinner. Will backport when 2.5 branch is unfrozen.
........
r54760 | raymond.hettinger | 2007-04-11 11:40:58 -0700 (Wed, 11 Apr 2007) | 1 line
SF 1191699: Make slices picklable
........
r54762 | georg.brandl | 2007-04-11 12:25:11 -0700 (Wed, 11 Apr 2007) | 2 lines
Exceptions are no longer old-style instances. Fix accordingly.
........
r54763 | georg.brandl | 2007-04-11 16:28:44 -0700 (Wed, 11 Apr 2007) | 2 lines
Repair missing spaces after \UNIX.
........
r54772 | raymond.hettinger | 2007-04-11 21:10:00 -0700 (Wed, 11 Apr 2007) | 1 line
SF 1193128: Let str.translate(None) be an identity transformation
........
r54784 | georg.brandl | 2007-04-12 00:01:19 -0700 (Thu, 12 Apr 2007) | 2 lines
Patch #1698951: clarify deprecation message in rexec and Bastion
........
r54785 | ziga.seilnacht | 2007-04-12 01:46:51 -0700 (Thu, 12 Apr 2007) | 2 lines
Patch #1695862: remove the cleanup code, now that Windows buildbots are green
again.
........
r54786 | walter.doerwald | 2007-04-12 03:35:00 -0700 (Thu, 12 Apr 2007) | 3 lines
Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
........
r54807 | barry.warsaw | 2007-04-13 11:47:14 -0700 (Fri, 13 Apr 2007) | 8 lines
Port r54805 from python25-maint branch:
Add code to read from master_fd in the parent, breaking when we get an OSError
(EIO can occur on Linux) or there's no more data to read. Without this,
test_pty.py can hang on the waitpid() because the child is blocking on the
stdout write. This will definitely happen on Mac OS X and could potentially
happen on other platforms. See the comment for details.
........
r54812 | kristjan.jonsson | 2007-04-13 15:07:33 -0700 (Fri, 13 Apr 2007) | 1 line
Fix a bug when using the __lltrace__ opcode tracer, and a problem sith signed chars in frameobject.c which can occur with opcodes > 127
........
r54814 | kristjan.jonsson | 2007-04-13 15:20:13 -0700 (Fri, 13 Apr 2007) | 1 line
Fix potential crash in path manipulation on windows
........
r54816 | trent.mick | 2007-04-13 16:22:05 -0700 (Fri, 13 Apr 2007) | 4 lines
Add the necessary dependency for the Windows VC6 build to ensure 'pythoncore'
is built before '_ctypes' is attempted.
Will backport to 2.5 once it is unfrozen for 2.5.1.
........
r54825 | neal.norwitz | 2007-04-13 22:25:50 -0700 (Fri, 13 Apr 2007) | 3 lines
When __slots__ are set to a unicode string, make it work the same as
setting a plain string, ie don't expand to single letter identifiers.
........
r54841 | neal.norwitz | 2007-04-16 00:37:55 -0700 (Mon, 16 Apr 2007) | 1 line
SF #1701207, Fix bogus assertion (and test it!)
........
r54844 | collin.winter | 2007-04-16 15:10:32 -0700 (Mon, 16 Apr 2007) | 1 line
Check the availability of the urlfetch resource earlier than before.
........
r54849 | martin.v.loewis | 2007-04-16 22:02:01 -0700 (Mon, 16 Apr 2007) | 2 lines
Add Travis Oliphant.
........
r54873 | brett.cannon | 2007-04-18 20:44:17 -0700 (Wed, 18 Apr 2007) | 2 lines
Silence a compiler warning about incompatible pointer types.
........
r54874 | neal.norwitz | 2007-04-18 22:52:37 -0700 (Wed, 18 Apr 2007) | 2 lines
SF #1703270, add missing declaration in readline.c to avoid compiler warning.
........
r54875 | armin.rigo | 2007-04-19 07:44:48 -0700 (Thu, 19 Apr 2007) | 8 lines
Revert r53997 as per
http://mail.python.org/pipermail/python-dev/2007-March/071796.html .
I've kept a couple of still-valid extra tests in test_descr, but didn't
bother to sort through the new comments and refactorings added in r53997
to see if some of them could be kept. If so, they could go in a
follow-up check-in.
........
r54876 | armin.rigo | 2007-04-19 07:56:48 -0700 (Thu, 19 Apr 2007) | 2 lines
Fix a usage of the dangerous pattern decref - modify field - incref.
........
r54884 | neal.norwitz | 2007-04-19 22:20:38 -0700 (Thu, 19 Apr 2007) | 9 lines
Add an optional address to copy the failure mails to.
Detect a conflict in the only file that should have outstanding changes
when this script is run. This doesn't matter on the trunk, but does
when run on a branch. Trunk always has the date set to today in
boilerplate.tex. Each time a release is cut with a different date,
a conflict occurs. (We could copy a known good version, but then
we would lose changes to this file.)
........
r54918 | georg.brandl | 2007-04-21 13:35:38 -0700 (Sat, 21 Apr 2007) | 3 lines
Bug #1704790: bind name "sys" locally in __del__ method so that it is
not cleared before __del__ is run.
........
r54920 | facundo.batista | 2007-04-21 18:18:56 -0700 (Sat, 21 Apr 2007) | 5 lines
Added tests for other methods of SSL object. Now we cover
all the object methods. This is the final step to close
the #451607 bug.
........
r54927 | facundo.batista | 2007-04-23 10:08:31 -0700 (Mon, 23 Apr 2007) | 5 lines
As specified in RFC 2616, 2xx code indicates that the client's
request was successfully received, understood, and accepted.
Now in these cases no error is raised. Also fixed tests.
........
r54929 | collin.winter | 2007-04-23 20:43:46 -0700 (Mon, 23 Apr 2007) | 1 line
Convert PyUnit -> unittest.
........
r54931 | collin.winter | 2007-04-23 21:09:52 -0700 (Mon, 23 Apr 2007) | 1 line
Remove code that hasn't been called in years.
........
r54932 | neal.norwitz | 2007-04-23 21:53:12 -0700 (Mon, 23 Apr 2007) | 1 line
Fix SF #1703110, Incorrect example for add_password() (use uri, not host)
........
r54934 | georg.brandl | 2007-04-24 03:36:42 -0700 (Tue, 24 Apr 2007) | 2 lines
Some new year updates.
........
r54938 | facundo.batista | 2007-04-24 06:54:38 -0700 (Tue, 24 Apr 2007) | 4 lines
Added a comment about last change in urllib2.py (all 2xx responses
are ok now).
........
r54939 | georg.brandl | 2007-04-24 08:10:09 -0700 (Tue, 24 Apr 2007) | 2 lines
Bug #1705717: error in sys.argv docs.
........
r54941 | georg.brandl | 2007-04-24 08:27:13 -0700 (Tue, 24 Apr 2007) | 4 lines
Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in
".cpp" too.
........
r54944 | raymond.hettinger | 2007-04-24 15:13:43 -0700 (Tue, 24 Apr 2007) | 1 line
Fix markup
........
r54945 | kristjan.jonsson | 2007-04-24 17:10:50 -0700 (Tue, 24 Apr 2007) | 1 line
Merge change 54909 from release25-maint: Fix several minor issues discovered using code analysis in VisualStudio 2005 Team Edition
........
r54947 | kristjan.jonsson | 2007-04-24 17:17:39 -0700 (Tue, 24 Apr 2007) | 1 line
Make pythoncore compile cleanly with VisualStudio 2005. Used an explicit typecast to get a 64 bit integer, and undefined the Yield macro that conflicts with winbase.h
........
r54948 | kristjan.jonsson | 2007-04-24 17:19:26 -0700 (Tue, 24 Apr 2007) | 1 line
Remove obsolete comment. Importing of .dll files has been discontinued, only .pyd files supported on windows now.
........
r54949 | georg.brandl | 2007-04-24 23:24:59 -0700 (Tue, 24 Apr 2007) | 2 lines
Patch #1698768: updated the "using Python on the Mac" intro.
........
r54951 | georg.brandl | 2007-04-24 23:25:55 -0700 (Tue, 24 Apr 2007) | 2 lines
Markup fix.
........
r54953 | neal.norwitz | 2007-04-24 23:30:05 -0700 (Tue, 24 Apr 2007) | 3 lines
Whitespace normalization. Ugh, we really need to do this more often.
You might want to review this change as it's my first time. Be gentle. :-)
........
r54956 | collin.winter | 2007-04-25 10:29:52 -0700 (Wed, 25 Apr 2007) | 1 line
Standardize on test.test_support.run_unittest() (as opposed to a mix of run_unittest() and run_suite()). Also, add functionality to run_unittest() that admits usage of unittest.TestLoader.loadTestsFromModule().
........
r54957 | collin.winter | 2007-04-25 10:37:35 -0700 (Wed, 25 Apr 2007) | 1 line
Remove functionality from test_datetime.test_main() that does reference count checking; 'regrtest.py -R' is the way to do this kind of testing.
........
r54958 | collin.winter | 2007-04-25 10:57:53 -0700 (Wed, 25 Apr 2007) | 1 line
Change test_support.have_unicode to use True/False instead of 1/0.
........
r54959 | tim.peters | 2007-04-25 11:47:18 -0700 (Wed, 25 Apr 2007) | 2 lines
Whitespace normalization.
........
r54960 | tim.peters | 2007-04-25 11:48:35 -0700 (Wed, 25 Apr 2007) | 2 lines
Set missing svn:eol-style property on text files.
........
r54961 | collin.winter | 2007-04-25 11:54:36 -0700 (Wed, 25 Apr 2007) | 1 line
Import and raise statement cleanup.
........
r54969 | collin.winter | 2007-04-25 13:41:34 -0700 (Wed, 25 Apr 2007) | 1 line
Convert test_ossaudiodev to use unittest.
........
r54974 | collin.winter | 2007-04-25 14:50:25 -0700 (Wed, 25 Apr 2007) | 1 line
Fix an issue related to the unittest conversion.
........
r54979 | fred.drake | 2007-04-25 21:42:19 -0700 (Wed, 25 Apr 2007) | 1 line
fix some markup errors
........
r54982 | kristjan.jonsson | 2007-04-26 02:15:08 -0700 (Thu, 26 Apr 2007) | 1 line
Export function sanitize_the_mode from fileobject.c as _PyFile_SanitizeMode(). Use this function in posixmodule.c when implementing fdopen(). This fixes test_subprocess.py for a VisualStudio 2005 compile.
........
r54983 | kristjan.jonsson | 2007-04-26 06:44:16 -0700 (Thu, 26 Apr 2007) | 1 line
The locale "En" appears not to be valid on windows underi VisualStudio.2005. Added "English" to the test_locale.py to make the testsuite pass for that build
........
r54984 | steve.holden | 2007-04-26 07:23:12 -0700 (Thu, 26 Apr 2007) | 1 line
Minor wording change on slicing aide-memoire.
........
r54985 | kristjan.jonsson | 2007-04-26 08:24:54 -0700 (Thu, 26 Apr 2007) | 1 line
Accomodate 64 bit time_t in the _bsddb module.
........
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 27 Apr 2007 19:54:29 +0000 |
| parents | 29ae5e0fc348 |
| children |
| rev | line source |
|---|---|
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1 % |
|
30722
651fc8d98d99
Fix a bunch of typos in documentation, docstrings and comments.
Walter Dörwald <walter@livinglogic.de>
parents:
30345
diff
changeset
|
2 % python.sty for the Python docummentation [works only with Latex2e] |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
3 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
4 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01] |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
6 \ProvidesPackage{python} |
|
7737
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
7 [1998/01/11 LaTeX package (Python markup)] |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
8 |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
9 \RequirePackage{longtable} |
|
34807
2380f9d1ebab
clean up the underscore mess for the typeset formats so that subscripts
Fred Drake <fdrake@acm.org>
parents:
34726
diff
changeset
|
10 \RequirePackage{underscore} |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
11 |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
12 % Uncomment these two lines to ignore the paper size and make the page |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
13 % size more like a typical published manual. |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
14 %\renewcommand{\paperheight}{9in} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
15 %\renewcommand{\paperwidth}{8.5in} % typical squarish manual |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
16 %\renewcommand{\paperwidth}{7in} % O'Reilly ``Programmming Python'' |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
17 |
| 7778 | 18 % These packages can be used to add marginal annotations which indicate |
| 19 % index entries and labels; useful for reviewing this messy documentation! | |
| 20 % | |
| 21 %\RequirePackage{showkeys} | |
| 22 %\RequirePackage{showidx} | |
| 23 | |
|
34064
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
24 % If we ever want to indent paragraphs, this needs to be changed. |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
25 % This is used inside the macros defined here instead of coding |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
26 % \noindent directly. |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
27 \let\py@parindent=\noindent |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
28 |
|
7737
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
29 % for PDF output, use maximal compression & a lot of other stuff |
|
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
30 % (test for PDF recommended by Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov>) |
|
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
31 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
32 \newif\ifpy@doing@page@targets |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
33 \py@doing@page@targetsfalse |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
34 |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
35 \newif\ifpdf\pdffalse |
|
7737
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
36 \ifx\pdfoutput\undefined\else\ifcase\pdfoutput |
|
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
37 \else |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
38 \pdftrue |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
39 \input{pdfcolor} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
40 \let\py@LinkColor=\NavyBlue |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
41 \let\py@NormalColor=\Black |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
42 \pdfcompresslevel=9 |
|
8306
4674cd2f6f07
Set the right page size in the PDF output.
Fred Drake <fdrake@acm.org>
parents:
8229
diff
changeset
|
43 \pdfpagewidth=\paperwidth % page width of PDF output |
|
4674cd2f6f07
Set the right page size in the PDF output.
Fred Drake <fdrake@acm.org>
parents:
8229
diff
changeset
|
44 \pdfpageheight=\paperheight % page height of PDF output |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
45 % |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
46 % Pad the number with '0' to 3 digits wide so no page name is a prefix |
|
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
47 % of any other. |
|
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
48 % |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
49 \newcommand{\py@targetno}[1]{\ifnum#1<100 0\fi\ifnum#1<10 0\fi#1} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
50 \newcommand{\py@pageno}{\py@targetno\thepage} |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
51 % |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
52 % This definition allows the entries in the page-view of the ToC to be |
|
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
53 % active links. Some work, some don't. |
|
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
54 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
55 \let\py@OldContentsline=\contentsline |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
56 % |
|
22320
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
57 % Backward compatibility hack: pdfTeX 0.13 defined \pdfannotlink, |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
58 % but it changed to \pdfstartlink in 0.14. This let's us use either |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
59 % version and still get useful behavior. |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
60 % |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
61 \@ifundefined{pdfstartlink}{ |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
62 \let\pdfstartlink=\pdfannotlink |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
63 }{} |
|
dc6054e5b642
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
Fred Drake <fdrake@acm.org>
parents:
22316
diff
changeset
|
64 % |
|
34064
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
65 % The \py@parindent here is a hack -- we're forcing pdfTeX into |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
66 % horizontal mode since \pdfstartlink requires that. |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
67 \def\py@pdfstartlink{% |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
68 \ifvmode\py@parindent\fi% |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
69 \pdfstartlink% |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
70 } |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
71 % |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
72 % Macro that takes two args: the name to link to and the content of |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
73 % the link. This takes care of the PDF magic, getting the colors |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
74 % the same for each link, and avoids having lots of garbage all over |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
75 % this style file. |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
76 \newcommand{\py@linkToName}[2]{% |
|
34064
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
77 \py@pdfstartlink attr{/Border [0 0 0]} goto name{#1}% |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
78 \py@LinkColor#2\py@NormalColor% |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
79 \pdfendlink% |
|
22316
cc788b3b21b6
Revise the markup related to the grammar productions to increase the
Fred Drake <fdrake@acm.org>
parents:
21418
diff
changeset
|
80 } |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
81 % Compute the padded page number separately since we end up with a pair of |
|
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
82 % \relax tokens; this gets the right string computed and works. |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
83 \renewcommand{\contentsline}[3]{% |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
84 \def\my@pageno{\py@targetno{#3}}% |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
85 \py@OldContentsline{#1}{\py@linkToName{page\my@pageno}{#2}}{#3}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
86 } |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
87 \AtEndDocument{ |
|
33216
6b743cbc4171
sf #1009373, #1005936. fix underscores in index entries in PDF files.
Neal Norwitz <nnorwitz@gmail.com>
parents:
31845
diff
changeset
|
88 \def\_{\string_} |
|
7737
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
89 \InputIfFileExists{\jobname.bkm}{\pdfcatalog{/PageMode /UseOutlines}}{} |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
90 } |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
91 \newcommand{\py@target}[1]{% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
92 \ifpy@doing@page@targets% |
|
10451
2b1dfc13951d
Use more recent option to \pdfdest to not change the zoom factor.
Fred Drake <fdrake@acm.org>
parents:
10423
diff
changeset
|
93 {\pdfdest name{#1} xyz}% |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
94 \fi% |
|
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
95 } |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
96 \let\py@OldLabel=\label |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
97 \renewcommand{\label}[1]{% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
98 \py@OldLabel{#1}% |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
99 \py@target{label-#1}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
100 } |
|
8306
4674cd2f6f07
Set the right page size in the PDF output.
Fred Drake <fdrake@acm.org>
parents:
8229
diff
changeset
|
101 % This stuff adds a page# destination to every PDF page, where # is three |
|
4674cd2f6f07
Set the right page size in the PDF output.
Fred Drake <fdrake@acm.org>
parents:
8229
diff
changeset
|
102 % digits wide, padded with leading zeros. This doesn't really help with |
|
4674cd2f6f07
Set the right page size in the PDF output.
Fred Drake <fdrake@acm.org>
parents:
8229
diff
changeset
|
103 % the frontmatter, but does fine with the body. |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
104 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
105 % This is *heavily* based on the hyperref package. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
106 % |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
107 \def\@begindvi{% |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
108 \unvbox \@begindvibox |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
109 \@hyperfixhead |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
110 } |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
111 \def\@hyperfixhead{% |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
112 \let\H@old@thehead\@thehead |
|
8067
48e2349d11c6
Fix the broken PDF links, really this time!
Fred Drake <fdrake@acm.org>
parents:
8066
diff
changeset
|
113 \global\def\@foo{\py@target{page\py@pageno}}% |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
114 \expandafter\ifx\expandafter\@empty\H@old@thehead |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
115 \def\H@old@thehead{\hfil}\fi |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
116 \def\@thehead{\@foo\relax\H@old@thehead}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
117 } |
|
7737
5d7e4d20c89e
Change uses of \pdfinfo and \pdfcatalog to use the new syntax from the
Fred Drake <fdrake@acm.org>
parents:
7706
diff
changeset
|
118 \fi\fi |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
119 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
120 % Increase printable page size (copied from fullpage.sty) |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
121 \topmargin 0pt |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
122 \advance \topmargin by -\headheight |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
123 \advance \topmargin by -\headsep |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
124 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
125 % attempt to work a little better for A4 users |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
126 \textheight \paperheight |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
127 \advance\textheight by -2in |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
128 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
129 \oddsidemargin 0pt |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
130 \evensidemargin 0pt |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
131 %\evensidemargin -.25in % for ``manual size'' documents |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
132 \marginparwidth 0.5in |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
133 |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
134 \textwidth \paperwidth |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
135 \advance\textwidth by -2in |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
136 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
137 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
138 % Style parameters and macros used by most documents here |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
139 \raggedbottom |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
140 \sloppy |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
141 \parindent = 0mm |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
142 \parskip = 2mm |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
143 \hbadness = 5000 % don't print trivial gripes |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
144 |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
145 \pagestyle{empty} % start this way; change for |
|
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
146 \pagenumbering{roman} % ToC & chapters |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
147 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
148 % Use this to set the font family for headers and other decor: |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
149 \newcommand{\py@HeaderFamily}{\sffamily} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
150 |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
151 % Set up abstract ways to get the normal and smaller font sizes that |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
152 % work even in footnote context. |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
153 \newif\ifpy@infootnote \py@infootnotefalse |
|
26015
5be5c84dea23
Thinking on comp.text.tex seems to be that it's better to override
Fred Drake <fdrake@acm.org>
parents:
25979
diff
changeset
|
154 \let\py@oldmakefntext\@makefntext |
|
5be5c84dea23
Thinking on comp.text.tex seems to be that it's better to override
Fred Drake <fdrake@acm.org>
parents:
25979
diff
changeset
|
155 \def\@makefntext#1{% |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
156 \bgroup% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
157 \py@infootnotetrue |
|
26015
5be5c84dea23
Thinking on comp.text.tex seems to be that it's better to override
Fred Drake <fdrake@acm.org>
parents:
25979
diff
changeset
|
158 \py@oldmakefntext{#1}% |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
159 \egroup% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
160 } |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
161 \def\py@defaultsize{% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
162 \ifpy@infootnote\footnotesize\else\normalsize\fi% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
163 } |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
164 \def\py@smallsize{% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
165 \ifpy@infootnote\scriptsize\else\small\fi% |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
166 } |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
167 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
168 % Redefine the 'normal' header/footer style when using "fancyhdr" package: |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
169 \@ifundefined{fancyhf}{}{ |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
170 % Use \pagestyle{normal} as the primary pagestyle for text. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
171 \fancypagestyle{normal}{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
172 \fancyhf{} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
173 \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
174 \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
175 \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
176 \renewcommand{\headrulewidth}{0pt} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
177 \renewcommand{\footrulewidth}{0.4pt} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
178 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
179 % Update the plain style so we get the page number & footer line, |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
180 % but not a chapter or section title. This is to keep the first |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
181 % page of a chapter and the blank page between chapters `clean.' |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
182 \fancypagestyle{plain}{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
183 \fancyhf{} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
184 \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
185 \renewcommand{\headrulewidth}{0pt} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
186 \renewcommand{\footrulewidth}{0.4pt} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
187 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
188 % Redefine \cleardoublepage so that the blank page between chapters |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
189 % gets the plain style and not the fancy style. This is described |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
190 % in the documentation for the fancyhdr package by Piet von Oostrum. |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
191 \@ifundefined{chapter}{}{ |
|
7548
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
192 \renewcommand{\cleardoublepage}{ |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
193 \clearpage\if@openright \ifodd\c@page\else |
|
7548
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
194 \hbox{} |
|
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
195 \thispagestyle{plain} |
|
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
196 \newpage |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
197 \if@twocolumn\hbox{}\newpage\fi\fi\fi |
|
7548
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
198 } |
|
7eb19b1ce84d
Improve separation of document class and python semantic constructs. This
Fred Drake <fdrake@acm.org>
parents:
7527
diff
changeset
|
199 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
200 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
201 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
202 % This sets up the {verbatim} environment to be indented and a minipage, |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
203 % and to have all the other mostly nice properties that we want for |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
204 % code samples. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
205 |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
206 \let\py@OldVerbatim=\verbatim |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
207 \let\py@OldEndVerbatim=\endverbatim |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
208 \RequirePackage{verbatim} |
|
22637
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
209 \let\py@OldVerbatimInput=\verbatiminput |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
210 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
211 % Variable used by begin code command |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
212 \newlength{\py@codewidth} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
213 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
214 \renewcommand{\verbatim}{% |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
215 \setlength{\parindent}{1cm}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
216 % Calculate the text width for the minipage: |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
217 \setlength{\py@codewidth}{\linewidth}% |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
218 \addtolength{\py@codewidth}{-\parindent}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
219 % |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
220 \par\indent% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
221 \begin{minipage}[t]{\py@codewidth}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
222 \small% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
223 \py@OldVerbatim% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
224 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
225 \renewcommand{\endverbatim}{% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
226 \py@OldEndVerbatim% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
227 \end{minipage}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
228 } |
|
22637
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
229 \renewcommand{\verbatiminput}[1]{% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
230 {\setlength{\parindent}{1cm}% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
231 % Calculate the text width for the minipage: |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
232 \setlength{\py@codewidth}{\linewidth}% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
233 \addtolength{\py@codewidth}{-\parindent}% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
234 % |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
235 \small% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
236 \begin{list}{}{\setlength{\leftmargin}{1cm}} |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
237 \item% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
238 \py@OldVerbatimInput{#1}% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
239 \end{list} |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
240 }% |
|
d778ea9de780
Extend \verbatiminput so that the typeset version provides the same appearance
Fred Drake <fdrake@acm.org>
parents:
22589
diff
changeset
|
241 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
242 |
|
17380
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
243 % This does a similar thing for the {alltt} environment: |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
244 \RequirePackage{alltt} |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
245 \let\py@OldAllTT=\alltt |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
246 \let\py@OldEndAllTT=\endalltt |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
247 |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
248 \renewcommand{\alltt}{% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
249 \setlength{\parindent}{1cm}% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
250 % Calculate the text width for the minipage: |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
251 \setlength{\py@codewidth}{\linewidth}% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
252 \addtolength{\py@codewidth}{-\parindent}% |
|
31507
354129143809
add support for \e to the {alltt} environment
Fred Drake <fdrake@acm.org>
parents:
31498
diff
changeset
|
253 \let\e=\textbackslash% |
|
17380
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
254 % |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
255 \par\indent% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
256 \begin{minipage}[t]{\py@codewidth}% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
257 \small% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
258 \py@OldAllTT% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
259 } |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
260 \renewcommand{\endalltt}{% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
261 \py@OldEndAllTT% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
262 \end{minipage}% |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
263 } |
|
4622af4da9e2
Import the alltt package and wrap that environment in a similar way to
Fred Drake <fdrake@acm.org>
parents:
16966
diff
changeset
|
264 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
265 |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
266 \newcommand{\py@modulebadkey}{{--just-some-junk--}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
267 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
268 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
269 %% Lots of index-entry generation support. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
270 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
271 % Command to wrap around stuff that refers to function / module / |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
272 % attribute names in the index. Default behavior: like \code{}. To |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
273 % just keep the index entries in the roman font, uncomment the second |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
274 % definition; it matches O'Reilly style more. |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
275 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
276 \newcommand{\py@idxcode}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
277 %\renewcommand{\py@idxcode}[1]{#1} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
278 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
279 % Command to generate two index entries (using subentries) |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
280 \newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
281 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
282 % And three entries (using only one level of subentries) |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
283 \newcommand{\indexiii}[3]{\index{#1!#2 #3}\index{#2!#3, #1}\index{#3!#1 #2}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
284 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
285 % And four (again, using only one level of subentries) |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
286 \newcommand{\indexiv}[4]{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
287 \index{#1!#2 #3 #4} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
288 \index{#2!#3 #4, #1} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
289 \index{#3!#4, #1 #2} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
290 \index{#4!#1 #2 #3} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
291 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
292 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
293 % Command to generate a reference to a function, statement, keyword, |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
294 % operator. |
| 8229 | 295 \newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\py@idxcode{#1}}}} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
296 \newcommand{\stindex}[1]{\indexii{statement}{#1@{\py@idxcode{#1}}}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
297 \newcommand{\opindex}[1]{\indexii{operator}{#1@{\py@idxcode{#1}}}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
298 \newcommand{\exindex}[1]{\indexii{exception}{#1@{\py@idxcode{#1}}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
299 \newcommand{\obindex}[1]{\indexii{object}{#1}} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
300 \newcommand{\bifuncindex}[1]{% |
|
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
301 \index{#1@{\py@idxcode{#1()}} (built-in function)}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
302 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
303 % Add an index entry for a module |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
304 \newcommand{\py@refmodule}[2]{\index{#1@{\py@idxcode{#1}} (#2module)}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
305 \newcommand{\refmodindex}[1]{\py@refmodule{#1}{}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
306 \newcommand{\refbimodindex}[1]{\py@refmodule{#1}{built-in }} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
307 \newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
308 \newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
309 |
|
9868
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
310 % Refer to a module's documentation using a hyperlink of the module's |
|
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
311 % name, at least if we're building PDF: |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
312 \ifpdf |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
313 \newcommand{\refmodule}[2][\py@modulebadkey]{% |
|
9868
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
314 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
315 \py@linkToName{label-module-\py@modulekey}{\module{#2}}% |
|
9868
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
316 } |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
317 \else |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
318 \newcommand{\refmodule}[2][\py@modulebadkey]{\module{#2}} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
319 \fi |
|
9868
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
320 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
321 % support for the module index |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
322 \newif\ifpy@UseModuleIndex |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
323 \py@UseModuleIndexfalse |
|
7617
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
324 |
|
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
325 \newcommand{\makemodindex}{ |
|
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
326 \newwrite\modindexfile |
|
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
327 \openout\modindexfile=mod\jobname.idx |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
328 \py@UseModuleIndextrue |
|
7617
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
329 } |
|
068a6942fe1a
Adjust the index support a bit to make it easier to deal with module index.
Fred Drake <fdrake@acm.org>
parents:
7597
diff
changeset
|
330 |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
331 % Add the defining entry for a module |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
332 \newcommand{\py@modindex}[2]{% |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
333 \renewcommand{\py@thismodule}{#1} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
334 \setindexsubitem{(in module #1)}% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
335 \index{#1@{\py@idxcode{#1}} (#2module)|textbf}% |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
336 \ifpy@UseModuleIndex% |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
337 \@ifundefined{py@modplat@\py@thismodulekey}{ |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
338 \write\modindexfile{\protect\indexentry{#1@{\texttt{#1}}}{\thepage}}% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
339 }{\write\modindexfile{\protect\indexentry{#1@{\texttt{#1} % |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
340 \emph{(\py@platformof[\py@thismodulekey]{})}}}{\thepage}}% |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
341 } |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
342 \fi% |
|
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
343 } |
|
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
344 |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
345 % *** XXX *** THE NEXT FOUR MACROS ARE NOW OBSOLETE !!! *** |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
346 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
347 % built-in & Python modules in the main distribution |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
348 \newcommand{\bimodindex}[1]{\py@modindex{#1}{built-in }% |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
349 \typeout{*** MACRO bimodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
350 \newcommand{\stmodindex}[1]{\py@modindex{#1}{standard }% |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
351 \typeout{*** MACRO stmodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
352 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
353 % Python & extension modules outside the main distribution |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
354 \newcommand{\modindex}[1]{\py@modindex{#1}{}% |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
355 \typeout{*** MACRO modindex IS OBSOLETE -- USE declaremodule INSTEAD!}} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
356 \newcommand{\exmodindex}[1]{\py@modindex{#1}{extension }% |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
357 \typeout{*** MACRO exmodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
358 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
359 % Additional string for an index entry |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
360 \newif\ifpy@usingsubitem\py@usingsubitemfalse |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
361 \newcommand{\py@indexsubitem}{} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
362 \newcommand{\setindexsubitem}[1]{\renewcommand{\py@indexsubitem}{ #1}% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
363 \py@usingsubitemtrue} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
364 \newcommand{\ttindex}[1]{% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
365 \ifpy@usingsubitem |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
366 \index{#1@{\py@idxcode{#1}}\py@indexsubitem}% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
367 \else% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
368 \index{#1@{\py@idxcode{#1}}}% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
369 \fi% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
370 } |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
371 \newcommand{\withsubitem}[2]{% |
|
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
372 \begingroup% |
|
15362
9a17cdcd3320
Fix \withsubitem so that it actually works if the only indexing macro in
Fred Drake <fdrake@acm.org>
parents:
15360
diff
changeset
|
373 \def\ttindex##1{\index{##1@{\py@idxcode{##1}} #1}}% |
|
9a17cdcd3320
Fix \withsubitem so that it actually works if the only indexing macro in
Fred Drake <fdrake@acm.org>
parents:
15360
diff
changeset
|
374 #2% |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
375 \endgroup% |
|
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
376 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
377 |
|
7801
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
378 |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
379 % Module synopsis processing ----------------------------------------------- |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
380 % |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
381 \newcommand{\py@thisclass}{} |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
382 \newcommand{\py@thismodule}{} |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
383 \newcommand{\py@thismodulekey}{} |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
384 \newcommand{\py@thismoduletype}{} |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
385 |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
386 \newcommand{\py@standardIndexModule}[1]{\py@modindex{#1}{standard }} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
387 \newcommand{\py@builtinIndexModule}[1]{\py@modindex{#1}{built-in }} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
388 \newcommand{\py@extensionIndexModule}[1]{\py@modindex{#1}{extension }} |
|
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
389 \newcommand{\py@IndexModule}[1]{\py@modindex{#1}{}} |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
390 |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
391 \newif\ifpy@HaveModSynopsis \py@HaveModSynopsisfalse |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
392 \newif\ifpy@ModSynopsisFileIsOpen \py@ModSynopsisFileIsOpenfalse |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
393 \newif\ifpy@HaveModPlatform \py@HaveModPlatformfalse |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
394 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
395 % \declaremodule[key]{type}{name} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
396 \newcommand{\declaremodule}[3][\py@modulebadkey]{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
397 \py@openModSynopsisFile |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
398 \renewcommand{\py@thismoduletype}{#2} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
399 \ifx\py@modulebadkey#1 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
400 \renewcommand{\py@thismodulekey}{#3} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
401 \else |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
402 \renewcommand{\py@thismodulekey}{#1} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
403 \fi |
|
10855
28887f40e344
\declaremodule: Make this more robust. Only attempt to add an index
Fred Drake <fdrake@acm.org>
parents:
10846
diff
changeset
|
404 \@ifundefined{py@#2IndexModule}{% |
|
28887f40e344
\declaremodule: Make this more robust. Only attempt to add an index
Fred Drake <fdrake@acm.org>
parents:
10846
diff
changeset
|
405 \typeout{*** MACRO declaremodule called with unknown module type: `#2'} |
| 10856 | 406 \py@IndexModule{#3}% |
|
10855
28887f40e344
\declaremodule: Make this more robust. Only attempt to add an index
Fred Drake <fdrake@acm.org>
parents:
10846
diff
changeset
|
407 }{% |
|
28887f40e344
\declaremodule: Make this more robust. Only attempt to add an index
Fred Drake <fdrake@acm.org>
parents:
10846
diff
changeset
|
408 \csname py@#2IndexModule\endcsname{#3}% |
|
28887f40e344
\declaremodule: Make this more robust. Only attempt to add an index
Fred Drake <fdrake@acm.org>
parents:
10846
diff
changeset
|
409 } |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
410 \label{module-\py@thismodulekey} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
411 } |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
412 \newif\ifpy@ModPlatformFileIsOpen \py@ModPlatformFileIsOpenfalse |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
413 \newcommand{\py@ModPlatformFilename}{\jobname.pla} |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
414 \newcommand{\platform}[1]{ |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
415 \ifpy@ModPlatformFileIsOpen\else |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
416 \newwrite\py@ModPlatformFile |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
417 \openout\py@ModPlatformFile=\py@ModPlatformFilename |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
418 \py@ModPlatformFileIsOpentrue |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
419 \fi |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
420 } |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
421 \InputIfFileExists{\jobname.pla}{}{} |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
422 \newcommand{\py@platformof}[2][\py@modulebadkey]{% |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
423 \ifx\py@modulebadkey#1 \def\py@key{#2}% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
424 \else \def\py@key{#1}% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
425 \fi% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
426 \csname py@modplat@\py@key\endcsname% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
427 } |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
428 \newcommand{\ignorePlatformAnnotation}[1]{} |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
429 |
| 8916 | 430 % \moduleauthor{name}{email} |
| 431 \newcommand{\moduleauthor}[2]{} | |
| 432 | |
| 433 % \sectionauthor{name}{email} | |
| 434 \newcommand{\sectionauthor}[2]{} | |
| 435 | |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
436 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
437 \newcommand{\py@defsynopsis}{Module has no synopsis.} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
438 \newcommand{\py@modulesynopsis}{\py@defsynopsis} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
439 \newcommand{\modulesynopsis}[1]{ |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
440 \py@HaveModSynopsistrue |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
441 \renewcommand{\py@modulesynopsis}{#1} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
442 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
443 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
444 % define the file |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
445 \newwrite\py@ModSynopsisFile |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
446 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
447 % hacked from \addtocontents from latex.ltx: |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
448 \long\def\py@writeModSynopsisFile#1{% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
449 \protected@write\py@ModSynopsisFile% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
450 {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
451 {\string#1}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
452 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
453 \newcommand{\py@closeModSynopsisFile}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
454 \ifpy@ModSynopsisFileIsOpen |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
455 \closeout\py@ModSynopsisFile |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
456 \py@ModSynopsisFileIsOpenfalse |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
457 \fi |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
458 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
459 \newcommand{\py@openModSynopsisFile}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
460 \ifpy@ModSynopsisFileIsOpen\else |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
461 \openout\py@ModSynopsisFile=\py@ModSynopsisFilename |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
462 \py@ModSynopsisFileIsOpentrue |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
463 \fi |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
464 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
465 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
466 \newcommand{\py@ProcessModSynopsis}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
467 \ifpy@HaveModSynopsis |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
468 \py@writeModSynopsisFile{\modulesynopsis% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
469 {\py@thismodulekey}{\py@thismodule}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
470 {\py@thismoduletype}{\py@modulesynopsis}}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
471 \py@HaveModSynopsisfalse |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
472 \fi |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
473 \renewcommand{\py@modulesynopsis}{\py@defsynopsis} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
474 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
475 \AtEndDocument{\py@ProcessModSynopsis\py@closeModSynopsisFile} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
476 |
|
10328
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
477 |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
478 \long\def\py@writeModPlatformFile#1{% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
479 \protected@write\py@ModPlatformFile% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
480 {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
481 {\string#1}% |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
482 } |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
483 |
|
f438c6e2b6c1
Added support for \platform, \platformof, and \ignorePlatformAnnotation.
Fred Drake <fdrake@acm.org>
parents:
10077
diff
changeset
|
484 |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
485 \newcommand{\localmoduletable}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
486 \IfFileExists{\py@ModSynopsisFilename}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
487 \begin{synopsistable} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
488 \input{\py@ModSynopsisFilename} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
489 \end{synopsistable} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
490 }{} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
491 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
492 |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
493 \ifpdf |
|
9968
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
494 \newcommand{\py@ModSynopsisSummary}[4]{% |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
495 \py@linkToName{label-module-#1}{\bfcode{#2}} & #4\\ |
|
485502c42d89
\py@linkToName: New macro to consolidate support for most internal
Fred Drake <fdrake@acm.org>
parents:
9958
diff
changeset
|
496 } |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
497 \else |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
498 \newcommand{\py@ModSynopsisSummary}[4]{\bfcode{#2} & #4\\} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
499 \fi |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
500 \newenvironment{synopsistable}{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
501 % key, name, type, synopsis |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
502 \let\modulesynopsis=\py@ModSynopsisSummary |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
503 \begin{tabular}{ll} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
504 }{ |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
505 \end{tabular} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
506 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
507 % |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
508 % -------------------------------------------------------------------------- |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
509 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
510 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
511 \newcommand{\py@reset}{ |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
512 \py@usingsubitemfalse |
|
8713
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
513 \py@ProcessModSynopsis |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
514 \renewcommand{\py@thisclass}{} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
515 \renewcommand{\py@thismodule}{} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
516 \renewcommand{\py@thismodulekey}{} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
517 \renewcommand{\py@thismoduletype}{} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
518 } |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
519 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
520 % Augment the sectioning commands used to get our own font family in place, |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
521 % and reset some internal data items: |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
522 \renewcommand{\section}{\py@reset% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
523 \@startsection{section}{1}{\z@}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
524 {-3.5ex \@plus -1ex \@minus -.2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
525 {2.3ex \@plus.2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
526 {\reset@font\Large\py@HeaderFamily}} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
527 \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
528 {-3.25ex\@plus -1ex \@minus -.2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
529 {1.5ex \@plus .2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
530 {\reset@font\large\py@HeaderFamily}} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
531 \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
532 {-3.25ex\@plus -1ex \@minus -.2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
533 {1.5ex \@plus .2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
534 {\reset@font\normalsize\py@HeaderFamily}} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
535 \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
536 {3.25ex \@plus1ex \@minus.2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
537 {-1em}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
538 {\reset@font\normalsize\py@HeaderFamily}} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
539 \renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
540 {3.25ex \@plus1ex \@minus .2ex}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
541 {-1em}% |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
542 {\reset@font\normalsize\py@HeaderFamily}} |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
543 |
|
ed8f4e2eb11a
Lots of new stuff for "module synopsis support." Public interface consists
Fred Drake <fdrake@acm.org>
parents:
8609
diff
changeset
|
544 |
|
7801
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
545 % Now for a lot of semantically-loaded environments that do a ton of magical |
|
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
546 % things to get the right formatting and index entries for the stuff in |
|
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
547 % Python modules and C API. |
|
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
548 |
|
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
549 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
550 % {fulllineitems} is used in one place in libregex.tex, but is really for |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
551 % internal use in this file. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
552 % |
| 9078 | 553 \newcommand{\py@itemnewline}[1]{% |
| 554 \@tempdima\linewidth% | |
| 555 \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}% | |
| 556 } | |
| 557 | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
558 \newenvironment{fulllineitems}{ |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
559 \begin{list}{}{\labelwidth \leftmargin \labelsep 0pt |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
560 \rightmargin 0pt \topsep -\parskip \partopsep \parskip |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
561 \itemsep -\parsep |
| 9078 | 562 \let\makelabel=\py@itemnewline} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
563 }{\end{list}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
564 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
565 % \optional is mostly for use in the arguments parameters to the various |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
566 % {*desc} environments defined below, but may be used elsewhere. Known to |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
567 % be used in the debugger chapter. |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
568 % |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
569 % Typical usage: |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
570 % |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
571 % \begin{funcdesc}{myfunc}{reqparm\optional{, optparm}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
572 % ^^^ ^^^ |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
573 % No space here No space here |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
574 % |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
575 % When a function has multiple optional parameters, \optional should be |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
576 % nested, not chained. This is right: |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
577 % |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
578 % \begin{funcdesc}{myfunc}{\optional{parm1\optional{, parm2}}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
579 % |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
580 \let\py@badkey=\@undefined |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
581 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
582 \newcommand{\optional}[1]{% |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
583 {\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
584 |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
585 % This can be used when a function or method accepts an varying number |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
586 % of arguments, such as by using the *args syntax in the parameter list. |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
587 \newcommand{\py@moreargs}{...} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
588 |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
589 % This can be used when you don't want to document the parameters to a |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
590 % function or method, but simply state that it's an alias for |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
591 % something else. |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
592 \newcommand{\py@unspecified}{...} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
593 |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
594 |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
595 \newlength{\py@argswidth} |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
596 \newcommand{\py@sigparams}[1]{% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
597 \parbox[t]{\py@argswidth}{\py@varvars{#1}\code{)}}} |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
598 \newcommand{\py@sigline}[2]{% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
599 \settowidth{\py@argswidth}{#1\code{(}}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
600 \addtolength{\py@argswidth}{-2\py@argswidth}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
601 \addtolength{\py@argswidth}{\textwidth}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
602 \item[#1\code{(}\py@sigparams{#2}]} |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
603 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
604 % C functions ------------------------------------------------------------ |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
605 % \begin{cfuncdesc}[refcount]{type}{name}{arglist} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
606 % Note that the [refcount] slot should only be filled in by |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
607 % tools/anno-api.py; it pulls the value from the refcounts database. |
|
23063
530aba3116a4
Separate out a \cfuncline macro from the cfuncdesc environment.
Fred Drake <fdrake@acm.org>
parents:
23013
diff
changeset
|
608 \newcommand{\cfuncline}[3]{ |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
609 \py@sigline{\code{#1 \bfcode{#2}}}{#3}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
610 \index{#2@{\py@idxcode{#2()}}} |
|
23063
530aba3116a4
Separate out a \cfuncline macro from the cfuncdesc environment.
Fred Drake <fdrake@acm.org>
parents:
23013
diff
changeset
|
611 } |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
612 \newenvironment{cfuncdesc}[4][\py@badkey]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
613 \begin{fulllineitems} |
|
23063
530aba3116a4
Separate out a \cfuncline macro from the cfuncdesc environment.
Fred Drake <fdrake@acm.org>
parents:
23013
diff
changeset
|
614 \cfuncline{#2}{#3}{#4} |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
615 \ifx\@undefined#1\relax\else% |
| 12346 | 616 \emph{Return value: \textbf{#1}.}\\ |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
617 \fi |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
618 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
619 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
620 % C variables ------------------------------------------------------------ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
621 % \begin{cvardesc}{type}{name} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
622 \newenvironment{cvardesc}[2]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
623 \begin{fulllineitems} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
624 \item[\code{#1 \bfcode{#2}}\index{#2@{\py@idxcode{#2}}}] |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
625 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
626 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
627 % C data types ----------------------------------------------------------- |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
628 % \begin{ctypedesc}[index name]{typedef name} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
629 \newenvironment{ctypedesc}[2][\py@badkey]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
630 \begin{fulllineitems} |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
631 \item[\bfcode{#2}% |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
632 \ifx\@undefined#1\relax% |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
633 \index{#2@{\py@idxcode{#2}} (C type)} |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
634 \else% |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
635 \index{#2@{\py@idxcode{#1}} (C type)} |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
636 \fi] |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
637 }{\end{fulllineitems}} |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
638 |
|
23013
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
639 % C type fields ---------------------------------------------------------- |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
640 % \begin{cmemberdesc}{container type}{ctype}{membername} |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
641 \newcommand{\cmemberline}[3]{ |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
642 \item[\code{#2 \bfcode{#3}}] |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
643 \index{#3@{\py@idxcode{#3}} (#1 member)} |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
644 } |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
645 \newenvironment{cmemberdesc}[3]{ |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
646 \begin{fulllineitems} |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
647 \cmemberline{#1}{#2}{#3} |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
648 }{\end{fulllineitems}} |
|
d6322983069e
Additional support for describing C structure members.
Fred Drake <fdrake@acm.org>
parents:
22921
diff
changeset
|
649 |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
650 % Funky macros ----------------------------------------------------------- |
|
22921
3c876ff29a83
Add \csimplemacro to parallel the csimplemacrodesc environment.
Fred Drake <fdrake@acm.org>
parents:
22637
diff
changeset
|
651 % \begin{csimplemacrodesc}{name} |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
652 % -- "simple" because it has no args; NOT for constant definitions! |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
653 \newenvironment{csimplemacrodesc}[1]{ |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
654 \begin{fulllineitems} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
655 \item[\bfcode{#1}\index{#1@{\py@idxcode{#1}} (macro)}] |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
656 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
657 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
658 % simple functions (not methods) ----------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
659 % \begin{funcdesc}{name}{args} |
|
15362
9a17cdcd3320
Fix \withsubitem so that it actually works if the only indexing macro in
Fred Drake <fdrake@acm.org>
parents:
15360
diff
changeset
|
660 \newcommand{\funcline}[2]{% |
|
9a17cdcd3320
Fix \withsubitem so that it actually works if the only indexing macro in
Fred Drake <fdrake@acm.org>
parents:
15360
diff
changeset
|
661 \funclineni{#1}{#2}% |
|
9a17cdcd3320
Fix \withsubitem so that it actually works if the only indexing macro in
Fred Drake <fdrake@acm.org>
parents:
15360
diff
changeset
|
662 \index{#1@{\py@idxcode{#1()}} (in module \py@thismodule)}} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
663 \newenvironment{funcdesc}[2]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
664 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
665 \funcline{#1}{#2} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
666 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
667 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
668 % similar to {funcdesc}, but doesn't add to the index |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
669 \newcommand{\funclineni}[2]{% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
670 \py@sigline{\bfcode{#1}}{#2}} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
671 \newenvironment{funcdescni}[2]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
672 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
673 \funclineni{#1}{#2} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
674 }{\end{fulllineitems}} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
675 |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
676 % classes ---------------------------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
677 % \begin{classdesc}{name}{constructor args} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
678 \newenvironment{classdesc}[2]{ |
|
9524
c6a1103efa8a
Minor nit that fixes a bunch of indexing: the way the classdesc
Fred Drake <fdrake@acm.org>
parents:
9078
diff
changeset
|
679 % Using \renewcommand doesn't work for this, for unknown reasons: |
|
c6a1103efa8a
Minor nit that fixes a bunch of indexing: the way the classdesc
Fred Drake <fdrake@acm.org>
parents:
9078
diff
changeset
|
680 \global\def\py@thisclass{#1} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
681 \begin{fulllineitems} |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
682 \py@sigline{\strong{class }\bfcode{#1}}{#2}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
683 \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
684 }{\end{fulllineitems}} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
685 |
|
17778
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
686 % \begin{classdesc*}{name} |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
687 \newenvironment{classdesc*}[1]{ |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
688 % Using \renewcommand doesn't work for this, for unknown reasons: |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
689 \global\def\py@thisclass{#1} |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
690 \begin{fulllineitems} |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
691 \item[\strong{class }\code{\bfcode{#1}}% |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
692 \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
693 }{\end{fulllineitems}} |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
694 |
|
14490
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
695 % \begin{excclassdesc}{name}{constructor args} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
696 % but indexes as an exception |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
697 \newenvironment{excclassdesc}[2]{ |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
698 % Using \renewcommand doesn't work for this, for unknown reasons: |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
699 \global\def\py@thisclass{#1} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
700 \begin{fulllineitems} |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
701 \py@sigline{\strong{exception }\bfcode{#1}}{#2}% |
|
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
702 \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)} |
|
14490
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
703 }{\end{fulllineitems}} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
704 |
|
17778
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
705 % There is no corresponding {excclassdesc*} environment. To describe |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
706 % a class exception without parameters, use the {excdesc} environment. |
|
b4b3657cb1fa
Define a new environment, classdesc*, which can be used to document a
Fred Drake <fdrake@acm.org>
parents:
17560
diff
changeset
|
707 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
708 |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
709 \let\py@classbadkey=\@undefined |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
710 |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
711 % object method ---------------------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
712 % \begin{methoddesc}[classname]{methodname}{args} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
713 \newcommand{\methodline}[3][\@undefined]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
714 \methodlineni{#2}{#3} |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
715 \ifx\@undefined#1\relax |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
716 \index{#2@{\py@idxcode{#2()}} (\py@thisclass\ method)} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
717 \else |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
718 \index{#2@{\py@idxcode{#2()}} (#1 method)} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
719 \fi |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
720 } |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
721 \newenvironment{methoddesc}[3][\@undefined]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
722 \begin{fulllineitems} |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
723 \ifx\@undefined#1\relax |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
724 \methodline{#2}{#3} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
725 \else |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
726 \def\py@thisclass{#1} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
727 \methodline{#2}{#3} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
728 \fi |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
729 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
730 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
731 % similar to {methoddesc}, but doesn't add to the index |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
732 % (never actually uses the optional argument) |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
733 \newcommand{\methodlineni}[3][\py@classbadkey]{% |
|
24090
bc00eeef0ac7
Abstract the creation of signature lines for callable things; the new
Fred Drake <fdrake@acm.org>
parents:
23063
diff
changeset
|
734 \py@sigline{\bfcode{#2}}{#3}} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
735 \newenvironment{methoddescni}[3][\py@classbadkey]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
736 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
737 \methodlineni{#2}{#3} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
738 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
739 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
740 % object data attribute -------------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
741 % \begin{memberdesc}[classname]{membername} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
742 \newcommand{\memberline}[2][\py@classbadkey]{% |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
743 \ifx\@undefined#1\relax |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
744 \memberlineni{#2} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
745 \index{#2@{\py@idxcode{#2}} (\py@thisclass\ attribute)} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
746 \else |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
747 \memberlineni{#2} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
748 \index{#2@{\py@idxcode{#2}} (#1 attribute)} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
749 \fi |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
750 } |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
751 \newenvironment{memberdesc}[2][\py@classbadkey]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
752 \begin{fulllineitems} |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
753 \ifx\@undefined#1\relax |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
754 \memberline{#2} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
755 \else |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
756 \def\py@thisclass{#1} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
757 \memberline{#2} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
758 \fi |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
759 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
760 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
761 % similar to {memberdesc}, but doesn't add to the index |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
762 % (never actually uses the optional argument) |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
763 \newcommand{\memberlineni}[2][\py@classbadkey]{\item[\bfcode{#2}]} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
764 \newenvironment{memberdescni}[2][\py@classbadkey]{ |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
765 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
766 \memberlineni{#2} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
767 }{\end{fulllineitems}} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
768 |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
769 % For exceptions: -------------------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
770 % \begin{excdesc}{name} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
771 % -- for constructor information, use excclassdesc instead |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
772 \newenvironment{excdesc}[1]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
773 \begin{fulllineitems} |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
774 \item[\strong{exception }\bfcode{#1}% |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
775 \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
776 }{\end{fulllineitems}} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
777 |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
778 % Module data or constants: ---------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
779 % \begin{datadesc}{name} |
|
15360
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
780 \newcommand{\dataline}[1]{% |
|
74e1d79520fd
Avoid using \withsubitem and \ttindex internally; they have not proven
Fred Drake <fdrake@acm.org>
parents:
15310
diff
changeset
|
781 \datalineni{#1}\index{#1@{\py@idxcode{#1}} (data in \py@thismodule)}} |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
782 \newenvironment{datadesc}[1]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
783 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
784 \dataline{#1} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
785 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
786 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
787 % similar to {datadesc}, but doesn't add to the index |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
788 \newcommand{\datalineni}[1]{\item[\bfcode{#1}]\nopagebreak} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
789 \newenvironment{datadescni}[1]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
790 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
791 \datalineni{#1} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
792 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
793 |
|
7764
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
794 % bytecode instruction --------------------------------------------------- |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
795 % \begin{opcodedesc}{name}{var} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
796 % -- {var} may be {} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
797 \newenvironment{opcodedesc}[2]{ |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
798 \begin{fulllineitems} |
|
9d0dc11775a4
Add comments about several of the environments.
Fred Drake <fdrake@acm.org>
parents:
7740
diff
changeset
|
799 \item[\bfcode{#1}\quad\var{#2}] |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
800 }{\end{fulllineitems}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
801 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
802 |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
803 \newcommand{\nodename}[1]{\label{#1}} |
|
7740
423be7cd0479
Don't use the fncychap package for HOWTO documents; appendices break. Still
Fred Drake <fdrake@acm.org>
parents:
7737
diff
changeset
|
804 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
805 % For these commands, use \command{} to get the typography right, not |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
806 % {\command}. This works better with the texinfo translation. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
807 \newcommand{\ABC}{{\sc abc}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
808 \newcommand{\UNIX}{{\sc Unix}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
809 \newcommand{\POSIX}{POSIX} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
810 \newcommand{\ASCII}{{\sc ascii}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
811 \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
812 \newcommand{\C}{C} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
813 \newcommand{\EOF}{{\sc eof}} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
814 \newcommand{\NULL}{\constant{NULL}} |
| 18230 | 815 \newcommand{\infinity}{\ensuremath{\infty}} |
| 816 \newcommand{\plusminus}{\ensuremath{\pm}} | |
|
31417
603a9eaa74e1
add \guilabel macro to mark labels that occur in user interfaces
Fred Drake <fdrake@acm.org>
parents:
31359
diff
changeset
|
817 |
|
603a9eaa74e1
add \guilabel macro to mark labels that occur in user interfaces
Fred Drake <fdrake@acm.org>
parents:
31359
diff
changeset
|
818 % \guilabel{Start} |
|
603a9eaa74e1
add \guilabel macro to mark labels that occur in user interfaces
Fred Drake <fdrake@acm.org>
parents:
31359
diff
changeset
|
819 \newcommand{\guilabel}[1]{\textsf{#1}} |
|
24496
2670a5db6843
Add a comment showing how one of the macros should be used.
Fred Drake <fdrake@acm.org>
parents:
24090
diff
changeset
|
820 % \menuselection{Start \sub Programs \sub Python} |
|
31417
603a9eaa74e1
add \guilabel macro to mark labels that occur in user interfaces
Fred Drake <fdrake@acm.org>
parents:
31359
diff
changeset
|
821 \newcommand{\menuselection}[1]{\guilabel{{\def\sub{ \ensuremath{>} }#1}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
822 |
|
7801
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
823 % Also for consistency: spell Python "Python", not "python"! |
|
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
824 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
825 % code is the most difficult one... |
|
13234
79f8f6b963c2
Try to make sure \code always uses roman (non-italic) text.
Fred Drake <fdrake@acm.org>
parents:
12638
diff
changeset
|
826 \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
827 \texttt{#1}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
828 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
829 \newcommand{\bfcode}[1]{\code{\bfseries#1}} % bold-faced code font |
|
22921
3c876ff29a83
Add \csimplemacro to parallel the csimplemacrodesc environment.
Fred Drake <fdrake@acm.org>
parents:
22637
diff
changeset
|
830 \newcommand{\csimplemacro}[1]{\code{#1}} |
|
8609
ce295bfacef3
Fix the \kbd definition so it didn't leave the courier face on.
Fred Drake <fdrake@acm.org>
parents:
8396
diff
changeset
|
831 \newcommand{\kbd}[1]{\code{#1}} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
832 \newcommand{\samp}[1]{`\code{#1}'} |
|
9542
1437c2335b3b
Make \var work correctly in math mode.
Fred Drake <fdrake@acm.org>
parents:
9524
diff
changeset
|
833 \newcommand{\var}[1]{% |
|
1437c2335b3b
Make \var work correctly in math mode.
Fred Drake <fdrake@acm.org>
parents:
9524
diff
changeset
|
834 \ifmmode% |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
835 \hbox{\py@defaultsize\textrm{\textit{#1\/}}}% |
|
9542
1437c2335b3b
Make \var work correctly in math mode.
Fred Drake <fdrake@acm.org>
parents:
9524
diff
changeset
|
836 \else% |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
837 \py@defaultsize\textrm{\textit{#1\/}}% |
|
9542
1437c2335b3b
Make \var work correctly in math mode.
Fred Drake <fdrake@acm.org>
parents:
9524
diff
changeset
|
838 \fi% |
|
1437c2335b3b
Make \var work correctly in math mode.
Fred Drake <fdrake@acm.org>
parents:
9524
diff
changeset
|
839 } |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
840 \renewcommand{\emph}[1]{{\em #1}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
841 \newcommand{\dfn}[1]{\emph{#1}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
842 \newcommand{\strong}[1]{{\bf #1}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
843 % let's experiment with a new font: |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
844 \newcommand{\file}[1]{`\filenq{#1}'} |
|
31498
51c3d452af2f
support \e in \file and \filenq; this is useful for Windows paths
Fred Drake <fdrake@acm.org>
parents:
31417
diff
changeset
|
845 \newcommand{\filenq}[1]{{\py@smallsize\textsf{\let\e=\textbackslash#1}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
846 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
847 % Use this def/redef approach for \url{} since hyperref defined this already, |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
848 % but only if we actually used hyperref: |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
849 \ifpdf |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
850 \newcommand{\url}[1]{{% |
|
38453
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
851 \py@pdfstartlink% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
852 attr{ /Border [0 0 0] }% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
853 user{% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
854 /Subtype/Link% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
855 /A<<% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
856 /Type/Action% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
857 /S/URI% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
858 /URI(#1)% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
859 >>% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
860 }% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
861 \py@LinkColor% color of the link text |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
862 \py@smallsize\sf #1% |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
863 \py@NormalColor% Turn it back off; these are declarative |
|
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
864 \pdfendlink}% and don't appear bound to the current |
|
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
865 }% formatting "box". |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
866 \else |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
867 \newcommand{\url}[1]{\mbox{\py@smallsize\textsf{#1}}} |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
868 \fi |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
869 \newcommand{\email}[1]{{\py@smallsize\textsf{#1}}} |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
870 \newcommand{\newsgroup}[1]{{\py@smallsize\textsf{#1}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
871 |
|
13834
4aebd0f2a062
\py@varvars: Merge the various definitions to be the simplist one that
Fred Drake <fdrake@acm.org>
parents:
13234
diff
changeset
|
872 \newcommand{\py@varvars}[1]{{% |
|
12215
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
873 {\let\unspecified=\py@unspecified% |
|
774817285b8c
Merged changes from the 1.5.2p2 release.
Fred Drake <fdrake@acm.org>
parents:
11450
diff
changeset
|
874 \let\moreargs=\py@moreargs% |
|
13834
4aebd0f2a062
\py@varvars: Merge the various definitions to be the simplist one that
Fred Drake <fdrake@acm.org>
parents:
13234
diff
changeset
|
875 \var{#1}}}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
876 |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
877 % I'd really like to get rid of this! |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
878 \newif\iftexi\texifalse |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
879 |
|
8779
9138272c1fe6
Define stuff to allow simple HTML-only selection using TeX's \if<foo>...\fi
Fred Drake <fdrake@acm.org>
parents:
8762
diff
changeset
|
880 % This is used to get l2h to put the copyright and abstract on |
|
9138272c1fe6
Define stuff to allow simple HTML-only selection using TeX's \if<foo>...\fi
Fred Drake <fdrake@acm.org>
parents:
8762
diff
changeset
|
881 % a separate HTML page. |
|
9138272c1fe6
Define stuff to allow simple HTML-only selection using TeX's \if<foo>...\fi
Fred Drake <fdrake@acm.org>
parents:
8762
diff
changeset
|
882 \newif\ifhtml\htmlfalse |
|
9138272c1fe6
Define stuff to allow simple HTML-only selection using TeX's \if<foo>...\fi
Fred Drake <fdrake@acm.org>
parents:
8762
diff
changeset
|
883 |
|
9138272c1fe6
Define stuff to allow simple HTML-only selection using TeX's \if<foo>...\fi
Fred Drake <fdrake@acm.org>
parents:
8762
diff
changeset
|
884 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
885 % These should be used for all references to identifiers which are |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
886 % used to refer to instances of specific language constructs. See the |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
887 % names for specific semantic assignments. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
888 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
889 % For now, don't do anything really fancy with them; just use them as |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
890 % logical markup. This might change in the future. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
891 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
892 \newcommand{\module}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
893 \newcommand{\keyword}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
894 \newcommand{\exception}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
895 \newcommand{\class}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
896 \newcommand{\function}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
897 \newcommand{\member}[1]{\texttt{#1}} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
898 \newcommand{\method}[1]{\texttt{#1}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
899 |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
900 \newcommand{\pytype}[1]{#1} % built-in Python type |
|
7801
047996666c81
Removed an obsolete hack that's been commented out for a long time.
Fred Drake <fdrake@acm.org>
parents:
7792
diff
changeset
|
901 |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
902 \newcommand{\cfunction}[1]{\texttt{#1}} |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
903 \newcommand{\ctype}[1]{\texttt{#1}} % C struct or typedef name |
|
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
904 \newcommand{\cdata}[1]{\texttt{#1}} % C variable, typically global |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
905 |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
906 \newcommand{\mailheader}[1]{{\py@smallsize\textsf{#1:}}} |
|
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
907 \newcommand{\mimetype}[1]{{\py@smallsize\textsf{#1}}} |
|
7670
8e6a58019887
\regexp{}: Rewritten to look like Freidl's book. Too rip-off?
Fred Drake <fdrake@acm.org>
parents:
7659
diff
changeset
|
908 % The \! is a "negative thin space" in math mode. |
|
8e6a58019887
\regexp{}: Rewritten to look like Freidl's book. Too rip-off?
Fred Drake <fdrake@acm.org>
parents:
7659
diff
changeset
|
909 \newcommand{\regexp}[1]{% |
|
8e6a58019887
\regexp{}: Rewritten to look like Freidl's book. Too rip-off?
Fred Drake <fdrake@acm.org>
parents:
7659
diff
changeset
|
910 {\tiny$^{^\lceil}\!\!$% |
|
25979
d812b8aaefb3
Define abstract way to get the normal and smaller font sizes that work
Fred Drake <fdrake@acm.org>
parents:
25972
diff
changeset
|
911 {\py@defaultsize\code{#1}}% |
|
7850
db1e49d51fe1
Increase space between the end of a regexp and the little right floor symbol
Fred Drake <fdrake@acm.org>
parents:
7801
diff
changeset
|
912 $\!\rfloor\!$% |
|
7670
8e6a58019887
\regexp{}: Rewritten to look like Freidl's book. Too rip-off?
Fred Drake <fdrake@acm.org>
parents:
7659
diff
changeset
|
913 }} |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
914 \newcommand{\envvar}[1]{% |
|
16118
64545c986b98
Remove the dollar sign from the formatting of environment variables --
Fred Drake <fdrake@acm.org>
parents:
15362
diff
changeset
|
915 #1% |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
916 \index{#1}% |
|
16118
64545c986b98
Remove the dollar sign from the formatting of environment variables --
Fred Drake <fdrake@acm.org>
parents:
15362
diff
changeset
|
917 \index{environment variables!{#1}}% |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
918 } |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
919 \newcommand{\makevar}[1]{#1} % variable in a Makefile |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
920 \newcommand{\character}[1]{\samp{#1}} |
|
7659
869373fa0bf8
\withsubitem{}: New macro. Change indexsubitem temporarily for another
Fred Drake <fdrake@acm.org>
parents:
7617
diff
changeset
|
921 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
922 % constants defined in Python modules or C headers, not language constants: |
|
16966
38e17a089492
Label classes and exceptions explicitly in the documentation (for their
Fred Drake <fdrake@acm.org>
parents:
16118
diff
changeset
|
923 \newcommand{\constant}[1]{\code{#1}} % manifest constant, not syntactic |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
924 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
925 \newcommand{\manpage}[2]{{\emph{#1}(#2)}} |
|
14490
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
926 \newcommand{\pep}[1]{PEP #1\index{Python Enhancement Proposals!PEP #1}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
927 \newcommand{\rfc}[1]{RFC #1\index{RFC!RFC #1}} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
928 \newcommand{\program}[1]{\strong{#1}} |
|
11450
0a3bb403a430
\programopt: New macro, used to mark command-line parameters in the
Fred Drake <fdrake@acm.org>
parents:
11082
diff
changeset
|
929 \newcommand{\programopt}[1]{\strong{#1}} |
| 12377 | 930 % Note that \longprogramopt provides the '--'! |
| 931 \newcommand{\longprogramopt}[1]{\strong{-{}-#1}} | |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
932 |
|
18427
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
933 % \ulink{link text}{URL} |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
934 \ifpdf |
|
34064
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
935 \newcommand{\ulink}[2]{{% |
|
cec31edea414
- fix up internal hyperlink generation in PDF formatting so that links at
Fred Drake <fdrake@acm.org>
parents:
33216
diff
changeset
|
936 % For PDF, we *should* only generate a link when the URL is absolute. |
|
38453
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
937 \py@pdfstartlink% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
938 attr{ /Border [0 0 0] }% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
939 user{% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
940 /Subtype/Link% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
941 /A<<% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
942 /Type/Action% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
943 /S/URI% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
944 /URI(#2)% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
945 >>% |
|
29ae5e0fc348
Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk.
Thomas Wouters <thomas@python.org>
parents:
34807
diff
changeset
|
946 }% |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
947 \py@LinkColor% color of the link text |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
948 #1% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
949 \py@NormalColor% Turn it back off; these are declarative |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
950 \pdfendlink}% and don't appear bound to the current |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
951 }% formatting "box". |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
952 \else |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
953 \newcommand{\ulink}[2]{#1} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
954 \fi |
|
11450
0a3bb403a430
\programopt: New macro, used to mark command-line parameters in the
Fred Drake <fdrake@acm.org>
parents:
11082
diff
changeset
|
955 |
|
0a3bb403a430
\programopt: New macro, used to mark command-line parameters in the
Fred Drake <fdrake@acm.org>
parents:
11082
diff
changeset
|
956 % cited titles: \citetitle{Title of Work} |
|
0a3bb403a430
\programopt: New macro, used to mark command-line parameters in the
Fred Drake <fdrake@acm.org>
parents:
11082
diff
changeset
|
957 % online: \citetitle[url-to-resource]{Title of Work} |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
958 \ifpdf |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
959 \newcommand{\citetitle}[2][\py@modulebadkey]{% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
960 \ifx\py@modulebadkey#1\emph{#2}\else\ulink{\emph{#2}}{#1}\fi% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
961 } |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
962 \else |
|
20841
eacf81df6c42
Fix stupid bug recently introduced for DVI version of the docs (used to
Fred Drake <fdrake@acm.org>
parents:
20751
diff
changeset
|
963 \newcommand{\citetitle}[2][URL]{\emph{#2}} |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
964 \fi |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
965 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
966 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
967 |
|
21347
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
968 % This version is being checked in for the historical record; it shows |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
969 % how I've managed to get some aspects of this to work. It will not |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
970 % be used in practice, so a subsequent revision will change things |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
971 % again. This version has problems, but shows how to do something |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
972 % that proved more tedious than I'd expected, so I don't want to lose |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
973 % the example completely. |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
974 % |
|
19412
d4ba6e2aaae3
New \grammartoken markup, similar to \token but allowed everywhere.
Fred Drake <fdrake@acm.org>
parents:
18981
diff
changeset
|
975 \newcommand{\grammartoken}[1]{\texttt{#1}} |
|
18427
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
976 \newenvironment{productionlist}[1][\py@badkey]{ |
|
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
977 \def\optional##1{{\Large[}##1{\Large]}} |
|
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
978 \def\production##1##2{\code{##1}&::=&\code{##2}\\} |
|
22316
cc788b3b21b6
Revise the markup related to the grammar productions to increase the
Fred Drake <fdrake@acm.org>
parents:
21418
diff
changeset
|
979 \def\productioncont##1{& &\code{##1}\\} |
|
18427
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
980 \def\token##1{##1} |
|
19412
d4ba6e2aaae3
New \grammartoken markup, similar to \token but allowed everywhere.
Fred Drake <fdrake@acm.org>
parents:
18981
diff
changeset
|
981 \let\grammartoken=\token |
|
21347
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
982 \parindent=2em |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
983 \indent |
|
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
984 \begin{tabular}{lcl} |
|
18427
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
985 }{% |
|
21347
f59c6b5dd122
Save a new version of the productionlist environment for safe-keeping; this
Fred Drake <fdrake@acm.org>
parents:
21116
diff
changeset
|
986 \end{tabular} |
|
18427
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
987 } |
|
6a5ef1994153
Add \ulink, grammar production markup.
Fred Drake <fdrake@acm.org>
parents:
18230
diff
changeset
|
988 |
|
31845
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
989 \newlength{\py@noticelength} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
990 |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
991 \newcommand{\py@heavybox}{ |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
992 \setlength{\fboxrule}{2pt} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
993 \setlength{\fboxsep}{7pt} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
994 \setlength{\py@noticelength}{\linewidth} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
995 \addtolength{\py@noticelength}{-2\fboxsep} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
996 \addtolength{\py@noticelength}{-2\fboxrule} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
997 \setlength{\shadowsize}{3pt} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
998 \Sbox |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
999 \minipage{\py@noticelength} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1000 } |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1001 \newcommand{\py@endheavybox}{ |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1002 \endminipage |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1003 \endSbox |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1004 \fbox{\TheSbox} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1005 } |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1006 |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1007 % a 'note' is as plain as it gets: |
|
21418
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1008 \newcommand{\py@noticelabel@note}{Note:} |
|
31845
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1009 \newcommand{\py@noticestart@note}{} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1010 \newcommand{\py@noticeend@note}{} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1011 |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1012 % a 'warning' gets more visible distinction: |
|
21418
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1013 \newcommand{\py@noticelabel@warning}{Warning:} |
|
31845
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1014 \newcommand{\py@noticestart@warning}{\py@heavybox} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1015 \newcommand{\py@noticeend@warning}{\py@endheavybox} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1016 |
|
21418
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1017 \newenvironment{notice}[1][note]{ |
|
31845
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1018 \def\py@noticetype{#1} |
|
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1019 \csname py@noticestart@#1\endcsname |
|
21418
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1020 \par\strong{\csname py@noticelabel@#1\endcsname} |
|
31845
64cc163eeaf1
add a heavy box around warning notices to make them really stand out in the
Fred Drake <fdrake@acm.org>
parents:
31507
diff
changeset
|
1021 }{\csname py@noticeend@\py@noticetype\endcsname} |
|
21418
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1022 \newcommand{\note}[1]{\strong{\py@noticelabel@note} #1} |
|
571d5b7b746c
Add a new environment for whole-paragraph (or longer) notes & warnings.
Fred Drake <fdrake@acm.org>
parents:
21347
diff
changeset
|
1023 \newcommand{\warning}[1]{\strong{\py@noticelabel@warning} #1} |
|
20336
1b3ffdf12150
New markup: \note{...} and \warning{...}
Fred Drake <fdrake@acm.org>
parents:
20113
diff
changeset
|
1024 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1025 % Deprecation stuff. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1026 % Should be extended to allow an index / list of deprecated stuff. But |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1027 % there's a lot of stuff that needs to be done to make that automatable. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1028 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1029 % First parameter is the release number that deprecates the feature, the |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1030 % second is the action the should be taken by users of the feature. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1031 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1032 % Example: |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1033 % \deprecated{1.5.1}{Use \method{frobnicate()} instead.} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1034 % |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1035 \newcommand{\deprecated}[2]{% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1036 \strong{Deprecated since release #1.} #2\par} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1037 |
| 8762 | 1038 % New stuff. |
| 1039 % This should be used to mark things which have been added to the | |
| 1040 % development tree but that aren't in the release, but are documented. | |
| 1041 % This allows release of documentation that already includes updated | |
|
10077
80b215249b17
Make \versionadded and \versionchanged less prominant -- neither bold
Fred Drake <fdrake@acm.org>
parents:
9968
diff
changeset
|
1042 % descriptions. Place at end of descriptor environment. |
| 8762 | 1043 % |
| 1044 % Example: | |
| 1045 % \versionadded{1.5.2} | |
|
13234
79f8f6b963c2
Try to make sure \code always uses roman (non-italic) text.
Fred Drake <fdrake@acm.org>
parents:
12638
diff
changeset
|
1046 % \versionchanged[short explanation]{2.0} |
| 8762 | 1047 % |
|
17560
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1048 \newcommand{\versionadded}[2][\py@badkey]{% |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
1049 \ifx\@undefined#1\relax% |
|
17560
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1050 { New in version #2. }% |
|
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1051 \else% |
|
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1052 { New in version #2:\ #1. }% |
|
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1053 \fi% |
|
db928a277f8b
\versionadded: Add support for including an explanatory note along with
Fred Drake <fdrake@acm.org>
parents:
17380
diff
changeset
|
1054 } |
|
12549
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1055 \newcommand{\versionchanged}[2][\py@badkey]{% |
|
41554
06145fbc7ab9
Merged revisions 53952-54987 via svnmerge from
Guido van Rossum <guido@python.org>
parents:
38453
diff
changeset
|
1056 \ifx\@undefined#1\relax% |
|
12549
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1057 { Changed in version #2. }% |
|
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1058 \else% |
|
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1059 { Changed in version #2:\ #1. }% |
|
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1060 \fi% |
|
efd1e5d2284a
\versionchanged: Added optional parameter for explanation of change.
Fred Drake <fdrake@acm.org>
parents:
12500
diff
changeset
|
1061 } |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1062 |
| 8762 | 1063 |
| 1064 % Tables. | |
| 1065 % | |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1066 \newenvironment{tableii}[4]{% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1067 \begin{center}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1068 \def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1069 \begin{tabular}{#1}\strong{#3}&\strong{#4} \\* \hline% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1070 }{% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1071 \end{tabular}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1072 \end{center}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1073 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1074 |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1075 \newenvironment{longtableii}[4]{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1076 \begin{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1077 \def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1078 \begin{longtable}[c]{#1}\strong{#3}&\strong{#4} \\* \hline\endhead% |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1079 }{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1080 \end{longtable}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1081 \end{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1082 } |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1083 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1084 \newenvironment{tableiii}[5]{% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1085 \begin{center}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1086 \def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}% |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1087 \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5} \\% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1088 \hline% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1089 }{% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1090 \end{tabular}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1091 \end{center}% |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1092 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1093 |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1094 \newenvironment{longtableiii}[5]{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1095 \begin{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1096 \def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1097 \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5} \\% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1098 \hline\endhead% |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1099 }{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1100 \end{longtable}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1101 \end{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1102 } |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1103 |
|
8751
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1104 \newenvironment{tableiv}[6]{% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1105 \begin{center}% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1106 \def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1107 \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6} \\% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1108 \hline% |
|
8751
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1109 }{% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1110 \end{tabular}% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1111 \end{center}% |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1112 } |
|
99793302d10d
{tableiv} environment: Four-column table.
Fred Drake <fdrake@acm.org>
parents:
8726
diff
changeset
|
1113 |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1114 \newenvironment{longtableiv}[6]{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1115 \begin{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1116 \def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1117 \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1118 \\% |
|
15310
5d2a2185c651
Remove second horizontal line below table headers; it is just too
Fred Drake <fdrake@acm.org>
parents:
14722
diff
changeset
|
1119 \hline\endhead% |
|
14722
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1120 }{% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1121 \end{longtable}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1122 \end{center}% |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1123 } |
|
4d2e9cf1eb20
Add new environments: longtableii, longtableiii, and longtableiv, to
Fred Drake <fdrake@acm.org>
parents:
14555
diff
changeset
|
1124 |
|
18683
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1125 \newenvironment{tablev}[7]{% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1126 \begin{center}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1127 \def\linev##1##2##3##4##5{\csname#2\endcsname{##1}&##2&##3&##4&##5\\}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1128 \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}&\strong{#7} \\% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1129 \hline% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1130 }{% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1131 \end{tabular}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1132 \end{center}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1133 } |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1134 |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1135 \newenvironment{longtablev}[7]{% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1136 \begin{center}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1137 \def\linev##1##2##3##4##5{\csname#2\endcsname{##1}&##2&##3&##4&##5\\}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1138 \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}&\strong{#7}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1139 \\% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1140 \hline\endhead% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1141 }{% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1142 \end{longtable}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1143 \end{center}% |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1144 } |
|
8ca70c9c1971
Define new markup for 5-column tables.
Fred Drake <fdrake@acm.org>
parents:
18427
diff
changeset
|
1145 |
|
26875
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1146 % XXX Don't think we can use this yet, though it cleans up some |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1147 % tedious markup. There's no equivalent for the HTML transform yet, |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1148 % and that needs to exist. I don't know how to write it. |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1149 % |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1150 % This should really have something that makes it easier to bind a |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1151 % table's ``Notes'' column and an associated tablenotes environment, |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1152 % and generates the right magic for getting the numbers right in the |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1153 % table. |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1154 % |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1155 % So this is quite incomplete. |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1156 % |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1157 \newcounter{py@tablenotescounter} |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1158 \newenvironment{tablenotes}{% |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1159 \noindent Notes: |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1160 \par |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1161 \setcounter{py@tablenotescounter}{0} |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1162 \begin{list}{(\arabic{py@tablenotescounter})}% |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1163 {\usecounter{py@tablenotescounter}} |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1164 }{\end{list}} |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1165 |
|
d177dd0ca8f7
Start something that might make table notes easier to deal with,
Fred Drake <fdrake@acm.org>
parents:
26015
diff
changeset
|
1166 |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1167 % Cross-referencing (AMK, new impl. FLD) |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1168 % Sample usage: |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1169 % \begin{seealso} |
|
10846
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1170 % \seemodule{rand}{Uniform random number generator.}; % Module xref |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1171 % \seetext{\emph{Encyclopedia Britannica}}. % Ref to a book |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
1172 % |
|
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
1173 % % A funky case: module name contains '_'; have to supply an optional key |
|
10846
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1174 % \seemodule[copyreg]{copy_reg}{Interface constructor registration for |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1175 % \module{pickle}.} |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1176 % \end{seealso} |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
1177 % |
|
10846
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1178 % Note that the last parameter for \seemodule and \seetext should be complete |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1179 % sentences and be terminated with the proper punctuation. |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1180 |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1181 \ifpdf |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1182 \newcommand{\py@seemodule}[3][\py@modulebadkey]{% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1183 \par% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1184 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1185 \begin{fulllineitems} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1186 \item[\py@linkToName{label-module-\py@modulekey}{Module \module{#2}} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1187 (section \ref{module-\py@modulekey}):] |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1188 #3 |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1189 \end{fulllineitems} |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1190 } |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1191 \else |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1192 \newcommand{\py@seemodule}[3][\py@modulebadkey]{% |
|
9868
a58f36352c4f
\seemodule: Fix so that each \seemodule entry gets its own paragraph,
Fred Drake <fdrake@acm.org>
parents:
9542
diff
changeset
|
1193 \par% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1194 \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% |
|
10846
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1195 \begin{fulllineitems} |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1196 \item[Module \module{#2} (section \ref{module-\py@modulekey}):] |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1197 #3 |
|
b7378df3db56
Change the look of \seemodule output to fit in better.
Fred Drake <fdrake@acm.org>
parents:
10770
diff
changeset
|
1198 \end{fulllineitems} |
|
7585
2ef0aca96f2d
Revise some of the PDF support to get at least preliminary outline support.
Fred Drake <fdrake@acm.org>
parents:
7561
diff
changeset
|
1199 } |
|
20751
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1200 \fi |
|
85109a6099b5
Revise the PDF support in the LaTeX style sheet. This still isn't quite
Fred Drake <fdrake@acm.org>
parents:
20336
diff
changeset
|
1201 |
| 34726 | 1202 % \seelink{url}{link text}{why it's interesting} |
|
31359
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1203 \newcommand{\py@seelink}[3]{% |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1204 \par |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1205 \begin{fulllineitems} |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1206 \item[\ulink{#2}{#1}] |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1207 #3 |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1208 \end{fulllineitems} |
|
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1209 } |
|
14521
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1210 % \seetitle[url]{title}{why it's interesting} |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1211 \newcommand{\py@seetitle}[3][\py@modulebadkey]{% |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1212 \par |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1213 \begin{fulllineitems} |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1214 \item[\citetitle{#2}] |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1215 \ifx\py@modulebadkey#1\else |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1216 \item[{\small{(\url{#1})}}] |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1217 \fi |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1218 #3 |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1219 \end{fulllineitems} |
|
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1220 } |
|
14490
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1221 % \seepep{number}{title}{why it's interesting} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1222 \newcommand{\py@seepep}[3]{% |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1223 \par% |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1224 \begin{fulllineitems} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1225 \item[\pep{#1}, ``\emph{#2}''] |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1226 #3 |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1227 \end{fulllineitems} |
|
f78f287b3add
excclassdesc: New environment. For use in documenting class-based
Fred Drake <fdrake@acm.org>
parents:
14020
diff
changeset
|
1228 } |
|
12500
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1229 % \seerfc{number}{title}{why it's interesting} |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1230 \newcommand{\py@seerfc}[3]{% |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1231 \par% |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1232 \begin{fulllineitems} |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1233 \item[\rfc{#1}, ``\emph{#2}''] |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1234 #3 |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1235 \end{fulllineitems} |
|
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1236 } |
|
12638
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1237 % \seeurl{url}{why it's interesting} |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1238 \newcommand{\py@seeurl}[2]{% |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1239 \par% |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1240 \begin{fulllineitems} |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1241 \item[\url{#1}] |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1242 #2 |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1243 \end{fulllineitems} |
|
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1244 } |
|
21116
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1245 |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1246 \newenvironment{seealso*}{ |
|
10423
9a4baf0c57ea
Add some (commented out) macros to change the page size to the size of
Fred Drake <fdrake@acm.org>
parents:
10328
diff
changeset
|
1247 \par |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1248 \def\seetext##1{\par{##1}} |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1249 \let\seemodule=\py@seemodule |
|
14521
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1250 \let\seepep=\py@seepep |
|
12500
eb433efa24de
Define \seerfc within the seealso environment.
Fred Drake <fdrake@acm.org>
parents:
12377
diff
changeset
|
1251 \let\seerfc=\py@seerfc |
|
14521
9fed4eebc586
\seetitle: New macro for building reference list content.
Fred Drake <fdrake@acm.org>
parents:
14490
diff
changeset
|
1252 \let\seetitle=\py@seetitle |
|
12638
def959352422
Define \seeurl in the seealso environment. Two parameters: url, why.
Fred Drake <fdrake@acm.org>
parents:
12549
diff
changeset
|
1253 \let\seeurl=\py@seeurl |
|
31359
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1254 \let\seelink=\py@seelink |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1255 }{\par} |
|
21116
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1256 \newenvironment{seealso}{ |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1257 \par |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1258 \strong{See Also:} |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1259 \par |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1260 \def\seetext##1{\par{##1}} |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1261 \let\seemodule=\py@seemodule |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1262 \let\seepep=\py@seepep |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1263 \let\seerfc=\py@seerfc |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1264 \let\seetitle=\py@seetitle |
|
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1265 \let\seeurl=\py@seeurl |
|
31359
17ca347303d3
add new reference macro: \seelink
Fred Drake <fdrake@acm.org>
parents:
30722
diff
changeset
|
1266 \let\seelink=\py@seelink |
|
21116
0a67463f8b7d
Add a new environment in the Python docs markup: seealso*. This is similar
Fred Drake <fdrake@acm.org>
parents:
20841
diff
changeset
|
1267 }{\par} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1268 |
| 8762 | 1269 % Allow the Python release number to be specified independently of the |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1270 % \date{}. This allows the date to reflect the document's date and |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1271 % release to specify the Python release that is documented. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1272 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1273 \newcommand{\py@release}{} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1274 \newcommand{\version}{} |
| 14555 | 1275 \newcommand{\shortversion}{} |
|
18180
c25876a51f1b
Add a little more support for describing version information. This
Fred Drake <fdrake@acm.org>
parents:
17778
diff
changeset
|
1276 \newcommand{\releaseinfo}{} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1277 \newcommand{\releasename}{Release} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1278 \newcommand{\release}[1]{% |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1279 \renewcommand{\py@release}{\releasename\space\version}% |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1280 \renewcommand{\version}{#1}} |
| 14555 | 1281 \newcommand{\setshortversion}[1]{% |
| 1282 \renewcommand{\shortversion}{#1}} | |
|
18180
c25876a51f1b
Add a little more support for describing version information. This
Fred Drake <fdrake@acm.org>
parents:
17778
diff
changeset
|
1283 \newcommand{\setreleaseinfo}[1]{% |
|
c25876a51f1b
Add a little more support for describing version information. This
Fred Drake <fdrake@acm.org>
parents:
17778
diff
changeset
|
1284 \renewcommand{\releaseinfo}{#1}} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1285 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1286 % Allow specification of the author's address separately from the |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1287 % author's name. This can be used to format them differently, which |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1288 % is a good thing. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1289 % |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1290 \newcommand{\py@authoraddress}{} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1291 \newcommand{\authoraddress}[1]{\renewcommand{\py@authoraddress}{#1}} |
|
8341
ebfde06fdb8d
Added definitions for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8306
diff
changeset
|
1292 \let\developersaddress=\authoraddress |
|
ebfde06fdb8d
Added definitions for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8306
diff
changeset
|
1293 \let\developer=\author |
|
ebfde06fdb8d
Added definitions for \developer, \developers, \developersaddress.
Fred Drake <fdrake@acm.org>
parents:
8306
diff
changeset
|
1294 \let\developers=\author |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1295 |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1296 % This sets up the fancy chapter headings that make the documents look |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1297 % at least a little better than the usual LaTeX output. |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1298 % |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
1299 \@ifundefined{ChTitleVar}{}{ |
|
8190
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1300 \ChNameVar{\raggedleft\normalsize\py@HeaderFamily} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1301 \ChNumVar{\raggedleft \bfseries\Large\py@HeaderFamily} |
|
25c2aea64501
Fixed \code so word wrapping is allowed.
Fred Drake <fdrake@acm.org>
parents:
8076
diff
changeset
|
1302 \ChTitleVar{\raggedleft \rm\Huge\py@HeaderFamily} |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1303 % This creates chapter heads without the leading \vspace*{}: |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
1304 \def\@makechapterhead#1{% |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
1305 {\parindent \z@ \raggedright \normalfont |
|
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
1306 \ifnum \c@secnumdepth >\m@ne |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1307 \DOCH |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1308 \fi |
|
7597
39b84a3dceaa
Never, NEVER try to recover a screwed up file by carving a chunk out of an
Fred Drake <fdrake@acm.org>
parents:
7592
diff
changeset
|
1309 \interlinepenalty\@M |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1310 \DOTI{#1} |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1311 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1312 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1313 } |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1314 |
|
8396
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1315 |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1316 % Definition lists; requested by AMK for HOWTO documents. Probably useful |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1317 % elsewhere as well, so keep in in the general style support. |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1318 % |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1319 \newenvironment{definitions}{% |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1320 \begin{description}% |
| 9078 | 1321 \def\term##1{\item[##1]\mbox{}\\*[0mm]} |
|
8396
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1322 }{% |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1323 \end{description}% |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1324 } |
|
79071a4e0eca
Added {definitions} environment, which has \term to define indivual terms.
Fred Drake <fdrake@acm.org>
parents:
8341
diff
changeset
|
1325 |
|
7527
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1326 % Tell TeX about pathological hyphenation cases: |
|
26a8771a4cfd
Convert LaTeX support to create a new class of documents. HTML generation
Fred Drake <fdrake@acm.org>
parents:
diff
changeset
|
1327 \hyphenation{Base-HTTP-Re-quest-Hand-ler} |
