Revision: 1808
http://epydoc.svn.sourceforge.net/epydoc/?rev=1808&view=rev
Author: edloper
Date: 2008-03-05 10:40:33 -0800 (Wed, 05 Mar 2008)
Log Message:
-----------
- Use \raggedright for the subclass list
- Use utf8x encoding, instead of utf8
- \EpydocDottedName now expects its argument to use escaped characters
(underscore in particular.) E.g., \EpydocDottedName{foo\_bar}. It
no longer uses the latex url package. This makes it work better with
the hyperref package.
- Misc changes to show_latex_warnings().
Modified Paths:
--------------
trunk/epydoc/src/epydoc/docwriter/latex_sty.py
Modified: trunk/epydoc/src/epydoc/docwriter/latex_sty.py
===================================================================
--- trunk/epydoc/src/epydoc/docwriter/latex_sty.py 2008-03-04 02:32:58 UTC (rev 1807)
+++ trunk/epydoc/src/epydoc/docwriter/latex_sty.py 2008-03-05 18:40:33 UTC (rev 1808)
@@ -75,7 +75,6 @@
\RequirePackage[headings]{fullpage}
\RequirePackage[usenames]{color}
\RequirePackage{graphicx}
-\RequirePackage{url}
\@ifclassloaded{memoir}{%
\RequirePackage[other,notbib]{tocbibind}
@@ -107,6 +106,9 @@
% ======================================================================
% General Formatting
+% Setting this will make us less likely to get overfull hboxes:
+%\setlength{\emergencystretch}{1in}
+
% Separate paragraphs by a blank line (do not indent them). We define
% a new length variable. \EpydocParskip, for the paragraph-skip length.
% This needs to be assigned to \parskip here as well as inside several
@@ -566,23 +568,28 @@
% This section defines the EpydocDottedName command, which is used to
% display the names of Python objects.
-% The \EpydocDottedName command is used to escape dotted names. In
-% particular, it escapes all characters except '#', '%', and newlines,
-% and allows non-hyphenated wrapping at '.' separator characters.
-% [xx] this generates a warning for names containing _ -- we need
-% to somehow strip that out of the second argument.
-\newcommand\EpydocDottedName[1]{%
- \texorpdfstring{\protect\Epydoc@...{#1}}{#1}}
+% The \EpydocDottedName command adds a possible break-point after every
+% period in the given string. It no longer escapes characters such as
+% underscore, since this interfered with the hyperref package; instead,
+% epydoc is responsible for escaping them. E.g., correct usage for a
+% name with an underscore is \EpydocDottedName{some\_name}.
+\newcommand\EpydocDottedName[1]{
+ \Epydoc@... #1.@}
-\DeclareUrlCommand\Epydoc@...{%
- \urlstyle{rm}%
- \def\UrlBigBreaks{\do\.}%
- % We should never see most of these chars in a name, but handle
- % them if they happen to show up (eg script names)
- \def\UrlOrds{\do\@\do\#\do\%\do\^\do\&\do\(\do\)\do\-\do\_%
- \do\|\do\\\do\"\do\/\do\?\do\>\do\<\do\{\do\}%
- \do\`\do\~}
-}
+% This helper function performs the work of \EpydocDottedName. It
+% scans forward, looking for a period, and putting all text up to the
+% period into #1. The single character after the period is put in
+% #2. This function then checks if #2 is '@', indicating that we're
+% done, or some other character, indicating that we should continue.
+% Note that \ifx tests character codes; and that when '@' appears
+% in user code, it gets the character code 'other', but when it
+% appears here, it gets the character code 'letter'.
+\def\Epydoc@...#1.#2{%
+ \ifx#2@\relax #1\else
+ #1\discretionary{.}{}{.}%
+ \expandafter\expandafter\expandafter\Epydoc@...
+ \expandafter #2\fi%
+ }
"""+NIST_DISCLAIMER
######################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Revision: 1795
http://epydoc.svn.sourceforge.net/epydoc/?rev=1795&view=rev
Author: edloper
Date: 2008-02-26 09:13:33 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
- Updated description of \EpydocIndex command
Modified Paths:
--------------
trunk/epydoc/doc/epydoc-latex-demo.tex
Modified: trunk/epydoc/doc/epydoc-latex-demo.tex
===================================================================
--- trunk/epydoc/doc/epydoc-latex-demo.tex 2008-02-26 17:12:17 UTC (rev 1794)
+++ trunk/epydoc/doc/epydoc-latex-demo.tex 2008-02-26 17:13:33 UTC (rev 1795)
@@ -62,12 +62,25 @@
\subsection{Indexing}
% The \EpydocIndex command is used to mark items that should be included
-% in the index. It takes one optional argument, specifying the 'kind'
-% of the object, and one required argument, the term that should be
-% included in the index. (This command is used inside the \index
-% command.) kind can be Package, Script, Module, Class, Class Method,
-% Static Method, Method, Function, or Variable.
-\index{\EpydocIndex[Script]{\EpydocDottedName{fooble}}}
+% in the index. It takes three arguments. The first argument is the
+% item's case-normalized name; this is typically discarded, and is
+% simply used to ensure the proper (i.e., case-insensitive) sort order
+% in the index. The second argument is the item's name; and the
+% third item is the item's "kind". "kind" can be Package, Script, Module,
+% Class, Class Method, Static Method, Method, Function, or Variable.
+% This command is used inside of the \index{...} command.
+%
+% For modules and classes, the \index formatting strings "|(" and
+% "|)" are appended to mark the beginning and end of the object's
+% documentation. For methods, variables, and nested classes, the
+% index formatting string "!" is used to create nested index entries.
+% See the docs for the latex \index command for more information.
+\index{\EpydocIndex{mymodule}{mymodule}{module}|(}
+\index{\EpydocIndex{foo}{Foo}{class}|(}
+\index{\EpydocIndex{foo}{Foo}{class}!\EpydocIndex{foo.f}{Foo.f}{method}}
+\index{\EpydocIndex{foo}{Foo}{class}!\EpydocIndex{foo.f}{Foo.g}{method}}
+\index{\EpydocIndex{foo}{Foo}{class}|)}
+\index{\EpydocIndex{mymodule}{mymodule}{module}|)}
\subsection{Source Code Syntax Highlighting}
@@ -181,7 +194,7 @@
\subsection{Classes}
\begin{EpydocClassList}
\item[\EpydocHyperlink{my_module:Zip}
- {\EpydocDottedName{my_module.Zipasdkfjsdflsd}}]
+ {\EpydocDottedName{my_module.Zip}}]
Description of my\_module.Zip.
\item[\EpydocHyperlink{my_module:Zap}
{\EpydocDottedName{my_module.Zap}}]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.