texlive[62893] Master/texmf-dist: hvfloat (3apr22)
commits+karl at tug.org
commits+karl at tug.org
Sun Apr 3 22:55:41 CEST 2022
Revision: 62893
http://tug.org/svn/texlive?view=revision&revision=62893
Author: karl
Date: 2022-04-03 22:55:41 +0200 (Sun, 03 Apr 2022)
Log Message:
-----------
hvfloat (3apr22)
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.sty
Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/Changes 2022-04-03 20:55:18 UTC (rev 62892)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/Changes 2022-04-03 20:55:41 UTC (rev 62893)
@@ -1,4 +1,6 @@
hvfloat.sty:
+2.38 2022-04-02 - added option l for capWidth to get a caption with linewidth,
+ if also using the option wide for the object
2.37 2022-02-28 - fix bug for doublepage floats in twoside and twocolumn mode
and captions after the image
2.36 2022-02-22 - fix bug for outer captions (was wrong)
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 2022-04-03 20:55:18 UTC (rev 62892)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex 2022-04-03 20:55:41 UTC (rev 62893)
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.tex 318 2021-11-20 07:30:54Z herbert $
+%% $Id: hvfloat.tex 488 2022-04-02 19:32:17Z herbert $
\listfiles
\errorcontextlines=100
\documentclass[twoside,paper=a4,usegeometry]{scrartcl}
@@ -1038,8 +1038,6 @@
\hvblindtext
-
-
\begin{lstlisting}
\hvFloat[wide,
capPos=inner,
@@ -1086,7 +1084,31 @@
\endgroup
+With the optional argument \Lkeyset{capWidth=l} the caption can be terminated
+to the current line width. With the optional argument \Lkeyset{capHPos=right} one cat set
+the caption to the left, center, or right of the full width which is linewidth and margin width.
+
+\begin{lstlisting}
+\hvFloat[capPos=bottom,capWidth=l,wide,capHPos=right]{figure}
+ {\includegraphics[width=0.49\hvWideWidth]{images/CTAN}\quad
+ \includegraphics[width=0.49\hvWideWidth]{images/CTAN}}
+ {\hvblindtext}
+ {label}
+\end{lstlisting}
+
+
+\marginnote{Fig.~\ref{label}}
+\hvFloat[capPos=bottom,capWidth=l,wide,capHPos=right]{figure}
+ {\includegraphics[width=0.49\hvWideWidth]{images/CTAN}\quad
+ \includegraphics[width=0.49\hvWideWidth]{images/CTAN}}
+ {\hvblindtext}
+ {label}
+
+
+\hvblindtext
+
+
\section{The star version \Lcs{hvFloat*}}\label{star-version0}
In the \Index{twocolumn} mode the floating environment can be set over both
columns with the star version \Lcs{hvFloat*}. The floating environment will
Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty 2022-04-03 20:55:18 UTC (rev 62892)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty 2022-04-03 20:55:41 UTC (rev 62893)
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 392 2022-01-09 10:20:33Z herbert $
+%% $Id: hvfloat.sty 488 2022-04-02 19:32:17Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.36}
-\def\filedate{2022/02/22}
+\def\fileversion{2.38}
+\def\filedate{2022/04/02}
%\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
\let\hvFloatFileVersion\fileversion
@@ -68,6 +68,8 @@
\newlength\hvMaxCapWidth
%\AtBeginDocument{%
% \setlength\hv at BottomSpace{\dimexpr\paperheight-1in-\topmargin-\headheight-\headsep-\textheight}}
+\newlength\hvFullWidth % only for user purpose
+\setlength\hvFullWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}
\newsavebox\hvObjectBox
\newsavebox\hvCaptionBox
@@ -92,6 +94,7 @@
\def\hv at Even{evenPage}
\def\hv at Odd{oddPage}
\def\hv at Natural{n}
+\def\hv at LineWidth{l}
\def\hv at Width{w}
\def\hv at Height{h}
\def\hv at Zero{0}
@@ -104,7 +107,7 @@
\define at key{hvSet}{rotAngle}[0]{% rotates caption AND image together
\def\hvSet at rotAngle{#1}%
}
-\define at key{hvSet}{capWidth}[n]{% (n)atural width|object (w)idth)|object (h)eight|<scale of \columnwidth>
+\define at key{hvSet}{capWidth}[n]{% (l)inewidth|(n)atural width|object (w)idth)|object (h)eight|<scale of \columnwidth>
\def\hvSet at capWidth{#1}%
}
\define at key{hvSet}{capAngle}[0]{% -360..+360, only integers
@@ -619,37 +622,42 @@
\ifx\hvSet at capWidth\hv at Height% captionwidth=objectheight
\setlength\hvCapWidth{\ht\hvObjectBox}%
\else
- \ifx\hvSet at capWidth\hv at Natural% captionwidth=\linewidth-\objectwidth-separation
- \ifhv at capbeside
- \ifhv at wide
- \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax}%
- \else
- \ifhv at star
- \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \ifx\hvSet at capWidth\hv at LineWidth% captionwidth=objectheight
+ \setlength\hvCapWidth{\linewidth}%
+ \typeout{>>>>\the\hvCapWidth}%
+ \else
+ \ifx\hvSet at capWidth\hv at Natural% captionwidth=\linewidth-\objectwidth-separation
+ \ifhv at capbeside
+ \ifhv at wide
+ \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax}%
\else
- \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \ifhv at star
+ \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \else
+ \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \fi
\fi
- \fi
- \else
- \setlength\hvCapWidth{\columnwidth}%
- \fi
- \else
- \ifhv at capbeside
- \ifhv at wide
- \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
- \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax}%
\else
- \setlength\hvCapWidth{\hvSet at capWidth\columnwidth}%
- \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \setlength\hvCapWidth{\columnwidth}%
\fi
- \ifdim\hvCapWidth>\@tempdima
- \setlength\hvCapWidth{\@tempdima}%
- \fi
\else
- \ifhv at wide
- \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
+ \ifhv at capbeside
+ \ifhv at wide
+ \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
+ \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \else
+ \setlength\hvCapWidth{\hvSet at capWidth\columnwidth}%
+ \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv at floatCapSep\relax}%
+ \fi
+ \ifdim\hvCapWidth>\@tempdima
+ \setlength\hvCapWidth{\@tempdima}%
+ \fi
\else
- \setlength\hvCapWidth{\hvSet at capWidth\columnwidth}%
+ \ifhv at wide
+ \setlength\hvCapWidth{\hvSet at capWidth\hvWideWidth}%
+ \else
+ \setlength\hvCapWidth{\hvSet at capWidth\columnwidth}%
+ \fi
\fi
\fi
\fi
@@ -658,6 +666,7 @@
\saveCaptionSkip% we put this space ourselve
\ifnum\hvSet at capAngle=0 % need rotation?
\savebox\hvCaptionBox{% NO rotation
+ \typeout{>>>>\the\hvCapWidth}%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv at caption@format\relax\else\expandafter\captionsetup\expandafter{\hv at caption@format}\fi
\ifhv at nonFloat
@@ -688,9 +697,9 @@
\fi
\fi
\endminipage
- }%
+ }% end CaptionBox without rotation
\else
- \savebox\hvCaptionBox{% Rotation
+ \savebox\hvCaptionBox{% with Rotation
\rotatebox{\hvSet at capAngle}{%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv at caption@format\relax\else\expandafter\captionsetup\expandafter{\hv at caption@format}\fi
@@ -777,11 +786,12 @@
\ifoddpageoroneside\hv@@capPos=0\else\hv@@capPos=2\fi
\else
\ifx\hvSet at capPos\hv at Outer
- \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
+ \ifoddpage\hv@@capPos=2\else\hv@@capPos=0\fi
+% \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
% even page (left=0) | odd page (oneside) (right=2)
\else
\ifx\hvSet at capPos\hv at Before
- \hv@@capPos=0% same as cappos=right
+ \hv@@capPos=0% same as cappos=left
\else
\ifx\hvSet at capPos\hv at After
\hv@@capPos=2% same as capPos=right
@@ -796,7 +806,8 @@
%%%%
%\typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
\savebox{\@tempboxa}{% ***** @tempbox start
- \expandafter\ifcase\the\hv@@capPos% 0 is LEFT START \ifcase
+ \expandafter%
+ \ifcase\the\hv@@capPos % 0 is LEFT START \ifcase
\ifx\hvSet at capVPos\hv at Center
\put at CaptionBox
\hspace{\hv at floatCapSep}% capfloatsep
@@ -846,7 +857,7 @@
\hspace{\hv at floatCapSep}% capfloatsep
\put at CaptionBox[1]%
\else
- \put at ObjectBox[2]%
+ \put at ObjectBox[2]% bottom
\hspace{\hv at floatCapSep}% capfloatsep
\put at CaptionBox[2]%
\fi
@@ -1122,12 +1133,17 @@
\ifoddpage
\if at twocolumn
\if at firstcolumn
+ \hv at typeout{do at hvFloat@doublePage:oddpage->twocolumn->firstcolumn}%
\ifhv at switchType
+ \hv at typeout{hvfloat: switched to floattype p}%
\afterpage{\do at hvFloat@doublePAGECaptionRight{#1}}%
\else
- \afterpage{\afterpage{\do at hvFloat@doublePageCaptionRight{#1}}}%
+ \hv at typeout{calling do at hvFloat@doublePageCaptionRight}%
+ %\afterpage{
+ \afterpage{\do at hvFloat@doublePageCaptionRight{#1}}%}%
\fi
\else
+ \hv at typeout{do at hvFloat@doublePage:oddpage->twocolumn->secondcolumn}%
\ifhv at tugboat
\do at hvFloat@doublePageCaptionRight{#1}%
\else
@@ -1174,11 +1190,13 @@
}
%
\def\do at hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ----------------------------------
- \do at hvFloat@doublePageCaptionRightObjectLeft{0pt}%
+ \hv at typeout{do at hvFloat@doublePageCaptionRight->start}%
+ \do at hvFloat@doublePageCaptionRightObjectLeft{0pt}%
\afterpage{\do at hvFloat@doublePageCaptionRightObjectRight{#1}}%
}
%
\def\do at hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object
+ \hv at typeout{do at hvFloat@doublePageCaptionRightObjectLeft: start}%
\begin{\hv at floatType*}[!t]
\hv at set@noverticalSpace
\hfuzz=\maxdimen
@@ -1185,8 +1203,7 @@
\let\c at hv@tempCNTfigA\c at figure
\let\c at hv@tempCNTtabA\c at table
\expandafter\hvFloatSet\expandafter{\hv at save@setting}%
- \expandafter\hvFloatSet\expandafter{\hv at save@setting}%
- \hv at typeout{Floatpositionsparameter: !t}%
+ \hv at typeout{Float position parameter is for left page: !t}%
\global\savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
\clipbox*{0 -\depth{} \hv at leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\ifx\hv at label\@empty
@@ -1295,10 +1312,13 @@
\expandafter\global\expandafter\savebox\expandafter\hv at boxRightPage\expandafter{\clipbox*{\hv at leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}%
\checkoddpage
\ifoddpage
+ \hv at typeout{do at hvFloat@doublePAGE: oddpage}%
\if at twocolumn
\if at firstcolumn
+ \hv at typeout{do at hvFloat@doublePAGE: ifoddpage->twocolumn->firstcolumn}%
\afterpage{\do at hvFloat@doublePAGECaptionRight{#1}}%
\else
+ \hv at typeout{do at hvFloat@doublePAGE: ifoddpage->twocolumn->secondcolumn}%
\do at hvFloat@doublePAGECaptionRight{#1}%
\fi
\else
@@ -1305,6 +1325,7 @@
\do at hvFloat@doublePAGECaptionRight{#1}%
\fi
\else
+ \hv at typeout{do at hvFloat@doublePAGE: evenpage}%
\if at twocolumn
\if at firstcolumn
\afterpage{\afterpage{\afterpage{\do at hvFloat@doublePAGECaptionRight{#1}}}}%
@@ -1320,6 +1341,7 @@
%
\def\do at hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
+ \hv at typeout{do at hvFloat@doublePAGECaptionRight->start}%
\afterpage{%
\hfuzz=\maxdimen
\expandafter\hvFloatSet\expandafter{\hv at save@setting}%
@@ -1395,10 +1417,15 @@
% \savebox\hv at rightBox{\clipbox*{\the\hv at leftPageObjectWidth{} \depth{} \width{} \height}{\usebox\hvObjectBox}}%
% \expandafter\captionsetup\expandafter{\hv at caption@format}%
\ifoddpage
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: ifoddpage=true}%
\ifcase\hv@@capPos % =0 Caption before
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: caption before}%
\if at twocolumn
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: twocolumn=true}%
\if at firstcolumn
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: firstcolumn=true}%
\ifhv at twoColumnCaption
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: twoColumnCaption=true}%
\set at Normal@Bottom at Caption*
\afterpage{\do at hvFloat@doubleFULLPAGE at CaptionBefore}%
\else
@@ -1413,10 +1440,14 @@
\do at hvFloat@doubleFULLPAGE at CaptionBefore
\fi
\or % =1 Caption after
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: caption after}%
\ifhv at twoColumnCaption
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: twoColumnCaption=true}%
\if at firstcolumn
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: firstcolumn=true}%
\afterpage{\do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol}%
\else
+ \hv at typeout{do at hvFloat@doubleFULLPAGE: firstcolumn=false}%
\do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol
\fi
\else
@@ -1573,8 +1604,7 @@
\refstepcounter{hv at tempCNTtabA}% before caption
\fi
\ifx\hv at label\@empty\else\label{\hv at label}\fi
- \newpage
- \if at twocolumn\null\newpage\fi
+ \newpage\if at twocolumn\null\newpage\fi
\global\savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
\thispagestyle{empty}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
@@ -1606,7 +1636,9 @@
}
\def\do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol{%
+ \hv at typeout{do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol: start} %
\afterpage{%
+ \hv at typeout{do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol: afterpage start} %
\global\savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
@@ -1618,7 +1650,8 @@
\fi
\ifx\hv at label\@empty\else\label{\hv at label}\fi
\clipbox*{0 0 \the\hv at leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \newpage\if at twocolumn\null\newpage\fi
+ \newpage\if at twocolumn\null\newpage\fi
+ \hv at typeout{do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol: insert newpage} %
\global\savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
\thispagestyle{empty}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
@@ -1631,7 +1664,7 @@
\refstepcounter{hv at tempCNTtabB}% before caption
\fi
\ifx\hv at label\@empty\else\label{\hv at label-2}\fi
- \newpage
+ \newpage\if at twocolumn\null\newpage\fi
\begin{\hv at floatType*}[!b]
\hv at twoColumnCaptiontrue
\ifhv at separatorLine\drawSepLine\fi
@@ -1648,6 +1681,7 @@
\ifx\hv at label\@empty\else\label{\hv at label-cap}\fi
\end{\hv at floatType*}%
}%
+ \hv at typeout{do at hvFloat@doubleFULLPAGE at CaptionAfterTwoCol: afterpage done} %
}
\def\do at hvFloat@doubleFULLPAGE at CaptionOther#1{%
More information about the tex-live-commits
mailing list.