summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hvfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-15 20:07:35 +0000
committerKarl Berry <karl@freefriends.org>2021-06-15 20:07:35 +0000
commitc40247fcc454d674ad1e7a34fef7cd532ca4ce80 (patch)
treeb1de4610201e548d4b39632b83e9fe7a1e68907c /Master/texmf-dist/tex/latex/hvfloat
parentffabcfdaa53caa031688bf8c81ec835d5d29b391 (diff)
hvfloat (15jun21)
git-svn-id: svn://tug.org/texlive/trunk@59600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvfloat')
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty265
1 files changed, 161 insertions, 104 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index c6bb68b8fb7..681e5032d7b 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 107 2021-06-09 06:43:25Z herbert $
+%% $Id: hvfloat.sty 114 2021-06-15 13:20:03Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.28}
-\def\filedate{2021/06/09}
+\def\fileversion{2.29}
+\def\filedate{2021/06/15}
\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
\let\hvFloatFileVersion\fileversion
@@ -72,7 +72,6 @@
\newlength\hvWideWidth
\newlength\hvMultiFloatSkip
\newlength\hvMaxCapWidth
-%\newlength\hv@BottomSpace
%\AtBeginDocument{%
% \setlength\hv@BottomSpace{\dimexpr\paperheight-1in-\topmargin-\headheight-\headsep-\textheight}}
@@ -85,6 +84,7 @@
\newsavebox\hv@rightBox
\newif\ifhv@capbeside \hv@capbesidefalse
+\newif\ifhv@switchType
\def\hv@Top{top}
\def\hv@Bottom{bottom}
@@ -116,7 +116,6 @@
\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,evenPage,oddPage}[bottom]{%
\def\hvSet@capPos{#1}% it is relativ to the object, (e),(d) only valid for fullpage float
@@ -135,11 +134,11 @@
\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}%
+ \def\hv@@capVPos{b}%
\or
- \gdef\hv@@capVPos{c}%
+ \def\hv@@capVPos{c}%
\else
- \gdef\hv@@capVPos{t}%
+ \def\hv@@capVPos{t}%
\fi
}{\PackageWarning{hvfloat}{erroneous input (#1) for capVPos ignored. Using center.}%
\def\hvSet@capVPos{center}% it is relativ to the object
@@ -163,18 +162,6 @@
}{\PackageWarning{hvfloat}{erroneous input (#1) for objectPos ignored. Using center.}%
\def\hvSet@capVPos{center}% it is relativ to the object
}
-
-%\newif\ifhv@floatRefToObject
-%\define@choicekey*+{hvSet}{floatRef}[\val\nr]{caption,object}[object]{% where the LOF entry should point to (inactive)
-% \ifcase\nr\relax
-% \hv@floatRefToObjectfalse
-% \else
-% \hv@floatRefToObjecttrue
-% \fi
-%}{\PackageWarning{hvfloat}{erroneous input (#1) for floatRef ignored. Using option object.}%
-% \hv@floatRefToObjecttrue
-% }
-
\define@key{hvSet}{objectAngle}[0]{% -360..+360
\def\hvSet@objectAngle{#1}%
}
@@ -188,14 +175,8 @@
\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@]{twoColumnCaption}[true]{% Write the caption only as text
-% \ifhv@stfloats
-% \global\@nameuse{hv@twoColumnCaption#1}%
-% \else
-% \PackageWarning{hvfloat}{Please use the package option stfloats!}%
-% \global\hv@twoColumnCaptionfalse
-% \fi
-}
+\define@boolkey{hvSet}[hv@]{twoColumnCaption}[true]\global\@nameuse{hv@twoColumnCaption#1}{}% Write the caption only as text
+\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}
@@ -206,19 +187,31 @@
\newif\ifhv@doublePAGE
\newif\ifhv@doublePage
\newif\ifhv@setObjectLabel
+\newif\ifhv@global@sameHeight
\newlength\hvSet@bindCorrection
\newlength\hvSet@sepLineskip
\newlength\hv@leftPageObjectWidth% for doublepage images
\newlength\hv@tempWidthA
\newlength\hv@tempWidthB
+\newlength\hv@minTextlines
+\newlength\hv@floatCapSep
+\newlength\hvSet@bindCorr
\define@key{hvSet}{fullpage}[true]{\global\@nameuse{hv@fullpage#1}}%
\define@key{hvSet}{FULLPAGE}[true]{\global\@nameuse{hv@FULLPAGE#1}}
\define@key{hvSet}{doubleFULLPAGE}[true]{\global\@nameuse{hv@doubleFULLPAGE#1}\hv@doublePagefalse\hv@doublePAGEfalse}
\define@key{hvSet}{doublePAGE}[true]{\global\@nameuse{hv@doublePAGE#1}\hv@doublePagefalse\hv@doubleFULLPAGEfalse}
\define@key{hvSet}{doublePage}[true]{\global\@nameuse{hv@doublePage#1}\hv@doublePAGEfalse\hv@doubleFULLPAGEfalse}
-\define@key{hvSet}{bindCorr}[\z@]{\setlength\hvSet@bindCorrection{#1}}% for doublepage objects
+\define@key{hvSet}{bindCorr}[0]{%
+ \def\hv@temp{#1}%
+ \ifx\hv@temp\hv@Inner
+ \setlength\hvSet@bindCorr{\dimexpr1in+\oddsidemargin}%
+ \else
+ \setlength\hvSet@bindCorr{#1}%
+ \fi
+}
+%\setlength\hvSet@bindCorrection{#1}}% for doublepage objects
\define@boolkey{hvSet}[hv@]{subFloat}[true]{% typeset values as subfloats
\ifhv@subFloat\setkeys{hvSet}{multiFloat=false}\fi%
@@ -230,6 +223,7 @@
\define@boolkey{hvSet}[hv@]{separatorLine}[true]{}% separator line for caption of a full page float
\define@key{hvSet}{sepLineskip}{\def\hv@sepLineskip{#1}}%
+\define@key{hvSet}{minTextlines}{\setlength\hv@minTextlines{#1\baselineskip}}%
\define@boolkey{hvSet}[hv@]{objectFrame}[true]{}% a frame around the object with no separation
\define@key{hvSet}{style}{%
\@ifundefined{hv@#1}%
@@ -256,9 +250,9 @@
multiFloat=false,subFloat=false,
separatorLine,objectFrame=false,multiFloatSkip=\normalbaselineskip,
capFormat={}, subcapFormat={}, twoColumnCaption=false,
-% floatRef=object,
+ sameHeight=false,
bindCorr=\z@,sepLineskip=0pt,
- vFill=false,
+ vFill=false, minTextlines=2,
}%
}
@@ -300,7 +294,7 @@
\begingroup
\def\@captype{figure}%
\ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
- \if$#1$ \caption{#2}\else\caption[#1]{#2}\fi
+ \ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi
\endgroup}
\renewcommand\tabcaption[2][]{%
\begingroup
@@ -531,18 +525,26 @@
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
\gdef\hv@floatType{#2}%
\ifx\relax#2\relax
- \setkeys{hvSet}{nonFloat,onlyText}
+ \setkeys{hvSet}{nonFloat,onlyText}%
\fi
\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}%
+%
\ifhv@fullpage
\def\hvSet@CapWidth{n}% relative value
\do@@@@hvFloat% fullpage with caption on other page
@@ -567,7 +569,6 @@
\fi
\fi
\fi
-% \global\hv@capbesidefalse
}
%
\def\do@@@hvFloat{% no special float page, caption and image on top of each other or side by side
@@ -606,12 +607,12 @@
\ifx\hvSet@capWidth\hv@Natural% captionwidth=\linewidth-\objectwidth-separation
\ifhv@capbeside
\ifhv@wide
- \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hvSet@floatCapSep\relax}%
+ \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\else
\ifhv@star
- \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hvSet@floatCapSep\relax}%
+ \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\else
- \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hvSet@floatCapSep\relax}%
+ \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\fi
\fi
\else
@@ -621,10 +622,10 @@
\ifhv@capbeside
\ifhv@wide
\setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
- \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hvSet@floatCapSep\relax}%
+ \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\else
\setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
- \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hvSet@floatCapSep\relax}%
+ \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\fi
\ifdim\hvCapWidth>\@tempdima
\setlength\hvCapWidth{\@tempdima}%
@@ -640,7 +641,7 @@
\fi
\fi
\saveCaptionSkip% we put this space ourselve
- \ifnum\hvSet@capAngle=0 % need rotation?
+ \ifnum\hvSet@global@capAngle=0 % need rotation?
\savebox\hvCaptionBox{% NO rotation
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
\ifhv@nonFloat
@@ -674,7 +675,7 @@
}%
\else
\savebox\hvCaptionBox{% Rotation
- \rotatebox{\hvSet@capAngle}{%
+ \rotatebox{\hvSet@global@capAngle}{%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifhv@nonFloat
@@ -778,18 +779,18 @@
%%%%
\savebox{\@tempboxa}{% ***** @tempbox start
\expandafter\ifcase\the\hv@@capPos% 0 is LEFT START \ifcase
- \ifx\hvSet@capVPos\hv@Center
+ \ifx\hvSet@global@capVPos\hv@Center
\put@CaptionBox
- \hspace{\hvSet@floatCapSep}% capfloatsep
+ \hspace{\hv@floatCapSep}% capfloatsep
\put@ObjectBox
\else
- \ifx\hvSet@capVPos\hv@Top% caption and object at top aligned
+ \ifx\hvSet@global@capVPos\hv@Top% caption and object at top aligned
\put@CaptionBox[1]%
- \hspace{\hvSet@floatCapSep}% capfloatsep
+ \hspace{\hv@floatCapSep}% capfloatsep
\put@ObjectBox[1]%
\else% caption on bottom
\put@CaptionBox[2]%
- \hspace{\hvSet@floatCapSep}% capfloatsep
+ \hspace{\hv@floatCapSep}% capfloatsep
\put@ObjectBox[2]%
\fi
\fi% end caption left
@@ -809,18 +810,18 @@
\fi
\end{minipage}%
\or%2 is right
- \ifx\hvSet@capVPos\hv@Center
+ \ifx\hvSet@global@capVPos\hv@Center
\put@ObjectBox
- \hspace{\hvSet@floatCapSep}%
+ \hspace{\hv@floatCapSep}%
\put@CaptionBox
\else
- \ifx\hvSet@capVPos\hv@Top
+ \ifx\hvSet@global@capVPos\hv@Top
\put@ObjectBox[1]%
- \hspace{\hvSet@floatCapSep}% capfloatsep
+ \hspace{\hv@floatCapSep}% capfloatsep
\put@CaptionBox[1]%
\else
\put@ObjectBox[2]%
- \hspace{\hvSet@floatCapSep}% capfloatsep
+ \hspace{\hv@floatCapSep}% capfloatsep
\put@CaptionBox[2]%
\fi
\fi
@@ -1046,58 +1047,101 @@
\endgroup% startet at main \hvFloat
}
%
+
+
%% ------------------------------------- the doublepage obejcts ---------------------------
%% ||1in+evenside --- |1in+oddside ---||
%
\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-1in-\oddsidemargin+\hvSet@bindCorrection}%
- \xdef\hv@@capAngle{\hvSet@capAngle}%
+ \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
+ \savebox\hvCaptionBox{% NO rotation
+ \minipage{\textwidth}%% minipage, to get hyphenation
+ \let\@captype\hv@floatType
+ \caption*{\hv@longCap}%
+ \endminipage}%
+ \savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \ifnum#1=0\relax % no rotation, caption below
+ \hv@typeout{Texthöhe: \the\textheight}%
+ \hv@typeout{Objekthöhe: \the\ht\hvObjectBox}%
+ \hv@typeout{Captionhöhe: \the\ht\hvCaptionBox}%
+ \@tempdima=\dimexpr\ht\hvObjectBox+\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip +\textfloatsep\relax%+\floatsep\relax
+ \hv@typeout{Summe: \the\@tempdima}%
+ \ifdim\@tempdima > \dimexpr\textheight-\hv@minTextlines\relax
+ \hv@typeout{hvfloat: switched to floattype p}%
+ \hv@switchTypetrue
+ \fi
+ \fi
+ \hv@typeout{do@hvFloat@doublePage:hv@tempWidthA=\the\hv@tempWidthA}%
\checkoddpage
\ifoddpage
\if@twocolumn
\if@firstcolumn
- \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \ifhv@switchType
+ \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \fi
\else
\ifhv@tugboat
\do@hvFloat@doublePageCaptionRight{#1}%
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \ifhv@switchType
+ \do@hvFloat@doublePAGECaptionRight{#1}%
+ \else
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \fi
\fi
\fi
\else
- \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \ifhv@switchType
+ \do@hvFloat@doublePAGECaptionRight{#1}%
+ \else
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \fi
\fi
- \else
+ \else% we have an even page
\if@twocolumn
\if@firstcolumn
- \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}%
+ \ifhv@switchType
+ \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}%
+ \else
+ \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}%
+ \fi
+ \else% second column
+ \ifhv@switchType
+ \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \fi
+ \fi
+ \else% onecolumn
+ \ifhv@switchType
+ \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
\else
\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
\fi
- \else
- \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
\fi
\fi
+ \let\c@fptop\hv@fptop
\endgroup% started at main macro \hvFloat
}
%
\def\do@hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ----------------------------------
- \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}%
- \global\renewcommand\thehv@tempCNTfigA{xyz}%
- \global\renewcommand\thehv@tempCNTfigB{xyz}%
+ \do@hvFloat@doublePageCaptionRightObjectLeft{0pt}%
+ \afterpage{\do@hvFloat@doublePageCaptionRightObjectRight{#1}}%
+}
+%
+\def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object
\begin{\hv@floatType*}[!t]
+ \hv@typeout{Floatpositionsparameter: !t}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
+ \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\ifx\hv@label\@empty
- \else
+ \else
\ifx\hv@floatType\hv@figure
\global\refstepcounter{hv@tempCNTfigA}%
\else
@@ -1105,18 +1149,26 @@
\fi
\label{\hv@label}%
\fi
+ \ifhv@global@sameHeight
+ \hv@typeout{text should be of same height of both pages}%
+ \par\phantom{\parbox{\textwidth}{\caption*{\hv@longCap}}}%
+% \vspace{\textfloatsep}%
+ \fi
\end{\hv@floatType*}%
- \afterpage{%
+}
+\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}%
- \noindent
+ \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{\the\dimexpr\textwidth-\wd\hv@rightBox-\hv@tempWidthA-\marginparsep}%
- \parbox[\hv@@capVPos]{\the\wd\hv@rightBox}{%
- \vspace{0pt}%
- \raisebox{\depth}{\usebox\hv@rightBox}%
- }%
+ \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}%
+ \ifdim\dp\hv@rightBox > \z@
+ \raisebox{\depth}{\usebox\hv@rightBox}%
+ \else
+ \usebox\hv@rightBox
+ \fi
\ifx\hv@label\@empty\else
\ifx\hv@floatType\hv@figure
\global\refstepcounter{hv@tempCNTfigB}%
@@ -1129,26 +1181,31 @@
\expandafter\captionsetup\expandafter{\hv@caption@format@temp}%
\fi
\ifnum#1>\z@ % caption on the right
- \ifnum\hv@@capAngle > \z@
- \rotatebox[origin=c]{\hv@@capAngle}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
+ \hv@typeout{doublePage: capAngle=\hvSet@global@capAngle}%
+ \ifnum\hvSet@global@capAngle > \z@
+ \hspace{\hv@floatCapSep}%
+ \rlap{\rotatebox{\hvSet@global@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
+ \abovecaptionskip=0pt% local inside parbox
+ \belowcaptionskip=0pt% local inside parbox
\ifx\relax\hv@shortCap\relax
\caption{\hv@longCap}%
\else
\caption[\hv@shortCap]{\hv@longCap}%
\fi
- }}%
- \ifx\relax\hv@label\relax\else\label{\hv@label-cap}\fi
+ }}}%
+ \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\else
- \hspace{\marginparsep}%
- \parbox[\hv@@capVPos]{\hv@tempWidthB}{%
+ \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}{%
\abovecaptionskip=0pt% local inside parbox
- \vspace{0pt}%
+ \belowcaptionskip=0pt% local inside parbox
\ifx\hv@shortCap\@empty
\caption{\hv@longCap}%
\else
- \caption[\hv@shortCap]{\hv@longCap}
+ \caption[\hv@shortCap]{\hv@longCap}%
\fi
- }%
+ }}%
\ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\fi
\else % #1 = 0 caption below
@@ -1159,10 +1216,8 @@
\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
+ \vspace{0pt}%
+ \end{\hv@floatType*}
}
%
\newsavebox\hv@boxLeftPage
@@ -1170,11 +1225,10 @@
%
%% ||1in+evenside --- |1in+oddside ---||
%
-\newif\ifhv@save@twocolumn
\def\do@hvFloat@doublePAGE#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
- \global\setlength\hv@tempWidthA{\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection+\parindent}%
+ \global\setlength\hv@tempWidthA{\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection}%
\global\setlength\hv@leftPageObjectWidth{\the\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection}%
\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}}%
@@ -1207,13 +1261,13 @@
\def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
\afterpage{%
- \noindent
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
+ \noindent
\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \newpage\if@twocolumn\null\newpage\fi
+ \null\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
+ \hspace*{\dimexpr-\hv@tempWidthA}%
\clipbox*{\the\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}%
\ifnum#1>0
\medskip
@@ -1236,13 +1290,16 @@
}}%
\ifx\hv@label\@empty\else\label{\hv@label}\fi
\fi
- \else
- \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}\fi
+ \else% caption not rotated
+ \par\noindent
+ \parbox{\textwidth}{%
+ \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}\fi
+ }%
\fi
\newpage\if@twocolumn\null\newpage\fi
}%