From 9b397c6baf243cfab623ede077eff43b67f0d05f Mon Sep 17 00:00:00 2001 From: "Fabrice (iLiburu)" Date: Wed, 5 Jan 2011 10:51:46 +0100 Subject: =?UTF-8?q?renommage=20massif=C2=A0:=20s=C3=A9paration=20des=20fic?= =?UTF-8?q?hiers=20de=20configuration=20des=20chapitres=20etc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configuration/smfhyperref.sty | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 configuration/smfhyperref.sty (limited to 'configuration/smfhyperref.sty') 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 -- cgit v1.2.1