summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-06 20:23:37 +0000
committerKarl Berry <karl@freefriends.org>2021-05-06 20:23:37 +0000
commit4a3742b13d2d84ad2530328f8f4d6e51cba2182c (patch)
tree1e9b183ff377335d17e329ffaf563fe570bc56f9 /Master
parent8fe610e311650f7a1333312c9735853005e3afa6 (diff)
hvfloat (6may21)
git-svn-id: svn://tug.org/texlive/trunk@59104 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/Changes2
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/README.exa3
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/capPos.ltx34
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/capPos.pdfbin0 -> 77925 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/capPos.tex129
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdfbin18366111 -> 18373761 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex117
-rw-r--r--Master/texmf-dist/doc/latex/hvfloat/missing.txt3
-rw-r--r--Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty240
9 files changed, 385 insertions, 143 deletions
diff --git a/Master/texmf-dist/doc/latex/hvfloat/Changes b/Master/texmf-dist/doc/latex/hvfloat/Changes
index 1b9013caae7..c2e191ac47b 100644
--- a/Master/texmf-dist/doc/latex/hvfloat/Changes
+++ b/Master/texmf-dist/doc/latex/hvfloat/Changes
@@ -1,4 +1,6 @@
hvfloat.sty:
+2.22 2021-05-06 - fix for default placement and vertical space for
+ full page images
2.21 2021-05-04 - fix for several bugs (onlyText, spaces,...)
2.20 2021-04-29 - use better macronames for setting the defaults
and defining an own style
diff --git a/Master/texmf-dist/doc/latex/hvfloat/README.exa b/Master/texmf-dist/doc/latex/hvfloat/README.exa
index f5c52e2e980..e6a3dff255f 100644
--- a/Master/texmf-dist/doc/latex/hvfloat/README.exa
+++ b/Master/texmf-dist/doc/latex/hvfloat/README.exa
@@ -23,3 +23,6 @@ a.s.o.
runEXA.sh <base>
runs a group of examples, e.g. "./runEXA.sh inner" runs _all_ examples
started with "inner".
+
+** single files **
+lualatex capPos.ltx \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/hvfloat/capPos.ltx b/Master/texmf-dist/doc/latex/hvfloat/capPos.ltx
new file mode 100644
index 00000000000..9fcd593abbe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hvfloat/capPos.ltx
@@ -0,0 +1,34 @@
+\documentclass[twoside,DIV=11]{scrartcl}
+%% $Id: capPos.ltx 72 2021-05-02 11:40:10Z herbert $
+
+\input{preamble.ltx}
+\usepackage{multicol}
+\usepackage[all=!htb]{hvfloat-fps}
+
+\setlength\columnseprule{0.4pt}
+\def\capShortText{A short caption}
+\def\capLongText{Here comes a caption to show the justification of the text relative to the object. It refers to
+the optional argument \texttt{capPos}.}
+
+\let\OrigBlindtext\blindtext
+\def\blindtext{\TeX\ is a typesetting language. Instead of visually formatting your text, you enter y
+our manuscript text intertwined with \TeX\ commands in a plain text file. You then run \TeX\ to
+produce formatted output, such as a PDF file. %Thus, in contrast to standard word processors,
+%your document is a separate file that does not pretend to be a representation of the final
+%typeset output, and so can be easily edited and manipulated.
+}
+
+
+
+\begin{document}
+\part{Examples for \texttt{capPos} and onecolumn mode}\clearpage
+\let\NewColumn\clearpage
+\input{capPos}
+
+\twocolumn[\part{Examples for \texttt{capPos} and twocolumn mode}]
+\def\blindtext{\OrigBlindtext}
+\let\NewColumn\columnbreak
+\input{capPos}
+
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/hvfloat/capPos.pdf b/Master/texmf-dist/doc/latex/hvfloat/capPos.pdf
new file mode 100644
index 00000000000..834f4949c76
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hvfloat/capPos.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hvfloat/capPos.tex b/Master/texmf-dist/doc/latex/hvfloat/capPos.tex
new file mode 100644
index 00000000000..db2e889f6ee
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/hvfloat/capPos.tex
@@ -0,0 +1,129 @@
+
+\section{\texttt{default}}
+\blindtext
+
+\begin{lstlisting}
+\hvFloat{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+
+\NewColumn
+
+
+
+%----------------------top-----------------------------------
+\section{\texttt{capPos=top}}
+
+\begin{lstlisting}
+\hvFloat[capPos=top]{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=top]{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat[capPos=top]{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=top]{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+
+\NewColumn
+
+%----------------------before-----------------------------------
+\section{\texttt{capPos=before}, same as \texttt{capPos=left}}
+
+\begin{lstlisting}
+\hvFloat[capPos=before]{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=before]{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat[capPos=before]{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=before]{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+\NewColumn
+
+%----------------------after-----------------------------------
+\section{\texttt{capPos=after}, same as \texttt{capPos=right}}
+
+\begin{lstlisting}
+\hvFloat[capPos=after]{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=after]{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat[capPos=after]{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=after]{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+
+\NewColumn
+
+%----------------------inner-----------------------------------
+\section{\texttt{capPos=inner}}
+
+\begin{lstlisting}
+\hvFloat[capPos=inner]{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=inner]{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat[capPos=inner]{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=inner]{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+
+\NewColumn
+
+
+%----------------------outer-----------------------------------
+\section{\texttt{capPos=outer}}
+
+\begin{lstlisting}
+\hvFloat[capPos=outer]{figure}{\includegraphics{frose}}{\capShortText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=outer]{figure}{\includegraphics{frose}}{\capShortText}{}
+
+\blindtext
+
+\begin{lstlisting}
+\hvFloat[capPos=outer]{figure}{\includegraphics{frose}}{\capLongText}{}
+\end{lstlisting}
+
+\hvFloat[capPos=outer]{figure}{\includegraphics{frose}}{\capLongText}{}
+
+\blindtext
+
+\NewColumn
+
diff --git a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
index b174232b479..2c642cae21b 100644
--- a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
+++ b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
index 18c0898a594..1082bb1334d 100644
--- a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
+++ b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.tex 73 2021-05-03 07:38:13Z herbert $
+%% $Id: hvfloat.tex 75 2021-05-04 19:52:22Z herbert $
\listfiles
\errorcontextlines=100
\documentclass[twoside,paper=a4,]{scrartcl}
@@ -56,6 +56,9 @@
\usepackage{hvindex}
\usepackage[all=!htb]{hvfloat-fps}
\usepackage[fbox,hyperref]{hvfloat}
+\hvFloatSet{floatRef=caption}
+
+
\captionsetup{format=plain,font=sf,labelfont={sf,bf}}
\captionsetup[sub]{format=plain,font=sf,labelfont={sf,bf}}
@@ -161,7 +164,7 @@
\begin{document}
\title{Package \texttt{hvfloat}\\Rotating and scaling of objects and captions\\ver \hvFloatFileVersion}
-\author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}}}
+\author{Herbert Voß\thanks{\protect\url{hvoss@tug.org}\newline Thanks to Frank Mittelbach, Rolf Niepraschk}}
\date{\today}
\maketitle
@@ -306,7 +309,7 @@ There are the following keywords:
\bottomrule
\endlastfoot
\Lkeyword{floatPos} & \texttt{tbp} & This is the same default placement setting like the one from standard \LaTeX, but maybe not always
-the best setting.\\
+the best setting. \\
\Lkeyword{rotAngle} & 0& The value for the angle if both, the object and the caption should be rotated in the same way.\\
\Lkeyword{capWidth} & n& The width of the caption. Can be »\texttt{n}« like a natural width,
@@ -2487,12 +2490,11 @@ even page and following text will be placed \emph{before} the object.
\hvFloat[doubleFULLPAGE,capPos=right,capAngle=90]%
{figure}%
{\includegraphics[angle=90,width=2\paperwidth]{images/r+j}}%
- [Eine doppelseitige Abbildung mit Caption auf der Abbildung]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die ÜBER den rechten
- Teil der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doubleFULLPAGE}}%
+ [A doublepage image with a caption on the image.]%
+ {A caption for a double-sided image that will be placed below the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doubleFULLPAGE}}%
{fig:doubleFULLPAGE0}
\Blindtext
@@ -2503,12 +2505,11 @@ even page and following text will be placed \emph{before} the object.
\hvFloat[doubleFULLPAGE,capPos=right,capAngle=90]%
{figure}%
{\includegraphics[height=2\paperwidth,angle=90]{images/r+j}}%
- [Eine doppelseitige Abbildung mit Caption auf der Abbildung]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die ÜBER den rechten
- Teil der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doubleFULLPAGE}}%
+ [A doublepage image with a caption on the image.]%
+ {A caption for a double-sided image that will be placed on the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doubleFULLPAGE}}%
{fig:doubleFULLPAGE0}
\Blindtext
@@ -2522,11 +2523,10 @@ even page and following text will be placed \emph{before} the object.
\hvFloat[doubleFULLPAGE,capPos=right]%
{figure}%
{\includegraphics[height=\paperheight]{images/rheinsberg}}%
- {Eine Beschriftung einer doppelseitigen Abbildung, die ÜBER den rechten
- Teil der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doubleFULLPAGE}}%
+ {A caption for a double-sided image that will be placed on the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doubleFULLPAGE}}%
{fig:doubleFULLPAGE1}
\Blindtext \Blindtext
@@ -2537,11 +2537,10 @@ even page and following text will be placed \emph{before} the object.
\hvFloat[doubleFULLPAGE,capPos=right]%
{figure}%
{\includegraphics[height=\paperheight]{images/rheinsberg}}%
- {Eine Beschriftung einer doppelseitigen Abbildung, die ÜBER den rechten
- Teil der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doubleFULLPAGE}}%
+ {A caption for a double-sided image that will be placed on the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doubleFULLPAGE}}%
{fig:doubleFULLPAGE1}
\Blindtext \Blindtext
@@ -2558,12 +2557,11 @@ There will be pagenumbers and a caption can be rotated on the right of the objec
\hvFloat[doublePAGE]%
{figure}%
{\includegraphics[width=2\paperwidth]{images/seiser}}%
- [Eine doppelseitige Abbildung mit Caption unterhalb der rechten Abbildung]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die unterhalb der rechten
- Teils der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePAGE}}%
+ [A doublepage image with a caption below the right part.]%
+ {A caption for a double-sided image that will be placed below the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doublePAGE}}%
{fig:doublePAGE0}
\Blindtext
@@ -2575,12 +2573,11 @@ There will be pagenumbers and a caption can be rotated on the right of the objec
\hvFloat[doublePAGE]%
{figure}%
{\includegraphics[width=2\paperwidth]{images/seiser}}%
- [Eine doppelseitige Abbildung mit Caption unterhalb der rechten Abbildung]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die unterhalb der rechten
- Teils der Abbildung platziert wird. Die Abbildung beginnt am linken
- Papierrand. Auf den Seiten wird kein weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePAGE}}%
+ [A doublepage image with a caption below the right part.]%
+ {A caption for a double-sided image that will be placed below the right-hand
+ part of the illustration. The illustration begins on the left edge of the paper.
+ No further text is placed on the pages. A short form is used for the LOF.
+ The parameter is \texttt{doublePAGE}}%
{fig:doublePAGE0}
\Blindtext
@@ -2597,12 +2594,11 @@ and the rest of the text area is filled with text.
\hvFloat[doublePage,capWidth=n,capPos=right]%
{figure}%
{\includegraphics[width=2\textwidth]{images/sonne-meer}}%
- [Eine doppelseitige Abbildung mit rechtsseitiger Caption unterhalb]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die unterhalb des rechten
- Teils der Abbildung platziert wird. Die Abbildung beginnt am linken
- Textrand. Auf den Seiten wird ansonsten weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePage}}%
+ [A doublepage image with a caption on the right side of the right part.]%
+ {A caption for a double-sided image 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}}%
{fig:doublePage0}
\Blindtext
@@ -2614,12 +2610,11 @@ and the rest of the text area is filled with text.
\hvFloat[doublePage,capWidth=n,capPos=right]%
{figure}%
{\includegraphics[width=2\textwidth]{images/sonne-meer}}%
- [Eine doppelseitige Abbildung mit rechtsseitiger Caption unterhalb]%
- {Eine Beschriftung einer doppelseitigen Abbildung, die unterhalb des rechten
- Teils der Abbildung platziert wird. Die Abbildung beginnt am linken
- Textrand. Auf den Seiten wird ansonsten weiterer Text
- platziert. Für das LOF wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePage}}%
+ [A doublepage image with a caption on the right side of the right part.]%
+ {A caption for a double-sided image 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}}%
{fig:doublePage0}
\Blindtext
@@ -2667,12 +2662,11 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15
\hvFloat[doublePage,capWidth=n,capPos=right]%
{table}%
{\usebox\hvOBox}%%%%%%%%%%%%%%
- [Eine doppelseitige Tabelle mit rechtsseitiger Caption unterhalb]%
- {Eine Beschriftung einer doppelseitigen Tabelle, die unterhalb des rechten
- Teils der Abbildung platziert wird. Die Tabelle beginnt am linken
- Textrand. Auf den Seiten wird ansonsten weiterer Text
- platziert. Für das LOT wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePage}}%
+ [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}}%
{tab:doublePage3}
\Blindtext
@@ -2711,12 +2705,11 @@ Artikel gesamt & 2 & 6 & 13 & 8 & 4 & 3 & 5 & 4 & 0 & 6 & 3 & 5 &23 &10 & 8 & 15
\hvFloat[doublePage,capWidth=n,capPos=right]%
{table}%
{\usebox\hvOBox}%%%%%%%%%%%%%%
- [Eine doppelseitige Tabelle mit rechtsseitiger Caption unterhalb]%
- {Eine Beschriftung einer doppelseitigen Tabelle, die unterhalb des rechten
- Teils der Abbildung platziert wird. Die Tabelle beginnt am linken
- Textrand. Auf den Seiten wird ansonsten weiterer Text
- platziert. Für das LOT wird dabei eine Kurzform berücksichtigt. Parameter
- ist \texttt{doublePage}}%
+ [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}}%
{tab:doublePage3}
\Blindtext
@@ -2832,7 +2825,7 @@ optional package options to set the global placement:
\Blindtext
-\hvFloatSetDefaults
+%\hvFloatSetDefaults
\hvFloat[FULLPAGE]{figure}%
{\includegraphics[FULLPAGE]{tiger}}%
[A float which needs the complete paper width and height.]%
diff --git a/Master/texmf-dist/doc/latex/hvfloat/missing.txt b/Master/texmf-dist/doc/latex/hvfloat/missing.txt
index 5a0917558c0..4d557d45b45 100644
--- a/Master/texmf-dist/doc/latex/hvfloat/missing.txt
+++ b/Master/texmf-dist/doc/latex/hvfloat/missing.txt
@@ -1,3 +1,4 @@
-Not all imaging of the documentation are listed here, because
+Not all images of the documentation are listed here, because
some are not for public use. You can use any other imgae if you
want to run the documentation by yourselve.
+
diff --git a/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty b/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
index dd27d7af479..61222e4aca1 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 73 2021-05-03 07:38:13Z herbert $
+%% $Id: hvfloat.sty 75 2021-05-04 19:52:22Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.21}
-\def\filedate{2021/05/04}
+\def\fileversion{2.22}
+\def\filedate{2021/05/06}
\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\ rotating of floating objects]
\let\hvFloatFileVersion\fileversion
@@ -128,7 +128,7 @@
}
\newif\ifhv@floatRefToObject
-\define@choicekey*+{hvSet}{floatRef}[\val\nr]{caption,object}[object]{% where the LOF entry should point to
+\define@choicekey*+{hvSet}{floatRef}[\val\nr]{caption,object}[object]{% where the LOF entry should point to (inactive)
\ifcase\nr\relax
\hv@floatRefToObjectfalse
\else
@@ -151,7 +151,9 @@
\define@boolkey{hvSet}[hv@]{nonFloat}[true]{}% Do not use float environment
\define@boolkey{hvSet}[hv@]{onlyText}[true]{}% Write the caption only as text
\define@boolkey{hvSet}[hv@]{wide}[true]{}% Write the caption only as text
+\define@boolkey{hvSet}[hv@]{debug}[true]{}% give more infos in the terminal
+\newcommand\hv@typeout[1]{\ifhv@debug\typeout{#1}\fi}
\newif\ifhv@fullpage
\newif\ifhv@FULLPAGE
@@ -190,7 +192,7 @@
%
\newcommand{\setDefaults}{%
\hv@set{%
- floatPos=htbp, rotAngle=0, capWidth=n, capAngle=0,
+ floatPos=, rotAngle=0, capWidth=n, capAngle=0,
capPos=bottom, capVPos=center, objectPos=center, objectAngle=0,
floatCapSep=5pt, useOBox=false, nonFloat=false,
onlyText=false, wide=false, fullpage=false, FULLPAGE=false,
@@ -232,10 +234,11 @@
\setlength\belowcaptionskip{\hvBelowCaptionSkip}%
}
%
-\newcommand\figcaption[2][]{\def\@captype{figure}%
+\newcommand\figcaption[2][]{%
+ \def\@captype{figure}%
\begingroup
\ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
- \ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi
+ \if$#1$ \caption{#2}\else\caption[#1]{#2}\fi
\endgroup}
\newcommand\tabcaption[2][]{\def\@captype{table}%
\begingroup
@@ -404,29 +407,17 @@
\newcount\hv@cnta
\newcount\hv@cntb
-\def\hvFloat@ii[#1]#2{% #1: key/value, #2: floattype
- \@ifnextchar[{\hvFloat@iii[#1]{#2}}{\hvFloat@iii[#1]{#2}[]}%
-}
-
-\def\hvFloat@iii[#1]#2[#3]#4{% #1: key/value, #2: floattype, #3: ListOfExt, #4: object
+\def\hvFloat@ii[#1]#2#3{% #1: key/value, #2: floattype, #3: object
\hv@maxImageWidth=\textwidth
\ifx\relax#1\relax\else\setkeys{hvSet}{#1}\fi
\gdef\hv@floatType{#2}%
- \ifx\relax#3\relax
- \ifx\hv@floatType\hv@figure
- \gdef\hv@floatListOfExt{lof}%
- \else
- \gdef\hv@floatListOfExt{lot}%
- \fi
- \else
- \gdef\hv@floatListOfExt{#3}%
- \fi
+ \xdef\hv@floatListOfExt{\@nameuse{ext@\hv@floatType}}%
\ifx\relax#2\relax \setkeys{hvSet}{nonFloat=true}\fi
- \gdef\hv@floatObject{#4}%
+ \gdef\hv@floatObject{#3}%
\@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}%
}
-\def\do@@hvFloat[#1]#2#3{%
+\def\do@@hvFloat[#1]#2#3{% #1: listof caption, #2. long caption #3: label
\gdef\hv@shortCap{#1}%
\gdef\hv@longCap{#2}%
\gdef\hv@label{#3}%
@@ -458,7 +449,7 @@
% \global\hv@capbesidefalse
}
%
-\def\do@@@hvFloat{% no special float page
+\def\do@@@hvFloat{% no special float page, caption and image on top of each other or side by side
\def\@tempa{90}%
\ifx\hvSet@rotAngle\@tempa
\setlength\hvMaxCapWidth{\textheight}%
@@ -551,21 +542,12 @@
\hv@longCap
\else
\let\@captype\hv@floatType
- \ifhv@floatRefToObject
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption[]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
- \addcontentsline{\hv@floatListOfExt}{\hv@floatType}{\protect\numberline{\csname the\hv@floatType\endcsname}{\ignorespaces\hv@longCap}}%
- \else
- \caption[]{\hv@shortCap\expandafter\label\expandafter{\hv@label}}%
- \addcontentsline{\hv@floatListOfExt}{\hv@floatType}{\protect\numberline{\csname the\hv@floatType\endcsname}{\ignorespaces\hv@shortCap}}%
- \fi
- \else
\expandafter\ifx\expandafter\relax\hv@shortCap\relax
\caption{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
\else
\caption[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
\fi
- \fi
+% \fi
\fi
\fi
% \expandafter\label\expandafter{\hv@label}% 2.17 put label into the caption argument
@@ -591,20 +573,9 @@
\hv@longCap
\else
\let\@captype\hv@floatType
- \ifhv@floatRefToObject
- \expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption[]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
- \addcontentsline{\hv@floatListOfExt}{\hv@floatType}{\protect\numberline{\csname the\hv@floatType\endcsname}{\ignorespaces\hv@longCap}}%
- \else
- \caption[]{\hv@shortCap\expandafter\label\expandafter{\hv@label}}%
- \addcontentsline{\hv@floatListOfExt}{\hv@floatType}{\protect\numberline{\csname the\hv@floatType\endcsname}{\ignorespaces\hv@shortCap}}%
- \fi
- \else
\expandafter\ifx\expandafter\relax\hv@shortCap\relax
\caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}%
- \fi
\fi
-% \expandafter\ifx\expandafter\relax\hv@shortCap\relax \caption{\hv@longCap}\else\caption[\hv@shortCap]{\hv@longCap}\fi
\fi
\fi
\label{\hv@label}%
@@ -617,7 +588,11 @@
% rotated angles saved in different boxes
%%
\restoreCaptionSkip% save old values
- \def\fps@figure{\hvSet@floatPos}%
+% \def\fps@figure{\hvSet@floatPos}%
+ \ifx\hvSet@floatPos\@empty % use type default
+ \else
+ \@namedef{fps@\hv@floatType}{\hvSet@floatPos}%
+ \fi
\ifhv@nonFloat
\begingroup% Start the nonfloat part
\else
@@ -953,13 +928,27 @@
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\else
\rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
}%
}%
@@ -982,13 +971,27 @@
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\else
\rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
}}}%
\fi
@@ -997,6 +1000,7 @@
\def\do@hvFloat@doublePAGE#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
+ \hv@typeout{>>>>do@hvFloat@doublePAGE}%
\checkoddpage
\ifoddpage
\afterpage{%
@@ -1012,13 +1016,27 @@
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\else
\rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
\newpage
}%
@@ -1037,13 +1055,27 @@
\medskip
\ifdim\dp\hvObjectBox > \z@
\rotatebox[origin=c]{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\else
\rotatebox{90}{\parbox{\the\dimexpr\ht\hvObjectBox+\dp\hvObjectBox}{%
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
\newpage
}}%
@@ -1053,66 +1085,114 @@
%
\def\do@hvFloat@doubleFULLPAGE#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
+ \hv@typeout{>>>>do@hvFloat@doubleFULLPAGE}%
\checkoddpage
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\ifoddpage
+ \hv@typeout{>>>>>doubleFULLPAGE->oddpage}%
\afterpage{%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip}% +0.5\paperheight-0.5\ht\hvObjectBox
+ \begingroup
+ \nointerlineskip
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
+ \endgroup
\AtBeginShipoutNext{\thispagestyle{empty}}%
\clipbox*{0 0 \paperwidth{} \height}{\usebox\hvObjectBox}%
\newpage
\AtBeginShipoutNext{\thispagestyle{empty}}%
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\normalbaselineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
+ \begingroup
+ \nointerlineskip
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
+ \endgroup
\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}}}}%
+ \captionof*{\hv@floatType}{\hv@longCap}}}%
+% \captionof*{\hv@floatType}{\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}}}}%
+ \hv@typeout{>>>>>doubleFULLPAGE->oddpage->floatRefToObject=false}%
+ \rotatebox{90}{\qquad\parbox{0.9\ht\hvObjectBox}{%
+ \if$\hv@shortCap$
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }}%
+% \fi
\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
- }}}%
+ \parbox{0.8\textwidth}{%
+ \hv@typeout{>>>>>doubleFULLPAGE->oddpage->#1<0->floatRefToObject=false}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }%
+ \endminipage}}}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\relax\hv@shortCap\relax
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
\newpage
}%
\else
+ \hv@typeout{>>>>>doubleFULLPAGE->evenpage}%
\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-\baselineskip}% +0.5\paperheight-0.5\ht\hvObjectBox
+ \begingroup
+ \nointerlineskip
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
+ \endgroup
\AtBeginShipoutNext{\thispagestyle{empty}}%
\clipbox*{0 0 \paperwidth{} \paperheight}{\usebox\hvObjectBox}%
\newpage
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\normalbaselineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
+ \begingroup
+ \nointerlineskip
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip+2\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\oddsidemargin-\parindent-1in}%
+ \endgroup
\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}}}}%
+ \savebox\hvCaptionBox{\parbox{0.9\ht\hvObjectBox}{\captionof*{\hv@floatType}[\hv@shortCap]{\hv@longCap}}}%
+% \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}%
+ \rotatebox{90}{\minipage{\the\ht\hvObjectBox}\centering\parbox{0.75\textwidth}{%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }%
+ \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}}}%
+ \centering\parbox{0.8\textwidth}{%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
+ }%
+ \endminipage}}}%
\fi
\else
- \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \ifx\hv@shortCap\@empty
+ \captionof{\hv@floatType}{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \else
+ \captionof{\hv@floatType}[\hv@shortCap]{\hv@longCap\expandafter\label\expandafter{\hv@label}}%
+ \fi
\fi
\newpage
}%
@@ -1136,7 +1216,7 @@
\begin{\hv@floatType}[p]%
\fi
\ifhv@FULLPAGE
- \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-0.5\baselineskip}%
+ \vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep}%-0.5\baselineskip%
\checkoddpage
\if@twoside
\ifoddpage
@@ -1278,9 +1358,9 @@
\setlength\abovecaptionskip{0pt}%
\edef\@captype{\hv@floatType}%
\expandafter\ifx\expandafter\relax\hv@shortCap\relax
- \caption{\hv@longCap}%
+ \caption{\hv@longCap}%
\else
- \caption[\hv@shortCap]{\hv@longCap}%
+ \caption[\hv@shortCap]{\hv@longCap}%
\fi
\expandafter\ifx\expandafter\relax\hv@label\relax\else\label{\hv@label-cap}\fi
\endminipage}%