diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/hypcap.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/hypcap.sty | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty b/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty index c2d24351078..cbb184fd095 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/hypcap.sty @@ -29,7 +29,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hypcap}% - [2008/08/11 v1.9 Adjusting anchors of captions (HO)] + [2008/09/08 v1.10 Adjusting anchors of captions (HO)] \@ifundefined{hyper@@anchor}{% \PackageError{hypcap}{You have to load 'hyperref' first}\@ehc \endinput @@ -38,19 +38,23 @@ \let\hc@org@caption\caption \newif\if@capstart \newcommand*\hypcapspace{.5\baselineskip} +\newif\ifcapstart +\capstarttrue \newcommand*\capstart{% - \H@refstepcounter\@captype % first part of caption - \hyper@makecurrent\@captype - \global\let\hc@currentHref\@currentHref - \vspace*{-\hypcapspace}% - \begingroup - \let\leavevmode\relax - \hyper@@anchor\@currentHref\relax - \endgroup - \vspace*{\hypcapspace}% - \hc@hyperref{\let\caption\hc@caption}% - \global\@capstarttrue - \global\advance\csname c@\@captype\endcsname\m@ne + \ifcapstart + \H@refstepcounter\@captype % first part of caption + \hyper@makecurrent\@captype + \global\let\hc@currentHref\@currentHref + \vspace*{-\hypcapspace}% + \begingroup + \let\leavevmode\relax + \hyper@@anchor\@currentHref\relax + \endgroup + \vspace*{\hypcapspace}% + \hc@hyperref{\let\caption\hc@caption}% + \global\@capstarttrue + \global\advance\csname c@\@captype\endcsname\m@ne + \fi } \@ifpackagelater{hyperref}{2007/04/09}{% \let\hc@hyperref\@gobble |