texlive[72452] Master/texmf-dist: hvfloat (3oct24)

commits+karl at tug.org commits+karl at tug.org
Thu Oct 3 22:33:48 CEST 2024


Revision: 72452
          https://tug.org/svn/texlive?view=revision&revision=72452
Author:   karl
Date:     2024-10-03 22:33:48 +0200 (Thu, 03 Oct 2024)
Log Message:
-----------
hvfloat (3oct24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hvfloat/Changes
    trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
    trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-4.inc

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/Changes	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/Changes	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,4 +1,7 @@
 hvfloat.sty:    
+2.51  2024-10-02  - added option nonFloatTopSkip, preset to 2pt like \interlineskip
+                    only valid for nonFloats and caption not on top
+2.50  2024-04-06  - first try for a check on page beginning
 2.49  2024-03-17  - bugfix for checkoddpage and FULLPAGE option
 2.48  2024-03-03  - added option fboxLines to get patial lines of \fbox
                     (package fbox)

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.tex 878 2024-03-16 20:49:50Z herbert $
+%% $Id: hvfloat.tex 1014 2024-10-03 08:22:14Z herbert $
 %\listfiles
 \errorcontextlines=100
 \documentclass[twoside,paper=a4,usegeometry,index=totoc]{scrartcl}
@@ -401,6 +401,7 @@
 \Lkeyword{nonFloat} & false     & \rowvsp The object isn't put in a floating
     environment, but printed as standard text with an additional caption.
     \rownl The float counter is increased as usual and can be referenced.\\
+\Lkeyword{nonFloatTopSkip} & 2pt  & Skip between text and object with caption below for nonFloat objects.\\
 \Lkeyword{wide} & false         & \rowvsp The float can use
     \Ldim{textwidth}$\,+\,$\Ldim{marginparwidth} as horizontal width.\\
 \Lkeyword{inMargin} & false  & \rowvsp Put object and frame into the margin.\\

Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,10 +1,11 @@
 %% Herbert Voss <hvoss at tug.org>
-%% Copyright (C) 2023
+%% Copyright (C) 2024
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN archives
 %% in directory macros/latex/base/lppl.txt.
 %%
+%%  width=2\paperwidth, height=variable
 %%
 %% ||1in+evenside --- |1in+oddside ---||       Image is 2\paperwidth wide, height is variable or user set
 %
@@ -26,6 +27,7 @@
   \let\c at hv@tempCNTtabA\c at table
   \checkoddpage
   \ifoddpage
+    \test at typeout{>>>>Befehl auf ungerader Seite, kein Test auf Anfang für Doppelseite!}%
     \if at twocolumn
       \if at firstcolumn
         \afterpage{afterpage{\do at hvFloat@doubleFullPage at ObjectAndCaption}}%  2nd Col and newpage
@@ -37,21 +39,27 @@
     \fi % end \if at twocolumn
   \else% evenpage 
     %---------
+    \global\savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
+    %\typeout{Boxmaße: \the\wd\hvObjectBox;\the\ht\hvObjectBox}%
     %\typeout{>>>>Setze hv at atPageBeginfalse}%
     \global\hv at atPageBeginfalse
+    \hv at float@head=\the\dimexpr+1in+\topmargin+\headheight+\headsep
+    \hv at float@foot=\the\dimexpr\paperheight-\hv at float@head-\textheight
+    %\typeout{Kopf: \the\hv at float@head}%
+    %\typeout{Fuß: \the\hv at float@foot}%
     \stepcounter{hvfloat at ref}%
     \zsavepos{\thehvfloat at ref}%
-    \@tempy=\dimexpr-\zposy{\thehvfloat at ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax
+    \@tempy=\dimexpr\paperheight-\zposy{\thehvfloat at ref} sp-1in-\topmargin-\headheight-\headsep\relax
     \@tempx=\dimexpr-\zposx{\thehvfloat at ref} sp+\evensidemargin+1in\relax
-    %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f at size}%
-    \ifdim\@tempy > \dimexpr\f at size pt + 2pt 
-      %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat at ref}%
+    \ifdim\@tempy > \dimexpr\f at size pt + 2pt % Test, ob Abbildung oben
+      \expandafter\ifdefined\csname HV at float@ref@\thehvfloat at ref\endcsname % already on top from last run?
+          \global\hv at atPageBegintrue 
+          \immediate\write\@auxout{\expandafter\gdef\csname HV at float@ref@\thehvfloat at ref\endcsname{1}}%
+      \fi
     \else
-      \ifdim\@tempx = \z@ 
-        %\typeout{>>>>Case 2,  Absolut oben links auf der Seite  \thehvfloat at ref }%
+      \ifdim\@tempx = \z@%
         \global\hv at atPageBegintrue
-      \else
-        %\typeout{>>>>Case 1,  Oben auf der Seite  \thehvfloat at ref, aber nicht am Anfang der Zeile}%
+        \immediate\write\@auxout{\expandafter\gdef\csname HV at float@ref@\thehvfloat at ref\endcsname{1}}%
       \fi
     \fi
   %---------

Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,10 +1,11 @@
 %% Herbert Voss <hvoss at tug.org>
-%% Copyright (C) 2023
+%% Copyright (C) 2024
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN archives
 %% in directory macros/latex/base/lppl.txt.
 %%
+%%  width=2\paperwidth, height=\paperheight
 %%
 %% ||1in+evenside --- |1in+oddside ---||
 %

Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,11 +1,14 @@
 %%
 %% Herbert Voss <hvoss at tug.org>
-%% Copyright (C) 2023
+%% Copyright (C) 2024
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN archives
 %% in directory macros/latex/base/lppl.txt.
 %%
+%% width=2\textwidth+\leftmargin+\rightmargin   height=variable
+%% _Without_ additional text on the doublepage
+%%
 %% ||1in+evenside --- |1in+oddside ---||
 %
 
@@ -34,24 +37,28 @@
     \hvfloat at typeout{do at hvFloat@doublePAGE: evenpage}%
     %---------
     \hv at atPageBeginfalse
-    \stepcounter{hvfloat at ref}%
+%    \stepcounter{hvfloat at ref}%
     \zsavepos{\thehvfloat at ref}%
     \@tempy=\dimexpr-\zposy{\thehvfloat at ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax
     \@tempx=\dimexpr-\zposx{\thehvfloat at ref} sp+\evensidemargin+1in\relax
-    %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f at size}%
+    \ifhv at test\marginnote{>>\the\@tempx >>\the\@tempy >>\f at size}\fi
     \ifdim\@tempy > \z@ 
-      %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat at ref}%
+      \test at typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat at ref}%
       \ifdim\@tempx < \z@ 
-         %\typeout{>>>>Case 0-1, Text oben auf der Seite  \thehvfloat at ref}%
+         \test at typeout{>>>>Case 0-1, Text oben auf der Seite  \thehvfloat at ref}%
+         \typeout{>>>>>-2.inc NEUER TEST: \the\@tempy; \the\ht\hvObjectBox}%
+         \ifdim\@tempy=\ht\hvObjectBox %  Annnahme, dass nur die Abbildung oben ist
+           \hv at atPageBegintrue
+         \fi
       \else
-        %\typeout{>>>>Case 0-2, Absolut oben links auf der Seite  \thehvfloat at ref}%
+        \test at typeout{>>>>Case 0-2, Absolut oben links auf der Seite  \thehvfloat at ref}%
         \hv at atPageBegintrue
       \fi
     \else
       \ifdim\@tempx > \z@ 
-        %\typeout{>>>>Case 1,  Oben auf der Seite  \thehvfloat at ref, aber nicht am Anfang der Zeile}%
+        \test at typeout{>>>>Case 1,  Oben auf der Seite  \thehvfloat at ref, aber nicht am Anfang der Zeile}%
       \else
-        %\typeout{>>>>Case 2,  Absolut oben links auf der Seite  \thehvfloat at ref }%
+        \test at typeout{>>>>Case 2,  Absolut oben links auf der Seite  \thehvfloat at ref }%
         \hv at atPageBegintrue
       \fi
     \fi

Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,10 +1,12 @@
 %% Herbert Voss <hvoss at tug.org>
-%% Copyright (C) 2023
+%% Copyright (C) 2024
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN archives
 %% in directory macros/latex/base/lppl.txt.
 %%
+%% width=2\textwidth+\leftmargin+\rightmargin   height=variable
+%% _With_ additional text on the doublepage
 %%
 %% ------------------------------------- the doublepage obejcts ---------------------------
 %% ||1in+evenside --- |1in+oddside ---||
@@ -96,21 +98,23 @@
     \fi  
   \else% we have an even page
     \hvfloat at typeout{do at hvFloat@doublePage:evenpage -> (\thepage)}%
-    %\typeout{>>>>Setze hv at atPageBeginfalse}%
+    \test at typeout{>>>>Setze hv at atPageBeginfalse}%
     \global\hv at atPageBeginfalse
-    \stepcounter{hvfloat at ref}%
+%    \stepcounter{hvfloat at ref}%
     \zsavepos{\thehvfloat at ref}%
     \@tempy=\dimexpr-\zposy{\thehvfloat at ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax
     \@tempx=\dimexpr-\zposx{\thehvfloat at ref} sp+\evensidemargin+1in\relax
-    %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f at size}%
+    \ifhv at test\marginnote{>>\the\@tempx >>\the\@tempy >>\f at size}\fi
     \ifdim\@tempy > \dimexpr\f at size pt + 2pt % Interlinespace
-      %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat at ref}%
+      \test at typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat at ref}%
+      \typeout{>>>>>-3.inc NEUER TEST Y:\the\@tempy; BOX:\the\ht\hvObjectBox}%
+      \ifdim\dimexpr\ht\hvObjectBox-\@tempy < \f at size pt %  Annnahme, dass nur die Abbildung oben ist
+        \hv at atPageBegintrue
+      \fi
     \else
       \ifdim\@tempx = \z@ 
-        %\typeout{>>>>Case 2,  Absolut oben links auf der Seite  \thehvfloat at ref }%
+        \test at typeout{>>>>Case 2,  Absolut oben links auf der Seite  \thehvfloat at ref }%
         \global\hv at atPageBegintrue
-      \else
-        %\typeout{>>>>Case 1,  Oben auf der Seite  \thehvfloat at ref, aber nicht am Anfang der Zeile}%
       \fi
     \fi
   %---------

Added: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-4.inc
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-4.inc	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-4.inc	2024-10-03 20:33:48 UTC (rev 72452)
@@ -0,0 +1,211 @@
+%% Herbert Voss <hvoss at tug.org>
+%% Copyright (C) 2024
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+%%  Option FULLPAGE,  complete paperarea on _one_ page even/odd 
+%%
+%% width=\textwidth+\leftmargin+\rightmargin   height=variable   --> FULLPAGE
+%% _With_ no additional text on the doublepage
+%%
+%% ------------------------------------- the fullpage obejcts ---------------------------
+%% ||1in+evenside --- |1in+oddside ---||
+%
+%\def\do@@@@hvFloat{%  special float page: caption <-> FULLPAGE images
+  \hvfloat at typeout{>>>do@@@@hvFloat: special float page}%
+  \ifx\hvSet at capPos\hv at After \global\hv@@capPos=1
+  \else
+    \ifx\hvSet at capPos\hv at Even  \global\hv@@capPos=2
+    \else
+      \ifx\hvSet at capPos\hv at Odd   \global\hv@@capPos=3
+      \else
+        \ifx\hvSet at capPos\hv at Inner   \global\hv@@capPos=4
+        \else
+          \ifx\hvSet at capPos\hv at Outer   \global\hv@@capPos=5
+          \else
+            \ifx\hvSet at capPos\hv at Right   \global\hv@@capPos=6% only for twocolumn mode
+            \else
+              \ifx\hvSet at capPos\hv at Left   \global\hv@@capPos=7% only for twocolumn mode
+              \else
+                \global\hv@@capPos=0
+              \fi
+            \fi
+          \fi
+        \fi
+      \fi
+    \fi
+  \fi
+  \hvfloat at typeout{>>>do@@@@hvFloat: hv at capPos is \the\hv@@capPos}%
+%  \checkoddpage
+  \hvfloat at typeout{>>>do@@@@hvFloat: set floattype}%
+  \set at caption@object{\hv at floatType}%  set caption and object into a box
+%  
+  \ifcase\hv@@capPos%   caption before object 0-> _always_ left
+    \hvfloat at typeout{>>>do@@@@hvFloat: setBottomCaption and setPageObject (0)}%
+    \setBottomCaption\setPageObject        
+  \or%                  caption after object 1-> _always_ right
+    \hvfloat at typeout{>>>do@@@@hvFloat: setPageObject and setBottomCaption (1)}%
+    \setPageObject\setBottomCaption        
+  \or%                  caption on even page 2-> left page
+    \ifoddpage
+      \hvfloat at typeout{>>>do@@@@hvFloat: afterpage-> oddpage/setBottomCaption and setPageObject (2)}%
+      \afterpage{\setBottomCaption\setPageObject}%
+    \else% we are on an even page
+      \hvfloat at typeout{>>>do@@@@hvFloat: evenpage/setBottomCaption and setPageObject (2)}%
+      \setBottomCaption\setPageObject
+    \fi
+  \or%                caption on odd page  3->right page
+    \if at twoside
+      \hvfloat at typeout{>>>do@@@@hvFloat: twoside and caption on oddpage (3)}%
+      \if at twocolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: twoside/twocolumn and caption on oddpage (3)}%
+        \ifoddpage
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/twocolumn/oddpage and caption on oddpage (3)}%
+          \if at firstcolumn%  on right side
+            \hvfloat at typeout{>>>do@@@@hvFloat: twoside/twocolumn/oddpage/firstcolumn and caption on oddpage (3)}%
+            \setBottomCaption\setPageObject        
+          \else
+            \hvfloat at typeout{>>>do@@@@hvFloat: afterpage->twoside/twocolumn/oddpage/secondcolumn and caption on oddpage (3)}%
+            \afterpage{\setPageObject\setBottomCaption}% start next column
+          \fi
+        \else% left (even) page
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/twocolumn/oddpage and caption on evenpage (3)}%
+          \if at firstcolumn
+            \hvfloat at typeout{>>>do@@@@hvFloat: afterpage->twoside/twocolumn/evenpage/firstcolumn and caption on oddpage (3)}%
+            \afterpage{\setPageObject\setBottomCaption}% start next column
+          \else
+            \hvfloat at typeout{>>>do@@@@hvFloat: twoside/twocolumn/evenage/secondcolumn and caption on oddpage (3)}%
+            \setPageObject\setBottomCaption
+          \fi
+        \fi
+      \else% onecolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: twoside/onecolumn and caption on oddpage (3)}%
+        \ifoddpage
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/onecolumn/oddpage and caption on oddpage (3)}%
+          \setPageObject\setBottomCaption
+        \else%  even page
+          \hvfloat at typeout{>>>do@@@@hvFloat: afterpage->twoside/onecolumn/evenpage and caption on oddpage (3)}%
+          \afterpage{\setPageObject\setBottomCaption}%
+        \fi
+      \fi
+    \else% oneside
+      \hvfloat at typeout{>>>do@@@@hvFloat: oneside and caption on oddpage (3)}%
+      \if at twocolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn and caption on oddpage (3)}%
+        \ifoddpage
+          \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn/oddpage and caption on oddpage (3)}%
+          \if at firstcolumn%  on right side
+            \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn/oddpage/firstcolumn and caption on oddpage (3)}%
+            \setBottomCaption\setPageObject
+          \else
+            \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn/oddpage/secondcolumn and caption on oddpage (3)}%
+            \setPageObject\setBottomCaption
+          \fi
+        \else
+          \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn/evenpage and caption on oddpage (3)}%
+          \if at firstcolumn%  on left side
+            \hvfloat at typeout{>>>do@@@@hvFloat: afterpage->oneside/twocolumn/evenpage/firstcolumn and caption on oddpage (3)}%
+            \afterpage{\setPageObject\setBottomCaption}%
+          \else
+            \hvfloat at typeout{>>>do@@@@hvFloat: oneside/twocolumn/evenpage/secondcolumn and caption on oddpage (3)}%
+            \setPageObject\setBottomCaption
+          \fi
+        \fi
+      \else % onecolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: oneside/onecolumn and caption on oddpage (3)}%
+        \ifoddpage
+          \hvfloat at typeout{>>>do@@@@hvFloat: oneside/onecolumn/oddpage and caption on oddpage (3)}%
+          \setBottomCaption\setPageObject%
+        \else
+          \hvfloat at typeout{>>>do@@@@hvFloat: afterpage->oneside/onecolumn/evenpage and caption on oddpage (3)}%
+          \afterpage{\setBottomCaption\setPageObject}%
+        \fi
+      \fi
+    \fi
+  \or%                caption on the inner column 4->inner
+%    \set at caption@object
+    \if at twocolumn
+      \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn and caption on inner column (4)}%
+      \ifoddpage
+        \hvfloat at typeout{>>>do@@@@hvFloat: twoside/oddpage and caption on inner column (4)}%
+        \if at firstcolumn%  on right side
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/oddpage/firstcolumn and caption on inner column (4)}%
+	  \setBottomCaption\setPageObject
+        \else          % right column on right side
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/oddpage/secondcolumn and caption on inner column (4)}%
+          \setPageObject\setBottomCaption%  start next firstcolumn next page
+        \fi
+      \else
+        \hvfloat at typeout{>>>do@@@@hvFloat: twoside/evenpage and caption on inner column (4)}%
+        \if at firstcolumn%  on left side
+          \hvfloat at typeout{>>>do@@@@hvFloat: afterpage^2 -> twoside/evenpage/firstcolumn and caption on inner column (4)}%
+          \afterpage{\afterpage{\setBottomCaption\setPageObject}}% start next page/first column
+        \else% left page/column
+          \hvfloat at typeout{>>>do@@@@hvFloat: twoside/evenpage/secondcolumn and caption on inner column (4)}%
+          \setBottomCaption\setPageObject% start on same page/column 
+        \fi
+      \fi 
+    \else% onecolumn
+      \hvfloat at typeout{>>>do@@@@hvFloat: onecolumn and caption on inner column (4)}%
+      \setBottomCaption\setPageObject
+    \fi       
+  \or%                caption on the outer column  5->outer
+%    \set at caption@object
+    \if at twocolumn
+      \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn and caption on outer column (5)}%
+      \ifoddpage
+        \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/oddpage and caption on outer column (5)}%
+        \if at firstcolumn
+          \hvfloat at typeout{>>>do@@@@hvFloat: afterpage^2 -> firstcolumn/oddpage/twocolumn and caption on outer column (5)}%
+          \afterpage{\afterpage{\setBottomCaption\setPageObject}}%
+        \else
+          \hvfloat at typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/oddpage/secondcolumn and caption on outer column (5)}%
+          \afterpage{\setBottomCaption\setPageObject}%
+        \fi
+      \else% even page (left)
+        \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/evenpage and caption on outer column (5)}%
+        \if at firstcolumn
+          \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/evenpage/firstcolumn and caption on outer column (5)}%
+          \setBottomCaption\setPageObject
+        \else   
+          \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/evenpage/secondolumn and caption on outer column (5)}%
+%%%               !!!!  to-do: !!!!          
+        \fi
+      \fi 
+    \else% onecolumn
+      \setBottomCaption\setPageObject
+    \fi 
+  \or%                caption after object on same page 6->right for twocolumn
+    \if at twocolumn
+      \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn and caption after object (6)}%
+      \if at firstcolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/firstcolumn and caption after object (6)}%
+        \afterpage{\setPageObject\setBottomCaption}%
+      \else
+        \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/secondcolumn and caption after object (6)}%
+        \setPageObject\setBottomCaption
+      \fi
+    \else%  always caption _after_ object for onecolumn 
+      \hvfloat at typeout{>>>do@@@@hvFloat: onecolumn and caption after object (6)}%
+      \setPageObject\setBottomCaption
+    \fi  
+  \or%                caption before object on same page 7->left for twocolumn
+    \if at twocolumn
+      \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn and caption before object (7)}%
+      \if at firstcolumn
+        \hvfloat at typeout{>>>do@@@@hvFloat: twocolumn/firstcolumn and caption before object (7)}%
+        \setBottomCaption\setPageObject
+      \else
+        \hvfloat at typeout{>>>do@@@@hvFloat: afterpage -> twocolumn/secondcolumn and caption before object (7)}%
+        \afterpage{\setBottomCaption\setPageObject}%
+      \fi    
+    \else%        onecolumn -> same as before
+      \hvfloat at typeout{>>>do@@@@hvFloat: onecolumn and caption before object (7)}%
+      \setBottomCaption\setPageObject
+    \fi
+  \fi
+  \endgroup% startet at main \hvFloat
+%}
+%


Property changes on: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-4.inc
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty	2024-10-02 23:44:27 UTC (rev 72451)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty	2024-10-03 20:33:48 UTC (rev 72452)
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 879 2024-03-17 10:44:09Z herbert $
+%% $Id: hvfloat.sty 1014 2024-10-03 08:22:14Z herbert $
 %%
 %%
 %% IMPORTANT NOTICE:
@@ -16,8 +16,8 @@
 %%   `hvfloat' offers rotating of captions and objects for floats
 %%
 \NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.49}
-\def\filedate{2024/03/17}
+\def\fileversion{2.51}
+\def\filedate{2024/10/02}
 \ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
 \let\hvFloatFileVersion\fileversion
 %
@@ -60,6 +60,8 @@
 \newdimen\@tempy
 \newcounter{hvfloat at testCtr}
 \newcounter{hvfloat at ref}
+\newdimen\hv at float@head
+\newdimen\hv at float@foot
 \renewcommand\thehvfloat at ref{tmp@\arabic{hvfloat at ref}}
 \setcounter{hvfloat at ref}{0}
 \newif\ifhv at atPageBegin
@@ -86,6 +88,7 @@
 \newlength\hvCapWidth
 \newlength\hvWideWidth
 \newlength\hvMultiFloatSkip
+\newlength\hvNonFloatTopSkip
 \newlength\hvMaxCapWidth
 \newlength\hvFloatFullWidth % only for user purpose
 \AtBeginDocument{\hvFloatFullWidth=\the\dimexpr\textwidth+\marginparwidth+\marginparsep\relax}
@@ -188,10 +191,14 @@
 \define at key{hvSet}{multiFloatSkip}[\normalbaselineskip]{% a width with the unit pt
 	\setlength\hvMultiFloatSkip{#1}%
 }
+\define at key{hvSet}{nonFloatTopSkip}[\medskipamount]{% a topskip for nonfloats with the unit pt
+	\setlength\hvNonFloatTopSkip{#1}%
+}
 \define at boolkey{hvSet}[hv@]{useOBox}[true]{}%		use of the hvOBox contents
 \define at boolkey{hvSet}[hv@]{nonFloat}[true]{}%		Do not use float environment
 \define at boolkey{hvSet}[hv@]{inMargin}[true]{}%		use of the hvOBox contents
 \define at boolkey{hvSet}[hv@]{onlyText}[true]{}%		Write the caption only as text
+\define at boolkey{hvSet}[hv@]{onlyTextInTOC}[true]{}%	caption without number into TOC
 \define at boolkey{hvSet}[hv@]{wide}[true]{}%		Write the caption only as text
 \define at boolkey{hvSet}[hv@]{forceLeft}[true]{}%		use only one \afterpage instead of \afterpage{\afterpage{..
 \define at boolkey{hvSet}[hv@]{twoColumnCaption}[true]\global\@nameuse{hv at twoColumnCaption#1}{}%	Write the caption only as text
@@ -304,7 +311,7 @@
 	floatPos=, rotAngle=0, capWidth=n, capAngle=0, objectAngle=0,
 	capPos=bottom, capVPos=center, objectPos=center, capHPos=center,
 	floatCapSep=5pt, useOBox=false, forceLeft=false,
-	onlyText=false, wide=false, fullpage=false, FULLPAGE=false, 
+	onlyText=false, onlyTextInTOC=false, wide=false, fullpage=false, FULLPAGE=false, 
 	doubleFULLPAGE=false, doublePage=false, doublePAGE=false,
         multiFloat=false,subFloat=false,inMargin=false,
 	separatorLine,objectFrame=false, fboxLines={ltrb}, fboxSep=0pt,
@@ -312,6 +319,7 @@
 	capFormat={}, subcapFormat={}, twoColumnCaption=false,
 	sameHeight=false,
 	bindCorr=\z@,sepLineskip=0pt,
+	nonFloatTopSkip=\medskipamount,
 	vFill=false, minTextlines=2,
 	forceOutput=false, nonFloat=false, 
 }%
@@ -541,7 +549,6 @@
 
 \def\hvFloat at i*{\@ifnextchar[{\do at hvFloat}{\do at hvFloat[]}}
 \def\do at hvFloat[#1]{%
-  \ifhv at Debug\marginnote{\textbf{hvFloat}}\fi%
   %\marginnote{\textbf{hvFloat}}%
   \savebox\hvObjectBox{}%  
   \begingroup
@@ -568,6 +575,7 @@
                              {\hv at subcaption@format}%
   \fi
   \gdef\hv at floatType{figure}%  presetting
+  \ifhv at Debug\marginnote{\textbf{hvFloat}}\fi%
   \@ifnextchar+{\do at multiFloat}{\hvFloat at ii[#1]}%
 }
 
@@ -642,7 +650,7 @@
   \ifhv at capbeside\def\@@temp{1}\else\def\@@temp{0}\fi
   \ifhv at sameHeight\global\hv at global@sameHeighttrue\else\global\hv at global@sameHeightfalse\fi  
   \global\hvSet at bindCorrection=\hvSet at bindCorr%  for doublepage objects   
-  \global\hv at floatCapSep=\hvSet at floatCapSep%
+  \global\hv at floatCapSep=\hvSet at floatCapSep
 %
   \ifhv at fullpage
     \hvfloat at typeout{>>>> do@@hvFloat: fullpage true}%
@@ -662,11 +670,11 @@
         \ifhv at doubleFullPage
           \hvfloat at typeout{>>>> do@@hvFloat: doubleFullPage true}%
           \setlength\hvCapWidth{\textwidth}%
-          \expandafter\do at hvFloat@doubleFullPage\@@temp%  fullpage with caption under an odd page
+          \expandafter\do at hvFloat@doubleFullPage\@@temp %  fullpage with caption under an odd page
         \else
           \ifhv at doublePAGE
             \hvfloat at typeout{>>>> do@@hvFloat: doublePAGE true}%
-            \expandafter\do at hvFloat@doublePAGE\@@temp%  fullpage with caption rotated or under on an odd page
+            \expandafter\do at hvFloat@doublePAGE\@@temp %  fullpage with caption rotated or under on an odd page
           \else
             \ifhv at doublePage
               \hvfloat at typeout{>>>> do@@hvFloat: doublePage true}%
@@ -689,11 +697,15 @@
 %
 \def\do@@@hvFloat{%  no special float page, caption and image on top of each other or side by side
   \def\@tempa{90}%
+  \setlength\hvWideWidth{\dimexpr\textwidth+\marginparsep+\marginparwidth-10pt}%  Mehr Platz rechts
   \ifx\hvSet at rotAngle\@tempa 
     \setlength\hvMaxCapWidth{\textheight}%
   \else 
     \setlength\hvMaxCapWidth{\hvWideWidth}%
   \fi
+  \ifhv at nonFloat
+    \ifx\hvSet at capPos\hv at Top\else\vspace{\hvNonFloatTopSkip}\fi
+  \fi
 %
 % First we save the object in \hvObjectBox
 %
@@ -742,14 +754,12 @@
           \ifhv at capbeside
             \ifhv at wide
               \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
-              \@tempdima=\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax
+              \@tempdima=\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax % 2, damit nicht zu dicht am Rand
             \else
               \setlength\hvCapWidth{\hvSet at capWidth\columnwidth}%
               \@tempdima=\the\dimexpr\columnwidth-\hvObjectWidth-\hv at floatCapSep\relax
             \fi
-            \ifdim\hvCapWidth>\@tempdima
-              \hvCapWidth=\@tempdima
-            \fi
+            \ifdim\hvCapWidth>\@tempdima \hvCapWidth=\@tempdima\fi
           \else
             \ifhv at wide
               \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
@@ -768,7 +778,8 @@
 % 	  \ifx\relax\hv at caption@format\relax\else\expandafter\captionsetup\expandafter{\hv at caption@format}\fi
       \ifhv at nonFloat
 	  \ifhv at onlyText
-	    \hv at longCap
+            \hv at longCap
+            \ifhv at onlyTextInTOC\captionlistentry{\hv at longCap}\fi
   	  \else
 	    \ifx\hv at floatType\hv at figure
 	      \ifx\relax\hv at shortCap\relax 
@@ -786,9 +797,10 @@
 	  \fi
 	\else 
 	  \ifhv at onlyText
-	    \hv at longCap
+            \hv at longCap
+            \ifhv at onlyTextInTOC\captionlistentry{\hv at longCap}\fi
   	  \else
-  	   	  \expandafter\ifx\hv at longCap\@empty \else
+  	    \expandafter\ifx\hv at longCap\@empty \else
             \let\@captype\hv at floatType
             \ifx\hv at shortCap\@empty\caption{\hv at longCap}\else\caption[\hv at shortCap]{\hv at longCap}\fi
             \ifx\hv at label\@empty\else\label{\hv at label}\fi
@@ -804,7 +816,8 @@
 %	  \ifx\relax\hv at caption@format\relax\else\expandafter\captionsetup\expandafter{\hv at caption@format}\fi
   	  \ifhv at nonFloat
   	    \ifhv at onlyText
-  	      \hv at longCap
+            \hv at longCap
+            \ifhv at onlyTextInTOC\captionlistentry{\hv at longCap}\fi
             \else
 	      \ifx\hv at floatType\hv at figure 
 	        \ifx\hv at shortCap\@empty \figcaption{\hv at longCap}\else\figcaption[\hv at shortCap]{\hv at longCap}\fi
@@ -815,7 +828,8 @@
 	  \else
 	    \expandafter\ifx\hv at longCap\@empty \else
   	    \ifhv at onlyText
-  	      \hv at longCap
+            \hv at longCap
+            \ifhv at onlyTextInTOC\captionlistentry{\hv at longCap}\fi
             \else
               \let\@captype\hv at floatType
               \ifx\hv at shortCap\@empty \caption{\hv at longCap}\else\caption[\hv at shortCap]{\hv at longCap}%
@@ -1647,7 +1661,8 @@
     \setlength\belowcaptionskip{5pt}%
     \setlength\abovecaptionskip{0pt}%
     \ifhv at onlyText
-      \hv at longCap
+            \hv at longCap
+            \ifhv at onlyTextInTOC\captionlistentry{\hv at longCap}\fi
     \else
       \edef\@captype{\hv at floatType}%
       \expandafter\ifx\expandafter\relax\hv at shortCap\relax 



More information about the tex-live-commits mailing list.