%%
%% This is file `geschichtsfrkldoc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% geschichtsfrkl.dtx  (with options: `dtxstyle')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from geschichtsfrkldoc.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file geschichtsfrkl.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesPackage{geschichtsfrkldoc.sty}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%% This code is curtesy of David Carlisle
%% http://tex.stackexchange.com/questions/49850/indexing-macros-without-a-leading-backslash-in-a-dtx-file
%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\bibmacro{\def\macro@type{bibmacro}\environment}
\let\endbibmacro\endenvironment

\def\bibbool{\def\macro@type{bibbool}\environment}
\let\endbibbool\endenvironment

\def\BibliographyOption{\def\macro@type{bibliography option}\environment}
\let\endBibliographyOption\endenvironment

\def\BibliographyDriver{\def\macro@type{bibliography driver}\environment}
\let\endBibliographyDriver\endenvironment

\def\EntryOption{\def\macro@type{entry option}\environment}
\let\endEntryOption\endenvironment

\def\FieldFormat{\def\macro@type{field format}\environment}
\let\endFieldFormat\endenvironment

\def\NameFormat{\def\macro@type{name format}\environment}
\let\endNameFormat\endenvironment

\def\macro@type{environment}%% default

\def\macro@finish{%
  \macro@namepart
\ifx\macro@namepart\xbegin
  \def\macro@type{environment}%
\else\ifx\macro@namepart\xifbool
   \def\macro@type{bibbool}%
   \let\macro@namepart\xbegin
\else\ifx\macro@namepart\xusebibmacro
 \def\macro@type{bibmacro}%
 \let\macro@namepart\xbegin
\fi\fi\fi
\ifx\macro@namepart\xbegin
  \expandafter\macro@grabname
  \else
\ifx\macro@namepart\xend
 \else
  \ifnot@excluded
     \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}%
     \@tempa  \fi
  \fi\fi}

\def\xbegin{begin}
\def\xifbool{ifbool}
\def\xusebibmacro{usebibmacro}
\def\xend{end}
\begingroup
\lccode`\(`\{
\lccode`\)`\}
\lowercase{\endgroup
\def\macro@grabname\fi(#1){%
(#1)%
\SpecialxEnvUseIndex\macro@type{#1}%
}
}

\def\SpecialxEnvUseIndex#1{%
  \expandafter\SpecialxxEnvUseIndex\expandafter{#1}}

\def\SpecialxxEnvUseIndex#1#2{\@bsphack
    \special@index{#2\actualchar{\string\ttfamily\space#2}
           (#1)}%
    \special@index{#1s:\levelchar#2\actualchar{\string\ttfamily\space#2}}\@esphack}

\def\SpecialMainEnvIndex{%
   \expandafter\SpecialMainxEnvIndex\expandafter{\macro@type}}

\def\SpecialMainxEnvIndex#1#2{\@bsphack\special@index{%
                                      #2\actualchar
                                      {\string\ttfamily\space#2}
                                         (#1)%
                                      \encapchar main}%
    \special@index{#1s:\levelchar#2\actualchar{%
                   \string\ttfamily\space#2}\encapchar
           main}\@esphack}

\def\DescribeBibBool{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{bibbool}\begingroup\Describe@Env}

\def\DescribeBibMacro{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{bibmacro}\begingroup\Describe@Env}

\def\DescribeBibEnv{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{environment}\begingroup\Describe@Env}

\def\DescribeBibOption{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{bibliography option}\begingroup\Describe@Env}

\def\DescribeBibDriver{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{bibliography driver}\begingroup\Describe@Env}

\def\DescribeBibField{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{field}\begingroup\Describe@Env}

\def\DescribeEntryOption{%
\leavevmode\@bsphack\begingroup\MakePrivateLetters
\def\macro@type{entry option}\begingroup\Describe@Env}

\def\Describe@Env#1{\endgroup
              \marginpar{\raggedleft\PrintDescribeEnv{#1}}%
              \SpecialEnvIndex{#1}\endgroup\@esphack\ignorespaces}

\def\SpecialEnvIndex{%
   \expandafter\SpecialxEnvIndex\expandafter{\macro@type}}

\def\SpecialxEnvIndex#1#2{\@bsphack
    \index{#2\actualchar{\string\ttfamily\space#2}
           (#1)\encapchar usage}%
    \index{#1s:\levelchar#2\actualchar{\string\ttfamily\space#2}\encapchar
           usage}\@esphack}
\endinput
%%
%% End of file `geschichtsfrkldoc.sty'.
