Debian Codegraph @

texmf-dist/tex/latex/amscls/amsmidx.sty

raw
1 %%
2 %% This is file `amsmidx.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% amsmidx.dtx
8 %% This is a generated file.
9 %%
10 %% Copyright 1995, 2004, 2009, 2010 American Mathematical Society.
11 %%
12 %% American Mathematical Society
13 %% Technical Support
14 %% Publications Technical Group
15 %% 201 Charles Street
16 %% Providence, RI 02904
17 %% USA
18 %% tel: (401) 455-4080
19 %% (800) 321-4267 (USA and Canada only)
20 %% fax: (401) 331-3842
21 %% email: [email protected]
22 %%
23 %% This work may be distributed and/or modified under the
24 %% conditions of the LaTeX Project Public License, either version 1.3c
25 %% of this license or (at your option) any later version.
26 %% The latest version of this license is in
27 %% http://www.latex-project.org/lppl.txt
28 %% and version 1.3c or later is part of all distributions of LaTeX
29 %% version 2005/12/01 or later.
30 %%
31 %% This work has the LPPL maintenance status `maintained'.
32 %%
33 %% The Current Maintainer of this work is the American Mathematical
34 %% Society.
35 %%
36 %% ========================================================================
37 %%
38 \NeedsTeXFormat{LaTeX2e}[1995/06/01]
39 \ProvidesPackage{amsmidx}[2007/09/25 v2.02 multiple indexes for AMS classes]
40 \renewcommand{\makeindex}[1]{%
41 \begingroup
42 \makeatletter
43 \if@filesw \expandafter\newwrite\csname #1@idxfile\endcsname
44 \expandafter\immediate\openout \csname #1@idxfile\endcsname #1.idx\relax
45 \typeout{Writing index file #1.idx }\fi
46 \endgroup}
47 \renewcommand{\index}[1]{%
48 \@bsphack
49 \begingroup
50 \def\protect##1{\string##1\space}\@sanitize\@wrindex{#1}}
51 \renewcommand{\@wrindex}[2]{%
52 \let\thepage\relax
53 \xdef\@gtempa{%
54 \@ifundefined{#1@idxfile}{%
55 \PackageError{\@packagename}{%
56 The requested file, #[email protected], does not exist;\MessageBreak
57 index term #2 will not be be written out.%
58 }%
59 }{%
60 \expandafter\write\csname #1@idxfile\endcsname
61 {\string\indexentry{#2}{\thepage}}%
62 }%
63 }%
64 \endgroup\@gtempa
65 \if@nobreak \ifvmode\nobreak\fi\fi
66 \@esphack
67 }
68 \renewcommand{\printindex}[1]{\@input{#1.ind}}
69 \newcommand{\Printindex}[2]{%
70 \begingroup
71 \cleardoublepage
72 \def\indexname{#2}%
73 \raggedright
74 \hyphenpenalty=10000
75 \renewcommand{\seename}{see~also}
76 \renewcommand{\subitem}{\par\hangindent 3em\hspace*{1em}}
77 \@input{#1.ind}%
78 \endgroup
79 }
80 \newdimen\@indexcommentwidth
81 \@indexcommentwidth=\textwidth
82 \ifdim\@indexcommentwidth > 26pc
83 \advance\@indexcommentwidth-6pc
84 \else
85 \advance\@indexcommentwidth-4pc
86 \fi
87 \newcommand{\indexcomment}[1]{%
88 \def\theindexcomment{%
89 \vskip\baselineskip
90 \parbox[t]{\@indexcommentwidth}{\normalsize\mdseries#1}%
91 }%
92 }
93 \let\theindexcomment\@empty
94 \renewcommand{\indexchap}[1]{%
95 \global\topskip 7.5pc\relax
96 \twocolumn[\fontsize{\@xivpt}{18}%
97 \vskip\topskip\vskip-\baselineskip\hbox{}% adjust top space
98 \bfseries\centering #1\par
99 \ifx\theindexcomment\@empty
100 \else \theindexcomment
101 \global\let\theindexcomment\@empty
102 \fi
103 ]%
104 \global\topskip 34\p@
105 }
106 \endinput
107 %%
108 %% End of file `amsmidx.sty'.