summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hvfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-20 19:55:43 +0000
committerKarl Berry <karl@freefriends.org>2021-06-20 19:55:43 +0000
commit0dfccc591702a7d52fd4739ddb2622d1769cf422 (patch)
treedf14e93d5d441cc36fe40ada0a2a1b678063b65f /Master/texmf-dist/tex/latex/hvfloat
parentd149ddcdf0e3ccface144bd88fb11f08a9f4b016 (diff)
hvfloat (20jun21)
git-svn-id: svn://tug.org/texlive/trunk@59653 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvfloat')
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty10
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty170
2 files changed, 104 insertions, 76 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty
index 99b7cbfbab6..0090e80f5f0 100644
--- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty
+++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty
@@ -1,7 +1,6 @@
-%% $Id: hvfloat-fps.sty 35 2020-10-31 07:41:00Z herbert $
+%% $Id: hvfloat-fps.sty 120 2021-06-20 13:31:02Z herbert $
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{hvfloat-fps}[2017/09/16 setting float objects]
%%
%% IMPORTANT NOTICE:
%%
@@ -16,9 +15,10 @@
%% DESCRIPTION:
%% `hvfloat-fps' offers global placement of floats
%%
-\def\fileversion{0.02}
-\def\filedate{2017/09/20}
-\message{`hvfloat-fps' v\fileversion, \filedate\space (Herbert Voss)}
+\def\fileversion{0.03}
+\def\filedate{2020/06/20}
+\ProvidesPackage{hvfloat-fps}[\filedate\space v\fileversion\space global float position setting (hv)]
+%\message{`hvfloat-fps' v\fileversion, \filedate\space (Herbert Voss)}
%
\RequirePackage{xkeyval}
%
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index 681e5032d7b..2159575d1c7 100644
--- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
+++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 114 2021-06-15 13:20:03Z herbert $
+%% $Id: hvfloat.sty 119 2021-06-20 13:28:09Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,10 +15,10 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.29}
-\def\filedate{2021/06/15}
-\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
-\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
+\def\fileversion{2.30}
+\def\filedate{2021/06/20}
+%\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
+\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
\let\hvFloatFileVersion\fileversion
%
\newif\ifhv@fbox \hv@fboxfalse
@@ -33,12 +33,6 @@
\ProcessOptions
-\providecommand\@tugclass{\@empty}
-\ifx\@tugclass\@empty
-\else
- \hv@tugboattrue % special page handling
- \typeout{>>> we are using a TUGboat class}%
-\fi
\PassOptionsToPackage{hypcap}{caption}
\RequirePackage{caption}
@@ -65,6 +59,8 @@
\RequirePackage{stfloats}% for bottom floats in a twocolumn mode
\fi
%
+
+
\providecommand*\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}
\newlength\hvObjectWidth
@@ -179,7 +175,6 @@
\define@boolkey{hvSet}[hv@]{sameHeight}[true]{\@nameuse{hv@sameHeight#1}}% Write the caption only as text
\define@boolkey{hvSet}[hv@]{Debug}[true]{}% give more infos in the terminal
-\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi}
\newif\ifhv@fullpage
\newif\ifhv@FULLPAGE
@@ -258,6 +253,15 @@
\let\hvFloatSetDefaults\setDefaults
+\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi}
+
+\providecommand\@tugclass{\@empty}
+\ifx\@tugclass\@empty
+\else
+ \hv@tugboattrue % special page handling
+ \hv@typeout{>>> we are using a TUGboat class}%
+\fi
+
\newcommand\reset@special@float{%
\hv@set{subFloat=false,%fullpage=false,
multiFloat=false,%FULLPAGE=false
@@ -425,10 +429,6 @@
\newif\if@hvsubstar
\setDefaults
-\def\hvFloat{\@ifnextchar*% Main macro
- {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}%
- {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}%
-}
%\newcommand*{\hvFloat}[5][]+{%
% [#1}: keyvalues
@@ -438,6 +438,12 @@
% #5: caption
% #6: label
%
+
+\def\hvFloat{\@ifnextchar*% Main macro
+ {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}%
+ {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}%
+}
+
\def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}}
\def\do@hvFloat[#1]{%
\begingroup
@@ -446,19 +452,13 @@
% \setlength\hvWideWidth{\dimexpr\linewidth+\marginparwidth}%
\hv@maxImageWidth=\textwidth
\reset@special@float
- \setcounter{hv@pfigure}{\value{figure}}%
- \setcounter{hv@ptable}{\value{table}}%
+ \global\setcounter{hv@pfigure}{\value{figure}}%
+ \global\setcounter{hv@ptable}{\value{table}}%
\setcounter{hv@tempCNTfigA}{\value{figure}}%
\setcounter{hv@tempCNTfigB}{\value{figure}}%
\setcounter{hv@tempCNTtabA}{\value{table}}%
\setcounter{hv@tempCNTtabB}{\value{table}}%
- \renewcommand\thehv@pfigure{\thefigure}%
- \renewcommand\thehv@ptable{\thetable}%
- \renewcommand\thehv@tempCNTfigA{\thefigure}%
- \renewcommand\thehv@tempCNTfigB{\thefigure}%
- \renewcommand\thehv@tempCNTtabA{\thetable}%
- \renewcommand\thehv@tempCNTtabB{\thetable}%
- \gdef\hv@save@setting{#1}%
+ \gdef\hv@save@setting{#1}% for later use after \endgroup inside figure/table env
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
\ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifx\hv@subcaption@format\@empty\else
@@ -516,32 +516,28 @@
\ExplSyntaxOff
-
\newcount\hv@cnta
\newcount\hv@cntb
\def\hvFloat@ii[#1]#2#3{% #1: key/value, #2: floattype, #3: object
\hv@maxImageWidth=\textwidth
- \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
+% \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
\gdef\hv@floatType{#2}%
\ifx\relax#2\relax
\setkeys{hvSet}{nonFloat,onlyText}%
+ \xdef\hv@save@setting{\hv@save@setting,nonFloat,onlyText}% for later use after \endgroup inside figure/table env
\fi
- \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}%
+% \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}%
\gdef\hv@floatObject{#3}%
\@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}%
}
-
\def\do@@hvFloat[#1]#2#3{% #1: listof caption, #2. long caption #3: label
\gdef\hv@shortCap{#1}%
\gdef\hv@longCap{#2}%
\gdef\hv@label{#3}%
\ifhv@capbeside\def\@@temp{1}\else\def\@@temp{0}\fi
\ifhv@sameHeight\global\hv@global@sameHeighttrue\else\global\hv@global@sameHeightfalse\fi
- \xdef\hv@global@@capVPos{\hv@@capVPos}%
- \xdef\hvSet@global@capVPos{\hvSet@capVPos}%
- \xdef\hvSet@global@capAngle{\hvSet@capAngle}%
\global\setlength\hvSet@bindCorrection{\hvSet@bindCorr}% for doublepage objects
\global\setlength\hv@floatCapSep{\hvSet@floatCapSep}%
%
@@ -641,7 +637,7 @@
\fi
\fi
\saveCaptionSkip% we put this space ourselve
- \ifnum\hvSet@global@capAngle=0 % need rotation?
+ \ifnum\hvSet@capAngle=0 % need rotation?
\savebox\hvCaptionBox{% NO rotation
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
\ifhv@nonFloat
@@ -675,7 +671,7 @@
}%
\else
\savebox\hvCaptionBox{% Rotation
- \rotatebox{\hvSet@global@capAngle}{%
+ \rotatebox{\hvSet@capAngle}{%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifhv@nonFloat
@@ -779,12 +775,12 @@
%%%%
\savebox{\@tempboxa}{% ***** @tempbox start
\expandafter\ifcase\the\hv@@capPos% 0 is LEFT START \ifcase
- \ifx\hvSet@global@capVPos\hv@Center
+ \ifx\hvSet@capVPos\hv@Center
\put@CaptionBox
\hspace{\hv@floatCapSep}% capfloatsep
\put@ObjectBox
\else
- \ifx\hvSet@global@capVPos\hv@Top% caption and object at top aligned
+ \ifx\hvSet@capVPos\hv@Top% caption and object at top aligned
\put@CaptionBox[1]%
\hspace{\hv@floatCapSep}% capfloatsep
\put@ObjectBox[1]%
@@ -810,12 +806,12 @@
\fi
\end{minipage}%
\or%2 is right
- \ifx\hvSet@global@capVPos\hv@Center
+ \ifx\hvSet@capVPos\hv@Center
\put@ObjectBox
\hspace{\hv@floatCapSep}%
\put@CaptionBox
\else
- \ifx\hvSet@global@capVPos\hv@Top
+ \ifx\hvSet@capVPos\hv@Top
\put@ObjectBox[1]%
\hspace{\hv@floatCapSep}% capfloatsep
\put@CaptionBox[1]%
@@ -904,22 +900,22 @@
\let\clist@count@N\clist_count:N
\ExplSyntaxOff
-\def\do@@@@hvFloat{% special float page: caption <-> fullpage image
- \ifx\hvSet@capPos\hv@After \hv@@capPos=1
+\def\do@@@@hvFloat{% special float page: caption <-> fullpage images
+ \ifx\hvSet@capPos\hv@After \global\hv@@capPos=1
\else
- \ifx\hvSet@capPos\hv@Even \hv@@capPos=2
+ \ifx\hvSet@capPos\hv@Even \global\hv@@capPos=2
\else
- \ifx\hvSet@capPos\hv@Odd \hv@@capPos=3
+ \ifx\hvSet@capPos\hv@Odd \global\hv@@capPos=3
\else
- \ifx\hvSet@capPos\hv@Inner \hv@@capPos=4
+ \ifx\hvSet@capPos\hv@Inner \global\hv@@capPos=4
\else
- \ifx\hvSet@capPos\hv@Outer \hv@@capPos=5
+ \ifx\hvSet@capPos\hv@Outer \global\hv@@capPos=5
\else
- \ifx\hvSet@capPos\hv@Right \hv@@capPos=6% only for twocolumn mode
+ \ifx\hvSet@capPos\hv@Right \global\hv@@capPos=6% only for twocolumn mode
\else
- \ifx\hvSet@capPos\hv@Left \hv@@capPos=7% only for twocolumn mode
+ \ifx\hvSet@capPos\hv@Left \global\hv@@capPos=7% only for twocolumn mode
\else
- \hv@@capPos=0
+ \global\hv@@capPos=0
\fi
\fi
\fi
@@ -1058,6 +1054,11 @@
\global\setlength\hv@tempWidthA{\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection}%
\xdef\hv@caption@format@temp{\hv@caption@format}% it gets lost otherwise for next afterpage
\global\hv@switchTypefalse
+% \endgroup% started at main macro \hvFloat
+ \setcounter{hv@tempCNTfigA}{\value{figure}}%
+ \setcounter{hv@tempCNTfigB}{\value{figure}}%
+ \setcounter{hv@tempCNTtabA}{\value{table}}%
+ \setcounter{hv@tempCNTtabB}{\value{table}}%
\savebox\hvCaptionBox{% NO rotation
\minipage{\textwidth}%% minipage, to get hyphenation
\let\@captype\hv@floatType
@@ -1137,7 +1138,11 @@
%
\def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object
\begin{\hv@floatType*}[!t]
- \hv@typeout{Floatpositionsparameter: !t}%
+ \let\c@hv@tempCNTfigA\c@figure
+ \let\c@hv@tempCNTtabA\c@table
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
+ \hv@typeout{Floatpositionsparameter: !t}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\ifx\hv@label\@empty
@@ -1157,10 +1162,11 @@
\end{\hv@floatType*}%
}
\def\do@hvFloat@doublePageCaptionRightObjectRight#1{% right part of the object
- \begin{\hv@floatType*}[!t]
- \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \hspace*{-\hv@tempWidthA}%
- \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}%
+ \begin{\hv@floatType*}[!t]
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
+ \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \hspace*{-\hv@tempWidthA}%
+ \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}%
\global\setlength\hv@tempWidthB{\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax}%
\hv@typeout{Height of right box: \the\ht\hv@rightBox}%
\hv@typeout{Depth of right box : \the\dp\hv@rightBox}%
@@ -1169,22 +1175,26 @@
\else
\usebox\hv@rightBox
\fi
+ \c@hv@tempCNTfigB=\numexpr\c@figure-1\relax
+ \c@hv@tempCNTtabB=\numexpr\c@table-1\relax
\ifx\hv@label\@empty\else
\ifx\hv@floatType\hv@figure
- \global\refstepcounter{hv@tempCNTfigB}%
+ \refstepcounter{hv@tempCNTfigB}%
\else
- \global\refstepcounter{hv@tempCNTtabB}% before caption
+ \refstepcounter{hv@tempCNTtabB}% before caption
\fi
\label{\hv@label-2}%
\fi
\ifx\hv@caption@format@temp\@empty\else
\expandafter\captionsetup\expandafter{\hv@caption@format@temp}%
\fi
+ \c@figure=\numexpr\c@hv@tempCNTfigB-1\relax
+ \c@table=\numexpr\c@hv@tempCNTtabB-1\relax
\ifnum#1>\z@ % caption on the right
- \hv@typeout{doublePage: capAngle=\hvSet@global@capAngle}%
- \ifnum\hvSet@global@capAngle > \z@
+ \hv@typeout{doublePage: capAngle=\hvSet@capAngle}%
+ \ifnum\hvSet@capAngle > \z@
\hspace{\hv@floatCapSep}%
- \rlap{\rotatebox{\hvSet@global@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
+ \rlap{\rotatebox{\hvSet@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
\abovecaptionskip=0pt% local inside parbox
\belowcaptionskip=0pt% local inside parbox
\ifx\relax\hv@shortCap\relax
@@ -1197,7 +1207,7 @@
\else
\global\setlength\hv@tempWidthB{\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax}%
\hspace{\hv@floatCapSep}%
- \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@global@@capVPos]{\hv@tempWidthB}{%
+ \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@@capVPos]{\hv@tempWidthB}{%
\abovecaptionskip=0pt% local inside parbox
\belowcaptionskip=0pt% local inside parbox
\ifx\hv@shortCap\@empty
@@ -1233,7 +1243,8 @@
\expandafter\global\expandafter\savebox\expandafter\hvObjectBox\expandafter{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\expandafter\global\expandafter\savebox\expandafter\hv@boxLeftPage\expandafter{\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}%
\expandafter\global\expandafter\savebox\expandafter\hv@boxRightPage\expandafter{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}%
- \checkoddpage
+% \endgroup% started at main macro \hvFloat
+ \checkoddpage
\ifoddpage
\if@twocolumn
\if@firstcolumn
@@ -1261,6 +1272,7 @@
\def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
\afterpage{%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\noindent
\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
@@ -1269,6 +1281,7 @@
\noindent
\hspace*{\dimexpr-\hv@tempWidthA}%
\clipbox*{\the\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}%
+ \begingroup
\ifnum#1>0
\medskip
\ifdim\dp\hvObjectBox > \z@
@@ -1301,6 +1314,7 @@
\ifx\hv@label\@empty\else\label{\hv@label}\fi
}%
\fi
+ \endgroup
\newpage\if@twocolumn\null\newpage\fi
}%
}
@@ -1309,11 +1323,12 @@
%
\def\do@hvFloat@doubleFULLPAGE#1{% image on left and right page with caption before/below/right/after
% #1-> 0/1 caption under/right
- \ifx\hvSet@capPos\hv@After \hv@@capPos=1
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
+ \ifx\hvSet@capPos\hv@After \global\hv@@capPos=1
\else
- \ifx\hvSet@capPos\hv@Before \hv@@capPos=0
+ \ifx\hvSet@capPos\hv@Before \global\hv@@capPos=0
\else
- \hv@@capPos=2 % other caption type
+ \global\hv@@capPos=2 % other caption type
\fi\fi
\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
@@ -1421,6 +1436,7 @@
\def\set@Normal@Bottom@Caption{\@ifnextchar*\set@Normal@Bottom@CaptionStar\set@Normal@Bottom@Caption@}
\def\set@Normal@Bottom@Caption@{%
\begin{\hv@floatType}[!b]
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@separatorLine\drawSepLine\fi
% \expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifx\hv@shortCap\@empty
@@ -1433,6 +1449,7 @@
}
\def\set@Normal@Bottom@CaptionStar*{%
\begin{\hv@floatType*}[!b]
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@separatorLine\drawSepLine\fi
% \expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifx\hv@shortCap\@empty
@@ -1444,12 +1461,7 @@
\end{\hv@floatType*}%
}
-
\def\do@hvFloat@doubleFULLPAGE@CaptionBefore{%
-% \setcounter{hv@tempCNTfigA}{\value{figure}}%
-% \setcounter{hv@tempCNTfigB}{\value{figure}}%
-% \setcounter{hv@tempCNTtabA}{\value{table}}%
-% \setcounter{hv@tempCNTtabB}{\value{table}}%
\afterpage{%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
@@ -1639,6 +1651,7 @@
\def\setBottomCaption{%
\begin{\hv@floatType}[!b]%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@separatorLine\drawSepLine\fi
\par
\usebox\hvCaptionBox
@@ -1651,6 +1664,7 @@
\else
\begin{\hv@floatType}[p]%
\fi
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@FULLPAGE
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-0.5\baselineskip%
\checkoddpage
@@ -1664,7 +1678,7 @@
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\fi
\AtBeginShipoutNext{\thispagestyle{empty}}%
- \usebox\hvObjectBox%
+ \usebox\hvObjectBox
\else
\usebox\hvObjectBox
\fi
@@ -1679,6 +1693,7 @@
\def\getMultiCaptionAndLabel{%
\global\sbox\hvCaptionBox{\minipage[b]{\linewidth}%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\setlength\belowcaptionskip{5pt}%
\setlength\abovecaptionskip{0pt}%
@@ -1710,6 +1725,7 @@
\else
\minipage{\columnwidth}%
\fi
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifx\hvSet@objectPos\hv@Right\raggedleft\else
\ifx\hvSet@objectPos\hv@Left\raggedleft\else
@@ -1736,9 +1752,9 @@
\repeat
\endminipage}%
}
-
\def\getMultiSubCaptionAndLabel{%
\global\sbox\hvCaptionBox{\minipage{\linewidth}%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
% \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\setlength\belowcaptionskip{5pt}%
\setlength\abovecaptionskip{0pt}%
@@ -1756,6 +1772,7 @@
\def\getMultiSubObjectAndLabel{%
\global\sbox\hvObjectBox{%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@vFill
\minipage[b][\textheight][s]{\columnwidth}%
\else
@@ -1774,6 +1791,11 @@
\advance\hv@cntb by \@ne
\hv@cnta=2
\edef\@captype{\clist_item:Nn\l_clist_Type{1}}% the same for all subfloats
+ \ifx\@tempa\@empty
+ \else
+% \refstepcounter{\@captype}%
+% \expandafter\label\expandafter{\@tempa}%
+ \fi
\loop
\def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}%
\ifhv@objectFrame\frame{\@temp}\else\@temp\fi
@@ -1798,8 +1820,9 @@
\edef\@tempa{\clist_item:Nn\l_clist_Label{1}}% the main label at the end
\ifx\@tempa\@empty
\else
- \addtocounter{\@captype}{-1}% to get the same <object>-ref as "label"-cap
- \refstepcounter{\@captype}%
+% \addtocounter{\@captype}{-1}% to get the same <object>-ref as "label"-cap
+ \edef\@temp{hv@p\@captype}%
+ \refstepcounter{\@temp}%
\expandafter\label\expandafter{\@tempa}%
\fi
\endminipage}%
@@ -1808,6 +1831,7 @@
\def\getSingleCaptionAndLabel{%
\global\sbox\hvCaptionBox{\minipage{\linewidth}%
+ \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\setlength\belowcaptionskip{5pt}%
\setlength\abovecaptionskip{0pt}%
\edef\@captype{\hv@floatType}%
@@ -1822,9 +1846,13 @@
\def\set@caption@object#1{% first caption, then object #1=\hv@floatType
\ifhv@multiFloat
+ \setcounter{hv@pfigure}{\value{figure}}%
+ \setcounter{hv@ptable}{\value{table}}%
\getMultiCaptionAndLabel
\else
\ifhv@subFloat
+ \setcounter{hv@pfigure}{\value{figure}}%
+ \setcounter{hv@ptable}{\value{table}}%
\getMultiSubCaptionAndLabel
\else
\getSingleCaptionAndLabel