\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{smfhref}[2002/11/07 v0.0 Hyperref + smfbook...] \RequirePackage{ifpdf} \let\org@bibitem\@bibitem \let\org@lbibitem\@lbibitem \RequirePackageWithOptions{hyperref} \AtBeginDocument{% \def\@schapter[#1]#2{% \def\@currentlabelname{#1}% \begingroup \let\@mkboth\@gobbletwo \Hy@GlobalStepCount\Hy@linkcounter \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}% \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% \endgroup \H@old@schapter[{#1}]{#2} }} \def\@@wrindex#1|#2|#3\\{% \ifx\\#2\\% \protected@write\@indexfile{}{% \string\indexentry{#1}{\thepage}% }% \else \def\Hy@temp@A{#2}% \ifx\Hy@temp@A\HyInd@ParenLeft \protected@write\@indexfile{}{% \string\indexentry{#1|#2}{\thepage}% }% \else \protected@write\@indexfile{}{% \string\indexentry{#1|#2}{\thepage}% }% \fi \fi \endgroup \@esphack }% \@ifpackageloaded{backref}{% \def\BR@@lbibitem[#1]#2#3\par{% \org@lbibitem[#1]{#2}#3 \newblock \backref{\csname br@#2\endcsname}% \par }% \def\BR@@bibitem#1#2\par{% \org@bibitem{#1}#2 \newblock \backref{\csname br@#1\endcsname}% \par } \AtBeginDocument{% \def\thebibliography{% % \@starttoc{brf}{}% \BRorg@thebibliography }% } } \ifpdf \hypersetup{pdftex} \else \hypersetup{dvips} \fi