summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hvfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-21 20:48:00 +0000
committerKarl Berry <karl@freefriends.org>2019-03-21 20:48:00 +0000
commit2f67ef04c2e95c64f0a4e7395e0633710ab122a4 (patch)
treefa1180a32355834e2753ccbe11263e0a306a0c0f /Master/texmf-dist/tex/latex/hvfloat
parent65438f7ca8b6143d68f1f7f4ad1ace352d467047 (diff)
hvfloat (21mar19)
git-svn-id: svn://tug.org/texlive/trunk@50507 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvfloat')
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty623
1 files changed, 444 insertions, 179 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index fbcea5ee3e9..3a9e26e91dd 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 964 2019-03-14 11:37:36Z herbert $
+%% $Id: hvfloat.sty 988 2019-03-20 21:34:05Z herbert $
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hvfloat}[2019/02/03 rotating of floating objects]
@@ -7,7 +7,7 @@
%%
%% This is file `hvfloat.sty',
%%
-%% Herbert Voss <hvoss@tug.de>
+%% Herbert Voss <hvoss@tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -16,8 +16,8 @@
%% DESCRIPTION:
%% `hvfloat' offers rotating of captions and objects for floats
%%
-\def\fileversion{2.00}
-\def\filedate{2019/03/14}
+\def\fileversion{2.10}
+\def\filedate{2019/03/20}
\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
%
\newif\ifhv@fbox \hv@fboxfalse
@@ -27,18 +27,20 @@
\ProcessOptions
+\PassOptionsToPackage{hypcap}{caption}
+\RequirePackage{caption}
+\PassOptionsToPackage{hypcap}{subcaption}
+\RequirePackage{subcaption}
\ifhv@hyperref
\RequirePackage{hyperref}
- \RequirePackage{hypcap}
-% \newcommand\fltref[1]{\ref{#1}\vpageref{#1-flt}}%%
+% \RequirePackage{hypcap}
\fi
-\AtBeginDocument{\providecommand\capstart{}}% in no hyperref/hypcap is loaded
+%\AtBeginDocument{\providecommand\capstart{}}% in no hyperref/hypcap is loaded
%
+\RequirePackage{expl3,multido}
\RequirePackage{graphicx}
-
\RequirePackage{xkeyval}
-\RequirePackage{caption}
\RequirePackage{ifoddpage}
%
\RequirePackage{afterpage}
@@ -46,26 +48,21 @@
\newlength\hvObjectWidth
\newlength\hvCapWidth
\newlength\hvWideWidth
+\newlength\hvMultiFloatSkip
\newlength\hvMaxCapWidth
\newsavebox\hvObjectBox
\newsavebox\hvCaptionBox
\newsavebox\hvOBox
%
-\newif\ifhv@useOBox
-\newif\ifhv@nonFloat
-\newif\ifhv@onlyText
-\newif\ifhv@wide
-\newif\ifhv@fullpage
-\newif\ifhv@FullPage
\newif\ifhv@capbeside \hv@capbesidefalse
-\newif\ifhv@separatorLine \hv@separatorLinetrue
-\newif\ifhv@objectFrame \hv@objectFramefalse
\def\hv@Top{t}
\def\hv@Bottom{b}
\def\hv@Right{r}
+\def\hv@RIGHT{R}
\def\hv@Left{l}
+\def\hv@LEFT{L}
\def\hv@Center{c}
\def\hv@Outer{o}
\def\hv@Inner{i}
@@ -95,12 +92,12 @@
\def\hvSet@capPos{#1}% it is relativ to the object, (e),(d) only valid for fullpage float
\edef\@tempa{#1}%
\ifx\hv@Bottom\@tempa
- \global\hv@capbesidefalse
+ \hv@capbesidefalse
\else
\ifx\hv@Top\@tempa
- \global\hv@capbesidefalse
+ \hv@capbesidefalse
\else
- \global\hv@capbesidetrue
+ \hv@capbesidetrue
\fi
\fi
}
@@ -116,32 +113,23 @@
\define@key{hvSet}{floatCapSep}[5]{% a width with the unit pt
\def\hvSet@floatCapSep{#1}%
}
-\define@key{hvSet}{useOBox}[true]{% use of the hvOBox contents
- \@nameuse{hv@useOBox#1}%
-}
-\define@key{hvSet}{nonFloat}[true]{% Do not use float environment
- \@nameuse{hv@nonFloat#1}%
-}
-\define@key{hvSet}{onlyText}[false]{% Write the caption only as text
- \@nameuse{hv@onlyText#1}%
-}
-\define@key{hvSet}{wide}[true]{% Write the caption only as text
- \@nameuse{hv@wide#1}%
-}
-\define@key{hvSet}{fullpage}[true]{% fullpage float with caption on other page
- \@nameuse{hv@fullpage#1}%
-% \def\hvSet@capWidth{n}%
-}
-\define@key{hvSet}{FullPage}[true]{% fullpage float with caption on other page
- \@nameuse{hv@FullPage#1}%
-% \def\hvSet@capWidth{n}%
+\define@key{hvSet}{multiFloatSkip}[\normalbaselineskip]{% a width with the unit pt
+ \setlength\hvMultiFloatSkip{#1}%
}
-\define@key{hvSet}{separatorLine}[true]{% separator line for caption of a full page float
- \@nameuse{hv@separatorLine#1}%
+\define@boolkey{hvSet}[hv@]{useOBox}[true]{}% use of the hvOBox contents
+\define@boolkey{hvSet}[hv@]{nonFloat}[true]{}% Do not use float environment
+\define@boolkey{hvSet}[hv@]{onlyText}[true]{}% Write the caption only as text
+\define@boolkey{hvSet}[hv@]{wide}[true]{}% Write the caption only as text
+\define@boolkey{hvSet}[hv@]{fullpage}[true]{}% fullpage float with caption on other page
+\define@boolkey{hvSet}[hv@]{FullPage}[true]{}% fullpage float with caption on other page
+\define@boolkey{hvSet}[hv@]{subFloat}[true]{% typeset values as subfloats
+ \ifhv@subFloat\setkeys{hvSet}{multiFloat=false}\fi%
}%
-\define@key{hvSet}{objectFrame}[true]{% a frame around the object with no separation
- \@nameuse{hv@objectFrame#1}%
+\define@boolkey{hvSet}[hv@]{multiFloat}[true]{% typeset values as continous floats
+ \ifhv@multiFloat\setkeys{hvSet}{subFloat=false}\fi%
}%
+\define@boolkey{hvSet}[hv@]{separatorLine}[true]{}% separator line for caption of a full page float
+\define@boolkey{hvSet}[hv@]{objectFrame}[true]{}% a frame around the object with no separation
\define@key{hvSet}{style}{%
\@ifundefined{hv@#1}%
{\errmessage{Custom style `#1' undefined}}%
@@ -149,19 +137,27 @@
\edef\x{\endgroup\noexpand\setkeys{hvSet}{\@nameuse{hv@#1}}}\x}% use a defined style
}
-\def\hvset#1{\setkeys{hvSet}{#1}}
+
+\def\hv@set#1{\begingroup\edef\x{\endgroup\noexpand\setkeys{hvSet}{#1}}\x}
%
\def\defhvstyle#1#2{\@namedef{hv@#1}{#2}}
%
\newcommand{\setDefaults}{%
- \hvset{%
+ \hv@set{%
floatPos=htbp, rotAngle=0, capWidth=n, capAngle=0,
capPos=b, capVPos=c, objectPos=c, objectAngle=0,
floatCapSep=5, useOBox=false, nonFloat=false,
onlyText=false, wide=false, fullpage=false, FullPage=false,
- separatorLine,objectFrame=false}%
+ multiFloat=false,subFloat=false,
+ separatorLine,objectFrame=false,multiFloatSkip=\normalbaselineskip,
+}%
}
+\newcommand\reset@special@float{%
+ \hv@set{subFloat=false,fullpage=false,FullPage=false,multiFloat=false}}
+
+\def\hv@vskip{\vspace{\hvMultiFloatSkip}}
+
%
\newlength\hvAboveCaptionSkip
\newlength\hvBelowCaptionSkip
@@ -184,9 +180,9 @@
}
%
\newcommand\figcaption[2][]{\def\@captype{figure}%
- \ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi}
+ \begingroup\ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi\endgroup}
\newcommand\tabcaption[2][]{\def\@captype{table}%
- \ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi}
+ \begingroup\ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi\endgroup}
%
\newlength\hv@maxImageWidth
\AtBeginDocument{\hv@maxImageWidth=\columnwidth}
@@ -252,20 +248,16 @@
\fi
}
-\newif\if@hvstar
+\newif\ifhv@star
+\newif\if@hvsubstar
+\setDefaults
\def\hvFloat{\@ifnextchar*%
- {\@hvstartrue
- \hv@maxImageWidth=\textwidth
- \hvFloat@i}%
- {\@hvstarfalse
- \hv@maxImageWidth=\columnwidth
- \hvFloat@i*}%
+ {\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}%
+ {\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}%
}
-\setDefaults
-
-%\newcommand*{\hvFloat}[5][]{%
+%\newcommand*{\hvFloat}[5][]+{%
% [#1}: keyvalues
% #2: type figure | table | ...
% #3: float contents
@@ -274,11 +266,85 @@
% #6: label
%
\def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}}
-\def\do@hvFloat[#1]#2#3{%
+
+\def\do@hvFloat[#1]{%
\begingroup
\setlength\hvWideWidth{\dimexpr\linewidth+\marginparwidth}%
\hv@maxImageWidth=\textwidth
- \global\hv@capbesidefalse
+ \hv@capbesidefalse
+ \reset@special@float
+ \setcounter{hv@pfigure}{\value{figure}}%
+ \setcounter{hv@ptable}{\value{table}}%
+ \gdef\hv@save@setting{#1}%
+ \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
+%\ifhv@multiFloat\typeout{>>>>>>>>multiFloat!!}\else\typeout{>>>>>>>> KEIN MultiFloat!}\fi%
+ \gdef\hv@floatType{figure}%
+ \@ifnextchar+{\do@multiFloat}{\hvFloat@ii[#1]}}
+
+\ExplSyntaxOn
+
+\def\do@multiFloat+#1#2{%
+ \clist_set:Nn\l_clist_Type{{#1}}%
+ \clist_set:Nn\l_clist_Object{{#2}}%
+ \@ifnextchar[\do@multiFloat@i{\do@multiFloat@i[]}%
+}
+\def\do@multiFloat@i[#1]#2#3{% lof-caption, caption,label
+ \ifx\relax#1\relax
+ \clist_set:Nn\l_clist_LofCaption{{}}%
+ \else
+ \clist_set:Nn\l_clist_LofCaption{{#1}}%
+ \fi
+ \clist_set:Nn\l_clist_Caption{{#2}}%
+ \ifx\relax#3\relax
+ \clist_set:Nn\l_clist_Label{{}}%
+ \else
+ \clist_set:Nn\l_clist_Label{{#3}}%
+ \fi
+ \@ifnextchar+{\do@multiFloat@ii}{}%
+}
+\def\do@multiFloat@ii+#1#2{%
+ \clist_put_right:Nn\l_clist_Type{{#1}}%
+ \clist_put_right:Nn\l_clist_Object{{#2}}%
+ \@ifnextchar[\do@multiFloat@iii{\do@multiFloat@iii[]}%
+}
+
+\def\do@multiFloat@iii[#1]#2#3{% lof-caption, caption, label
+ \ifx\relax#1\relax
+ \clist_put_right:Nn\l_clist_LofCaption{{}}%
+ \else
+ \clist_put_right:Nn\l_clist_LofCaption{{#1}}%
+ \fi
+ \clist_put_right:Nn\l_clist_Caption{{#2}}%
+ \ifx\relax#3\relax
+ \clist_put_right:Nn\l_clist_Label{{}}%
+ \else
+ \clist_put_right:Nn\l_clist_Label{{#3}}%
+ \fi
+ \@ifnextchar+\do@multiFloat@ii%
+ {\def\hvSet@CapWidth{n}%
+ \do@@@@hvFloat}%
+}
+\ExplSyntaxOff
+
+
+\newcounter{hv@pfigure}
+\newcounter{hv@ptable}
+\newcounter{subhv@pfigure}
+\newcounter{subhv@ptable}
+
+\def\drawSepLine{%
+ \noindent
+ \if@twocolumn\rule{\columnwidth}{0.4pt}\else\rule{\linewidth}{0.4pt}\fi
+ \vspace{0pt}%
+}
+
+\newcount\hv@cnta
+\newcount\hv@cntb
+
+
+\def\hvFloat@ii[#1]#2#3{%
+ \hv@maxImageWidth=\textwidth
+ \hv@capbesidefalse
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
\gdef\hv@floatType{#2}%
\ifx\relax#2\relax \setkeys{hvSet}{nonFloat=true}\fi
@@ -339,7 +405,7 @@
\else
\ifhv@capbeside
\ifhv@wide
- \setlength\hvCapWidth{\hvSet@capWidth\hv@WideWidth}%
+ \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
\setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hvSet@floatCapSep pt\relax}%
\else
\setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
@@ -350,7 +416,7 @@
\fi
\else
\ifhv@wide
- \setlength\hvCapWidth{\hvSet@capWidth\hv@WideWidth}%
+ \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
\else
\setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
\fi
@@ -375,7 +441,7 @@
\let\@captype\hv@floatType
\expandafter\ifx\expandafter\relax\hv@shortCap\relax \caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}\fi
\fi
- \label{\hv@label}%
+ \expandafter\label\expandafter{\hv@label}%
\end{minipage}%
}%
\else
@@ -518,12 +584,12 @@
\else
\rotatebox{\hvSet@rotAngle}{\usebox{\@tempboxa}}%
\fi
- \ifhv@nonFloat
- \ifx\hvSet@objectPos\hv@Center
- \ifhv@nonFloat
+ \ifhv@nonFloat
+ \ifx\hvSet@objectPos\hv@Center
+ \ifhv@nonFloat
\hspace{\fill}%
- \fi
\fi
+ \fi
\endgroup% End the nonfloat part
\else
\end{\hv@floatType}% End the floating environment
@@ -535,84 +601,7 @@
{\minipage{#1}\center}
{\endcenter\endminipage}
%
-\newcounter{hvpfigure}
-\newcounter{hvptable}
-
-\def\drawSepLine{%
- \noindent
- \if@twocolumn\rule{\columnwidth}{0.4pt}\else\rule{\linewidth}{0.4pt}\fi
- \vspace{0pt}%
-}
-
-\def\set@caption@object{% first caption, then object
- \begin{\hv@floatType}[!b]
- \capstart
- \belowcaptionskip=0pt% local change
- \ifhv@separatorLine\drawSepLine\fi
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption{\hv@longCap}%
- \else
- \caption[\hv@shortCap]{\hv@longCap}%
- \fi
- \expandafter\ifx\expandafter\relax\hv@label\relax\else
- \label{\hv@label-cap}\fi
- \end{\hv@floatType}%
-%
- \if@hvstar
- \begin{\hv@floatType*}[!p]
- \else
- \begin{\hv@floatType}[!p]
- \fi
- \edef\@captype{hvp\@captype}%
- \capstart
- \refstepcounter{\@captype}%
- \expandafter\ifx\expandafter\relax\hv@label\relax\else
- \expandafter\label\expandafter{\hv@label}%
- \fi
- \ifhv@objectFrame\frame{\hv@floatObject}\else\hv@floatObject\fi
- \if@hvstar
- \end{\hv@floatType*}%
- \else
- \end{\hv@floatType}%
- \fi
-}
-\def\set@object@caption{% first object, then caption
- \if@hvstar
- \begin{\hv@floatType*}[!p]
- \else
- \begin{\hv@floatType}[!p]
- \fi
- \edef\@captype{hvp\@captype}%
- \capstart
- \refstepcounter{\@captype}%
- \expandafter\ifx\expandafter\relax\hv@label\relax\else
- \expandafter\label\expandafter{\hv@label}%
- \fi
- \ifhv@objectFrame\frame{\hv@floatObject}\else\hv@floatObject\fi
- \if@hvstar
- \end{\hv@floatType*}%
- \else
- \end{\hv@floatType}%
- \fi
-%
- \begin{\hv@floatType}[!b]
- \capstart
- \belowcaptionskip=0pt% local change
- \ifhv@separatorLine\drawSepLine\fi
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption{\hv@longCap}%
- \else
- \caption[\hv@shortCap]{\hv@longCap}%
- \fi
- \expandafter\ifx\expandafter\relax\hv@label\relax\else
- \label{\hv@label-cap}
- \fi
- \end{\hv@floatType}%
-}
-%
\def\do@@@@hvFloat{% special float page: caption <-> fullpage image
-% \typeout{hvfloat: \hvSet@capPos}%
-% \ifoddpage\typeout{hvfloat: Oddpage}\else\typeout{hvfloat: Evenpage}\fi
\ifx\hvSet@capPos\hv@Right \hv@@capPos=1
\else
\ifx\hvSet@capPos\hv@Even \hv@@capPos=2
@@ -623,59 +612,98 @@
\else
\ifx\hvSet@capPos\hv@Outer \hv@@capPos=5
\else
- \hv@@capPos=0
+ \ifx\hvSet@capPos\hv@RIGHT \hv@@capPos=6
+ \else
+ \ifx\hvSet@capPos\hv@LEFT \hv@@capPos=7
+ \else
+ \hv@@capPos=0
+ \fi
+ \fi
\fi
\fi
\fi
\fi
\fi
+%\ifhv@multiFloat\typeout{>>>>do@@@@hvFloat: multiFloatTRUE}\else\typeout{>>>>do@@@@hvFloat: multiFloatFALSE}\fi
\checkoddpage
- \ifcase\hv@@capPos% caption before object 0->left
- \if@twocolumn
- \if@firstcolumn
- \ifhv@FullPage\afterpage{\set@caption@object}\else\set@caption@object\fi
- \else
- \afterpage{\set@caption@object}%
- \fi
- \else
+ \ifcase\hv@@capPos% caption before object 0-> _always_ left
+ \set@caption@object
+ \or% caption after object 1-> _always_ right
+ \set@object@caption
+ \or% caption on even page 2-> left page
+ \ifoddpage
+ \afterpage{\set@caption@object}%
+ \else% we are on an even page
\set@caption@object
\fi
- \or% caption after object 1->right
- \if@twocolumn
- \if@firstcolumn
- \afterpage{\null\afterpage{\set@object@caption}}%
- \else
- \set@object@caption%
- \fi
- \else
- \set@object@caption
- \fi
- \or% caption on even page 2->left page
- \ifoddpage\set@object@caption\else\set@caption@object\fi
\or% caption on odd page 3->right page
- \ifoddpage\set@caption@object\else\afterpage{\set@caption@object}\fi
- \or% caption on the inner column 4->inner
- \if@twocolumn
- \ifoddpage
- \if@firstcolumn
- \set@caption@object
+ \if@twoside
+ \if@twocolumn
+ \ifoddpage
+ \if@firstcolumn% on right side
+ \set@caption@object
+ \else
+ \afterpage{\null\set@object@caption}% start next column
+ \fi
+ \else% left (even) page
+ \if@firstcolumn
+ \afterpage{\set@object@caption}% start next column
+ \else
+ \set@object@caption
+ \fi
+ \fi
+ \else % onecolumn
+ \ifoddpage
+ \set@object@caption
\else
- \afterpage{\set@object@caption}%
+ \afterpage{\set@object@caption}
\fi
- \else% even page (left)
- \afterpage{%
- \if@firstcolumn
+ \fi
+ \else % oneside
+ \if@twocolumn
+ \ifoddpage
+ \if@firstcolumn% on right side
\set@caption@object
\else
- \afterpage{\set@caption@object}%
+ \set@object@caption%
+ \fi
+ \else
+ \if@firstcolumn% on left side
+ \afterpage{\set@object@caption}
+ \else
+ \set@object@caption%
\fi
- }%
+ \fi
+ \else % onecolumn
+ \ifoddpage
+ \set@caption@object
+ \else
+ \set@object@caption
+ \fi
+ \fi
+ \fi
+ \or% caption on the inner column 4->inner
+ \if@twocolumn
+ \ifoddpage
+ \set@object@caption
+ \else
+ \if@firstcolumn% on right side
+ \afterpage{\null\set@caption@object}% start next column
+ \else% left page/column
+ \set@caption@object
+ \fi
\fi
+ \else % onecolumn
+ \set@caption@object
\fi
- \or% caption on the outer column
+ \or% caption on the outer column 5->outer
\if@twocolumn
\ifoddpage
- \afterpage{\if@firstcolumn\set@caption@object\else\afterpage{\set@caption@object}\fi}%
+ \if@firstcolumn
+ \afterpage{\null\set@caption@object}%
+ \else
+ \set@caption@object%
+ \fi
\else% even page (left)
\if@firstcolumn
\set@caption@object
@@ -683,11 +711,248 @@
\afterpage{\set@object@caption}%
\fi
\fi
+ \else
+ \set@caption@object
\fi
+ \or% caption after object 6->RIGHT for twoside/twocolumn
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\set@object@caption}%
+ \else
+ \set@object@caption
+ \fi
+ \else% always caption _after_ object for onecolumn
+ \set@object@caption
+ \fi
+ \or% caption before object 7->LEFT for twoside/twocolumn
+ \if@twocolumn
+ \if@firstcolumn
+ \set@caption@object
+ \else
+ \afterpage{\set@caption@object}
+ \fi
+ \else% onecolumn
+ \ifoddpage
+ \afterpage{\set@caption@object}%
+ \else
+ \set@caption@object
+ \fi
+ \fi
\fi
\endgroup% startet at main \hvFloat
}%
%
+\ExplSyntaxOn
+
+\def\getMultiCaptionAndLabel{%}
+ \hv@cntb=\clist_count:N\l_clist_Type
+ \advance\hv@cntb by \@ne
+ \hv@cnta=1
+ \begingroup
+ \loop
+ \edef\@captype{\clist_item:Nn\l_clist_Type{\hv@cnta}}
+ \edef\@tempa{\clist_item:Nn\l_clist_LofCaption{\hv@cnta}}%
+ \ifx\@tempa\@empty
+ \caption{\clist_item:Nn\l_clist_Caption{\hv@cnta}}%
+ \else
+ \expandafter\caption\expandafter[\@tempa]{\clist_item:Nn\l_clist_Caption{\hv@cnta}}%
+ \fi
+ \edef\@tempa{\clist_item:Nn\l_clist_Label{\hv@cnta}}%
+ \ifx\@tempa\@empty
+ \else
+ \expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{\hv@cnta}-cap}\fi
+ \advance\hv@cnta by \@ne
+ \ifnum\hv@cnta<\hv@cntb
+ \repeat
+ \endgroup
+}
+\def\getMultiObjectAndLabel{%
+ \hv@cntb=\clist_count:N\l_clist_Type
+ \advance\hv@cntb by \@ne
+ \hv@cnta=1
+% \clist_show:N\l_clist_Label
+% ist bereits gesetzt! \edef\@captype{hv@p\@captype}
+ \loop
+ \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}%
+ \ifhv@objectFrame\frame{\@temp}\else\@temp\fi
+ \edef\@tempa{\clist_item:Nn\l_clist_Label{\hv@cnta}}%
+ \ifx\@tempa\@empty
+ \else
+ \refstepcounter{\@captype}%
+ \expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{\hv@cnta}}%
+ \fi
+ \ifnum\hv@cnta<\clist_count:N\l_clist_Type\par\hv@vskip\fi
+ \advance\hv@cnta by \@ne
+ \ifnum\hv@cnta<\hv@cntb
+ \repeat
+}
+
+\def\getMultiSubCaptionAndLabel{%
+ \xdef\@captype{\clist_item:Nn\l_clist_Type{1}}% the same for all subfloats
+ \edef\@tempa{\clist_item:Nn\l_clist_LofCaption{1}}%
+ \ifx\@tempa\@empty
+ \caption{\clist_item:Nn\l_clist_Caption{1}}%
+ \else
+ \expandafter\caption\expandafter[\@tempa]{\clist_item:Nn\l_clist_Caption{1}}%
+ \fi
+ \edef\@tempa{\clist_item:Nn\l_clist_Label{1}}%
+ \ifx\@tempa\@empty\else\expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{1}-cap}\fi
+}
+
+\def\getMultiSubObjectAndLabel{%
+% \clist_show:N\l_clist_Object
+ \hv@cntb=\clist_count:N\l_clist_Caption
+ \advance\hv@cntb by \@ne
+ \hv@cnta=2
+ \loop
+ \begingroup
+ \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}%
+ \ifhv@objectFrame\frame{\@temp}\else\@temp\fi
+ \edef\@tempa{\clist_item:Nn\l_clist_LofCaption{\hv@cnta}}%
+ \ifx\@tempa\@empty
+ \subcaption{\clist_item:Nn\l_clist_Caption{\hv@cnta}}%
+ \else
+ \expandafter\subcaption\expandafter[\@tempa]{\clist_item:Nn\l_clist_Caption{\hv@cnta}}%
+ \fi
+ \edef\@tempa{\clist_item:Nn\l_clist_Label{\hv@cnta}}%
+ \ifx\@tempa\@empty
+ \else
+ \expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{\hv@cnta}}%
+ \fi
+ \endgroup
+ \ifnum\hv@cnta<\clist_count:N\l_clist_Type\par\hv@vskip\fi
+ \advance\hv@cnta by \@ne
+ \ifnum\hv@cnta<\hv@cntb
+ \repeat
+ \edef\@tempa{\clist_item:Nn\l_clist_Label{1}}% the main label at the end
+ \ifx\@tempa\@empty
+ \else
+%\typeout{>>>>>>>>>>>>>>>>>>>>>>>>>\@captype}%
+% bereits gesetzt \edef\@captype{hv@p\@captype}
+ \refstepcounter{\@captype}
+ \expandafter\label\expandafter{\@tempa}%
+ \fi
+}
+
+\ExplSyntaxOff
+\def\set@caption@object{% first caption, then object
+ \begin{\hv@floatType}[!b]
+% \capstart
+ \belowcaptionskip=0pt% local change
+ \ifhv@separatorLine\drawSepLine\fi
+ \ifhv@multiFloat
+% \edef\@captype{hv@p\@captype}
+ \getMultiCaptionAndLabel
+ \else
+ \ifhv@subFloat
+ \getMultiSubCaptionAndLabel
+ \else
+ \expandafter\ifx\expandafter\relax\hv@shortCap\relax
+ \caption{\hv@longCap}%
+ \else
+ \caption[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \expandafter\ifx\expandafter\relax\hv@label\relax\else
+ \label{\hv@label-cap}
+ \fi
+ \fi
+ \fi
+ \end{\hv@floatType}%
+%
+ \ifhv@star
+ \begin{\hv@floatType*}[!p]
+ \else
+ \begin{\hv@floatType}[!p]
+ \fi
+% \ifhv@subFloat
+% \else
+ \edef\@captype{hv@p\@captype}
+% \fi
+% \capstart
+ \ifx\hvSet@objectPos\hv@Right\raggedleft\else
+ \ifx\hvSet@objectPos\hv@Left\raggedleft\else
+ \ifx\hvSet@objectPos\hv@Center\centering
+ \fi\fi\fi
+ \ifhv@multiFloat
+ \getMultiObjectAndLabel
+ \else
+ \ifhv@subFloat
+ \getMultiSubObjectAndLabel
+ \else
+ \refstepcounter{\@captype}%
+ \ifhv@objectFrame\frame{\hv@floatObject}\else\hv@floatObject\fi
+ \expandafter\ifx\expandafter\relax\hv@label\relax
+ \else
+ \expandafter\label\expandafter{\hv@label}%
+ \fi
+ \fi
+ \fi
+ \ifhv@star
+ \end{\hv@floatType*}%
+ \else
+ \end{\hv@floatType}%
+ \fi
+}
+\def\set@object@caption{% first object, then caption
+%\ifhv@multiFloat\typeout{>>>>set@object@caption: multiFloatTRUE}\else\typeout{>>>>set@object@caption: multiFloatFALSE}\fi
+ \ifhv@star
+ \begin{\hv@floatType*}[!p]
+ \else
+ \begin{\hv@floatType}[!p]
+ \fi
+% \ifhv@subFloat
+% \else
+% \edef\@captype{hv@p\@captype}
+% \fi
+% \capstart
+ \ifx\hvSet@objectPos\hv@Right\raggedleft\else
+ \ifx\hvSet@objectPos\hv@Left\raggedleft\else
+ \ifx\hvSet@objectPos\hv@Center\centering
+ \fi\fi\fi
+ \ifhv@multiFloat
+ \edef\@captype{hv@p\@captype}
+ \getMultiObjectAndLabel
+ \else
+ \ifhv@subFloat
+ \getMultiSubObjectAndLabel
+ \else
+ \edef\@captype{hv@p\@captype}%
+ \ifhv@objectFrame\frame{\hv@floatObject}\else\hv@floatObject\fi
+ \refstepcounter{\@captype}%
+ \expandafter\ifx\expandafter\relax\hv@label\relax\else
+ \expandafter\label\expandafter{\hv@label}%
+ \fi
+ \fi
+ \fi
+ \ifhv@star
+ \end{\hv@floatType*}%
+ \else
+ \end{\hv@floatType}%
+ \fi
+%
+ \begin{\hv@floatType}[!b]
+% \capstart
+ \belowcaptionskip=0pt% local change
+ \ifhv@separatorLine\drawSepLine\fi
+ \ifhv@multiFloat
+ \getMultiCaptionAndLabel
+ \else
+ \ifhv@subFloat
+ \getMultiSubCaptionAndLabel
+ \else
+ \expandafter\ifx\expandafter\relax\hv@shortCap\relax
+ \caption{\hv@longCap}%
+ \else
+ \caption[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \expandafter\ifx\expandafter\relax\hv@label\relax\else
+ \label{\hv@label-cap}
+ \fi
+ \fi
+ \fi
+ \end{\hv@floatType}%
+}
+%
\endinput