summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/memoir/memhfixc.sty')
-rw-r--r--Master/texmf-dist/tex/latex/memoir/memhfixc.sty36
1 files changed, 25 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
index 00d45aab0f6..58ebaf0827e 100644
--- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
+++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty
@@ -38,6 +38,7 @@
%% With thanks to Heiko Oberdiek, if you use hyperref dated 2006/11/15
%% or later, memhfixc will be automatically loaded after hyperref.
%%
+%% Version 1.14 2010/06/10
%% Version 1.13 2010/04/19
%% Version 1.12 2009/02/06
%% Version 1.11 2009/01/18
@@ -53,7 +54,7 @@
%% Version 1.1 2003/01/22
%% Version 1.0 2002/10/22
%%
-\ProvidesPackage{memhfixc}[2010/04/19 v1.13 nameref/hyperref package fixes for memoir class]
+\ProvidesPackage{memhfixc}[2010/06/10 v1.14 nameref/hyperref package fixes for memoir class]
\let\M@hfixcfinish\relax
\@ifclassloaded{memoir}{}%
{\let\M@hfixcfinish\endinput
@@ -192,17 +193,30 @@
\@ifundefined{H@old@sectm@m}{% haven't fiddled with \M@sect
\let\H@old@sectm@m\M@sect
\def\M@sect#1#2#3#4#5#6[#7][#8]#9{%
- \ifnum #2>\c@secnumdepth
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{section*.\the\Hy@linkcounter}%
- \fi
- \H@old@sectm@m{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]{#9}%
- \ifnum #2>\c@secnumdepth
- \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
- \fi}%
+ \ifnum #2>\c@secnumdepth%
+ \expandafter\@firstoftwo%
+ \else%
+ \expandafter\@secondoftwo%
+ \fi%
+ {%
+ \Hy@MakeCurrentHrefAuto{section*}%
+ \setlength{\Hy@SectionHShift}{#3}%
+ \begingroup
+ \toks@{\H@old@sectm@m{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{8}]}%
+ \toks\tw@\expandafter{%
+ \expandafter\Hy@SectionAnchorHref\expandafter{\@currentHref}%
+ #9%
+ }%
+ \edef\x{\endgroup%
+ \the\toks@{\the\toks\tw@}%
+ }\x%
+ }{%
+ \H@old@sectm@m{#1}{#2}{#3}{#4}{#5}{#6}[{#7}][{#8}]{#9}%
+ }%
}%
- {% already fiddled \M@sect
- }
+}%
+{% already fiddled \M@sect
+}
\let\MH@old@resets@pp\@resets@pp
\renewcommand*{\@resets@pp}{%