This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python.sty: \py@sigline correction
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, georg.brandl, smigaj
Priority: normal Keywords: patch

Created on 2005-09-17 12:54 by smigaj, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python.sty.sigline.diff smigaj, 2005-09-17 12:54 python.sty patch
Messages (2)
msg48740 - (view) Author: Wojciech Smigaj (smigaj) Date: 2005-09-17 12:54
This patch corrects the following bug: the last line of
multiline headings created with environments like
classdesc, methoddesc... clash into the following text.

The source of this problem is typesetting the
"parameter" part of the heading inside a \parbox[t]
(parbox with its first ("top") line aligned with the
surrounding text). As a consequence, when the parameter
list takes multiple lines, all lines beneath the first
add up to the *depth* (not the *height*) of the parbox.
This causes TeX to treat the box as a very long
"descender", and place only \lineskip=1pt between the
bottom of the box and the following line.

The proposed solution is to shape the paragraph in a
"natural" way, using the \hangafter and \hangindent
macros instead of the \parbox command. Additionally,
inclusion of the \raggedright macro makes the argument
list left-justified, thus preventing excessive
stretching of interword spaces and hyphenation of
parameter names, which doesn't look good in most cases.

A test case follows (text taken from the PyX package
manual). Compare the space between both headings when
processed with the original and modified versions of
python.sty.

\documentclass{manual}
\begin{document}

some text\dots

\begin{classdesc}{histogram}{lineattrs=[], steps=0,
fromvalue=0, % {{{
                             frompathattrs=[], fillable=0,
                             autohistogramaxisindex=0,
                             autohistogrampointpos=0.5,
epsilon=1e-10}
  This class is a style to plot histograms.
\var{lineattrs} is merged
  with \code{defaultlineattrs} which is
\code{[deco.stroked]}. When
  \var{steps} is set, the histrogram is plotted as
steps instead of
  the default being a boxed histogram. \var{fromvalue}
is the baseline
  value of the histogram. When set to \code{None}, the
histogram will
  start at the baseline. When fromvalue is set,
\var{frompathattrs}
  are the stroke attributes used to show the histogram
baseline path.
  etc\dots
\end{classdesc}

\begin{classdesc}{barpos}{fromvalue=None,
frompathattrs=[], epsilon=1e-10} % {{{
  This class is a hidden style providing position
information in a bar
  graph. Those graphs need to contain a specialized
axis, namely a bar
  axis. The data column for this bar axis is named
\code{Xname} where
  \code{X} is an axis name. In the other graph
dimension the data
  column name must be equal to an axis name. To plot
several bars in a
  single graph side by side, you need to have a nested
bar axis and
  provide a tuple as data for nested bar axis.
\end{classdesc}

\end{document}
msg55205 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 20:35
Obsolete now that we're using reST sources.
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42378
2007-08-23 20:35:46georg.brandlsetstatus: open -> closed
resolution: out of date
messages: + msg55205
nosy: + georg.brandl
2005-09-17 12:54:38smigajcreate