%%
%% This is file `amsmidx.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% amsmidx.dtx 
%% This is a generated file.
%% 
%% Copyright 1995, 2004, 2009, 2010 American Mathematical Society.
%% 
%% American Mathematical Society
%% Technical Support
%% Publications Technical Group
%% 201 Charles Street
%% Providence, RI 02904
%% USA
%% tel: (401) 455-4080
%%      (800) 321-4267 (USA and Canada only)
%% fax: (401) 331-3842
%% email: tech-support@ams.org
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% 
%% The Current Maintainer of this work is the American Mathematical
%% Society.
%% 
%% ========================================================================
%% 
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{amsmidx}[2007/09/25 v2.02 multiple indexes for AMS classes]
\renewcommand{\makeindex}[1]{%
  \begingroup
    \makeatletter
    \if@filesw \expandafter\newwrite\csname #1@idxfile\endcsname
    \expandafter\immediate\openout \csname #1@idxfile\endcsname #1.idx\relax
    \typeout{Writing index file #1.idx }\fi
  \endgroup}
\renewcommand{\index}[1]{%
  \@bsphack
  \begingroup
    \def\protect##1{\string##1\space}\@sanitize\@wrindex{#1}}
\renewcommand{\@wrindex}[2]{%
  \let\thepage\relax
  \xdef\@gtempa{%
    \@ifundefined{#1@idxfile}{%
      \PackageError{\@packagename}{%
        The requested file, #1@idxfile.idx, does not exist;\MessageBreak
        index term #2 will not be be written out.%
      }%
    }{%
      \expandafter\write\csname #1@idxfile\endcsname
        {\string\indexentry{#2}{\thepage}}%
      }%
    }%
  \endgroup\@gtempa
  \if@nobreak \ifvmode\nobreak\fi\fi
  \@esphack
  }
\renewcommand{\printindex}[1]{\@input{#1.ind}}
\newcommand{\Printindex}[2]{%
  \begingroup
    \cleardoublepage
    \def\indexname{#2}%
    \raggedright
    \hyphenpenalty=10000
    \renewcommand{\seename}{see~also}
    \renewcommand{\subitem}{\par\hangindent 3em\hspace*{1em}}
    \@input{#1.ind}%
  \endgroup
  }
\newdimen\@indexcommentwidth
\@indexcommentwidth=\textwidth
\ifdim\@indexcommentwidth > 26pc
  \advance\@indexcommentwidth-6pc
\else
  \advance\@indexcommentwidth-4pc
\fi
\newcommand{\indexcomment}[1]{%
  \def\theindexcomment{%
    \vskip\baselineskip
    \parbox[t]{\@indexcommentwidth}{\normalsize\mdseries#1}%
    }%
  }
\let\theindexcomment\@empty
\renewcommand{\indexchap}[1]{%
  \global\topskip 7.5pc\relax
  \twocolumn[\fontsize{\@xivpt}{18}%
    \vskip\topskip\vskip-\baselineskip\hbox{}% adjust top space
    \bfseries\centering #1\par
    \ifx\theindexcomment\@empty
    \else \theindexcomment
      \global\let\theindexcomment\@empty
    \fi
    ]%
  \global\topskip 34\p@
}
\endinput
%%
%% End of file `amsmidx.sty'.
