%%
%% This is file `hxt-bc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% backcite.dtx  (with options: `backcite')
%% 
%% File: backcite.dtx Copyright (C) 1995--1999 Michael Mehlich
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt; either
%% version 1 of the License, or any later version.
\def\fileversion{V2.0}
\def\filedate{1997/03/01}
\def\docdate{1997/03/01}
%%
%% \CharacterTable
%% {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%  Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%  Digits        \0\1\2\3\4\5\6\7\8\9
%%  Exclamation   \!     Double quote  \"     Hash (number) \#
%%  Dollar        \$     Percent       \%     Ampersand     \&
%%  Acute accent  \'     Left paren    \(     Right paren   \)
%%  Asterisk      \*     Plus          \+     Comma         \,
%%  Minus         \-     Point         \.     Solidus       \/
%%  Colon         \:     Semicolon     \;     Less than     \<
%%  Equals        \=     Greater than  \>     Question mark \?
%%  Commercial at \@     Left bracket  \[     Backslash     \\
%%  Right bracket \]     Circumflex    \^     Underscore    \_
%%  Grave accent  \`     Left brace    \{     Vertical bar  \|
%%  Right brace   \}     Tilde         \~}
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{hxt-bc}%
  [\filedate\space Backcite extension for HyperLaTeX2e]
\@ifpackageloaded{hyper}{}{%
\PackageWarningNoLine{backcite}{%
  Backcite extension of hyper package needs hyper package.\MessageBreak
  Loading hyper package.%
}%
\usepackage[no]{hyper}%
}
\def\hyper@aux#1#2#3{%
    \expandafter\ifx\csname hyper@aux@#1@#2\endcsname\relax%
      \expandafter\global%
      \expandafter\edef\csname hyper@aux@#1@#2\endcsname%
        {(#3)}%
    \else%
      \expandafter\global%
      \expandafter\edef\csname hyper@aux@#1@#2\endcsname%
        {\csname hyper@aux@#1@#2\endcsname(#3)}%
    \fi%
    \expandafter\ifx\csname hyper@aux@#1\endcsname\relax%
      \expandafter\global\expandafter%
      \newtoks\csname hyper@aux@#1\endcsname%
    \fi%
    \def\hyper@tempa{\csname hyper@aux@#1\endcsname}%
    \expandafter\expandafter\expandafter\expandafter%
    \expandafter\expandafter\expandafter\global%
    \expandafter\expandafter\expandafter\expandafter%
    \expandafter\expandafter\expandafter\hyper@tempa%
    \expandafter\expandafter\expandafter\expandafter%
    \expandafter\expandafter\expandafter{%
      \expandafter\expandafter\expandafter\the\expandafter\hyper@tempa%
      \csname hyper@aux@#1@#2\endcsname%
    }%
}
\def\hyperbackcite#1#2#3#4{\hyper@aux{br}{#1}{#2,#3,#4}}
\def\hyper@back@to@aux#1{%
   \@bsphack%
     \protected@write%
       \@auxout%
       {}%
       {\string\hyperbackcite%
         {#1}%
         {\@currenthyper}%
         {\@currentlabel}%
         {\thepage}%
       }%
   \@esphack%
}
\def\hyper@back@to@aux@list#1{%
  \@for\@citeb:=#1\do%
    {\edef\@citeb{\expandafter\@firstofone\@citeb}%
     \@bsphack%
       \protected@write%
         \@auxout%
         {}%
         {\string\hyperbackcite%
           {\@citeb}%
           {\@currenthyper}%
           {\@currentlabel}%
           {\thepage}%
         }%
     \@esphack%
    }%
}
\let\hyper@citex\@citex%
\def\@citex[#1]#2{%
   \hyper@back@to@aux@list{#2}%
   \hyper@citex[#1]{#2}%
}%
\ifx\harvarditem\@undefined\else%
  \let\hyper@har@citetoaux\HAR@citetoaux%
  \def\HAR@citetoaux#1{%
       \hyper@back@to@aux{#1}%
       \hyper@har@citetoaux{#1}%
  }%
\fi
\ifx\NAT@set@cites\@undefined\else%
  \let\hyper@hyper@natlinkstart\hyper@natlinkstart%
  \def\hyper@natlinkstart#1#2\hyper@natlinkend{%
     \hyper@back@to@aux{#1}%
     \hyper@hyper@natlinkstart{#1}{#2}\hyper@natlinkend%
  }%
  \ifnum\NAT@sort=1\relax
    \let\hyper@back@hold\relax
    \def\hyper@compress@cite#1#2{%
      \advance\@tempcnta\@ne%
      \ifnum #1=\@tempcnta%
         \ifx\@h@ld\relax%
            \edef\@h@ld{%
               \@citea%
               \noexpand%
                  \hyper@natlinkstart{#2}{#1}%
               \noexpand%
                  \hyper@natlinkend%
            }%
            \def\hyper@back@hold{\hyper@back@to@aux{#2}}%
         \else%
            \hyper@back@hold%
            \def\@h@ld{%
               \hbox{--}%
               \hyper@natlinkstart{#2}{#1}\hyper@natlinkend%
            }%
            \def\hyper@back@hold{\hyper@back@to@aux{#2}}%
         \fi%
      \else%
         \@h@ld\@citea%
         \hyper@natlinkstart{#2}{#1}\hyper@natlinkend%
         \let\@h@ld\relax%
      \fi%
      \@tempcnta#1\def\@citea{\NAT@sep\penalty\@m\NAT@space}%
    }
  \fi
  \NAT@set@cites
\fi%
\let\hyper@lbibitem\@lbibitem
\def\@lbibitem[#1]#2#3\par{%
  \hyper@lbibitem[#1]{#2}#3%
  \expandafter\hyper@backcite\csname hyper@aux@br@#2\endcsname%
  \par%
}
\let\hyper@bibitem\@bibitem
\def\hyper@bibitem#1#2\par{%
  \hyper@bibitem{#1}#2%
  \expandafter\hyper@backcite\csname hyper@aux@br@#1\endcsname%
  \par%
}
\ifx\harvarditem\@undefined\else
  \let\hyper@harvarditem\harvarditem
  \def\harvarditem{%
     \@ifnextchar[{\hyper@harvard@oitem}{\hyper@harvard@item}%
  }
  \def\hyper@harvard@item#1#2#3#4\par{%
     \hyper@harvarditem{#1}{#2}{#3}#4%
     \expandafter\hyper@backcite\csname hyper@aux@br@#3\endcsname%
  \par%
  }
  \def\hyper@harvard@oitem[#1]#2#3#4#5\par{%
     \hyper@harvarditem[#1]{#2}{#3}{#4}#5%
     \expandafter\hyper@backcite\csname hyper@aux@br@#4\endcsname%
  \par%
  }
\fi
\def\hyperbackcitepage{Cited on page~}
\def\hyperbackcitepages{Cited on pages~}
\def\hyperbackcitesection{Cited in~}
\def\hyperbackcitesections{Cited in~}
\def\hyperbackcitenormalseparator{, }
\def\hyperbackcitefinalseparatorpair{ and~}
\def\hyperbackcitefinalseparatorlist{, and~}
\def\hyper@backcite#1{%
  \bgroup%
    \let\hyper@last@cite\relax%
    \count11=0\relax%
    \expandafter\hyper@back@cnt#1\relax%
    \let\hyper@last@cite\relax%
    \expandafter\ifnum\count11>0\relax%
      \if@hyper@back@pages@%
        \expandafter\ifnum\count11>1\relax%
          \hyperbackcitepages%
        \else%
          \hyperbackcitepage%
        \fi%
      \else%
        \expandafter\ifnum\count11>1\relax%
          \hyperbackcitesection%
        \else%
          \hyperbackcitesections%
        \fi%
      \fi%
      \ifnum\count11>2\relax%
         \let\hyper@back@final@connection%
                \hyperbackcitefinalseparatorlist%
      \else%
         \let\hyper@back@final@connection%
                \hyperbackcitefinalseparatorpair%
      \fi%
      \expandafter\hyper@@backcite#1\relax.%
    \fi%
  \egroup%
}
\def\hyper@back@cnt{\@ifnextchar({\hyper@@back@cnt}{\@gobble}}
\def\hyper@@back@cnt(#1,#2,#3){%
  \if@hyper@back@pages@%
    \edef\hyper@tempa{#3}%
    \ifx\hyper@last@cite\hyper@tempa\relax\else%
      \advance\count11by1\relax%
      \edef\hyper@last@cite{#3}%
    \fi%
  \else%
    \edef\hyper@tempa{#2}%
    \ifx\hyper@tempa\@empty%
    \else\ifx\hyper@last@cite\hyper@tempa\relax\else%
      \advance\count11by1\relax%
      \edef\hyper@last@cite{#2}%
    \fi\fi%
  \fi%
  \hyper@back@cnt%
}
\def\hyper@@backcite{\@ifnextchar({\hyper@@@backcite}{}}
\def\hyper@@@backcite(#1,#2,#3){%
  \if@hyper@back@pages@%
    \edef\hyper@tempa{#3}%
    \ifx\hyper@tempa\@empty\relax%
    \else\ifx\hyper@last@cite\hyper@tempa\relax\else%
       \advance\count11by-1\relax%
       \ifx\hyper@last@cite\relax\else%
          \ifnum\count11=0\relax%
             \hyper@back@final@connection%
          \else%
             \hyperbackcitenormalseparator%
          \fi%
      \fi%
      \hyperpagereference{#3}{#3}%
      \edef\hyper@last@cite{#3}%
    \fi\fi%
  \else%
    \edef\hyper@tempa{#2}%
    \ifx\hyper@tempa\@empty\relax%
    \else\ifx\hyper@last@cite\hyper@tempa\relax\else%
       \advance\count11by-1\relax%
       \ifx\hyper@last@cite\relax\else%
          \ifnum\count11=0\relax%
             \hyper@back@final@connection%
          \else%
             \hyperbackcitenormalseparator%
          \fi%
       \fi%
       \hyperreference{#1}{#2}%
       \edef\hyper@last@cite{#2}%
    \fi\fi%
  \fi%
  \hyper@@backcite%
}
\def\hyperbackcite@check#1#2#3#4{\hyper@aux{brc}{#1}{#2,#3,#4}}
\let\hyper@back@cite@enddocument\enddocument
\def\enddocument{%
  \let\hyperbackcite\hyperbackcite@check%
  \let\hyper@@backcite@end\@@end%
  \def\@@end{\hyper@check@backcites\hyper@@backcite@end}%
  \hyper@back@cite@enddocument%
}
\def\hyper@check@backcites{%
  \expandafter\ifx\csname hyper@aux@br\endcsname\relax%
    \expandafter\ifx\csname hyper@aux@brc\endcsname\relax%
    \else%
      \PackageWarningNoLine{backcite}{%
        Backcite(s) may have changed.\MessageBreak
        Rerun to get back references right%
      }%
    \fi%
  \else\expandafter\ifx\csname hyper@aux@brc\endcsname\relax%
    \PackageWarningNoLine{backcite}{%
        Backcite(s) may have changed.\MessageBreak
        Rerun to get back references right%
      }%
  \else%
    \edef\hyper@tempa{\the\hyper@aux@br}
    \edef\hyper@tempb{\the\hyper@aux@brc}
    \edef\hyper@tempa{\hyper@tempa}
    \edef\hyper@tempb{\hyper@tempb}
    \ifx\hyper@tempa\hyper@tempb\else%
      \PackageWarningNoLine{backcite}{%
        Backcite(s) may have changed.\MessageBreak
        Rerun to get back references right%
      }%
    \fi%
  \fi\fi%
}
\newif\if@hyper@back@pages@
\@hyper@back@pages@true
\DeclareOption{pages}{\@hyper@back@pages@true}
\DeclareOption{sections}{\@hyper@back@pages@false}
\ProcessOptions
\endinput
%%
%% End of file `hxt-bc.sty'.