diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/memoir/memhfixc.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/memoir/memhfixc.sty | 85 |
1 files changed, 81 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty index f0b20bdfebb..15502dd75fe 100644 --- a/Master/texmf-dist/tex/latex/memoir/memhfixc.sty +++ b/Master/texmf-dist/tex/latex/memoir/memhfixc.sty @@ -6,9 +6,8 @@ %% %% mempatch.dtx (with options: `hyper') %% -%% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004 -%% (or at: pandgwilson at earthlink dot net) -%% Copyright 2001 --- 2004 Peter R. Wilson +%% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net +%% Copyright 2001 --- 2006 Peter R. Wilson %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -36,6 +35,8 @@ %% \usepackage[...]{hyperref} %% \usepackage{memhfixc} %% +%% Version 1.8 2006/01/21 +%% Version 1.7 2005/11/15 %% Version 1.6 2004/05/13 %% Version 1.5 2003/10/14 %% Version 1.4 2003/09/26 @@ -44,7 +45,7 @@ %% Version 1.1 2003/01/22 %% Version 1.0 2002/10/22 %% -\ProvidesPackage{memhfixc}[2004/05/13 v1.6 package fixes for memoir class] +\ProvidesPackage{memhfixc}[2006/01/21 v1.8 nameref/hyperref package fixes for memoir class] \let\M@hfixcfinish\relax \@ifclassloaded{memoir}{}% {\let\M@hfixcfinish\endinput @@ -96,6 +97,41 @@ \@ifpackageloaded{hyperref}{}{\let\M@hfixcfinish\endinput} \M@hfixcfinish +\let\H@old@sbook\@sbook +\def\@sbook#1{% + \H@old@sbook{#1}% + \Hy@GlobalStepCount\Hy@linkcounter + \xdef\@currentHref{book*.\the\Hy@linkcounter}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% +} + +\@ifundefined{Hy@captionsenglish}{}{% + \g@addto@macro{\Hy@captionsenglish}{\def\bookautorefname{Book}}} +\@ifundefined{HyLang@english}{}{% + \g@addto@macro{\HyLang@english}{\def\bookautorefname{Book}}} + +\@ifundefined{Hy@captionsgerman}{}{% + \g@addto@macro{\Hy@captionsgerman}{\def\bookautorefname{Buch}}} +\@ifundefined{HyLang@german}{}{% + \g@addto@macro{\HyLang@german}{\def\bookautorefname{Buch}}} + +\@ifundefined{Hy@captionsportuges}{}{% + \g@addto@macro{\Hy@captionsportuges}{\def\bookautorefname{Livro}}} +\@ifundefined{HyLang@portuges}{}{% + \g@addto@macro{\HyLang@portuges}{\def\bookautorefname{Livro}}} + +\@ifundefined{Hy@captionsspanish}{}{% + \g@addto@macro{\Hy@captionsspanish}{\def\bookautorefname{Libro}}} +\@ifundefined{HyLang@spanish}{}{% + \g@addto@macro{\HyLang@spanish}{\def\bookautorefname{Libro}}} + +\@ifundefined{Hy@captionsafrikaans}{}{% + \g@addto@macro{\Hy@captionsafrikaans}{\def\bookautorefname{Boek}}} +\@ifundefined{HyLang@afrikaans}{}{% + \g@addto@macro{\HyLang@afrikaans}{\def\bookautorefname{Boek}}} + +\providecommand{\bookautorefname}{Book} + \def\@@writetorep#1#2#3#4#5{% \begingroup \def\Hy@tempa{#5}% @@ -133,10 +169,12 @@ \fi \ifHy@bookmarksnumbered \let\numberline\Hy@numberline + \let\booknumberline\Hy@numberline % <- added \let\partnumberline\Hy@numberline % <- added \let\chapternumberline\Hy@numberline % <- added \else \let\numberline\@gobble + \let\booknumberline\@gobble % <- added \let\partnumberline\@gobble % <- added \let\chapternumberline\@gobble % <- added \fi @@ -184,6 +222,45 @@ \let\m@moldhypcaption\caption \renewcommand{\caption}{\donemaincaptiontrue\m@moldhypcaption} +\newcounter{memhycontfloat} +\renewcommand*{\thememhycontfloat}{\arabic{memhycontfloat}} +\renewcommand{\theHmemhycontfloat}{\arabic{memhycontfloat}} +\setcounter{memhycontfloat}{0} + +\renewcommand{\contcaption}{% + \refstepcounter{memhycontfloat}% + \addtocounter{\@captype}{\m@ne}\H@refstepcounter{\@captype}% + \@contcaption\@captype} + +\def\endsidecaption{% + \m@mscapend@fbox + \H@refstepcounter{\@captype}% + \hyper@makecurrent{\@captype}% + \m@mscaplabel + \begin{lrbox}{\m@mscap@capbox}% + \begin{minipage}[c]{\sidecapwidth}% + \sidecapstyle + \@caption\@captype[\m@mscap@fortoc]{\m@mscap@forcap}% + \end{minipage}% + \end{lrbox}% + \m@mscapopboxes} + +\renewcommand*{\sidecontcaption}{% + \refstepcounter{memhycontfloat}% + \@sidecontcaption} +\def\endsidecontcaption{% + \m@mscapend@fbox + \addtocounter{\@captype}{\m@ne}\H@refstepcounter{\@captype}% + \hyper@makecurrent{memhycontfloat}% + \m@mscaplabel + \begin{lrbox}{\m@mscap@capbox}% + \begin{minipage}[c]{\sidecapwidth}% + \sidecapstyle + \@contcaption\@captype{\m@mscap@forcap}% + \end{minipage}% + \end{lrbox}% + \m@mscapopboxes} + \endinput %% %% End of file `memhfixc.sty'. |