From a538e0c7c47ec0e5a275e4d86ea8e748a3854346 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Apr 2019 21:12:09 +0000 Subject: hvfloat (2apr19) git-svn-id: svn://tug.org/texlive/trunk@50712 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty | 490 ++++++++++++------------ 1 file changed, 243 insertions(+), 247 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty index 3a9e26e91dd..c5a2e2bc77c 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 988 2019-03-20 21:34:05Z herbert $ +%% $Id: hvfloat.sty 1009 2019-04-01 12:44:03Z herbert $ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hvfloat}[2019/02/03 rotating of floating objects] @@ -16,8 +16,8 @@ %% DESCRIPTION: %% `hvfloat' offers rotating of captions and objects for floats %% -\def\fileversion{2.10} -\def\filedate{2019/03/20} +\def\fileversion{2.11} +\def\filedate{2019/04/01} \message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)} % \newif\ifhv@fbox \hv@fboxfalse @@ -31,6 +31,7 @@ \RequirePackage{caption} \PassOptionsToPackage{hypcap}{subcaption} \RequirePackage{subcaption} +\RequirePackage{atbegshi} \ifhv@hyperref \RequirePackage{hyperref} % \RequirePackage{hypcap} @@ -54,20 +55,25 @@ \newsavebox\hvObjectBox \newsavebox\hvCaptionBox \newsavebox\hvOBox +\newsavebox\@tempbox +\newsavebox\hv@caption@box + % \newif\ifhv@capbeside \hv@capbesidefalse -\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} -\def\hv@Even{e} -\def\hv@Odd{d} +\def\hv@Top{top} +\def\hv@Bottom{bottom} +\def\hv@After{after} +\def\hv@Before{before} +\def\hv@Right{right} +\def\hv@RIGHT{RIGHT} +\def\hv@Left{left} +\def\hv@LEFT{LEFT} +\def\hv@Center{center} +\def\hv@Outer{outer} +\def\hv@Inner{inner} +\def\hv@Even{evenPage} +\def\hv@Odd{oddPage} \def\hv@Natural{n} \def\hv@Width{w} \def\hv@Height{h} @@ -88,7 +94,7 @@ \define@key{hvSet}{capAngle}[0]{% -360..+360 \def\hvSet@capAngle{#1}% } -\define@key{hvSet}{capPos}[b]{% (l)eft|(b)ottom|(t)op|(r)ight|(i)nner|(o)uter|(e)ven|o(d)d +\define@key{hvSet}{capPos}[bottom]{% (l)eft|(b)ottom|(t)op|(r)ight|(i)nner|(o)uter|(e)ven|o(d)d \def\hvSet@capPos{#1}% it is relativ to the object, (e),(d) only valid for fullpage float \edef\@tempa{#1}% \ifx\hv@Bottom\@tempa @@ -101,10 +107,10 @@ \fi \fi } -\define@key{hvSet}{capVPos}[c]{% (b)ottom|(c)enter|(t)op +\define@key{hvSet}{capVPos}[center]{% bottom|center|top \def\hvSet@capVPos{#1}% it is relativ to the object } -\define@key{hvSet}{objectPos}[c]{% (l)eft|(c)enter|(r)ight|(i)nner|(o)uter +\define@key{hvSet}{objectPos}[center]{% (l)eft|(c)enter|(r)ight|(i)nner|(o)uter \def\hvSet@objectPos{#1}% it is relativ to the document } \define@key{hvSet}{objectAngle}[0]{% -360..+360 @@ -121,7 +127,8 @@ \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@]{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% }% @@ -146,15 +153,17 @@ \newcommand{\setDefaults}{% \hv@set{% floatPos=htbp, rotAngle=0, capWidth=n, capAngle=0, - capPos=b, capVPos=c, objectPos=c, objectAngle=0, + capPos=bottom, capVPos=center, objectPos=center, objectAngle=0, floatCapSep=5, useOBox=false, nonFloat=false, - onlyText=false, wide=false, fullpage=false, FullPage=false, + onlyText=false, wide=false, fullpage=false, %FullPage=false, + FULLPAGE=false, multiFloat=false,subFloat=false, separatorLine,objectFrame=false,multiFloatSkip=\normalbaselineskip, }% } \newcommand\reset@special@float{% - \hv@set{subFloat=false,fullpage=false,FullPage=false,multiFloat=false}} + \hv@set{subFloat=false,fullpage=false,%FullPage=false, + multiFloat=false,FULLPAGE=false}} \def\hv@vskip{\vspace{\hvMultiFloatSkip}} @@ -197,15 +206,10 @@ \def\Gin@eheight{\textheight}% \Gin@boolkey{false}{iso}% } -\newcommand\IncludeGraphics[2][]{% - \checkoddpage - \vspace*{\the\dimexpr-1in-\voffset+\topskip-\headheight-0.5\baselineskip}% - \ifoddpage - \hspace*{\dimexpr-\oddsidemargin-\parindent-1in}% - \else - \hspace*{\dimexpr-\evensidemargin-\parindent-1in}% - \fi - \includegraphics[#1,width=\paperwidth,height=\paperheight,keepaspectratio=false]{#2}% +\define@key{Gin}{FULLPAGE}[true]{% + \def\Gin@ewidth{\paperwidth}% + \def\Gin@eheight{\paperheight}% + \Gin@boolkey{false}{iso}% } \newcommand\put@CaptionBox[1][0]{% @@ -277,7 +281,6 @@ \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]}} @@ -333,7 +336,7 @@ \newcounter{subhv@ptable} \def\drawSepLine{% - \noindent + \par\noindent \if@twocolumn\rule{\columnwidth}{0.4pt}\else\rule{\linewidth}{0.4pt}\fi \vspace{0pt}% } @@ -359,7 +362,12 @@ \def\hvSet@CapWidth{n}% relative value \do@@@@hvFloat% fullpage with caption on other page \else - \do@@@hvFloat + \ifhv@FULLPAGE + \def\hvSet@CapWidth{n}% relative value + \do@@@@hvFloat% fullpage with caption on other page + \else + \do@@@hvFloat + \fi \fi } % @@ -601,8 +609,17 @@ {\minipage{#1}\center} {\endcenter\endminipage} % + +\ExplSyntaxOn +\let\clist@item@Nn\clist_item:Nn +\let\l@clist@Type\l_clist_Type +\let\l@clist@LofCaption\l_clist_LofCaption +\let\l@clist@Label\l_clist_Label +\let\clist@count@N\clist_count:N +\ExplSyntaxOff + \def\do@@@@hvFloat{% special float page: caption <-> fullpage image - \ifx\hvSet@capPos\hv@Right \hv@@capPos=1 + \ifx\hvSet@capPos\hv@After \hv@@capPos=1 \else \ifx\hvSet@capPos\hv@Even \hv@@capPos=2 \else @@ -624,118 +641,124 @@ \fi \fi \fi -%\ifhv@multiFloat\typeout{>>>>do@@@@hvFloat: multiFloatTRUE}\else\typeout{>>>>do@@@@hvFloat: multiFloatFALSE}\fi \checkoddpage - \ifcase\hv@@capPos% caption before object 0-> _always_ left - \set@caption@object + \set@caption@object% set caption and object into a box + \ifcase\hv@@capPos% caption before object 0-> _always_ left + \setBottomCaption\setPageObject \or% caption after object 1-> _always_ right - \set@object@caption + \setPageObject\setBottomCaption \or% caption on even page 2-> left page \ifoddpage - \afterpage{\set@caption@object}% + \afterpage{\setBottomCaption\setPageObject}% \else% we are on an even page - \set@caption@object + \setBottomCaption\setPageObject \fi \or% caption on odd page 3->right page \if@twoside \if@twocolumn \ifoddpage \if@firstcolumn% on right side - \set@caption@object + \setBottomCaption\setPageObject \else - \afterpage{\null\set@object@caption}% start next column + \afterpage{\setPageObject\setBottomCaption}% start next column \fi \else% left (even) page \if@firstcolumn - \afterpage{\set@object@caption}% start next column + \afterpage{\setPageObject\setBottomCaption}% start next column \else - \set@object@caption + \setPageObject\setBottomCaption \fi \fi \else % onecolumn \ifoddpage - \set@object@caption + \setPageObject\setBottomCaption \else - \afterpage{\set@object@caption} + \afterpage{\setPageObject\setBottomCaption}% \fi \fi \else % oneside \if@twocolumn \ifoddpage \if@firstcolumn% on right side - \set@caption@object + \setBottomCaption\setPageObject \else - \set@object@caption% + \setPageObject\setBottomCaption \fi \else \if@firstcolumn% on left side - \afterpage{\set@object@caption} + \afterpage{\setPageObject\setBottomCaption}% \else - \set@object@caption% + \setPageObject\setBottomCaption \fi \fi \else % onecolumn \ifoddpage - \set@caption@object + \setBottomCaption\setPageObject \else - \set@object@caption + \afterpage{\setBottomCaption\setPageObject}% \fi \fi \fi \or% caption on the inner column 4->inner + \set@caption@object \if@twocolumn \ifoddpage - \set@object@caption - \else \if@firstcolumn% on right side - \afterpage{\null\set@caption@object}% start next column + \setBottomCaption\setPageObject + \else % right column on right side + \setPageObject\setBottomCaption% start next firstcolumn next page + \fi + \else + \if@firstcolumn% on left side + \afterpage{\setBottomCaption\setPageObject}% start next page/first column \else% left page/column - \set@caption@object + \setBottomCaption\setPageObject% start same page \fi \fi \else % onecolumn - \set@caption@object + \setBottomCaption\setPageObject \fi \or% caption on the outer column 5->outer + \set@caption@object \if@twocolumn \ifoddpage \if@firstcolumn - \afterpage{\null\set@caption@object}% + \afterpage{\afterpage{\setBottomCaption\setPageObject}}% \else - \set@caption@object% + \afterpage{\setBottomCaption\setPageObject}% \fi \else% even page (left) \if@firstcolumn - \set@caption@object + \setBottomCaption\setPageObject \else - \afterpage{\set@object@caption}% + \afterpage{\setBottomCaption\setPageObject}% \fi \fi - \else - \set@caption@object - \fi + \else% onecolumn + \setBottomCaption\setPageObject + \fi \or% caption after object 6->RIGHT for twoside/twocolumn \if@twocolumn \if@firstcolumn - \afterpage{\set@object@caption}% + \afterpage{\setPageObject\setBottomCaption}% \else - \set@object@caption + \setPageObject\setBottomCaption \fi \else% always caption _after_ object for onecolumn - \set@object@caption + \setPageObject\setBottomCaption \fi \or% caption before object 7->LEFT for twoside/twocolumn \if@twocolumn \if@firstcolumn - \set@caption@object + \setPageObject\setBottomCaption \else - \afterpage{\set@caption@object} + \afterpage{\setBottomCaption\setPageObject} \fi \else% onecolumn \ifoddpage - \afterpage{\set@caption@object}% + \afterpage{\setBottomCaption\setPageObject}% \else - \set@caption@object + \setBottomCaption\setPageObject \fi \fi \fi @@ -743,216 +766,189 @@ }% % -\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\setBottomCaption{% + \begin{\hv@floatType}[!b] + \ifhv@separatorLine\drawSepLine\fi + \par + \usebox\hvCaptionBox + \end{\hv@floatType}% } -\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 + +\def\setPageObject{% + \ifhv@star + \begin{\hv@floatType*}[p]% + \else + \begin{\hv@floatType}[p]% + \fi + \ifhv@FULLPAGE + \vspace*{\the\dimexpr-1in-\voffset+\topskip-\headheight-0.5\baselineskip}% + \if@twoside + \leavevmode\checkoddpage + \ifoddpage + \hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}% + \else + \hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}% + \fi \else - \refstepcounter{\@captype}% - \expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{\hv@cnta}}% + \hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}% \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 + \put(0,0){\usebox\hvObjectBox}% + \AtBeginShipoutNext{\thispagestyle{empty}}% + \else + \usebox\hvObjectBox + \fi + \ifhv@star + \end{\hv@floatType*}% + \else + \end{\hv@floatType}% + \fi } -\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 +\ExplSyntaxOn + +\def\getMultiCaptionAndLabel{% + \global\sbox\hvCaptionBox{\minipage[b]{\linewidth}% + \setlength\belowcaptionskip{10pt}% + \setlength\abovecaptionskip{0pt}% + \hv@cntb=\clist_count:N\l_clist_Type + \advance\hv@cntb by \@ne + \hv@cnta=1 + \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 + \endminipage}% +} +\def\getMultiObjectAndLabel{% + \global\sbox\hvObjectBox{\minipage{\linewidth}% + \ifx\hvSet@objectPos\hv@Right\raggedleft\else + \ifx\hvSet@objectPos\hv@Left\raggedleft\else + \ifx\hvSet@objectPos\hv@Center\centering + \fi\fi\fi + \hv@cntb=\clist_count:N\l_clist_Type + \advance\hv@cntb by \@ne + \hv@cnta=1 + \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 + \endminipage}% } -\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}}% +\def\getMultiSubCaptionAndLabel{% + \global\sbox\hvCaptionBox{\minipage{\linewidth}% + \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 - \subcaption{\clist_item:Nn\l_clist_Caption{\hv@cnta}}% + \caption{\clist_item:Nn\l_clist_Caption{1}}% \else - \expandafter\subcaption\expandafter[\@tempa]{\clist_item:Nn\l_clist_Caption{\hv@cnta}}% + \expandafter\caption\expandafter[\@tempa]{\clist_item:Nn\l_clist_Caption{1}}% \fi - \edef\@tempa{\clist_item:Nn\l_clist_Label{\hv@cnta}}% + \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 + \endminipage}% +} + +\def\getMultiSubObjectAndLabel{% + \global\sbox\hvObjectBox{\minipage{\linewidth}% + \ifx\hvSet@objectPos\hv@Right\raggedleft\else + \ifx\hvSet@objectPos\hv@Left\raggedleft\else + \ifx\hvSet@objectPos\hv@Center\centering + \fi\fi\fi + \hv@cntb=\clist_count:N\l_clist_Caption + \advance\hv@cntb by \@ne + \hv@cnta=2 + \xdef\@captype{\clist_item:Nn\l_clist_Type{1}}% the same for all subfloats + \loop + \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}% + \ifhv@objectFrame\frame{\@temp}\else\@temp\fi + \begingroup + \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 - \expandafter\label\expandafter{\clist_item:Nn\l_clist_Label{\hv@cnta}}% + \refstepcounter{\@captype} + \expandafter\label\expandafter{\@tempa}% \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 + \endminipage}% } \ExplSyntaxOff +\def\getSingleCaptionAndLabel{% + \global\sbox\hvCaptionBox{\minipage{\linewidth}% + \edef\@captype{\hv@floatType}% + \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 + \endminipage}% +} + \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 + \getSingleCaptionAndLabel \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 + \edef\@captype{hv@p\hv@floatType}% \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 + \global\sbox\hvObjectBox{% + \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 - \end{\hv@floatType}% } % \endinput -- cgit v1.2.3