summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hvfloat/latex/hvfloat.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-16 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2021-03-16 03:01:13 +0000
commit4947a16af6c8e33f697a8da222db7f3ad027ba94 (patch)
tree3eee9fd60fecc17e213ff42c404f538ae850f934 /macros/latex/contrib/hvfloat/latex/hvfloat.sty
parent36607734949d1736c36ed7b9f3a12a74d7a8ce86 (diff)
CTAN sync 202103160301
Diffstat (limited to 'macros/latex/contrib/hvfloat/latex/hvfloat.sty')
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat.sty69
1 files changed, 48 insertions, 21 deletions
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
index ff8fb42a4c..67c4c86b8d 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 41 2020-11-21 21:03:28Z herbert $
+%% $Id: hvfloat.sty 55 2021-03-15 06:54:38Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.18}
-\def\filedate{2021/03/12}
+\def\fileversion{2.19}
+\def\filedate{2021/03/15}
\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
\let\hvFloatFileVersion\fileversion
@@ -401,7 +401,7 @@
\else
\ifhv@doubleFULLPAGE
\setlength\hvCapWidth{\textheight}
- \do@hvFloat@doubleFULLPAGE% fullpage with caption rotated or under on an odd page
+ \expandafter\do@hvFloat@doubleFULLPAGE\@@temp% fullpage with caption rotated or under on an odd page
\else
\ifhv@doublePAGE
\expandafter\do@hvFloat@doublePAGE\@@temp% fullpage with caption rotated or under on an odd page
@@ -861,6 +861,7 @@
%
%
\def\do@hvFloat@doublePage#1{% image on left and right page with caption on the right ----------------------------------
+ % #1-> 0/1 caption under/right
\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\ifoddpage
@@ -892,8 +893,8 @@
\else
\afterpage{%
\afterpage{%
-% \newpage
- \noindent\null
+ \newpage
+% \noindent\null
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\global\@tempdima=\dimexpr\paperwidth-1in-\evensidemargin\relax{}
\hspace*{\@tempdima}%
@@ -922,6 +923,7 @@
}
\def\do@hvFloat@doublePAGE#1{% image on left and right page with caption on the right ----------------------------------
+ % #1-> 0/1 caption under/right
\checkoddpage
\ifoddpage
\afterpage{%
@@ -958,7 +960,7 @@
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\hspace*{\the\dimexpr-1in-\oddsidemargin-\parindent\relax}%
\clipbox*{\paperwidth{} -\depth{} \width{} \height{}}{\usebox\hvObjectBox}%
- \ifnum#1>0
+ \ifnum#1>0 % caption right and rotated
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
@@ -976,44 +978,69 @@
\endgroup
}
%
-\def\do@hvFloat@doubleFULLPAGE{% image on left and right page with caption on the right ----------------------------------
+\def\do@hvFloat@doubleFULLPAGE#1{% image on left and right page with caption on the right ----------------------------------
+ % #1-> 0/1 caption under/right
\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\ifoddpage
\afterpage{%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep+0.5\paperheight-0.5\ht\hvObjectBox-\normalbaselineskip}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip}% +0.5\paperheight-0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
- \thispagestyle{empty}%
+ \AtBeginShipoutNext{\thispagestyle{empty}}%
\clipbox*{0 0 \paperwidth{} \height}{\usebox\hvObjectBox}%
\newpage
- \thispagestyle{empty}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-0.5\paperheight+0.5\ht\hvObjectBox-\normalbaselineskip}%
+ \AtBeginShipoutNext{\thispagestyle{empty}}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\normalbaselineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\clipbox*{\paperwidth{} 0 \wd\hvObjectBox{} \paperheight{}}{\usebox\hvObjectBox}%
\savebox\hvCaptionBox{\parbox{0.9\ht\hvObjectBox}{%
\captionof*{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
- \put(-\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\parbox{0.9\ht\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}}}
+ \ifnum#1>0
+ \ifdim\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox\relax < 2\paperwidth
+ \rotatebox{90}{\qquad\parbox{0.9\ht\hvObjectBox}{%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \else
+ \put(-\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\minipage{\textwidth}\centering
+ \parbox{0.8\textwidth}{%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}\endminipage
+ }}}%
+ \fi
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\newpage
}%
\else
\afterpage{%
\AddToHookNext{shipout/before}{%
+ \newpage
+ \AddToHook{begin/page}{\thispagestyle{empty}}
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-0.75\paperheight+0.75\ht\hvObjectBox}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip}% +0.5\paperheight-0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
- \thispagestyle{empty}%
+ \AtBeginShipoutNext{\thispagestyle{empty}}%
\clipbox*{0 0 \paperwidth{} \paperheight}{\usebox\hvObjectBox}%
\newpage
- \thispagestyle{empty}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-0.5\paperheight+0.5\ht\hvObjectBox-\normalbaselineskip}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\normalbaselineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\clipbox*{\paperwidth{} 0 \wd\hvObjectBox{} \paperheight{}}{\usebox\hvObjectBox}%
+ \AtBeginShipoutNext{\thispagestyle{empty}}%
\savebox\hvCaptionBox{\parbox{0.9\ht\hvObjectBox}{%
\captionof*{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
- \put(-\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\parbox{0.9\ht\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}}}
+ \ifnum#1>0
+ \ifdim\dimexpr\ht\hvCaptionBox+\wd\hvObjectBox\relax < 2\paperwidth
+ \rotatebox{90}{\minipage{\the\ht\hvObjectBox}\centering\parbox{0.75\textwidth}{%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}%
+ \endminipage}%
+ \else% no space on the right, put it over the imag
+ \put(-\ht\hvCaptionBox,0.5\ht\hvObjectBox){\makebox(0,0){\rotatebox{90}{\minipage{\the\dimexpr\ht\hvObjectBox}%
+ \centering\parbox{0.8\textwidth}{%
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}\endminipage}}}%
+ \fi
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\newpage
}%
}%
@@ -1047,7 +1074,7 @@
\else
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
\fi
- %\put(0,0){
+ %\put(0,0){%
\AtBeginShipoutNext{\thispagestyle{empty}}%
\usebox\hvObjectBox%}%
\else