From 5d714d9476cbb90b125ff14a9d764ad90bb7c2ed Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 24 Sep 2021 03:01:47 +0000 Subject: CTAN sync 202109240301 --- macros/latex/contrib/hvfloat/latex/hvfloat.sty | 112 +++++++++++++++++-------- 1 file changed, 77 insertions(+), 35 deletions(-) (limited to 'macros/latex/contrib/hvfloat/latex/hvfloat.sty') diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty index 4d9e265b62..e0a378d28f 100644 --- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty +++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty @@ -1,4 +1,4 @@ -%% $Id: hvfloat.sty 126 2021-06-29 12:56:04Z herbert $ +%% $Id: hvfloat.sty 257 2021-09-23 11:44:35Z herbert $ %% %% %% IMPORTANT NOTICE: @@ -15,8 +15,8 @@ %% `hvfloat' offers rotating of captions and objects for floats %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{2.33} -\def\filedate{2021/07/14} +\def\fileversion{2.34} +\def\filedate{2021/09/23} %\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)} \ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)] \let\hvFloatFileVersion\fileversion @@ -180,6 +180,7 @@ \newif\ifhv@doublePage \newif\ifhv@setObjectLabel \newif\ifhv@global@sameHeight +\newif\ifhv@forceOutput \newlength\hvSet@bindCorrection \newlength\hvSet@sepLineskip @@ -195,7 +196,7 @@ \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}[0]{% +\define@key{hvSet}{bindCorr}[0pt]{% \def\hv@temp{#1}% \ifx\hv@temp\hv@Inner \setlength\hvSet@bindCorr{\dimexpr1in+\oddsidemargin}% @@ -225,6 +226,8 @@ } \define@key{hvSet}{capFormat}{\def\hv@caption@format{#1}}% \define@key{hvSet}{subcapFormat}{\def\hv@subcaption@format{#1}}% +\define@boolkey{hvSet}[hv@]{forceOutput}[true]{% + \ifhv@forceOutput\hv@nonFloattrue\fi}% immediate output, no floating! \def\hv@set#1{\begingroup\edef\x{\endgroup\noexpand\setkeys{hvSet}{#1}}\x} \let\hvFloatSet\hv@set @@ -236,7 +239,7 @@ \hv@set{% floatPos=, rotAngle=0, capWidth=n, capAngle=0, objectAngle=0, capPos=bottom, capVPos=center, objectPos=center, allHPos=center, - floatCapSep=5pt, useOBox=false, nonFloat=false, + floatCapSep=5pt, useOBox=false, onlyText=false, wide=false, fullpage=false, FULLPAGE=false, doubleFULLPAGE=false, doublePage=false, doublePAGE=false, multiFloat=false,subFloat=false, @@ -245,10 +248,12 @@ sameHeight=false, bindCorr=\z@,sepLineskip=0pt, vFill=false, minTextlines=2, + forceOutput=false, nonFloat=false, }% } \let\hvFloatSetDefaults\setDefaults +\hvFloatSetDefaults% onyl for first loading of the package \newcommand\hv@typeout[1]{\ifhv@Debug\typeout{>>>> #1}\fi} @@ -452,6 +457,7 @@ % #6: label % + \def\hvFloat{\@ifnextchar*% Main macro {\global\hv@startrue\hv@maxImageWidth=\textwidth\hvFloat@i}% {\global\hv@starfalse\hv@maxImageWidth=\columnwidth\hvFloat@i*}% @@ -1091,6 +1097,9 @@ \fi \fi \hv@typeout{do@hvFloat@doublePage:hv@tempWidthA=\the\hv@tempWidthA}% + \ifhv@forceOutput + \do@hvFloat@doublePAGECaptionRight{#1}% no cheque + \else \checkoddpage \ifoddpage \if@twocolumn @@ -1142,6 +1151,7 @@ \fi \fi \let\c@fptop\hv@fptop + \fi \endgroup% started at main macro \hvFloat } % @@ -1465,10 +1475,14 @@ \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% - \ifx\hv@shortCap\@empty - \captionof{\hv@floatType}{\hv@longCap}% + \ifhv@onlyText + \hv@longCap \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \end{\hv@floatType}% @@ -1478,10 +1492,14 @@ \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% - \ifx\hv@shortCap\@empty - \captionof{\hv@floatType}{\hv@longCap}% + \ifhv@onlyText + \hv@longCap \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \end{\hv@floatType*}% @@ -1535,8 +1553,8 @@ \refstepcounter{hv@tempCNTtabA}% before caption \fi \ifx\hv@label\@empty\else\label{\hv@label}\fi -% \afterpage{% - \newpage\if@twocolumn\null\newpage\fi + \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 @@ -1553,14 +1571,18 @@ \begin{\hv@floatType}[!b] \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% - \ifx\hv@shortCap\@empty - \captionof{\hv@floatType}{\hv@longCap}% + \ifhv@onlyText + \hv@longCap \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \end{\hv@floatType}% - }%}% + }% } \def\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{% @@ -1594,10 +1616,14 @@ \hv@twoColumnCaptiontrue \ifhv@separatorLine\drawSepLine\fi % \expandafter\captionsetup\expandafter{\hv@caption@format}% - \ifx\hv@shortCap\@empty - \captionof{\hv@floatType}{\hv@longCap}% + \ifhv@onlyText + \hv@longCap \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \end{\hv@floatType*}% @@ -1638,20 +1664,28 @@ \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}% + \ifhv@onlyText + \hv@longCap \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi }}}% rotatebox \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \else% ifdim: no space left on page \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}% - \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifhv@onlyText + \hv@longCap + \else + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi }% \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi @@ -1663,10 +1697,14 @@ \else \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}% - \else - \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \ifhv@onlyText + \hv@longCap + \else + \ifx\hv@shortCap\@empty + \captionof{\hv@floatType}{\hv@longCap}% + \else + \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap}% + \fi \fi }}}% \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi @@ -1863,11 +1901,15 @@ \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \setlength\belowcaptionskip{5pt}% \setlength\abovecaptionskip{0pt}% - \edef\@captype{\hv@floatType}% - \expandafter\ifx\expandafter\relax\hv@shortCap\relax - \caption{\hv@longCap}% + \ifhv@onlyText + \hv@longCap \else - \caption[\hv@shortCap]{\hv@longCap}% + \edef\@captype{\hv@floatType}% + \expandafter\ifx\expandafter\relax\hv@shortCap\relax + \caption{\hv@longCap}% + \else + \caption[\hv@shortCap]{\hv@longCap}% + \fi \fi \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi \endminipage}% -- cgit v1.2.3