summaryrefslogtreecommitdiffstats
path: root/configuration/smfhyperref.sty
diff options
context:
space:
mode:
authorFabrice (iLiburu) <Fabrice.Orgogozo@gmail.com>2011-01-05 10:51:46 +0100
committerFabrice (iLiburu) <Fabrice.Orgogozo@gmail.com>2011-01-05 10:51:46 +0100
commit9b397c6baf243cfab623ede077eff43b67f0d05f (patch)
treebf934a1dd51c9555c9ce0668bb262038b95be28a /configuration/smfhyperref.sty
parent71624bddf4e7e63397a9af8213153bdbdb06a3ba (diff)
downloadgalois-9b397c6baf243cfab623ede077eff43b67f0d05f.zip
galois-9b397c6baf243cfab623ede077eff43b67f0d05f.tar.gz
galois-9b397c6baf243cfab623ede077eff43b67f0d05f.tar.bz2
renommage massif : séparation des fichiers de configuration des chapitres etc.
Diffstat (limited to 'configuration/smfhyperref.sty')
-rw-r--r--configuration/smfhyperref.sty71
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