[Python-checkins] CVS: python/dist/src/Doc/texinputs python.sty,1.53.2.2,1.53.2.3

Fred L. Drake python-dev@python.org
Tue, 21 Mar 2000 11:03:20 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Doc/texinputs
In directory weyr:/home/fdrake/projects/python/Doc-152p2/texinputs

Modified Files:
      Tag: release152p1-patches
	python.sty 
Log Message:

Revised handling of the "index sub-item".  The fixes the problem of
unnecessary whitespace between an index term marked with \ttindex and
the comma that separates it from the page number, which was only
appearant when the sub-item wasn't used (really only appearant in the
API manual; C API names typically have this characteristic).


Index: python.sty
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/texinputs/python.sty,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -C2 -r1.53.2.2 -r1.53.2.3
*** python.sty	2000/03/15 15:01:26	1.53.2.2
--- python.sty	2000/03/21 16:03:17	1.53.2.3
***************
*** 278,288 ****
  
  % Additional string for an index entry
! \newcommand{\index@subitem}{}
! \newcommand{\setindexsubitem}[1]{\renewcommand{\index@subitem}{#1}}
! \newcommand{\ttindex}[1]{\index{#1@{\py@idxcode{#1}} \index@subitem}}
! 
  \newcommand{\withsubitem}[2]{%
    \begingroup%
!   \def\index@subitem{#1}#2%
    \endgroup%
  }
--- 278,300 ----
  
  % Additional string for an index entry
! \newif\ifpy@usingsubitem\py@usingsubitemfalse
! \newcommand{\py@indexsubitem}{}
! \newcommand{\setindexsubitem}[1]{\renewcommand{\py@indexsubitem}{ #1}%
!                                  \py@usingsubitemtrue}
! \newcommand{\ttindex}[1]{%
!   \ifpy@usingsubitem
!     \index{#1@{\py@idxcode{#1}}\py@indexsubitem}%
!   \else%
!     \index{#1@{\py@idxcode{#1}}}%
!   \fi%
! }
  \newcommand{\withsubitem}[2]{%
    \begingroup%
!     \ifpy@usingsubitem%
!       \def\index@subitem{#1}#2%
!     \else%
!       \def\index@subitem{#1}#2%
!       \py@usingsubitemfalse%
!     \fi
    \endgroup%
  }
***************
*** 422,425 ****
--- 434,438 ----
  
  \newcommand{\py@reset}{
+   \py@usingsubitemfalse
    \py@ProcessModSynopsis
    \renewcommand{\py@thisclass}{}