From 2bd77f5a4d02b0d1649589aa7a548e79b198f6af Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Thu, 10 Jun 2021 03:01:49 +0000
Subject: CTAN sync 202106100301

---
 macros/latex/contrib/hvfloat/latex/hvfloat.sty | 53 +++++++++++++++-----------
 1 file changed, 31 insertions(+), 22 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 cb9f1b0742..c6bb68b8fb 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 105 2021-06-07 07:30:15Z herbert $
+%% $Id: hvfloat.sty 107 2021-06-09 06:43:25Z herbert $
 %%
 %%
 %% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
 %%   `hvfloat' offers rotating of captions and objects for floats
 %%
 \NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.27}
-\def\filedate{2021/06/07}
+\def\fileversion{2.28}
+\def\filedate{2021/06/09}
 \message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
 \ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
 \let\hvFloatFileVersion\fileversion
@@ -422,11 +422,10 @@
 \newcounter{hv@tempCNTfigB}% 
 \newcounter{hv@tempCNTtabA}%
 \newcounter{hv@tempCNTtabB}% 
-
-\newcounter{hv@pfigure}
-\newcounter{hv@ptable}
-\newcounter{subhv@pfigure}
-\newcounter{subhv@ptable}
+\newcounter{hv@pfigure}%
+\newcounter{hv@ptable}%
+\newcounter{subhv@pfigure}%
+\newcounter{subhv@ptable}%
 
 \newif\ifhv@star
 \newif\if@hvsubstar
@@ -453,12 +452,18 @@
 %  \setlength\hvWideWidth{\dimexpr\linewidth+\marginparwidth}%
   \hv@maxImageWidth=\textwidth
   \reset@special@float
-  \global\setcounter{hv@pfigure}{\value{figure}}%
-  \global\setcounter{hv@ptable}{\value{table}}%
+  \setcounter{hv@pfigure}{\value{figure}}%
+  \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}}%
+  \renewcommand\thehv@pfigure{\thefigure}%
+  \renewcommand\thehv@ptable{\thetable}%
+  \renewcommand\thehv@tempCNTfigA{\thefigure}%
+  \renewcommand\thehv@tempCNTfigB{\thefigure}%
+  \renewcommand\thehv@tempCNTtabA{\thetable}%
+  \renewcommand\thehv@tempCNTtabB{\thetable}%
   \gdef\hv@save@setting{#1}%
   \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
   \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
@@ -525,8 +530,10 @@
   \hv@maxImageWidth=\textwidth
   \ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
   \gdef\hv@floatType{#2}%
+  \ifx\relax#2\relax 
+    \setkeys{hvSet}{nonFloat,onlyText}
+  \fi
   \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}%
-  \ifx\relax#2\relax \setkeys{hvSet}{nonFloat=true}\fi
   \gdef\hv@floatObject{#3}%
   \@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}%
 }
@@ -642,15 +649,15 @@
   	  \else
 	    \ifx\hv@floatType\hv@figure
 	      \ifx\relax\hv@shortCap\relax 
-	        \figcaption{\hv@longCap}%
+	        \figcaption{\hv@longCap\ifx\hv@label\@empty\else\label{\hv@label}\fi}%
 	      \else
-	        \figcaption[\hv@shortCap]{\hv@longCap}%
+	        \figcaption[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\label{\hv@label}\fi}%
 	      \fi
 	    \else
 	      \ifx\relax\hv@shortCap\relax 
-	        \tabcaption{\hv@longCap}%
+	        \tabcaption{\hv@longCap\ifx\hv@label\@empty\else\label{\hv@label}\fi}%
 	      \else
-	        \tabcaption[\hv@shortCap]{\hv@longCap}%
+	        \tabcaption[\hv@shortCap]{\hv@longCap\ifx\hv@label\@empty\else\label{\hv@label}\fi}%
 	      \fi
 	    \fi
 	  \fi
@@ -660,9 +667,9 @@
   	  \else
             \let\@captype\hv@floatType
             \ifx\hv@shortCap\@empty\caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}\fi
+            \ifx\hv@label\@empty\else\label{\hv@label}\fi
           \fi
 	\fi
-	\ifx\hv@label\@empty\else\label{\hv@label}\fi 
       \endminipage
     }%
   \else
@@ -794,10 +801,10 @@
       \fi
       \centering
       \ifhv@fbox
-	\fbox{\usebox{\hvCaptionBox}}\\[\hvBelowCaptionSkip]%
+	\fbox{\usebox{\hvCaptionBox}}\\[0.5\hvBelowCaptionSkip]%
 	\fbox{\usebox{\hvObjectBox}}%
       \else
-	\usebox{\hvCaptionBox}\\[\hvBelowCaptionSkip]%
+	\usebox{\hvCaptionBox}\\[0.5\hvBelowCaptionSkip]%
 	\usebox{\hvObjectBox}%
       \fi
       \end{minipage}%
@@ -825,10 +832,10 @@
       \fi
       \centering
       \ifhv@fbox
-        \fbox{\usebox{\hvObjectBox}}\\[\hvAboveCaptionSkip]%
+        \fbox{\usebox{\hvObjectBox}}\\[0.5\hvAboveCaptionSkip]%
           \fbox{\usebox{\hvCaptionBox}}%
         \else
-          \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[\hvAboveCaptionSkip]%
+          \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[0.5\hvAboveCaptionSkip]%
           \usebox{\hvCaptionBox}%
         \fi
       \end{minipage}%
@@ -1084,15 +1091,17 @@
   \setcounter{totalnumber}{0}%
   \setcounter{dbltopnumber}{0}%
   \def\dblfloatpagefraction{0.5}%
+  \global\renewcommand\thehv@tempCNTfigA{xyz}%
+  \global\renewcommand\thehv@tempCNTfigB{xyz}%
   \begin{\hv@floatType*}[!t]
     \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}%
+        \global\refstepcounter{hv@tempCNTfigA}%
       \else
-        \refstepcounter{hv@tempCNTtabA}%   before caption
+        \global\refstepcounter{hv@tempCNTtabA}%   before caption
       \fi
       \label{\hv@label}%
     \fi        
-- 
cgit v1.2.3

