diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-15 22:29:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-15 22:29:46 +0000 |
commit | 429c8d085320925e501311ff6a8b690b70a27c4f (patch) | |
tree | d9bcdb47486ec40be04ee056581679d52e898a4a /Master/texmf-dist/tex/latex/hvfloat | |
parent | c0fce33e4cab9e3a2ee67660ea1fe776ef7388ad (diff) |
hvfloat (15mar21)
git-svn-id: svn://tug.org/texlive/trunk@58411 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hvfloat')
-rw-r--r-- | Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty | 69 |
1 files changed, 48 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty index ff8fb42a4ce..67c4c86b8d9 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 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 |