summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty576
1 files changed, 375 insertions, 201 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index 59bfd20a45e..66a354eae60 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 92 2021-05-18 09:46:55Z herbert $
+%% $Id: hvfloat.sty 103 2021-05-31 12:37:11Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,26 +15,35 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.25}
-\def\filedate{2021/05/18}
+\def\fileversion{2.26}
+\def\filedate{2021/05/26}
\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
\let\hvFloatFileVersion\fileversion
%
\newif\ifhv@fbox \hv@fboxfalse
\newif\ifhv@hyperref \hv@hyperreffalse
-\newif\ifhv@stfloats \hv@stfloatsfalse
+\newif\ifhv@nostfloats \hv@nostfloatsfalse
+\newif\ifhv@tugboat \hv@tugboatfalse
\DeclareOption{fbox}{\hv@fboxtrue\setlength{\fboxsep}{1pt}}
\DeclareOption{hyperref}{\hv@hyperreftrue}
-\DeclareOption{stfloats}{\hv@stfloatstrue}
+\DeclareOption{nostfloats}{\hv@nostfloatstrue}
\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}
\PassOptionsToPackage{hypcap}{subcaption}
\RequirePackage{subcaption}
+\RequirePackage{atbegshi}
\RequirePackage{picture,trimclip}
\RequirePackage{expl3,multido}
@@ -47,7 +56,7 @@
\ifhv@hyperref
\RequirePackage{hyperref}
\fi
-\ifhv@stfloats
+\ifhv@nostfloats\else
\RequirePackage{stfloats}% for bottom floats in a twocolumn mode
\fi
%
@@ -99,12 +108,12 @@
\define@key{hvSet}{capWidth}[n]{% (n)atural width|object (w)idth)|object (h)eight|<scale of \columnwidth>
\def\hvSet@capWidth{#1}%
}
-\define@key{hvSet}{capAngle}[0]{% -360..+360
+\define@key{hvSet}{capAngle}[0]{% -360..+360, only integers
\def\hvSet@capAngle{#1}%
}
-\define@choicekey*+{hvSet}{capPos}[\val\nr]{bottom,top,left,before,right,after,inner,outer,even,odd}[bottom]{%
+\define@choicekey*+{hvSet}{capPos}[\val\nr]{bottom,top,left,before,right,after,inner,outer,evenPage,oddPage}[bottom]{%
\def\hvSet@capPos{#1}% it is relativ to the object, (e),(d) only valid for fullpage float
\ifcase\nr\relax
\hv@capbesidefalse
@@ -120,6 +129,13 @@
\define@choicekey*+{hvSet}{capVPos}[\val\nr]{bottom,center,top}[center]{%
\def\hvSet@capVPos{#1}% it is relativ to the object
+ \ifcase\nr\relax
+ \gdef\hv@@capVPos{b}%
+ \or
+ \gdef\hv@@capVPos{c}%
+ \else
+ \gdef\hv@@capVPos{t}%
+ \fi
}{\PackageWarning{hvfloat}{erroneous input (#1) for capVPos ignored. Using bottom.}%
\def\hvSet@capVPos{center}% it is relativ to the object
}
@@ -164,7 +180,7 @@
}
\define@boolkey{hvSet}[hv@]{Debug}[true]{}% give more infos in the terminal
-\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{#1}\fi}
+\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi}
\newif\ifhv@fullpage
\newif\ifhv@FULLPAGE
@@ -190,8 +206,10 @@
\ifhv@subFloat\setkeys{hvSet}{multiFloat=false}\fi%
}%
\define@boolkey{hvSet}[hv@]{multiFloat}[true]{% typeset values as continous floats
- \ifhv@multiFloat\setkeys{hvSet}{subFloat=false}\fi%
+ \ifhv@multiFloat\setkeys{hvSet}{subFloat=false}\fi
}%
+\define@boolkey{hvSet}[hv@]{vFill}[true]{}% \vfill between multifloat objects
+
\define@boolkey{hvSet}[hv@]{separatorLine}[true]{}% separator line for caption of a full page float
\define@key{hvSet}{sepLineskip}{\def\hv@sepLineskip{#1}}%
\define@boolkey{hvSet}[hv@]{objectFrame}[true]{}% a frame around the object with no separation
@@ -222,6 +240,7 @@
capFormat={}, subcapFormat={}, twoColumnCaption=false,
% floatRef=object,
bindCorr=\z@,sepLineskip=0pt,
+ vFill=false,
}%
}
@@ -270,6 +289,11 @@
\newlength\hv@maxImageWidth
\AtBeginDocument{\hv@maxImageWidth=\columnwidth}
+\define@key{Gin}{columnWidth}[true]{%
+ \def\Gin@ewidth{\columnwidth}%
+% \def\Gin@eheight{1ex}%
+ \Gin@boolkey{true}{iso}%
+}
\define@key{Gin}{fullpage}[true]{%
\def\Gin@ewidth{\columnwidth}%
\def\Gin@eheight{\textheight}%
@@ -291,7 +315,7 @@
\Gin@boolkey{false}{iso}%
}
\define@key{Gin}{doubleFULLPAGEbindCorr}[true]{%
- \def\Gin@ewidth{\the\dimexpr2\paperwidth-2\hvSet@bindCorrection}%
+ \def\Gin@ewidth{\the\dimexpr2\paperwidth-2\hvSet@bindCorrection\relax}%
\def\Gin@eheight{\paperheight}%
\Gin@boolkey{false}{iso}%
}
@@ -342,11 +366,22 @@
\ifhv@fbox
\fbox{\usebox{\hvObjectBox}}%
\else
- \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi%
+ % rotated object with a depth need to raise up the \depth
+ \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\raisebox{\depth}{\usebox{\hvObjectBox}}\fi%
\fi
\fi
}
+\newcounter{hv@tempCNTfigA}%
+\newcounter{hv@tempCNTfigB}%
+\newcounter{hv@tempCNTtabA}%
+\newcounter{hv@tempCNTtabB}%
+
+\newcounter{hv@pfigure}
+\newcounter{hv@ptable}
+\newcounter{subhv@pfigure}
+\newcounter{subhv@ptable}
+
\newif\ifhv@star
\newif\if@hvsubstar
\setDefaults
@@ -367,15 +402,20 @@
\def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}}
\def\do@hvFloat[#1]{%
\begingroup
- \setlength\hvWideWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}%
+ \setlength\hvWideWidth{\dimexpr\columnwidth+\marginparwidth+\marginparsep}%
+% \setlength\hvWideWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}%
% \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}}%
\gdef\hv@save@setting{#1}%
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
- \gdef\hv@floatType{figure}%
+ \gdef\hv@floatType{figure}% presetting
\@ifnextchar+{\do@multiFloat}{\hvFloat@ii[#1]}%
}
@@ -425,14 +465,6 @@
\ExplSyntaxOff
-\newcounter{hv@tempCNTa}\setcounter{hv@tempCNTa}{0}% defined after \refstepcounter{figure}
-\newcounter{hv@tempCNTb}\setcounter{hv@tempCNTb}{0}% defined before \refstepcounter{figure}
-\def\thehv@tempCNTa{\arabic{figure}}
-\def\thehv@tempCNTb{\the\numexpr\arabic{figure}+1}
-\newcounter{hv@pfigure}
-\newcounter{hv@ptable}
-\newcounter{subhv@pfigure}
-\newcounter{subhv@ptable}
\def\drawSepLine{%
\par\noindent
@@ -503,10 +535,14 @@
%
% First we save the object in \hvObjectBox
%
- \ifx\hvSet@objectAngle\hv@Zero% rotate the object?
- \savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \ifnum\hvSet@objectAngle=0 % rotate the object?
+ \ifhv@useOBox
+ \let\hvObjectBox\hvOBox
+ \else
+ \savebox\hvObjectBox{\hv@floatObject}%
+ \fi
\else
- \savebox{\hvObjectBox}{%
+ \savebox\hvObjectBox{%
\rotatebox{\hvSet@objectAngle}{%
\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi
}%
@@ -559,25 +595,25 @@
\fi
\fi
\saveCaptionSkip% we put this space ourselve
- \ifx\hvSet@capAngle\hv@Zero% need rotation?
+ \ifnum\hvSet@capAngle=0 % need rotation?
\savebox\hvCaptionBox{% NO rotation
\begin{minipage}[b]{\hvCapWidth}%% minipage, to get hyphenation
- \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
+ \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifhv@nonFloat
\ifhv@onlyText
\hv@longCap
\else
\ifx\hv@floatType\hv@figure
\ifx\relax\hv@shortCap\relax
- \figcaption{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \figcaption{\hv@longCap}%
\else
- \figcaption[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \figcaption[\hv@shortCap]{\hv@longCap}%
\fi
\else
\ifx\relax\hv@shortCap\relax
- \tabcaption{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \tabcaption{\hv@longCap}%
\else
- \tabcaption[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \tabcaption[\hv@shortCap]{\hv@longCap}%
\fi
\fi
\fi
@@ -586,15 +622,10 @@
\hv@longCap
\else
\let\@captype\hv@floatType
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
- \else
- \caption[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
- \fi
-% \fi
+ \ifx\hv@shortCap\@empty\caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}\fi
\fi
\fi
-% \expandafter\label\expandafter{\hv@label}% 2.17 put label into the caption argument
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\end{minipage}%
}%
\else
@@ -617,12 +648,11 @@
\hv@longCap
\else
\let\@captype\hv@floatType
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}%
+ \ifx\relax\hv@shortCap\relax \caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}%
\fi
\fi
\fi
- \label{\hv@label}%
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\end{minipage}%
}% rotatebox
}% \sbox
@@ -638,10 +668,15 @@
\@namedef{fps@\hv@floatType}{\hvSet@floatPos}%
\fi
\ifhv@nonFloat
+ \noindent
\begingroup% Start the nonfloat part
\else
\ifhv@star
- \@nameuse{\hv@floatType*}% Start the floating environment *****************************
+ \ifx\hvSet@floatPos\hv@floatBottom
+ \@nameuse{\hv@floatType*}[b]% Start the floating environment *****************************
+ \else
+ \@nameuse{\hv@floatType*}%
+ \fi
\else
\begin{\hv@floatType}% Start the floating environment
\fi
@@ -766,7 +801,28 @@
% now we rotate the object and caption, if needed
%
\ifhv@wide
- \ifoddpageoroneside\else\ifoddpage\else\hspace*{\dimexpr-\marginparwidth-\marginparsep}\fi\fi% <- for wide and left page
+ \ifoddpageoroneside
+ \if@twocolumn
+ \if@firstcolumn
+ \noindent
+ \hspace*{\dimexpr-\marginparwidth-\marginparsep}% oddpage first column
+ \fi
+ \fi
+ \else
+ \ifoddpage
+ \if@twocolumn
+ \if@firstcolumn
+ \noindent
+ \hspace*{\dimexpr-\marginparwidth-\marginparsep}% oddpage first column
+ \fi
+ \fi
+ \else% evenpage
+ \if@firstcolumn
+ \noindent
+ \hspace*{\dimexpr-\marginparwidth-\marginparsep}% <- for wide and left page
+ \fi
+ \fi
+ \fi
\fi
\ifx\hvSet@rotAngle\hv@Zero
\usebox{\@tempboxa}%
@@ -775,9 +831,9 @@
\fi
\ifhv@nonFloat
\ifx\hvSet@objectPos\hv@Center
- \ifhv@nonFloat
+% \ifhv@nonFloat
\hspace{\fill}%
- \fi
+% \fi
\fi
\endgroup% End the nonfloat part
\else
@@ -827,7 +883,7 @@
\fi
\fi
\checkoddpage
- \set@caption@object% set caption and object into a box
+ \set@caption@object{\hv@floatType}% 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
@@ -836,12 +892,7 @@
\ifoddpage
\afterpage{\setBottomCaption\setPageObject}%
\else% we are on an even page
-% \zsaveposy{hv@currentPos}%
-% \ifdim\the\dimexpr\zposy{hv@currentPos}sp-\hv@BottomSpace-1cm>\ht\TBox % enough space*
- \setBottomCaption\setPageObject
-% \else
-% \afterpage{\afterpage{\setBottomCaption\setPageObject}}%
-% \fi
+ \setBottomCaption\setPageObject
\fi
\or% caption on odd page 3->right page
\if@twoside
@@ -890,7 +941,7 @@
\fi
\fi
\or% caption on the inner column 4->inner
- \set@caption@object
+% \set@caption@object
\if@twocolumn
\ifoddpage
\if@firstcolumn% on right side
@@ -909,7 +960,7 @@
\setBottomCaption\setPageObject
\fi
\or% caption on the outer column 5->outer
- \set@caption@object
+% \set@caption@object
\if@twocolumn
\ifoddpage
\if@firstcolumn
@@ -957,78 +1008,122 @@
\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right page
% #1-> 0/1 caption under/right
\global\setlength\hv@leftPageObjectWidth{\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection}%
-% \global\setlength\hv@tempWidthA{\the\dimexpr-\oddsidemargin-1in-\parindent+\hvSet@bindCorrection}% the width of the right side offset
\global\setlength\hv@tempWidthA{\the\dimexpr-1in-\oddsidemargin+\hvSet@bindCorrection}%
+ \xdef\hv@@capAngle{\hvSet@capAngle}%
\checkoddpage
\ifoddpage
\if@twocolumn
\if@firstcolumn
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
\else
- \do@hvFloat@doublePageCaptionRight{#1}%
+ \ifhv@tugboat
+ \do@hvFloat@doublePageCaptionRight{#1}%
+ \else
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \fi
\fi
\else
- \do@hvFloat@doublePageCaptionRight{#1}%
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
\fi
\else
\if@twocolumn
\if@firstcolumn
- \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}%
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
\fi
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
\fi
\fi
\endgroup% started at main macro \hvFloat
}
%
\def\do@hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ----------------------------------
- \afterpage{%
- \let\hv@fptop\c@fptop
- \global\setlength{\@fptop}{0pt}%
- \let\hv@c@topnumber\c@topnumber
- \setcounter{topnumber}{1}%
- \begin{\hv@floatType*}[t]
- \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \end{\hv@floatType*}%
- \begin{\hv@floatType*}[t]
- \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \hspace*{\hv@tempWidthA}%
- \noindent
- \clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}%
- \ifnum#1>0
- \medskip
- \ifdim\dp\hvObjectBox > \z@
- \rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \fi
- }}%
- \else
- \rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \fi
- }}%
- \fi
- \else
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
- \fi
- \fi
- \end{\hv@floatType*}%
- \let\c@topnumber\hv@c@topnumber
- \let\c@fptop\hv@fptop
+ \let\hv@fptop\c@fptop
+ \global\setlength{\@fptop}{0pt}%
+ \let\hv@c@dbltopnumber\c@dbltopnumber
+ \setcounter{totalnumber}{0}%
+ \setcounter{dbltopnumber}{0}%
+ \def\dblfloatpagefraction{0.5}%
+ \begin{\hv@floatType*}[!thb]
+ \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
+ \ifx\hv@label\@empty
+ \else
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigA}%
+ \else
+ \refstepcounter{hv@tempCNTtabA}% before caption
+ \fi
+ \label{\hv@label}%
+ \fi
+ \end{\hv@floatType*}%
+ \afterpage{%
+ \begin{\hv@floatType*}[!thb]
+ \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \hspace*{\hv@tempWidthA}%
+ \noindent
+ \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}%
+ \global\setlength\hv@tempWidthB{\the\dimexpr\textwidth-\wd\hv@rightBox-\hv@tempWidthA-\marginparsep}%
+ \parbox[\hv@@capVPos]{\the\wd\hv@rightBox}{%
+ \vspace{0pt}%
+ \raisebox{\depth}{\usebox\hv@rightBox}%
+ }%
+ \ifx\hv@label\@empty\else
+ \ifx\hv@floatType\hv@figure
+ \global\refstepcounter{hv@tempCNTfigB}%
+ \else
+ \global\refstepcounter{hv@tempCNTtabB}% before caption
+ \fi
+ \label{\hv@label-2}%
+ \fi
+ \ifnum#1>0 % caption on the right
+% \medskip
+ \ifnum\hv@@capAngle > 0
+% \ifdim\dp\hvObjectBox > \z@
+% \rotatebox[origin=c]{\hv@@capAngle}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
+% \ifx\relax\hv@shortCap\relax
+% \captionof{\hv@floatType}{\hv@longCap}%
+% \else
+% \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+% \fi
+% \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
+% }}%
+% \else
+ \rotatebox[origin=c]{\hv@@capAngle}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+ \fi
+ }}%
+ \ifx\relax\hv@label\relax\else\label{\hv@label-cap}\fi
+% \fi
+ \else
+ \hspace{\marginparsep}%
+ \parbox[\hv@@capVPos]{\hv@tempWidthB}{%
+ \vspace{0pt}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\label{\hv@label-cap}\fi}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}
+ \fi
+ }%
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
+ \fi
+ \else % #1 = 0 caption below
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
+ \fi
+ \end{\hv@floatType*}%
}%
+ \let\c@topnumber\hv@c@topnumber
+ \let\c@fptop\hv@fptop
}
%
\newsavebox\hv@boxLeftPage
@@ -1050,6 +1145,8 @@
\if@twocolumn
\if@firstcolumn
\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \else
+ \do@hvFloat@doublePAGECaptionRight{#1}%
\fi
\else
\do@hvFloat@doublePAGECaptionRight{#1}%
@@ -1073,40 +1170,40 @@
\afterpage{%
\noindent
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \null
- \global\savebox\hv@boxLeftPage{\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}%
- \usebox\hv@boxLeftPage
+ \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\newpage\if@twocolumn\null\newpage\fi
\expandafter\global\expandafter\savebox\expandafter\hvObjectBox\expandafter{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\hspace*{-\dimexpr\hv@tempWidthA}%
\noindent
-% \usebox\hv@boxRightPage
\clipbox*{\the\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}%
\ifnum#1>0
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
}}%
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\else
\rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
}}%
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\fi
\else
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\fi
\newpage\if@twocolumn\null\newpage\fi
}%
@@ -1124,8 +1221,11 @@
\fi\fi
\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \global\setlength\hv@tempWidthA{\the\dimexpr-\oddsidemargin-1in-\parindent+\hvSet@bindCorrection}% the width of the right side offset
- \global\setlength\hv@leftPageObjectWidth{\the\dimexpr\paperwidth-\hvSet@bindCorrection}%
+ \global\setlength\hv@tempWidthA{\dimexpr-\oddsidemargin-1in-\parindent+\hvSet@bindCorrection}% the width of the right side offset
+ \global\setlength\hv@tempWidthB{\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox+2\hvSet@bindCorrection}%
+ \global\setlength\hv@leftPageObjectWidth{\dimexpr\paperwidth-\hvSet@bindCorrection}%
+% \savebox\hv@leftBox{\clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}}%
+% \savebox\hv@rightBox{\clipbox*{\the\hv@leftPageObjectWidth{} \depth{} \width{} \height}{\usebox\hvObjectBox}}%
\expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifoddpage
\ifcase\hv@@capPos % =0 Caption before
@@ -1137,29 +1237,40 @@
\else
\afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
\fi
- \else
+ \else% \if@firstcolumn
\set@Normal@Bottom@Caption
\do@hvFloat@doubleFULLPAGE@CaptionBefore
\fi
- \else
+ \else% \if@twocolumn
\set@Normal@Bottom@Caption
\do@hvFloat@doubleFULLPAGE@CaptionBefore
\fi
\or % =1 Caption after
\ifhv@twoColumnCaption
- \do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol
+ \if@firstcolumn
+ \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol}%
+ \else
+ \do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol
+ \fi
\else
- \do@hvFloat@doubleFULLPAGE@CaptionAfter
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter}%
+ \else
+ \do@hvFloat@doubleFULLPAGE@CaptionAfter
+ \fi
+ \else
+ \do@hvFloat@doubleFULLPAGE@CaptionAfter
+ \fi
\fi
- \else% >1 all other Captions
+ \else% \ifcase >1 all other Captions
\if@twocolumn
\if@firstcolumn
-% \global\setlength\hv@tempWidthA{\the\dimexpr-\evensidemargin-1in-\parindent+\hvSet@bindCorrection}%
\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}%
\else
\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}%
\fi
- \else % >1 Caption right/bottom
+ \else % \if@twocolumn
\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}%
\fi
\fi% \ifcase
@@ -1175,20 +1286,28 @@
\else
\afterpage{\afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore{#1}}}%
\fi
- \else
+ \else% \if@twocolumn
\afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
\fi
\or % capPos after
\if@twocolumn
\if@firstcolumn
- \afterpage{\afterpage\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter{#1}}}%
+ \ifhv@twoColumnCaption
+ \afterpage{\afterpage\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{#1}}}%
+ \else
+ \afterpage{\afterpage\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter{#1}}}%
+ \fi
\else
- \afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter{#1}}}%
+ \ifhv@twoColumnCaption
+ \afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{#1}}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter{#1}}}%
+ \fi
\fi
- \else
+ \else% \if@twocolumn
\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter}%
\fi
- \else % Any other caption
+ \else % \ifcase Any other caption
\if@twocolumn
\if@firstcolumn
\afterpage{\afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}}}%
@@ -1198,7 +1317,7 @@
\else
\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}%
\fi
- \fi%% \ifcase
+ \fi% \ifcase
\fi% main ifoddpage
\endgroup% started at main macro \hvFloat
}
@@ -1208,34 +1327,44 @@
\begin{\hv@floatType}[!b]
\ifhv@separatorLine\drawSepLine\fi
\expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\end{\hv@floatType}%
}
\def\set@Normal@Bottom@CaptionStar*{%
- \begin{\hv@floatType*}[!b]
- \ifhv@separatorLine\drawSepLine\fi
- \expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
- \else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
- \fi
- \end{\hv@floatType*}%
+ \begin{\hv@floatType*}[!b]
+ \ifhv@separatorLine\drawSepLine\fi
+ \expandafter\captionsetup\expandafter{\hv@caption@format}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
+ \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
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
\thispagestyle{empty}%
- \refstepcounter{hv@tempCNTa}%
+ \ifx\hv@floatType\hv@figure
+ \global\refstepcounter{hv@tempCNTfigB}%
+ \else
+ \global\refstepcounter{hv@tempCNTtabB}% before caption
+ \fi
\expandafter\label\expandafter{\hv@label}%
-%%% \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
\clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\afterpage{%
\if@twocolumn\newpage\null\newpage\fi
@@ -1245,7 +1374,11 @@
\hspace*{\hv@tempWidthA}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\clipbox*{\the\hv@leftPageObjectWidth{} \dp\hvObjectBox{} \wd\hvObjectBox{} \ht\hvObjectBox}{\usebox\hvObjectBox}%
- \refstepcounter{hv@tempCNTa}%
+ \ifx\hv@floatType\hv@figure
+ \global\refstepcounter{hv@tempCNTfigA}%
+ \else
+ \global\refstepcounter{hv@tempCNTtabA}% before caption
+ \fi
\expandafter\label\expandafter{\hv@label-2}%
\newpage\if@twocolumn\null\newpage\fi
}}%
@@ -1259,10 +1392,14 @@
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
\thispagestyle{empty}%
- \refstepcounter{hv@tempCNTb}%
- \expandafter\label\expandafter{\hv@label}%
- \clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \afterpage{%
+ \clipbox*{0 \the\dp\hvObjectBox{} \the\hv@leftPageObjectWidth{} \the\ht\hvObjectBox}{\usebox\hvObjectBox}%
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigA}%
+ \else
+ \refstepcounter{hv@tempCNTtabA}% before caption
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
+% \afterpage{%
\newpage\if@twocolumn\null\newpage\fi
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\thispagestyle{empty}%
@@ -1270,19 +1407,24 @@
\hspace*{\hv@tempWidthA}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\clipbox*{\the\hv@leftPageObjectWidth{} \dp\hvObjectBox{} \wd\hvObjectBox{} \ht\hvObjectBox}{\usebox\hvObjectBox}%
- \refstepcounter{hv@tempCNTb}%
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigB}%
+ \else
+ \refstepcounter{hv@tempCNTtabB}% before caption
+ \fi
\expandafter\label\expandafter{\hv@label-2}%
\newpage\if@twocolumn\null\newpage\fi
- \begin{\hv@floatType}[b]
+ \begin{\hv@floatType}[!b]
\ifhv@separatorLine\drawSepLine\fi
\expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
- \fi
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\end{\hv@floatType}%
- }}%
+ }%}%
}
\def\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{%
@@ -1291,10 +1433,13 @@
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
\thispagestyle{empty}%
- \refstepcounter{hv@tempCNTb}%
- \expandafter\label\expandafter{\hv@label}%
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigA}%
+ \else
+ \refstepcounter{hv@tempCNTtabA}% before caption
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label}\fi
\clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \afterpage{%
\newpage\if@twocolumn\null\newpage\fi
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\thispagestyle{empty}%
@@ -1302,20 +1447,25 @@
\hspace*{\hv@tempWidthA}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\clipbox*{\the\hv@leftPageObjectWidth{} \dp\hvObjectBox{} \wd\hvObjectBox{} \ht\hvObjectBox}{\usebox\hvObjectBox}%
- \refstepcounter{hv@tempCNTb}%
- \expandafter\label\expandafter{\hv@label-2}%
- \newpage\if@twocolumn\null\newpage\fi
- \begin{\hv@floatType*}[b]
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigB}%
+ \else
+ \refstepcounter{hv@tempCNTtabB}% before caption
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label-2}\fi
+ \newpage
+ \begin{\hv@floatType*}[!b]
\hv@twoColumnCaptiontrue
\ifhv@separatorLine\drawSepLine\fi
\expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
- \fi
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
+ \fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\end{\hv@floatType*}%
- }}%
+ }%
}
\def\do@hvFloat@doubleFULLPAGE@CaptionOther#1{%
@@ -1325,54 +1475,64 @@
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \refstepcounter{hv@tempCNTb}
- \expandafter\label\expandafter{\hv@label}%
+ \clipbox*{0 \depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigA}%
+ \else
+ \refstepcounter{hv@tempCNTtabA}% before caption
+ \fi
+ \label{\hv@label}%
\afterpage{%
\if@twocolumn\newpage\if@firstcolumn\else\null\newpage\fi\fi
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\thispagestyle{empty}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
\hspace*{\hv@tempWidthA}%
- \clipbox*{\the\hv@leftPageObjectWidth{} \dp\hvObjectBox{} \wd\hvObjectBox{} \ht\hvObjectBox}{\usebox\hvObjectBox}%
- \refstepcounter{hv@tempCNTb}%
+ \clipbox*{\hv@leftPageObjectWidth{} \dp\hvObjectBox{} \wd\hvObjectBox{} \ht\hvObjectBox}{\usebox\hvObjectBox}%
+ \ifx\hv@floatType\hv@figure
+ \refstepcounter{hv@tempCNTfigB}%
+ \else
+ \refstepcounter{hv@tempCNTtabB}% before caption
+ \fi
\expandafter\label\expandafter{\hv@label-2}%
\savebox\hvCaptionBox{\parbox{0.9\ht\hvObjectBox}{\captionof*{\hv@floatType}{\hv@longCap}}}%
\ifnum#1 > 0\relax % rotation with 90°
- \setlength\hv@tempWidthA{\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox+2\hvSet@bindCorrection}%
- \ifdim\hv@tempWidthA < 2\paperwidth
- \rotatebox{90}{\qquad\parbox{0.9\ht\hvObjectBox}{%
+% \setlength\hv@tempWidthB{\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox+2\hvSet@bindCorrection}%
+ \ifdim\hv@tempWidthB < 2\paperwidth
+ \rotatebox[origin=lb]{90}{\makebox[\paperheight][c]{\parbox{0.8\ht\hvObjectBox}{%
\expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
- }}% rotatebox
+ }}}% rotatebox
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\else% ifdim: no space left on page
- \put(-\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\minipage{\textwidth}\centering
+ \put(-2\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\minipage{\textwidth}\centering
\parbox{0.8\textwidth}{%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
}%
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\endminipage}}}%
\fi
\else% ifnum, caption not rotated, under or over the right page
\setlength\hv@tempWidthA{\dimexpr\paperheight-\ht\hvObjectBox}%
\ifdim\hv@tempWidthA > \ht\hvCaptionBox
\else
-% \refstepcounter{hv@temp}%%
- \put(\the\dimexpr-\textwidth-2in-\oddsidemargin,\the\dimexpr\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip){\makebox[0pt][l]{\parbox{\textwidth}{%%
+ \put(\the\dimexpr1.5\paperwidth-\wd\hvObjectBox-\hvSet@bindCorrection,\the\dimexpr\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip){\makebox[0pt][c]{\parbox{\textwidth}{%%
\expandafter\captionsetup\expandafter{\hv@caption@format}%
- \ifx\hv@shortCap\@empty
- \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap}%
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}%
\fi
}}}%
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\fi
\fi% end \ifnum#1>0
\newpage\if@twocolumn\null\newpage\fi
@@ -1407,9 +1567,8 @@
\else
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\fi
- %\put(0,0){%
\AtBeginShipoutNext{\thispagestyle{empty}}%
- \usebox\hvObjectBox%}%
+ \usebox\hvObjectBox%
\else
\usebox\hvObjectBox
\fi
@@ -1447,8 +1606,14 @@
\repeat
\endminipage}%
}
+
\def\getMultiObjectAndLabel{%
- \global\sbox\hvObjectBox{\minipage{\linewidth}%
+ \global\sbox\hvObjectBox{%
+ \ifhv@vFill
+ \minipage[b][\textheight][s]{\columnwidth}%
+ \else
+ \minipage{\columnwidth}%
+ \fi
\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
@@ -1461,6 +1626,8 @@
\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}}%
+ \edef\@tempb{\clist_item:Nn\l_clist_Type{\hv@cnta}}%
+ \edef\@captype{hv@p\@tempb}%
\ifx\@tempa\@empty
\else
\refstepcounter{\@captype}%
@@ -1469,6 +1636,7 @@
\ifnum\hv@cnta<\clist_count:N\l_clist_Type\par\hv@vskip\fi
\advance\hv@cnta by \@ne
\ifnum\hv@cnta<\hv@cntb
+ \ifhv@vFill\vfill\fi
\repeat
\endminipage}%
}
@@ -1491,7 +1659,12 @@
}
\def\getMultiSubObjectAndLabel{%
- \global\sbox\hvObjectBox{\minipage{\linewidth}%
+ \global\sbox\hvObjectBox{%
+ \ifhv@vFill
+ \minipage[b][\textheight][s]{\columnwidth}%
+ \else
+ \minipage{\columnwidth}%
+ \fi
\ifx\hv@subcaption@format\@empty\else
\expandafter
\captionsetup\expandafter[\expandafter s\expandafter u\expandafter b\expandafter]\expandafter
@@ -1504,7 +1677,7 @@
\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
+ \edef\@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
@@ -1524,6 +1697,7 @@
\ifnum\hv@cnta<\clist_count:N\l_clist_Type\par\hv@vskip\fi
\advance\hv@cnta by \@ne
\ifnum\hv@cnta<\hv@cntb
+ \ifhv@vFill\vfill\fi
\repeat
\edef\@tempa{\clist_item:Nn\l_clist_Label{1}}% the main label at the end
\ifx\@tempa\@empty
@@ -1547,11 +1721,11 @@
\else
\caption[\hv@shortCap]{\hv@longCap}%
\fi
- \expandafter\ifx\expandafter\relax\hv@label\relax\else\label{\hv@label-cap}\fi
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\endminipage}%
}
-\def\set@caption@object{% first caption, then object
+\def\set@caption@object#1{% first caption, then object #1=\hv@floatType
\ifhv@multiFloat
\getMultiCaptionAndLabel
\else
@@ -1561,7 +1735,7 @@
\getSingleCaptionAndLabel
\fi
\fi
- \edef\@captype{hv@p\hv@floatType}%
+ \edef\@captype{hv@p#1}%
\ifhv@multiFloat
\getMultiObjectAndLabel
\else