diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-04 21:10:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-04 21:10:46 +0000 |
commit | cf284a15d2d7c72b692868e6b24a8fa811d10738 (patch) | |
tree | e9f4cbbd455ddfb17fa57931740d7c027d8026b8 /Master/texmf-dist | |
parent | 3d467197a1473297abaebb4d2a9f9c8d2d837a22 (diff) |
hvfloat (4mar24)
git-svn-id: svn://tug.org/texlive/trunk@70394 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/hvfloat/Changes | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf | bin | 6384414 -> 6393567 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex | 68 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc | 42 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc | 264 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty | 309 |
8 files changed, 450 insertions, 292 deletions
diff --git a/Master/texmf-dist/doc/latex/hvfloat/Changes b/Master/texmf-dist/doc/latex/hvfloat/Changes index 41fa127bf1d..541dc4d5c7f 100644 --- a/Master/texmf-dist/doc/latex/hvfloat/Changes +++ b/Master/texmf-dist/doc/latex/hvfloat/Changes @@ -1,4 +1,6 @@ hvfloat.sty: +2.48 2024-03-03 - added option fboxLines to get patial lines of \fbox + (package fbox) 2.47 2023-10-16 - added type doubleFullPage for images with a width of 2\paperwidth, but variable height and possible text on both pages. diff --git a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf Binary files differindex be10a26587d..30058a04750 100644 --- a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf +++ b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf diff --git a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex index 1ab2adddaab..40bb098819c 100644 --- a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex +++ b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex @@ -1,7 +1,7 @@ -%% $Id: hvfloat.tex 774 2023-10-16 13:44:29Z herbert $ -\listfiles +%% $Id: hvfloat.tex 876 2024-03-03 14:04:56Z herbert $ +%\listfiles \errorcontextlines=100 -\documentclass[twoside,paper=a4,usegeometry]{scrartcl} +\documentclass[twoside,paper=a4,usegeometry,index=totoc]{scrartcl} \usepackage{fontspec} \usepackage[silent]{libertinus-otf} %\usepackage[scaled=0.85]{beramono} @@ -251,6 +251,7 @@ way with \Lcs{setlength} or \Lcs{addtolength}. The following packages are loaded by \Lpack{hvfloat} and the optional argument \Loption{hypcap} is passed to the packages \Lpack{caption} and \Lpack{subcaption}: +\Lpack{fbox}, \Lpack{caption}, \Lpack{subcaption}, \Lpack{atbegshi}, @@ -400,6 +401,8 @@ There are the following keywords: \Lkeyword{inMargin} & false & \rowvsp Put object and frame into the margin.\\ \Lkeyword{objectFrame} & false & \rowvsp Put a frame with no separation around the float object.\\ +\Lkeyword{fboxLines} & ltrb & \rowvsp Lines around the box l)eft, t)op, r)ight, b)ottom\\ +\Lkeyword{fboxSep} & 0pt & \rowvsp Additional box separation (like \Ldim{fboxsep})\\ \Lkeyword{style} & \none & \rowvsp Use a defined style.\\ \Lkeyword{capFormat} & \none & \rowvsp Define formatting options for \Lcs{caption}; see documentation of package \Lpack{caption}.\\ @@ -537,6 +540,23 @@ minus the width of the object and the space between object and caption, which is the separation between object and caption, and the current linewidth.}{fig:width1} +The same with box lines only on the left and right: + +\begin{lstlisting} +\hvFloat[floatPos=!htb,capPos=after,objectFrame, + fboxLines=lr,fboxSep=0pt]{figure}{\includegraphics[scale=1.5]{images/rose}}% + {Caption right beside with a \emph{natural} width, which is given by the width of the object, + the separation between object and caption, and the current linewidth.}{fig:width1A} +\end{lstlisting} + +\MarginNote{Fig.~\ref{fig:width1A}} +\hvFloat[floatPos=!htb,capPos=after,objectFrame, + fboxLines=lr,fboxSep=0pt]{figure}{\includegraphics[scale=1.5]{images/rose}}% + {Caption right beside with a \emph{natural} width, which is given by the width of the object, + the separation between object and caption, and the current linewidth.}{fig:width1A} + + + \subsection{Relative linewidth} With \Lkeyword{capWidth}\texttt{=<number>} the caption width is set to \texttt{<number>}\Ldim{columnwidth}. @@ -2742,9 +2762,9 @@ page~\pageref{foo} and the right part on page~\pageref{foo-2}. In the follwoing example~\ref{bar} the caption is on page~\pageref{bar-cap}, the left image part on page~\pageref{bar} and the right part on page~\pageref{bar-2}. All three labels points to the same figure or table number: -\verb/\ref{foo} | \ref{foo-cap} | \ref{foo-2}/ $\rightarrow$ \ref{foo} | \ref{foo-cap} | \ref{foo-2} +\verb/\ref{foo} | \ref{foo-cap} | \ref{foo-2}/ $\rightarrow$ Figure~\ref{foo} | Figure~\ref{foo-cap} | Figure~\ref{foo-2} -\verb/\pageref{foo} | \pageref{foo-cap} | \pageref{foo-2}/ $\rightarrow$ \pageref{foo} | \pageref{foo-cap} | \pageref{foo-2} +\verb/\pageref{foo} | \pageref{foo-cap} | \pageref{foo-2}/ $\rightarrow$ Page~\pageref{foo} | Page~\pageref{foo-cap} | Page~\pageref{foo-2} \begin{lstlisting} \hvFloat[doubleFULLPAGE,capPos=after]% @@ -2806,9 +2826,9 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same \hvBlindtext -\hvblindtext +\hvBlindtext -%\hvblindtext +\hvblindtext \subsection{\Lkeyword{doublePAGE}} With this option the object also starts at the left paper margin but on the top of the text area. @@ -3001,9 +3021,11 @@ of the object. \hvBlindtext -\hvBlindtext +%\hvBlindtext \hvBlindtext + +\vfill \begin{lstlisting} \hvFloat[doubleFullPage,capWidth=n,sameHeight,capPos=right]% {figure}% @@ -3016,9 +3038,13 @@ of the object. {fig:doublePage001} \end{lstlisting} +Now a pagebreak follows so that the following doublepage object should +immediately placed on the next page. +\newpage + \MarginNote{Fig. \ref{fig:doublePage001}} -\hvFloat[doubleFullPage,capWidth=n,sameHeight,capPos=right]% +\hvFloat[doubleFullPage,capWidth=n,sameHeight,capPos=left]% {figure}% {\includegraphics[doubleFullPage]{images/sonne-meer}}% [A doublepage image with a caption on the right side of the right part.]% @@ -3035,6 +3061,17 @@ of the object. \hvBlindtext \hvBlindtext +\hvblindtext +\hvblindtext + +\hvblindtext +\hvblindtext + +%\hvBlindtext +%\hvBlindtext +\hvBlindtext + +\hvBlindtext @@ -3086,13 +3123,11 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15 [A doublepage tabular with a caption on the right side of the right part.]% {A caption for a double-sided tabular that will be placed on the right side of the right-hand part of the illustration. The illustration begins on the left edge of - the paper. A short form is used for the LOF. - The parameter is \texttt{doublePage}}% + the paper. A short form is used for the LOF. The parameter is \texttt{doublePage}}% {tab:doublePage3} \end{lstlisting} -\marginpar{Tab.~\ref{tab:doublePage3}} \global\savebox\hvOBox{% \begin{tabular}{l*{18}r} \toprule & \textbf{1972} & \textbf{1973} & \textbf{1974} & \textbf{1975} & \textbf{1976} @@ -3121,6 +3156,7 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15 \end{tabular}} +\marginpar{Tab.~\ref{tab:doublePage3}}% \hvFloat[doublePage,capPos=right,capVPos=top,floatCapSep=12pt]% {table}% {\usebox\hvOBox}%%%%%%%%%%%%%% @@ -3131,6 +3167,14 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15 The parameter is \texttt{doublePage}}% {tab:doublePage3} + +Here comes some snonsense Text to show the output for a \Lcs{hvFloat} which appears +exactly on top of a new even page. This should be detectted by the command so that the +tabular is placed directly on the following double page, starting with the even pagenumber. + + +\hvBlindtext + \hvBlindtext \hvBlindtext diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc index a39a994c76c..c461aa6fca8 100644 --- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc +++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-0.inc @@ -36,15 +36,38 @@ \afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}% oddpage->newpage \fi % end \if@twocolumn \else% evenpage - \if@twocolumn - \if@firstcolumn - \afterpage{\afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}}% ->2nd Col left page and newpage + %--------- + %\typeout{>>>>Setze hv@atPageBeginfalse}% + \global\hv@atPageBeginfalse + \stepcounter{hvfloat@ref}% + \zsavepos{\thehvfloat@ref}% + \@tempy=\dimexpr-\zposy{\thehvfloat@ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax + \@tempx=\dimexpr-\zposx{\thehvfloat@ref} sp+\evensidemargin+1in\relax + %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f@size}% + \ifdim\@tempy > \dimexpr\f@size pt + 2pt + %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat@ref}% + \else + \ifdim\@tempx = \z@ + %\typeout{>>>>Case 2, Absolut oben links auf der Seite \thehvfloat@ref }% + \global\hv@atPageBegintrue \else - \afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}% ->newpage ( 2columns) + %\typeout{>>>>Case 1, Oben auf der Seite \thehvfloat@ref, aber nicht am Anfang der Zeile}% \fi - \else % onecol - \afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}% evenpage->newpage->newpage - \fi % end \if@twocolumn + \fi + %--------- + \ifhv@atPageBegin% At the top left of the even page -> output image + \do@hvFloat@doubleFullPage@ObjectAndCaption + \else + \if@twocolumn + \if@firstcolumn + \afterpage{\afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}}% ->2nd Col left page and newpage + \else + \afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}% ->newpage ( 2columns) + \fi + \else % onecol + \afterpage{\afterpage{\do@hvFloat@doubleFullPage@ObjectAndCaption}}% evenpage->newpage->newpage + \fi % end \if@twocolumn + \fi % end of \ifhv@atPageBegin \fi% main ifoddpage \endgroup% started at main macro \hvFloat } @@ -53,9 +76,11 @@ \begin{\hv@floatType*}[t] \hv@set@noverticalSpace \hfuzz=\maxdimen + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \hv@leftPageObjectWidth=\dimexpr\paperwidth-\hvSet@bindCorrection% - \savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% + \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-\baselineskip-\parskip+1.5\lineskip}% no interlineskip \hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}% \clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}% @@ -91,11 +116,11 @@ \begin{\hv@floatType*}[t] \hv@set@noverticalSpace \hfuzz=\maxdimen -% \let\c@hv@tempCNTfigA\c@figure -% \let\c@hv@tempCNTtabA\c@table + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \hv@leftPageObjectWidth=\dimexpr\paperwidth-\hvSet@bindCorrection - \savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% + \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-\baselineskip-\parskip+1.5\lineskip}% no interlineskip \hspace*{\the\dimexpr-1in-\oddsidemargin+\hvSet@bindCorrection}% \clipbox*{\the\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}% diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc index e5e0ead4bb4..258bfbfaf7d 100644 --- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc +++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-1.inc @@ -199,6 +199,8 @@ \def\do@hvFloat@doubleFULLPAGE@CaptionBefore{% \afterpage{% + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \hfuzz=\maxdimen \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% no interlineskip @@ -229,11 +231,11 @@ }}% } -\newif\ifhv@temp - \def\do@hvFloat@doubleFULLPAGE@CaptionAfter{% \afterpage{% \hfuzz=\maxdimen + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% no interlineskip \hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}% @@ -279,6 +281,8 @@ \def\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{% \hvfloat@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: start} % \afterpage{% + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \hvfloat@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: afterpage start} % \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% no interlineskip @@ -327,6 +331,8 @@ \def\do@hvFloat@doubleFULLPAGE@CaptionOther#1{% \afterpage{% + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox \hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}% \global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc index c930479fae0..9c27dc88b45 100644 --- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc +++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-2.inc @@ -28,19 +28,47 @@ \do@hvFloat@doublePAGECaptionRight{#1}% \fi \else - \do@hvFloat@doublePAGECaptionRight{#1}% + \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% \fi \else \hvfloat@typeout{do@hvFloat@doublePAGE: evenpage}% - \if@twocolumn - \if@firstcolumn - \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}}% + %--------- + \hv@atPageBeginfalse + \stepcounter{hvfloat@ref}% + \zsavepos{\thehvfloat@ref}% + \@tempy=\dimexpr-\zposy{\thehvfloat@ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax + \@tempx=\dimexpr-\zposx{\thehvfloat@ref} sp+\evensidemargin+1in\relax + %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f@size}% + \ifdim\@tempy > \z@ + %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat@ref}% + \ifdim\@tempx < \z@ + %\typeout{>>>>Case 0-1, Text oben auf der Seite \thehvfloat@ref}% \else - \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}% + %\typeout{>>>>Case 0-2, Absolut oben links auf der Seite \thehvfloat@ref}% + \hv@atPageBegintrue \fi \else - \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% onecolumn/left page + \ifdim\@tempx > \z@ + %\typeout{>>>>Case 1, Oben auf der Seite \thehvfloat@ref, aber nicht am Anfang der Zeile}% + \else + %\typeout{>>>>Case 2, Absolut oben links auf der Seite \thehvfloat@ref }% + \hv@atPageBegintrue + \fi \fi + %--------- + \ifhv@atPageBegin + \do@hvFloat@doublePAGECaptionRight{#1}% + \else + \if@twocolumn + \if@firstcolumn + \afterpage{\afterpage{\afterpage{afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}}}% + \else + \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}}% + \fi + \else + \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}% onecolumn/left page + \fi + \fi %end \hv@atPageBegintrue \fi \endgroup% startet at main macro } @@ -48,7 +76,6 @@ \def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ---------------------------------- % #1-> 0/1 caption under/right \hvfloat@typeout{do@hvFloat@doublePAGECaptionRight->start}% - \afterpage{% \hfuzz=\maxdimen \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifx\hv@caption@format\@empty\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi @@ -109,6 +136,5 @@ \fi \endgroup \newpage\if@twocolumn\null\newpage\fi - }% } % diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc new file mode 100644 index 00000000000..8b394e4fe9b --- /dev/null +++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat-3.inc @@ -0,0 +1,264 @@ +%% Herbert Voss <hvoss@tug.org> +%% Copyright (C) 2023 +%% +%% 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. +%% +%% +%% ------------------------------------- the doublepage obejcts --------------------------- +%% ||1in+evenside --- |1in+oddside ---|| +% +\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right page + % #1-> 0/1 caption under/right + \setcounter{topnumber}{1}% + \setcounter{dbltopnumber}{1}% + \hvfloat@typeout{----------------------------- do@hvFloat@doublePage#1 --------------------------}% + \hvfloat@typeout{>>>do@hvFloat@doublePage: begin with definitions of \hv@floatObject}% + \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% + \global\hv@switchTypefalse + \setcounter{hv@tempCNTfigA}{\value{figure}}% + \setcounter{hv@tempCNTfigB}{\value{figure}}% + \setcounter{hv@tempCNTtabA}{\value{table}}% + \setcounter{hv@tempCNTtabB}{\value{table}}% + \savebox\hvCaptionBox{% NO rotation + \minipage{\textwidth}%% minipage, to get hyphenation + \let\@captype\hv@floatType + \caption*{\hv@longCap}% + \endminipage}% + \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% + \ifnum#1=0\relax % no rotation, caption below +% \hvfloat@typeout{Texthöhe: \the\textheight}% +% \hvfloat@typeout{Objekthöhe: \the\ht\hvObjectBox}% +% \hvfloat@typeout{Captionhöhe: \the\ht\hvCaptionBox}% + \@tempdima=\dimexpr\ht\hvObjectBox+\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip +\textfloatsep\relax%+\floatsep\relax +% \hvfloat@typeout{Summe: \the\@tempdima}% + \ifdim\@tempdima > \dimexpr\textheight-\hv@minTextlines\relax +% \hvfloat@typeout{hvfloat: switched to floattype p}% + \hv@switchTypetrue + \fi + \fi + \hvfloat@typeout{do@hvFloat@doublePage:hv@tempWidthA=\the\hv@tempWidthA}% + \ifhv@forceOutput + \do@hvFloat@doublePAGECaptionRight{#1}% no cheque + \else + %\checkoddpage + \ifoddpage + \hvfloat@typeout{do@hvFloat@doublePage:oddpage}% + \if@twocolumn + \hvfloat@typeout{do@hvFloat@doublePage: oddpage/twocolumn}% + \if@firstcolumn + \hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->firstcolumn}% + \ifhv@switchType + \hvfloat@typeout{hvfloat: switched to floattype p}% + \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% + \else + \hvfloat@typeout{calling do@hvFloat@doublePageCaptionRight}% + %\afterpage{ + \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}% + \fi + \else +% \hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->secondcolumn}% + \ifhv@tugboat + \do@hvFloat@doublePageCaptionRight{#1}% + \else + \ifhv@switchType + \do@hvFloat@doublePAGECaptionRight{#1}% + \else + \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% + \fi + \fi + \fi + \else% onecolumn + \hvfloat@typeout{do@hvFloat@doublePage: oddpage/onecolumn}% + \ifhv@switchType + \hvfloat@typeout{do@hvFloat@doublePage: oddpage/onecolumn/switchType}% + \do@hvFloat@doublePAGECaptionRight{#1}% + \else + \hvfloat@typeout{do@hvFloat@doublePage: call do@hvFloat@doublePageCaptionRight #1}% + \ifhv@forceLeft + \do@hvFloat@doublePageCaptionRight{#1}% no \afterpage + \else + \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% + \fi + \fi + \fi + \else% we have an even page + \hvfloat@typeout{do@hvFloat@doublePage:evenpage -> (\thepage)}% + %\typeout{>>>>Setze hv@atPageBeginfalse}% + \global\hv@atPageBeginfalse + \stepcounter{hvfloat@ref}% + \zsavepos{\thehvfloat@ref}% + \@tempy=\dimexpr-\zposy{\thehvfloat@ref} sp+\paperheight-1in-\topmargin-\headheight-\headsep\relax + \@tempx=\dimexpr-\zposx{\thehvfloat@ref} sp+\evensidemargin+1in\relax + %\typeout{>>>>\the\@tempx >>>>>\the\@tempy >>>>\f@size}% + \ifdim\@tempy > \dimexpr\f@size pt + 2pt % Interlinespace + %\typeout{>>>>Case 0, Leere Box oder Text auf der Seite \thehvfloat@ref}% + \else + \ifdim\@tempx = \z@ + %\typeout{>>>>Case 2, Absolut oben links auf der Seite \thehvfloat@ref }% + \global\hv@atPageBegintrue + \else + %\typeout{>>>>Case 1, Oben auf der Seite \thehvfloat@ref, aber nicht am Anfang der Zeile}% + \fi + \fi + %--------- + \ifhv@atPageBegin% At the top left of the even page -> output image + \do@hvFloat@doublePageCaptionRight{#1} + \else + \if@twocolumn + \if@firstcolumn + \ifhv@switchType + \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}% + \else + \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}% + \fi + \else% second column + \ifhv@switchType + \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% + \else + %\afterpage{ + \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}% + \fi + \fi + \else% onecolumn + \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn -> (\thepage)}% + \ifhv@switchType + \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/switchType -> (\thepage)}% + \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% + \else + \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType -> (\thepage)}% + \ifhv@forceLeft + \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType/forceLeft -> (\thepage)}% + \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% + \else + \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}% + \fi + \fi + \fi + \fi + \fi + \let\@fptop\hv@fptop + \fi + \endgroup% started at main macro \hvFloat + \hvfloat@typeout{----------------------------- do@hvFloat@doublePage#1 ... Ende ----------------------}% +} +% +\def\do@hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ---------------------------------- + \setcounter{topnumber}{1}% + \setcounter{dbltopnumber}{1}% + \hvfloat@typeout{do@hvFloat@doublePageCaptionRight->start}% + \do@hvFloat@doublePageCaptionRightObjectLeft{0pt}% + \do@hvFloat@doublePageCaptionRightObjectRight{#1}% +} +% +\def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object + \begin{\hv@floatType*}[t] + \hvfloat@typeout{>>>doublePage: begin with left side of the object \hv@floatObject}% + \hv@set@noverticalSpace + \hfuzz=\maxdimen + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \hvfloat@typeout{Float position parameter is for left page: !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 + \global\refstepcounter{hv@tempCNTfigA}% + \else + \global\refstepcounter{hv@tempCNTtabA}% before caption + \fi + \label{\hv@label}% + \fi + \ifhv@global@sameHeight + \hvfloat@typeout{text should be of same height of both pages}% + \par\noindent\phantom{\parbox{\textwidth}{\caption*{\hv@longCap}}}% +% \vspace{-2pt}% + \fi + \hv@reset@noverticalSpace + \hvfloat@typeout{>>>doublePage: end with left side of the object \hv@floatObject}% + \end{\hv@floatType*}% +} + +\def\do@hvFloat@doublePageCaptionRightObjectRight#1{% right part of the object + \begin{\hv@floatType*}[t] + \hvfloat@typeout{>>>doublePage: begin with right side of the object \hv@floatObject}% + \hv@set@noverticalSpace + \hfuzz=\maxdimen + \let\c@hv@tempCNTfigA\c@figure + \let\c@hv@tempCNTtabA\c@table + \expandafter\hvFloatSet\expandafter{\hv@save@setting}% + \global\savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% + \hv@tempWidthA=\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection\relax% FÜR DTK + \hspace*{-\hv@tempWidthA}% + \hv@leftPageObjectWidth=\the\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection\relax% FÜR FTK + \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}% + \hv@tempWidthB=\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax + \hvfloat@typeout{Height of right box: \the\ht\hv@rightBox}% + \hvfloat@typeout{Depth of right box : \the\dp\hv@rightBox}% + \ifdim\dp\hv@rightBox > \z@ + \raisebox{\depth}{\usebox\hv@rightBox}% + \else + \usebox\hv@rightBox + \fi + \c@hv@tempCNTfigB=\numexpr\c@figure-1\relax + \c@hv@tempCNTtabB=\numexpr\c@table-1\relax + \ifx\hv@label\@empty\else + \ifx\hv@floatType\hv@figure + \refstepcounter{hv@tempCNTfigB}% + \else + \refstepcounter{hv@tempCNTtabB}% before caption + \fi + \label{\hv@label-2}% + \fi + \ifx\hv@caption@format@temp\@empty\else + \expandafter\captionsetup\expandafter{\hv@caption@format@temp}% + \fi + \c@figure=\numexpr\c@hv@tempCNTfigB-1\relax + \c@table=\numexpr\c@hv@tempCNTtabB-1\relax + \ifnum#1>\z@ % caption on the right + \hvfloat@typeout{doublePage: capAngle=\hvSet@capAngle}% + \ifnum\hvSet@capAngle > \z@ + \hspace{\hv@floatCapSep}% + \rlap{\rotatebox{\hvSet@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{% + \abovecaptionskip=0pt% local inside parbox + \belowcaptionskip=0pt% local inside parbox + \ifx\relax\hv@shortCap\relax + \caption{\hv@longCap}% + \else + \caption[\hv@shortCap]{\hv@longCap}% + \fi + }}}% + \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi + \else + \hv@tempWidthB=\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax + \hspace{\hv@floatCapSep}% + \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@@capVPos]{\hv@tempWidthB}{% + \abovecaptionskip=0pt % local inside parbox + \belowcaptionskip=0pt % local inside parbox + \ifx\hv@shortCap\@empty + \caption{\hv@longCap}% + \else + \caption[\hv@shortCap]{\hv@longCap}% + \fi + }}% + \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi + \fi + \else % #1 = 0 caption below + \ifx\relax\hv@shortCap\relax + \caption{\hv@longCap}% + \else + \caption[\hv@shortCap]{\hv@longCap}% + \fi + \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi + \fi + \vspace{0pt}% + \hv@reset@noverticalSpace + \hvfloat@typeout{>>>doublePage: end with right side of the object \hv@floatObject}% + \end{\hv@floatType*} +} diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty index 41c8042a4c6..a5a5e51c653 100644 --- a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty +++ b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty @@ -1,4 +1,4 @@ -%% $Id: hvfloat.sty 774 2023-10-16 13:44:29Z herbert $ +%% $Id: hvfloat.sty 876 2024-03-03 14:04:56Z herbert $ %% %% %% IMPORTANT NOTICE: @@ -6,7 +6,7 @@ %% This is file `hvfloat.sty', %% %% Herbert Voss <hvoss@tug.org> -%% Copyright (C) 2003-23 +%% Copyright (C) 2003-24 %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -16,8 +16,8 @@ %% `hvfloat' offers rotating of captions and objects for floats %% \NeedsTeXFormat{LaTeX2e} -\def\fileversion{2.47} -\def\filedate{2023/10/16} +\def\fileversion{2.48} +\def\filedate{2024/03/03} \ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)] \let\hvFloatFileVersion\fileversion % @@ -49,11 +49,21 @@ \RequirePackage{expl3,multido} \RequirePackage{graphicx} \RequirePackage{varwidth} +\RequirePackage{fbox} \RequirePackage{xkeyval} \RequirePackage{ifoddpage} \RequirePackage{afterpage} +\RequirePackage{zref-savepos} +\newdimen\@tempx +\newdimen\@tempy +\newcounter{hvfloat@ref} +\renewcommand\thehvfloat@ref{tmp@\arabic{hvfloat@ref}} +\setcounter{hvfloat@ref}{0} +\newif\ifhv@atPageBegin + + \ifhv@hyperref \RequirePackage{hyperref} \fi @@ -265,6 +275,9 @@ \define@key{hvSet}{sepLineskip}{\def\hv@sepLineskip{#1}}% \define@key{hvSet}{minTextlines}{\setlength\hv@minTextlines{#1\baselineskip}}% \define@boolkey{hvSet}[hv@]{objectFrame}[true]{}% a frame around the object with no separation +\define@key{hvSet}{fboxLines}[ltrb]{\def\hv@fboxLines{#1}}% +\define@key{hvSet}{fboxSep}[0pt]{\def\hv@fboxSep{#1}}% + \define@key{hvSet}{style}{% \@ifundefined{hv@#1}% {\errmessage{Custom style `#1' undefined}}% @@ -290,7 +303,8 @@ onlyText=false, wide=false, fullpage=false, FULLPAGE=false, doubleFULLPAGE=false, doublePage=false, doublePAGE=false, multiFloat=false,subFloat=false,inMargin=false, - separatorLine,objectFrame=false,multiFloatSkip=\normalbaselineskip, + separatorLine,objectFrame=false, fboxLines={ltrb}, fboxSep=0pt, + multiFloatSkip=\normalbaselineskip, capFormat={}, subcapFormat={}, twoColumnCaption=false, sameHeight=false, bindCorr=\z@,sepLineskip=0pt, @@ -459,20 +473,20 @@ \ifhv@fbox \fbox{\parbox{\wd\hvObjectBox}{\usebox{\hvObjectBox}}}% \else - \parbox{\wd\hvObjectBox}{\ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi}% + \parbox{\wd\hvObjectBox}{\ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi}% \fi \or \ifhv@fbox \fbox{\raisebox{-\height}{\usebox{\hvObjectBox}}}% \else - \raisebox{-\height}{\ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi}% + \raisebox{-\height}{\ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi}% \fi \or \ifhv@fbox \fbox{\usebox{\hvObjectBox}}% \else % rotated object with a depth need to raise up the \depth - \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\raisebox{\depth}{\usebox{\hvObjectBox}}\fi% + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\usebox{\hvObjectBox}}\else\raisebox{\depth}{\usebox{\hvObjectBox}}\fi% \fi \fi } @@ -523,6 +537,8 @@ \def\hvFloat@i*{\@ifnextchar[{\do@hvFloat}{\do@hvFloat[]}} \def\do@hvFloat[#1]{% + %\marginnote{\textbf{hvFloat}}% + \savebox\hvObjectBox{}% \begingroup \hvWideWidth=\the\dimexpr\columnwidth+\marginparwidth+\marginparsep\relax% % \setlength\hvWideWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}% @@ -603,7 +619,7 @@ \ifx\relax#2\relax \setkeys{hvSet}{nonFloat,onlyText}% \xdef\hv@save@setting{\hv@save@setting,nonFloat,onlyText}% for later use after \endgroup inside figure/table env - \else + \else \xdef\hv@save@setting{\hv@save@setting}% for later use after \endgroup inside figure/table env \fi % \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}% @@ -677,15 +693,16 @@ \ifhv@useOBox \let\hvObjectBox\hvOBox \else - \savebox\hvObjectBox{\hv@floatObject}% + \global\savebox\hvObjectBox{\hv@floatObject}% \fi \else - \savebox\hvObjectBox{% + \global\savebox\hvObjectBox{% \rotatebox{\hvSet@objectAngle}{% \ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi }% }% \fi + \ifhv@useOBox\global\savebox\hvOBox{}\fi \setlength\hvObjectWidth{\wd\hvObjectBox}% % % Now we save the caption with its defined \hvCapWidth @@ -736,7 +753,7 @@ \fi \fi \fi - \saveCaptionSkip% we put this space ourselve + \saveCaptionSkip % we put this space ourselve \ifnum\hvSet@capAngle=0 % need rotation? \savebox\hvCaptionBox{% NO rotation \minipage[b]{\hvCapWidth}%% minipage, to get hyphenation @@ -759,7 +776,7 @@ \fi \fi \fi - \else + \else \ifhv@onlyText \hv@longCap \else @@ -770,7 +787,7 @@ \fi \fi \fi - \endminipage + \endminipage }% end CaptionBox without rotation \else \savebox\hvCaptionBox{% with Rotation @@ -812,7 +829,7 @@ \ifx\hvSet@floatPos\@empty % use type default \else \@namedef{fps@\hv@floatType}{\hvSet@floatPos}% - \fi + \fi \ifhv@nonFloat \noindent \begingroup% Start the nonfloat part @@ -827,7 +844,7 @@ \begin{\hv@floatType}% Start the floating environment \fi \fi - %%\checkoddpage + \checkoddpage \ifx\hvSet@objectPos\hv@Right\raggedleft\fi \ifx\hvSet@objectPos\hv@Center \ifhv@nonFloat\hspace*{\fill}\else\centering\fi @@ -957,7 +974,7 @@ \fbox{\usebox{\hvObjectBox}}\\[0.5\hvAboveCaptionSkip]% \fbox{\usebox{\hvCaptionBox}}% \else - \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[0.5\hvAboveCaptionSkip]% + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[0.5\hvAboveCaptionSkip]% \usebox{\hvCaptionBox}% \fi \end{minipage}% @@ -1020,11 +1037,12 @@ % First we save the object in \hvObjectBox % \ifnum\hvSet@objectAngle=0 % rotate the object? - \ifhv@useOBox\let\hvObjectBox\hvOBox\else\savebox\hvObjectBox{\hv@floatObject}\fi + \ifhv@useOBox\global\let\hvObjectBox\hvOBox\else\global\savebox\hvObjectBox{\hv@floatObject}\fi \else - \savebox\hvObjectBox{\rotatebox{\hvSet@objectAngle}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}}% + \global\savebox\hvObjectBox{\rotatebox{\hvSet@objectAngle}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}}% \fi \setlength\hvObjectWidth{\wd\hvObjectBox}% + \ifhv@useOBox\global\savebox\hvOBox{}\fi % % Now we save the caption with its defined \hvCapWidth % @@ -1200,7 +1218,7 @@ \fbox{\usebox{\hvObjectBox}}\\[0.5\hvAboveCaptionSkip]% \fbox{\usebox{\hvCaptionBox}}% \else - \ifhv@objectFrame\frame{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[0.5\hvAboveCaptionSkip]% + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\usebox{\hvObjectBox}}\else\usebox{\hvObjectBox}\fi\\[0.5\hvAboveCaptionSkip]% \usebox{\hvCaptionBox}% \fi \end{minipage}% @@ -1425,244 +1443,17 @@ } % - -%% ------------------------------------- the doublepage obejcts --------------------------- -%% ||1in+evenside --- |1in+oddside ---|| -% -\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right page - % #1-> 0/1 caption under/right - \hvfloat@typeout{----------------------------- do@hvFloat@doublePage#1 --------------------------}% - \hvfloat@typeout{>>>do@hvFloat@doublePage: begin with definitions of \hv@floatObject}% - \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% - \global\hv@switchTypefalse - \setcounter{hv@tempCNTfigA}{\value{figure}}% - \setcounter{hv@tempCNTfigB}{\value{figure}}% - \setcounter{hv@tempCNTtabA}{\value{table}}% - \setcounter{hv@tempCNTtabB}{\value{table}}% - \savebox\hvCaptionBox{% NO rotation - \minipage{\textwidth}%% minipage, to get hyphenation - \let\@captype\hv@floatType - \caption*{\hv@longCap}% - \endminipage}% - \savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% - \ifnum#1=0\relax % no rotation, caption below -% \hvfloat@typeout{Texthöhe: \the\textheight}% -% \hvfloat@typeout{Objekthöhe: \the\ht\hvObjectBox}% -% \hvfloat@typeout{Captionhöhe: \the\ht\hvCaptionBox}% - \@tempdima=\dimexpr\ht\hvObjectBox+\ht\hvCaptionBox+\abovecaptionskip+\belowcaptionskip +\textfloatsep\relax%+\floatsep\relax -% \hvfloat@typeout{Summe: \the\@tempdima}% - \ifdim\@tempdima > \dimexpr\textheight-\hv@minTextlines\relax -% \hvfloat@typeout{hvfloat: switched to floattype p}% - \hv@switchTypetrue - \fi - \fi - \hvfloat@typeout{do@hvFloat@doublePage:hv@tempWidthA=\the\hv@tempWidthA}% - \ifhv@forceOutput - \do@hvFloat@doublePAGECaptionRight{#1}% no cheque - \else - %\checkoddpage - \ifoddpage - \hvfloat@typeout{do@hvFloat@doublePage:oddpage}% - \if@twocolumn - \hvfloat@typeout{do@hvFloat@doublePage: oddpage/twocolumn}% - \if@firstcolumn - \hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->firstcolumn}% - \ifhv@switchType - \hvfloat@typeout{hvfloat: switched to floattype p}% - \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% - \else - \hvfloat@typeout{calling do@hvFloat@doublePageCaptionRight}% - %\afterpage{ - \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}% - \fi - \else -% \hvfloat@typeout{do@hvFloat@doublePage:oddpage->twocolumn->secondcolumn}% - \ifhv@tugboat - \do@hvFloat@doublePageCaptionRight{#1}% - \else - \ifhv@switchType - \do@hvFloat@doublePAGECaptionRight{#1}% - \else - \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% - \fi - \fi - \fi - \else% onecolumn - \hvfloat@typeout{do@hvFloat@doublePage: oddpage/onecolumn}% - \ifhv@switchType - \hvfloat@typeout{do@hvFloat@doublePage: oddpage/onecolumn/switchType}% - \do@hvFloat@doublePAGECaptionRight{#1}% - \else - \hvfloat@typeout{do@hvFloat@doublePage: call do@hvFloat@doublePageCaptionRight #1}% - \ifhv@forceLeft - \do@hvFloat@doublePageCaptionRight{#1}% no \afterpage - \else - \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% - \fi - \fi - \fi - \else% we have an even page - \hvfloat@typeout{do@hvFloat@doublePage:evenpage -> (\thepage)}% - \if@twocolumn - \if@firstcolumn - \ifhv@switchType - \afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}% - \else - \afterpage{\afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}}% - \fi - \else% second column - \ifhv@switchType - \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% - \else - %\afterpage{ - \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}% - \fi - \fi - \else% onecolumn - \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn -> (\thepage)}% - \ifhv@switchType - \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/switchType -> (\thepage)}% - \afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}% - \else - \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType -> (\thepage)}% - \ifhv@forceLeft - \hvfloat@typeout{do@hvFloat@doublePage:evenpage/onecolumn/noSwitchType/forceLeft -> (\thepage)}% - \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}% - \else - \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}% - \fi - \fi - \fi - \fi - \let\@fptop\hv@fptop - \fi - \endgroup% started at main macro \hvFloat - \hvfloat@typeout{----------------------------- do@hvFloat@doublePage#1 ... Ende ----------------------}% -} -% -\def\do@hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ---------------------------------- - \hvfloat@typeout{do@hvFloat@doublePageCaptionRight->start}% - \do@hvFloat@doublePageCaptionRightObjectLeft{0pt}% - \afterpage{\do@hvFloat@doublePageCaptionRightObjectRight{#1}}% -} -% -\def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object - \begin{\hv@floatType*}[!t] - \hvfloat@typeout{>>>doublePage: begin with left side of the object \hv@floatObject}% - \hv@set@noverticalSpace - \hfuzz=\maxdimen - \let\c@hv@tempCNTfigA\c@figure - \let\c@hv@tempCNTtabA\c@table - \expandafter\hvFloatSet\expandafter{\hv@save@setting}% - \hvfloat@typeout{Float position parameter is for left page: !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 - \global\refstepcounter{hv@tempCNTfigA}% - \else - \global\refstepcounter{hv@tempCNTtabA}% before caption - \fi - \label{\hv@label}% - \fi - \ifhv@global@sameHeight - \hvfloat@typeout{text should be of same height of both pages}% - \par\noindent\phantom{\parbox{\textwidth}{\caption*{\hv@longCap}}}% -% \vspace{-2pt}% - \fi - \hv@reset@noverticalSpace - \hvfloat@typeout{>>>doublePage: end with left side of the object \hv@floatObject}% - \end{\hv@floatType*}% -} - -\def\do@hvFloat@doublePageCaptionRightObjectRight#1{% right part of the object - \begin{\hv@floatType*}[!t] - \hvfloat@typeout{>>>doublePage: begin with right side of the object \hv@floatObject}% - \hv@set@noverticalSpace - \hfuzz=\maxdimen - \expandafter\hvFloatSet\expandafter{\hv@save@setting}% - \savebox\hvObjectBox{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}% - \hv@tempWidthA=\the\dimexpr1in+\oddsidemargin-\hvSet@bindCorrection\relax% FÜR DTK - \hspace*{-\hv@tempWidthA}% - \hv@leftPageObjectWidth=\the\dimexpr\paperwidth-1in-\evensidemargin-\hvSet@bindCorrection\relax% FÜR FTK - \savebox\hv@rightBox{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}}% - \hv@tempWidthB=\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax - \hvfloat@typeout{Height of right box: \the\ht\hv@rightBox}% - \hvfloat@typeout{Depth of right box : \the\dp\hv@rightBox}% - \ifdim\dp\hv@rightBox > \z@ - \raisebox{\depth}{\usebox\hv@rightBox}% - \else - \usebox\hv@rightBox - \fi - \c@hv@tempCNTfigB=\numexpr\c@figure-1\relax - \c@hv@tempCNTtabB=\numexpr\c@table-1\relax - \ifx\hv@label\@empty\else - \ifx\hv@floatType\hv@figure - \refstepcounter{hv@tempCNTfigB}% - \else - \refstepcounter{hv@tempCNTtabB}% before caption - \fi - \label{\hv@label-2}% - \fi - \ifx\hv@caption@format@temp\@empty\else - \expandafter\captionsetup\expandafter{\hv@caption@format@temp}% - \fi - \c@figure=\numexpr\c@hv@tempCNTfigB-1\relax - \c@table=\numexpr\c@hv@tempCNTtabB-1\relax - \ifnum#1>\z@ % caption on the right - \hvfloat@typeout{doublePage: capAngle=\hvSet@capAngle}% - \ifnum\hvSet@capAngle > \z@ - \hspace{\hv@floatCapSep}% - \rlap{\rotatebox{\hvSet@capAngle}{\parbox[b]{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{% - \abovecaptionskip=0pt% local inside parbox - \belowcaptionskip=0pt% local inside parbox - \ifx\relax\hv@shortCap\relax - \caption{\hv@longCap}% - \else - \caption[\hv@shortCap]{\hv@longCap}% - \fi - }}}% - \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi - \else - \hv@tempWidthB=\dimexpr\textwidth-\wd\hv@rightBox-\hvSet@bindCorrection+1in+\oddsidemargin-\hv@floatCapSep\relax - \hspace{\hv@floatCapSep}% - \rlap{\parbox[b][\dimexpr\ht\hv@rightBox+\dp\hv@rightBox][\hv@@capVPos]{\hv@tempWidthB}{% - \abovecaptionskip=0pt % local inside parbox - \belowcaptionskip=0pt % local inside parbox - \ifx\hv@shortCap\@empty - \caption{\hv@longCap}% - \else - \caption[\hv@shortCap]{\hv@longCap}% - \fi - }}% - \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi - \fi - \else % #1 = 0 caption below - \ifx\relax\hv@shortCap\relax - \caption{\hv@longCap}% - \else - \caption[\hv@shortCap]{\hv@longCap}% - \fi - \ifx\hv@label\@empty\else\label{\hv@label-cap}\fi - \fi - \vspace{0pt}% - \hv@reset@noverticalSpace - \hvfloat@typeout{>>>doublePage: end with right side of the object \hv@floatObject}% - \end{\hv@floatType*} -} -% \newsavebox\hv@boxLeftPage \newsavebox\hv@boxRightPage +\newif\ifhv@temp + +\input{hvfloat-3.inc}% doublePage -\input{hvfloat-2.inc} +\input{hvfloat-2.inc}% doublePAGE -\input{hvfloat-1.inc} +\input{hvfloat-1.inc}% doubleFULLPAGE -\input{hvfloat-0.inc} +\input{hvfloat-0.inc}% doubleFullPage \ExplSyntaxOn @@ -1695,7 +1486,7 @@ } \def\getMultiObjectAndLabel{% - \global\sbox\hvObjectBox{% + \global\savebox\hvObjectBox{% \ifhv@vFill \minipage[b][\textheight][s]{\columnwidth}% \else @@ -1711,7 +1502,7 @@ \hv@cnta=1 \loop \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}% - \ifhv@objectFrame\frame{\@temp}\else\@temp\fi + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\@temp}\else\@temp\fi \edef\@tempa{\clist_item:Nn\l_clist_Label{\hv@cnta}}% \edef\@tempb{\clist_item:Nn\l_clist_Type{\hv@cnta}}% \edef\@captype{hv@p\@tempb}% @@ -1746,7 +1537,7 @@ } \def\getMultiSubObjectAndLabel{% - \global\sbox\hvObjectBox{% + \global\savebox\hvObjectBox{% \expandafter\hvFloatSet\expandafter{\hv@save@setting}% \ifhv@vFill \minipage[b][\textheight][s]{\columnwidth}% @@ -1774,7 +1565,7 @@ \fi \loop \def\@temp{\clist_item:Nn\l_clist_Object{\hv@cnta}}% - \ifhv@objectFrame\frame{\@temp}\else\@temp\fi + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\@temp}\else\@temp\fi \begingroup \edef\@tempa{\clist_item:Nn\l_clist_LofCaption{\hv@cnta}}% \ifx\@tempa\@empty @@ -1850,9 +1641,9 @@ \ifhv@subFloat \getMultiSubObjectAndLabel \else - \global\sbox\hvObjectBox{% + \global\savebox\hvObjectBox{% \refstepcounter{\@captype}% - \ifhv@objectFrame\frame{\hv@floatObject}\else\hv@floatObject\fi + \ifhv@objectFrame\fbox[boxsep=\hv@fboxSep,,\hv@fboxLines]{\hv@floatObject}\else\hv@floatObject\fi \expandafter\ifx\expandafter\relax\hv@label\relax \else \expandafter\label\expandafter{\hv@label}% |