summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hvfloat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-18 20:15:31 +0000
committerKarl Berry <karl@freefriends.org>2021-05-18 20:15:31 +0000
commit20e6010d6ddc56ddd3e31a998faa9879c0235aa3 (patch)
treeb85e37d75516b2e7ebd6e8abf6ece5b86d0a01e5 /Master/texmf-dist/tex/latex/hvfloat
parent4eb2f50e83b39c2547bcdd31a3648d870ee0343e (diff)
hvfloat (18may21)
git-svn-id: svn://tug.org/texlive/trunk@59255 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvfloat')
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty440
1 files changed, 266 insertions, 174 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index 1f56977f93e..59bfd20a45e 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 86 2021-05-12 19:25:56Z herbert $
+%% $Id: hvfloat.sty 92 2021-05-18 09:46:55Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,16 +15,19 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.24}
-\def\filedate{2021/05/09}
+\def\fileversion{2.25}
+\def\filedate{2021/05/18}
\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
+
\DeclareOption{fbox}{\hv@fboxtrue\setlength{\fboxsep}{1pt}}
\DeclareOption{hyperref}{\hv@hyperreftrue}
+\DeclareOption{stfloats}{\hv@stfloatstrue}
\ProcessOptions
@@ -32,7 +35,7 @@
\RequirePackage{caption}
\PassOptionsToPackage{hypcap}{subcaption}
\RequirePackage{subcaption}
-\RequirePackage{atbegshi,picture,trimclip}
+\RequirePackage{picture,trimclip}
\RequirePackage{expl3,multido}
\RequirePackage{graphicx}
@@ -40,14 +43,14 @@
\RequirePackage{xkeyval}
\RequirePackage{ifoddpage}
\RequirePackage{afterpage}
-%\RequirePackage{zref-abspos}
\ifhv@hyperref
\RequirePackage{hyperref}
-% \RequirePackage{hypcap}
+\fi
+\ifhv@stfloats
+ \RequirePackage{stfloats}% for bottom floats in a twocolumn mode
\fi
%
-%\unitlength=1cm
\providecommand*\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}
\newlength\hvObjectWidth
@@ -127,16 +130,16 @@
\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
- }
+%\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}%
@@ -151,6 +154,14 @@
\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@]{Debug}[true]{}% give more infos in the terminal
\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{#1}\fi}
@@ -163,6 +174,7 @@
\newif\ifhv@setObjectLabel
\newlength\hvSet@bindCorrection
+\newlength\hvSet@sepLineskip
\newlength\hv@leftPageObjectWidth% for doublepage images
\newlength\hv@tempWidthA
\newlength\hv@tempWidthB
@@ -181,6 +193,7 @@
\ifhv@multiFloat\setkeys{hvSet}{subFloat=false}\fi%
}%
\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
\define@key{hvSet}{style}{%
\@ifundefined{hv@#1}%
@@ -197,7 +210,7 @@
\def\defhvstyle#1#2{\@namedef{hv@#1}{#2}}
\let\hvDefFloatStyle\defhvstyle % better name
%
-\newcommand{\setDefaults}{%
+\newcommand\setDefaults{%
\hv@set{%
floatPos=, rotAngle=0, capWidth=n, capAngle=0,
capPos=bottom, capVPos=center, objectPos=center, objectAngle=0,
@@ -206,8 +219,9 @@
doubleFULLPAGE=false, doublePage=false, doublePAGE=false,
multiFloat=false,subFloat=false,
separatorLine,objectFrame=false,multiFloatSkip=\normalbaselineskip,
- capFormat={}, subcapFormat={},
- floatRef=object, bindCorr=\z@,
+ capFormat={}, subcapFormat={}, twoColumnCaption=false,
+% floatRef=object,
+ bindCorr=\z@,sepLineskip=0pt,
}%
}
@@ -236,7 +250,7 @@
\setlength{\abovecaptionskip}{0pt}%
\setlength{\belowcaptionskip}{0pt}%
}
-\newcommand{\restoreCaptionSkip}{%
+\newcommand\restoreCaptionSkip{%
\setlength\abovecaptionskip{\hvAboveCaptionSkip}%
\setlength\belowcaptionskip{\hvBelowCaptionSkip}%
}
@@ -271,6 +285,17 @@
\def\Gin@eheight{\paperheight}%
\Gin@boolkey{false}{iso}%
}
+\define@key{Gin}{doubleFULLPAGE}[true]{%
+ \def\Gin@ewidth{2\paperwidth}%
+ \def\Gin@eheight{\paperheight}%
+ \Gin@boolkey{false}{iso}%
+}
+\define@key{Gin}{doubleFULLPAGEbindCorr}[true]{%
+ \def\Gin@ewidth{\the\dimexpr2\paperwidth-2\hvSet@bindCorrection}%
+ \def\Gin@eheight{\paperheight}%
+ \Gin@boolkey{false}{iso}%
+}
+
\newcommand\IncludeGraphics[2][]{%
\vspace*{\the\dimexpr-1in-\voffset+\topskip-\headheight-0.5\baselineskip}%
\leavevmode\checkoddpage
@@ -400,6 +425,10 @@
\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}
@@ -407,8 +436,16 @@
\def\drawSepLine{%
\par\noindent
- \if@twocolumn\rule{\columnwidth}{0.4pt}\else\rule{\linewidth}{0.4pt}\fi
- \vspace{0pt}%
+ \if@twocolumn
+ \ifhv@twoColumnCaption
+ \rule{\linewidth}{0.4pt}\\[-2.5ex]
+ \else
+ \rule{\columnwidth}{0.4pt}\\[-2.5ex]
+ \fi
+ \else
+ \rule{\linewidth}{0.4pt}\\[-2.5ex]
+ \fi
+ \vspace{\hv@sepLineskip}%
}
\newcount\hv@cnta
@@ -914,74 +951,50 @@
\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 ----------------------------------
+\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right page
% #1-> 0/1 caption under/right
- \checkoddpage
\global\setlength\hv@leftPageObjectWidth{\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection}%
- \global\setlength\hv@tempWidthA{\the\dimexpr-1in-\oddsidemargin+\hvSet@bindCorrection-\parindent}%
- \hv@typeout{>>>>do@hvFloat@doublePage #1}%
+% \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}%
+ \checkoddpage
\ifoddpage
- \hv@typeout{>>>>do@hvFloat@doublePage->oddpage}%
- \hv@typeout{>>>>do@hvFloat@doublePage->oddpage->bindCorr=\the\hvSet@bindCorrection}%
- \hv@typeout{>>>>do@hvFloat@doublePage->oddpage->hv@leftPageObjectWidth=\the\hv@leftPageObjectWidth}%
- \afterpage{%
- \noindent
- \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \par\bigskip
- \afterpage{%
- \newpage
- \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
- }%
- }%
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \else
+ \do@hvFloat@doublePageCaptionRight{#1}%
+ \fi
+ \else
+ \do@hvFloat@doublePageCaptionRight{#1}%
+ \fi
\else
- \hv@typeout{>>>>do@hvFloat@doublePage->evenpage}%
- \hv@typeout{>>>>do@hvFloat@doublePage->evenpage->bindCorr=\the\hvSet@bindCorrection}%
- \hv@typeout{>>>>do@hvFloat@doublePage->evenpage->hv@leftPageObjectWidth=\the\hv@leftPageObjectWidth}%
- \global\setlength\hv@tempWidthA{\the\dimexpr-1in-\oddsidemargin+\hvSet@bindCorrection}%
- \global\setlength\hv@leftPageObjectWidth{\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection}%
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \else
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%
+ \fi
+ \else
+ \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{%
- \afterpage{%
\let\hv@fptop\c@fptop
\global\setlength{\@fptop}{0pt}%
\let\hv@c@topnumber\c@topnumber
\setcounter{topnumber}{1}%
- \begin{\hv@floatType}[t]
+ \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]
+ \end{\hv@floatType*}%
+ \begin{\hv@floatType*}[t]
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\hspace*{\hv@tempWidthA}%
\noindent
@@ -1012,21 +1025,21 @@
\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}%
+ \end{\hv@floatType*}%
\let\c@topnumber\hv@c@topnumber
\let\c@fptop\hv@fptop
- }}%
- \fi
- \endgroup% started at main macro \hvFloat
+ }%
}
+%
\newsavebox\hv@boxLeftPage
\newsavebox\hv@boxRightPage
%
%% ||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
- \hv@typeout{>>>>do@hvFloat@doublePAGE}%
\global\setlength\hv@tempWidthA{\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection+\parindent}%
\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}%
@@ -1034,58 +1047,36 @@
\expandafter\global\expandafter\savebox\expandafter\hv@boxRightPage\expandafter{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}%
\checkoddpage
\ifoddpage
- \hv@typeout{>>>>do@hvFloat@doublePAGE->oddpage}%
- \hv@typeout{>>>>do@hvFloat@doublePAGE->oddpage->bindCorr=\the\hvSet@bindCorrection}%
- \hv@typeout{>>>>do@hvFloat@doublePAGE->oddpage->hv@leftPageObjectWidth=\the\hv@leftPageObjectWidth}%
- \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
- \newpage
- \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}%
- \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
- \newpage
- }%
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \fi
+ \else
+ \do@hvFloat@doublePAGECaptionRight{#1}%
+ \fi
\else
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}%
+ \fi
+ \else
+ \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
+ \fi
+ \fi
+ \endgroup
+}
+%
+\def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ----------------------------------
+ % #1-> 0/1 caption under/right
\afterpage{%
- \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
- \newpage
+ \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
@@ -1117,10 +1108,8 @@
\captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\expandafter\global\expandafter\label\expandafter{\hv@label}\fi}%
\fi
\fi
- \newpage
- }}%
- \fi
- \endgroup
+ \newpage\if@twocolumn\null\newpage\fi
+ }%
}
%
%% ||1in+evenside --- |1in+oddside ---||
@@ -1135,86 +1124,157 @@
\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}%
+ \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}%
\expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifoddpage
- \ifcase\hv@@capPos
- \do@hvFloat@doubleFULLPAGE@CaptionBefore
- \or
- \do@hvFloat@doubleFULLPAGE@CaptionAfter
- \else
- \do@hvFloat@doubleFULLPAGE@CaptionOther{#1}%
+ \ifcase\hv@@capPos % =0 Caption before
+ \if@twocolumn
+ \if@firstcolumn
+ \ifhv@twoColumnCaption
+ \set@Normal@Bottom@Caption*
+ \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
+ \else
+ \afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
+ \fi
+ \else
+ \set@Normal@Bottom@Caption
+ \do@hvFloat@doubleFULLPAGE@CaptionBefore
+ \fi
+ \else
+ \set@Normal@Bottom@Caption
+ \do@hvFloat@doubleFULLPAGE@CaptionBefore
+ \fi
+ \or % =1 Caption after
+ \ifhv@twoColumnCaption
+ \do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol
+ \else
+ \do@hvFloat@doubleFULLPAGE@CaptionAfter
+ \fi
+ \else% >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
+ \do@hvFloat@doubleFULLPAGE@CaptionOther{#1}%
+ \fi
\fi% \ifcase
\else% we have an even page
- \hv@typeout{>>>>>doubleFULLPAGE->evenpage}%
\ifcase\hv@@capPos% Before
- \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
- \or
- \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter}%
+ \if@twocolumn
+ \if@firstcolumn
+ \ifhv@twoColumnCaption
+ \afterpage{\afterpage\set@Normal@Bottom@Caption*\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionBefore{#1}}}%
+ \else
+ \afterpage{\afterpage{\afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore{#1}}}}%
+ \fi
+ \else
+ \afterpage{\afterpage{\set@Normal@Bottom@Caption\do@hvFloat@doubleFULLPAGE@CaptionBefore{#1}}}%
+ \fi
+ \else
+ \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}}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter{#1}}}%
+ \fi
+ \else
+ \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfter}%
+ \fi
\else % Any other caption
- \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}%
- \fi%% \ifcase
+ \if@twocolumn
+ \if@firstcolumn
+ \afterpage{\afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}}}%
+ \else
+ \afterpage{\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}}%
+ \fi
+ \else
+ \afterpage{\do@hvFloat@doubleFULLPAGE@CaptionOther{#1}}%
+ \fi
+ \fi%% \ifcase
\fi% main ifoddpage
\endgroup% started at main macro \hvFloat
}
+\def\set@Normal@Bottom@Caption{\@ifnextchar*\set@Normal@Bottom@CaptionStar\set@Normal@Bottom@Caption@}
+\def\set@Normal@Bottom@Caption@{%
+ \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}%
+}
+\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*}%
+}
+
\def\do@hvFloat@doubleFULLPAGE@CaptionBefore{%
- \begin{\hv@floatType}[b]
- \ifhv@separatorLine\drawSepLine\vspace{\smallskipamount}\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
- \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
- \end{\hv@floatType}%
\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@floatType}%
+ \refstepcounter{hv@tempCNTa}%
\expandafter\label\expandafter{\hv@label}%
- \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
+%%% \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
\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}%
\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@floatType}%
+ \refstepcounter{hv@tempCNTa}%
\expandafter\label\expandafter{\hv@label-2}%
- \newpage
+ \newpage\if@twocolumn\null\newpage\fi
}}%
}
+\newif\ifhv@temp
+
\def\do@hvFloat@doubleFULLPAGE@CaptionAfter{%
\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@floatType}%
+ \refstepcounter{hv@tempCNTb}%
\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{%
+ \newpage\if@twocolumn\null\newpage\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}%
\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@floatType}%
+ \refstepcounter{hv@tempCNTb}%
\expandafter\label\expandafter{\hv@label-2}%
- \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
- \newpage
+ \newpage\if@twocolumn\null\newpage\fi
\begin{\hv@floatType}[b]
- \ifhv@separatorLine\drawSepLine\vspace{\smallskipamount}\fi
+ \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}}%
@@ -1225,29 +1285,60 @@
}}%
}
+\def\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{%
+ \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@tempCNTb}%
+ \expandafter\label\expandafter{\hv@label}%
+ \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}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
+ \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]
+ \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}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
+ \fi
+ \end{\hv@floatType*}%
+ }}%
+}
+
\def\do@hvFloat@doubleFULLPAGE@CaptionOther#1{%
\afterpage{%
\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}%
+ \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@floatType}%
+ \refstepcounter{hv@tempCNTb}
\expandafter\label\expandafter{\hv@label}%
- \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
\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}%
- \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@floatType}%
+ \refstepcounter{hv@tempCNTb}%
\expandafter\label\expandafter{\hv@label-2}%
- \global\addtocounter{\hv@floatType}{-1}% to get the same <object>-ref as "label"-cap
\savebox\hvCaptionBox{\parbox{0.9\ht\hvObjectBox}{\captionof*{\hv@floatType}{\hv@longCap}}}%
- \ifnum#1 > 0
+ \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}{%
@@ -1273,7 +1364,8 @@
\setlength\hv@tempWidthA{\dimexpr\paperheight-\ht\hvObjectBox}%
\ifdim\hv@tempWidthA > \ht\hvCaptionBox
\else
- \put(\the\dimexpr-\textwidth-1in,\the\dimexpr\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip){\makebox[0pt][l]{\parbox{\textwidth}{%%
+% \refstepcounter{hv@temp}%%
+ \put(\the\dimexpr-\textwidth-2in-\oddsidemargin,\the\dimexpr\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip){\makebox[0pt][l]{\parbox{\textwidth}{%%
\expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifx\hv@shortCap\@empty
\captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label-cap}}%
@@ -1283,7 +1375,7 @@
}}}%
\fi
\fi% end \ifnum#1>0
- \newpage
+ \newpage\if@twocolumn\null\newpage\fi
}%
}%
}