diff options
Diffstat (limited to 'configuration/smfhyperref.sty')
-rw-r--r-- | configuration/smfhyperref.sty | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/configuration/smfhyperref.sty b/configuration/smfhyperref.sty new file mode 100644 index 0000000..f16899c --- /dev/null +++ b/configuration/smfhyperref.sty @@ -0,0 +1,71 @@ +\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 |