diff options
Diffstat (limited to 'macros/latex/contrib/hvfloat/latex/hvfloat-2.inc')
-rw-r--r-- | macros/latex/contrib/hvfloat/latex/hvfloat-2.inc | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc b/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc index c930479fae..9c27dc88b4 100644 --- a/macros/latex/contrib/hvfloat/latex/hvfloat-2.inc +++ b/macros/latex/contrib/hvfloat/latex/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 - }% } % |