%%
%% This is file `corridx.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% corridx.dtx  (with options: `package')
%% 
%% This is a generated file.
%% Copyright (C) Johannes Fink
%% 
%% This file may  be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version
%% 1.2 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.2 or later is
%% part of all distributions of LaTeX version 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{corridx}
 [2005/05/05 v1.0 Chemical Index]
\newcommand{\ic}[1]{\begin{crrdxchem}#1\end{crrdxchem}\noic{#1}}%
\newcommand{\noic}[1]{%
\bgroup%
\def\crrdx@key@prefix{chem }%
\def\crrdx@key@ostfix{}%
\def\crrdx@sep@@{@}%
\def\crrdx@entry@prefix{\string\begin{crrdxchem}}%
\def\crrdx@entry@postfix{\string\end{crrdxchem}}%
\def\crrdx@fmt@page{\crrdx@fmtpage@chem}%
\def\crrdx@sfc@prerun{\crrdx@sfc@prerun@default}%
\def\crrdx@key@prerun{\crrdx@key@prerun@default}%
\crrdx@fmt@index@entry{#1}{#1}%
\egroup%
}%
\newcommand{\ia}[2]{#1 \mbox{(#2)}\noia{#1}{#2}}%
\newcommand{\noia}[2]{%
\bgroup%
\def\crrdx@key@prefix{acr }%
\def\crrdx@key@ostfix{}%
\def\crrdx@sep@@{@}%
\def\crrdx@entry@prefix{#2\string\nopagebreak!\string\begin{crrdxacr}}%
\def\crrdx@entry@postfix{\string\end{crrdxacr}}%
\def\crrdx@fmt@page{\crrdx@fmtpage@acr}%
\def\crrdx@sfc@prerun{\crrdx@sfc@prerun@default}%
\def\crrdx@key@prerun{\crrdx@key@prerun@default}%
\crrdx@fmt@index@entry{#2}{#1}%
\egroup%
}%
\newcommand{\noib}[2]{\noic{#1}\noia{#1}{#2}}%
\newcommand{\ib}[2]{\ic{#1}\noia{#1}{#2}}%
\newcommand{\ig}[2][]{%
#2%
\noig[#1]{#2}%
}%
\newcommand{\noig}[2][]{%
\bgroup%
\def\crrdx@key@prefix{gen }%
\def\crrdx@key@ostfix{}%
\def\crrdx@sep@@{@}%
\def\crrdx@entry@prefix{}%
\def\crrdx@entry@postfix{#1}%
\def\crrdx@fmt@page{\crrdx@fmtpage@gen}%
\def\crrdx@sfc@prerun{\crrdx@sfc@prerun@default}%
\def\crrdx@key@prerun{\crrdx@key@prerun@default}%
\crrdx@fmt@index@entry{#2}{#2}%
\egroup%
}%
\newcommand{\crrdxformatpage}[2]{\@namedef{crrdx@fmtpage@#1}{#2}}%
\crrdxformatpage{chem}{\@empty}%
\crrdxformatpage{acr}{\@empty}%
\crrdxformatpage{gen}{\@empty}%
\newenvironment{crrdxchem}{}{}%
\newenvironment{crrdxacr}{}{}%
\newcommand{\crrdx@key}[1]{%
\crrdx@key@prerun%
\edef\crrdx@key@temp{#1}%
\edef\crrdx@key@var{\@empty}%
\let\end\@empty%
\expandafter\crrdx@key@loop\crrdx@key@temp\end%
}%
\newcommand{\crrdx@key@loop}[1]{%
\let\next=\crrdx@key@loop%
\ifx#1\end\let\next=\relax\fi%
\ifcat\noexpand#1a\lowercase{\edef\crrdx@key@var{\crrdx@key@var#1}}\fi%
\next}%
\newcommand{\crrdx@key@prerun@default}%
{%
\renewcommand{\textrm}[1]{{\noexpand\textrm{##1}}}%
\renewcommand{\textbf}[1]{{\noexpand\textbf{##1}}}%
\renewcommand{\textsf}[1]{{\noexpand\textsf{##1}}}%
\renewcommand{\texttt}[1]{{\noexpand\texttt{##1}}}%
\renewcommand{\textmd}[1]{{\noexpand\textmd{##1}}}%
\renewcommand{\textit}[1]{{\noexpand\textit{##1}}}%
\renewcommand{\textsc}[1]{{\noexpand\textsc{##1}}}%
\renewcommand{\textsl}[1]{{\noexpand\textsl{##1}}}%
\renewcommand{\textup}[1]{{\noexpand\textup{##1}}}%
\def~{\string~}%
}%
\newcommand{\crrdx@sfc@prerun@default}%
{%
\renewcommand{\textrm}{\string\textrm}%
\renewcommand{\textbf}{\string\textbf}%
\renewcommand{\textsf}{\string\textsf}%
\renewcommand{\texttt}{\string\texttt}%
\renewcommand{\textmd}{\string\textmd}%
\renewcommand{\textit}{\string\textit}%
\renewcommand{\textsc}{\string\textsc}%
\renewcommand{\textsl}{\string\textsl}%
\renewcommand{\textup}{\string\textup}%
\def~{\string~}%
}%
\newcommand{\crrdx@fmt@index@entry}[2]{%
\crrdx@key{#1}%
\crrdx@sfc{#2}%
\edef\crrdx@fmt@index@entry@var{%
\crrdx@key@prefix%
\crrdx@key@var%
\crrdx@key@ostfix%
\crrdx@sep@@%
\crrdx@entry@prefix%
\crrdx@sfc@var%
\crrdx@entry@postfix%
\crrdx@fmt@page}%
\index{\crrdx@fmt@index@entry@var}%
}%
\newcommand{\crrdx@sfc@loop}[1]{%
\crrdx@sfc@prerun%
\let\next=\crrdx@sfc@loop%
\ifx#1\end\let\next=\relax\fi%
\ifcat\noexpand#1a%
\uppercase{\edef\crrdx@sfc@var{\crrdx@sfc@var#1}}%
\let\next=\crrdx@sfc@loop@leftover%
\else%
\edef\crrdx@sfc@var{\crrdx@sfc@var#1}%
\fi%
\next}%
\newcommand{\crrdx@sfc@loop@leftover}[1]{%
\let\next=\crrdx@sfc@loop@leftover%
\ifx#1\end\let\next=\relax\fi%
\edef\crrdx@sfc@var{\crrdx@sfc@var#1}%
\next%
}%
\newcommand{\crrdx@sfc}[1]{%
\edef\crrdx@sfc@var{\@empty}%
\let\end\@empty%
\crrdx@split{#1}%
\expandafter\crrdx@sfc@loop\crrdx@beforespace\end%
\ifx\crrdx@afterspace\@empty\else%
\edef\crrdx@sfc@var{\crrdx@sfc@var\space\crrdx@afterspace}%
\fi%
}%
\def\crrdx@ss#1 #2\stop{\edef\crrdx@beforespace{#1}\edef\crrdx@afterspace{#2}}%
\newcommand{\crrdx@split}[1]{%
\edef\test{\@empty}%
\crrdx@ss#1 \test\stop%
\ifx\crrdx@afterspace\test%
\edef\crrdx@beforespace{#1}\edef\crrdx@afterspace{\@empty}%
\else%
\crrdx@ss#1\stop%
\fi%
}%
\providecommand\swallow[1]{\relax}%
\providecommand{\sectioncrrdx}[1]%
{\section*{#1}\addcontentsline{toc}{section}{#1}}%
\AtBeginDocument{ \@ifpackageloaded{index}%
{\PackageError{corridx}%
{This package is not compatible with package index}{}}}%
\endinput
%%
%% End of file `corridx.sty'.