summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hvfloat/latex/hvfloat.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/hvfloat/latex/hvfloat.sty')
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat.sty59
1 files changed, 34 insertions, 25 deletions
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
index ec23f2c318..7c1e23111a 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 530 2022-05-01 11:01:31Z herbert $
+%% $Id: hvfloat.sty 584 2022-07-20 18:29:58Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -16,8 +16,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.39}
-\def\filedate{2022/05/01}
+\def\fileversion{2.40}
+\def\filedate{2022/07/20}
%\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
\let\hvFloatFileVersion\fileversion
@@ -27,7 +27,7 @@
\newif\ifhv@nostfloats \hv@nostfloatsfalse
\newif\ifhv@tugboat \hv@tugboatfalse
-\DeclareOption{fbox}{\hv@fboxtrue\setlength{\fboxsep}{1pt}}
+\DeclareOption{fbox}{\hv@fboxtrue\setlength\fboxsep{1pt}}
\DeclareOption{hyperref}{\hv@hyperreftrue}
\DeclareOption{nostfloats}{\hv@nostfloatstrue}
\DeclareOption{no-stfloats}{\hv@nostfloatstrue}
@@ -56,8 +56,12 @@
\ifhv@hyperref
\RequirePackage{hyperref}
\fi
-\ifhv@nostfloats\else
+\ifhv@nostfloats
+ \def\thisfloatpagestyle#1{%
+ \global\@namedef{\number\@currbox @float}{\thispagestyle{#1}}}
+\else
\RequirePackage{stfloats}% for bottom floats in a twocolumn mode
+ \RequirePackage{floatpag}% for bottom floats in a twocolumn mode
\fi
%
\providecommand*\LenToUnit[1]{\strip@pt\dimexpr#1*\p@/\unitlength}
@@ -67,10 +71,9 @@
\newlength\hvWideWidth
\newlength\hvMultiFloatSkip
\newlength\hvMaxCapWidth
-%\AtBeginDocument{%
-% \setlength\hv@BottomSpace{\dimexpr\paperheight-1in-\topmargin-\headheight-\headsep-\textheight}}
-\newlength\hvFullWidth % only for user purpose
-\setlength\hvFullWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}
+\newlength\hvFloatFullWidth % only for user purpose
+\AtBeginDocument{\hvFloatFullWidth=\the\dimexpr\textwidth+\marginparwidth+\marginparsep\relax}
+
\newsavebox\hvObjectBox
\newsavebox\hvCaptionBox
@@ -186,6 +189,7 @@
\newif\ifhv@global@sameHeight
\newif\ifhv@forceOutput
+
\newlength\hvSet@bindCorrection
\newlength\hvSet@sepLineskip
\newlength\hv@leftPageObjectWidth% for doublepage images
@@ -203,7 +207,7 @@
\define@key{hvSet}{bindCorr}[0pt]{%
\def\hv@temp{#1}%
\ifx\hv@temp\hv@Inner
- \setlength\hvSet@bindCorr{\dimexpr1in+\oddsidemargin}%
+ \hvSet@bindCorr=\the\dimexpr1in+\oddsidemargin\relax
\else
\setlength\hvSet@bindCorr{#1}%
\fi
@@ -259,7 +263,7 @@
\let\hvFloatSetDefaults\setDefaults
\hvFloatSetDefaults% onyl for first loading of the package
-\newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi}
+\providecommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi}
\providecommand\@tugclass{\@empty}
\ifx\@tugclass\@empty
@@ -283,8 +287,9 @@
\newlength\fboxlinewidth
\AtBeginDocument{%
- \setlength\fboxlinewidth{\dimexpr\linewidth-2\fboxrule-2\fboxsep}%
+ \fboxlinewidth=\the\dimexpr\linewidth-2\fboxrule-2\fboxsep\relax
}
+
\setlength\belowcaptionskip{\abovecaptionskip}% it is in latex.ltx = 0pt
\newcommand\saveCaptionSkip{%
\setlength{\hvAboveCaptionSkip}{\abovecaptionskip}%
@@ -331,9 +336,10 @@
\expandafter\captionsetup\expandafter{\hv@caption@format,position=below}
\ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi
\endgroup}
+
%
\newlength\hv@maxImageWidth
-\AtBeginDocument{\hv@maxImageWidth=\columnwidth}
+\AtBeginDocument{\setlength\hv@maxImageWidth{\columnwidth}}
\define@key{Gin}{columnWidth}[true]{%
\def\Gin@ewidth{\columnwidth}%
@@ -361,7 +367,7 @@
\Gin@boolkey{false}{iso}%
}
\define@key{Gin}{doublefullPage}[true]{%
- \def\Gin@ewidth{\dimexpr2\paperwidth-2in-2\evensidemargin}%
+ \def\Gin@ewidth{\the\dimexpr2\paperwidth-2in-2\evensidemargin}%
% \def\Gin@eheight{\paperheight}%
\Gin@boolkey{true}{iso}%
}
@@ -423,7 +429,6 @@
\fi
}
-
\def\drawSepLine{%
\par\noindent
\if@twocolumn
@@ -470,7 +475,7 @@
\def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}}
\def\do@hvFloat[#1]{%
\begingroup
- \setlength\hvWideWidth{\dimexpr\columnwidth+\marginparwidth+\marginparsep}%
+ \hvWideWidth=\the\dimexpr\columnwidth+\marginparwidth+\marginparsep\relax%
% \setlength\hvWideWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}%
% \setlength\hvWideWidth{\dimexpr\linewidth+\marginparwidth}%
\hv@maxImageWidth=\textwidth
@@ -630,12 +635,12 @@
\ifx\hvSet@capWidth\hv@Natural% captionwidth=\linewidth-\objectwidth-separation
\ifhv@capbeside
\ifhv@wide
- \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \hvCapWidth=\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax
\else
\ifhv@star
- \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \hvCapWidth=\the\dimexpr\textwidth-\hvObjectWidth-\hv@floatCapSep\relax
\else
- \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \hvCapWidth=\the\dimexpr\linewidth-\hvObjectWidth-\hv@floatCapSep\relax
\fi
\fi
\else
@@ -645,13 +650,13 @@
\ifhv@capbeside
\ifhv@wide
\setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
- \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \@tempdima=\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax
\else
\setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
- \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \@tempdima=\the\dimexpr\columnwidth-\hvObjectWidth-\hv@floatCapSep\relax
\fi
\ifdim\hvCapWidth>\@tempdima
- \setlength\hvCapWidth{\@tempdima}%
+ \hvCapWidth=\@tempdima
\fi
\else
\ifhv@wide
@@ -1101,7 +1106,7 @@
\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right page
% #1-> 0/1 caption under/right
\hv@typeout{>>>doublePage: start with definitions of \hv@floatObject}%
- \global\hv@leftPageObjectWidth=\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection\relax
+ \global\hv@leftPageObjectWidth=\the\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection\relax
\global\hv@tempWidthA=\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection\relax
\xdef\hv@caption@format@temp{\hv@caption@format}% it gets lost otherwise for next afterpage
\@dblfpbot=0\p@ \@plus 1fil%
@@ -1749,7 +1754,7 @@
\endminipage}}}%
\fi
\else% ifnum, caption not rotated, under or over the right page
- \setlength\hv@tempWidthA{\dimexpr\paperheight-\ht\hvObjectBox}%
+ \hv@tempWidthA=\the\dimexpr\paperheight-\ht\hvObjectBox\relax
\ifdim\hv@tempWidthA > \ht\hvCaptionBox
\else
\put(\the\dimexpr1.5\paperwidth-\wd\hvObjectBox-\hvSet@bindCorrection,\the\dimexpr\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip){\makebox[0pt][c]{\parbox{\textwidth}{%%
@@ -1782,12 +1787,15 @@
\end{\hv@floatType}%
}
+
+
\def\setPageObject{%
\ifhv@star
\begin{\hv@floatType*}[p]%
\else
\begin{\hv@floatType}[p]%
\fi
+ \thisfloatpagestyle{empty}%
\hfuzz=\maxdimen
\expandafter\hvFloatSet\expandafter{\hv@save@setting}%
\ifhv@FULLPAGE
@@ -1802,7 +1810,8 @@
\else
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\fi
- \AtBeginShipoutNext{\thispagestyle{empty}}%
+% \AtBeginShipoutNext{\thispagestyle{empty}}%
+% \afterpage{\AddToHookNext{shipout/after}{\thispagestyle{empty}}}%
\usebox\hvObjectBox
\else
\usebox\hvObjectBox