diff options
Diffstat (limited to 'macros/latex/contrib/hvfloat/doc/hvfloat.tex')
-rw-r--r-- | macros/latex/contrib/hvfloat/doc/hvfloat.tex | 227 |
1 files changed, 149 insertions, 78 deletions
diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.tex b/macros/latex/contrib/hvfloat/doc/hvfloat.tex index 90bea8a9eb..5382371f7e 100644 --- a/macros/latex/contrib/hvfloat/doc/hvfloat.tex +++ b/macros/latex/contrib/hvfloat/doc/hvfloat.tex @@ -1,7 +1,7 @@ -%% $Id: hvfloat.tex 114 2021-06-15 13:20:03Z herbert $ +%% $Id: hvfloat.tex 122 2021-06-26 12:35:53Z herbert $ \listfiles \errorcontextlines=100 -\documentclass[twoside,paper=a4,]{scrartcl} +\documentclass[twoside,paper=a4,usegeometry]{scrartcl} \usepackage{fontspec} \usepackage{libertinus} %\usepackage[scaled=0.85]{beramono} @@ -10,25 +10,29 @@ \usepackage{microtype} \usepackage[english]{babel} +\usepackage[marginparwidth=3cm,bottom=2cm,top=1cm,includeheadfoot]{geometry} + + \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} -\usepackage[showframe=false]{geometry} \usepackage{listings} % \lstset{% language=[LaTeX]TeX,% showstringspaces=false,% tabsize=5,% + backgroundcolor=\color{black!15}, % frame={tb},% -% lineskip=-1pt,% + lineskip=-1pt,% extendedchars=true,% basicstyle={\small\ttfamily},% -% numbers=left,% -% stepnumber=1,% -% numberstyle=\tiny,% -% xleftmargin=2em,% - breaklines=true} + numbers=left,% + stepnumber=1,% + numberstyle=\tiny,% + xleftmargin=2em,% + breaklines=true, + } % \usepackage{graphicx} @@ -86,8 +90,6 @@ \index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}} \index{#2@\texttt{#2} (value)}\index{Value!#2@\texttt{#2}}} - - \newsavebox\boxdef \newenvironment{BDef} {\begin{lrbox}{\boxdef} @@ -160,6 +162,13 @@ \let\CMD\Lcs \let\ENV\Lenv +\newdimen\normalparindent +\normalparindent=20pt +\def\NormalParIndent{\global\parindent=\normalparindent} +\NormalParIndent + + + \newcommand\Float[1][]{\ifx\relax#1\relax\marginnote{\fbox{float}}\else \marginnote{\fbox{\shortstack{float\\#1}}}\fi } @@ -301,57 +310,106 @@ Internally the style is saved in a macro named \verb|\hv@<name>|. There are the following keywords: +%\begin{lrbox}\hvOBox +\begingroup +\small + \def\rowvsp{\rule{0pt}{9pt}}% + \def\rowhsp{\hspace*{\normalparindent}}% + \def\rownl{\newline\rowhsp}% + \def\none{{\itshape none}}% + \def\arraystretch{0.96}% \begin{xltabular}{\textwidth}{@{} l>{\small\ttfamily}cX @{}} \caption{The optional keywords for the macro \nxLcs{hvFloat}}\label{tab:options}\\\toprule -\emph Keyword & \emph Default & \emph Description\\\midrule +\emph{K\kern-.1em eyword} & \rmfamily\emph{Default} & \emph{Description}\\\midrule \endfirsthead \midrule -\emph Keyword & \emph Default & \emph Description\\\midrule +\emph{K\kern-.1em eyword} & \rmfamily\emph{Default} & \emph{Description}\\\midrule \endhead \midrule \endfoot \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. \\ -\Lkeyword{rotAngle} & 0& The value for the angle if both, the object and the caption, should be rotated together.\\ -\Lkeyword{capWidth} & n& The width of the caption. Can be »\texttt{n}« like a natural width given by the current linewidth, - »\texttt{w}« for the width of the object, »\texttt{h}« for the height of the object, or a scale for \verb|\columnwidth|.\\ -\Lkeyword{capAngle} & 0 & The integer value for the angle if the caption should be rotated. Counted counter clockwise.\\ -\Lkeyword{capPos} & bottom& The position of the caption relative to the object. Possible values are\\ - & & \Lkeyval{before}: \emph{always} before (left) from the object.\\ - & & \Lkeyval{top}: \emph{always} on top of the object.\\ - & & \Lkeyval{left}: \emph{always} before (left) from the object, but on the \emph{same page} in twocolumn mode.\\ - & & \Lkeyval{after}: \emph{always} after (right) from the object.\\ - & & \Lkeyval{bottom}: \emph{always} on the bottom of the object.\\ - & & \Lkeyval{right}: \emph{always} after (right) from the object, but on the \emph{same page} in twocolumn mode.\\ - & & \Lkeyval{inner}: in twoside mode always typeset at the inner margin.\\ - & & \Lkeyval{outer}: in twoside mode always typeset at the outer margin.\\ - & & \Lkeyval{evenPage}: in twoside mode with fullpage objects always on an even page.\\ - & & \Lkeyval{oddPage}: in twoside mode with fullpage objects always on an odd page.\\ -\Lkeyword{capVPos}& center& This is only important for \texttt{capPos=left|right}. Only in this case the - caption can vertically placed at the \Lkeyval{bottom}, \Lkeyval{center} and \Lkeyval{top}.\\ -\Lkeyword{objectPos} & center & The horizontal placement of the object relative to the document. -Possible values are (\textbf{l})eft|(\textbf{c})enter|(\textbf{r})ight.\\ -\Lkeyword{objectAngle} & 0 & The integer value for the angle if the object should be rotated. Counted counter clockwise.\\ -\Lkeyword{floatCapSep} & 5pt & The additional space between the object and a left or right placed caption.\\ -\Lkeyword{useOBox} & false & Instead of passing the object as parameter to the \Lcs{hvFloat}, the contents maybe saved in the box \texttt{\textbackslash hvOBox} With \texttt{useOBox=true} the contents of this box will be used.\\ -\Lkeyword{onlyText} & false & The caption will be printed as normal text and there is no entry in the list of \ldots.\\ -\Lkeyword{nonFloat} & false & The object isn't put in a floating environment. It is printed as standard text with an additional caption. The float counter is increased as usual and can be referenced.\\ -\Lkeyword{wide} & false & The float can use \Ldim{textwidth}+\Ldim{marginparwidth} as horizontal width.\\ -\Lkeyword{objectFrame} & false & put a frame with no separation around the float object.\\ -\Lkeyword{style} & --- & Use a defined style\\ -\Lkeyword{capFormat} & --- & Define formatting options for \Lcs{caption} (see documentation of package \Lpack{caption}).\\ -\Lkeyword{subcapFormat} & --- & Define formatting options for \Lcs{subcaption}.\\ -\Lkeyword{fullpage} & false & Use a complete column in twocolumn mode.\\ -\Lkeyword{FULLPAGE} & false & Use the complete paper width/height for the object.\\ -\Lkeyword{FullPage} & false & Use the complete text area for the object.\\ -\Lkeyword{doublePage} & false & Use the textarea on a doublepage with additional text.\\ -\Lkeyword{doublePAGE} & false & Use the textarea on a doublepage without additional text.\\ -\Lkeyword{doubleFULLPAGE} & false & Use the paperwidth on a doublepage without additional text.\\ -\Lkeyword{vFill} & false & Put a \Lcs{vfill} between every two objects in a multi- or subfloat.\\ -\end{xltabular} +\Lkeyword{floatPos} & \texttt{tbp} & This is the same default placement + setting as in standard \LaTeX; maybe not always the best setting.\\ +\Lkeyword{rotAngle} & 0& \rowvsp The value for the angle if both the object and + the caption should be rotated together.\\ +\Lkeyword{capWidth} & n& \rowvsp The width of the caption. Can be \texttt{n} + for a natural width given by the current linewidth, + \texttt{w} for the width of the object, + \rownl\texttt{h} for the height of the object, + or a scale factor for \Lcs{columnwidth}.\\ +\Lkeyword{capAngle} & 0 & \rowvsp The integer value for the angle if the caption + should be rotated. Positive is counter-clockwise.\\ +% +\Lkeyword{capPos} & bottom& \rowvsp The position of the caption relative to the + object. Possible values:\\ + & & \rowhsp\Lkeyval{before}: \emph{always} before (left) from the object.\\ + & & \rowhsp\Lkeyval{top}: \emph{always} on top of the object.\\ + & & \rowhsp\Lkeyval{left}: \emph{always} before (left) from the object, + but on the same page in twocolumn mode.\\ + & & \rowhsp\Lkeyval{after}: \emph{always} after (right) from the object.\\ + & & \rowhsp\Lkeyval{bottom}: \emph{always} on the bottom of the object.\\ + & & \rowhsp\Lkeyval{right}: \emph{always} after (right) from the + object, but on the same page in twocolumn mode.\\ + & & \rowhsp\Lkeyval{inner}: in twoside mode always typeset at the inner + margin.\\ + & & \rowhsp\Lkeyval{outer}: in twoside mode always typeset at the outer + margin.\\ + & & \rowhsp\Lkeyval{evenPage}: in twoside mode with fullpage objects + always on an even page.\\ + & & \rowhsp\Lkeyval{oddPage}: in twoside mode with fullpage objects + always on an odd page.\\ +% +\Lkeyword{capVPos}& center& \rowvsp Only used when + \texttt{capPos=left$\,|\,$right}; in these cases, the caption can + be vertically placed at the \Lkeyval{bottom}, \Lkeyval{center} or + \Lkeyval{top}.\\ +\Lkeyword{objectPos} & center & \rowvsp Horizontal placement of the object + relative to the document. Possible values are + (\textbf{l})eft, (\textbf{c})enter, (\textbf{r})ight.\\ +\Lkeyword{objectAngle} & 0 & \rowvsp Integer value for the angle if + the object should be rotated. Positive is counter-clockwise.\\ +\Lkeyword{floatCapSep} & 5pt & \rowvsp Additional space between the + object and a left- or right-placed caption.\\ +\Lkeyword{useOBox} & false & \rowvsp Instead of passing the object as a + parameter to \Lcs{hvFloat}, with \texttt{useOBox=true} the contents + of the predefined box \texttt{\textbackslash hvOBox} is used.\\ +\Lkeyword{onlyText} & false & \rowvsp The caption is printed as normal + text with no entry in any list of \ldots\\ +\Lkeyword{nonFloat} & false & \rowvsp The object isn't put in a floating + environment, but printed as standard text with an additional caption. + \rownl The float counter is increased as usual and can be referenced.\\ +\Lkeyword{wide} & false & \rowvsp The float can use + \Ldim{textwidth}$\,+\,$\Ldim{marginparwidth} as horizontal width.\\ +\Lkeyword{objectFrame} & false & \rowvsp Put a frame with no separation + around the float object.\\ +\Lkeyword{style} & \none & \rowvsp Use a defined style.\\ +\Lkeyword{capFormat} & \none & \rowvsp Define formatting options for + \Lcs{caption}; see documentation of package \Lpack{caption}.\\ +\Lkeyword{subcapFormat} & \none & \rowvsp Define formatting options for + \Lcs{subcaption}.\\ +\Lkeyword{fullpage} & false & \rowvsp Use a complete column in twocolumn mode.\\ +\Lkeyword{FullPage} & false & \rowvsp Use the full text area for the object.\\ +\Lkeyword{FULLPAGE} & false & \rowvsp Use the full paper width/height for the object.\\ +\Lkeyword{doublePage} & false & \rowvsp Use the text area on a doublepage with additional text.\\ +\Lkeyword{doublePAGE} & false & \rowvsp Use the text area on a doublepage without additional text.\\ +\Lkeyword{doubleFULLPAGE} & false & \rowvsp Use the paperwidth on a doublepage without additional text.\\ +\Lkeyword{vFill} & false & \rowvsp Put a \Lcs{vfill} between every two objects in a multi- or subfloat.\\ +\Lkeyword{sameHeight} & false & \rowvsp use the same text height on both pages for a \Lkeyword{doublePage} object.\\ +\end{xltabular} +%\end{lrbox} +\endgroup + +%\hvFloat*[floatPos=p,rotAngle=90,capPos=top,capWidth=w,useOBox=true] +% {table} +% {} +% [The optional keywords for the \newline\Lcs{hvFloat} macro] +% {The optional keywords for the \protect\Lcs{hvFloat} macro.} +% {tab:options} + + + @@ -786,10 +844,12 @@ The code for figure \ref{fig:5}: The code for figure \ref{fig:6}: \begin{lstlisting} \hvFloat[% - capWidth=0.25, - capPos=right, + capWidth=0.25,% + capPos=right,% capVPos=center,% the default -]{figure}{\frame{\includegraphics{images/rose}}}{Caption centered right beside the float}{fig:6} +]{figure}{\frame{\includegraphics{images/rose}} + \frame{\includegraphics[origin=c,angle=180]{images/rose}}}% + {Caption centered right beside the float}{fig:6} \end{lstlisting} @@ -798,7 +858,9 @@ The code for figure \ref{fig:6}: capWidth=0.25,% capPos=right,% capVPos=center,% the default -]{figure}{\frame{\includegraphics{images/rose}}}{Caption centered right beside the float}{fig:6} +]{figure}{\frame{\includegraphics{images/rose}} + \frame{\includegraphics[origin=c,angle=180]{images/rose}}}% + {Caption centered right beside the float}{fig:6} \section{Caption format} @@ -1633,6 +1695,9 @@ which is before the caption. \end{figure} \fi + + + \FloatBarrier @@ -1641,6 +1706,11 @@ which is before the caption. These settings make no sense in \Index{onecolumn} mode. +\clearpage + + + + \subsection{Using the paper size} It belongs to the user to create an object which fills the complete page. However, with the @@ -1695,6 +1765,8 @@ the paper dimensions \Ldim{paperwidth} and \FloatBarrier +\clearpage + \subsection{Multifloats}\label{sec:multifloats} Multifloats is the name for more than one image and/or tabular in \emph{one} floating @@ -2542,7 +2614,7 @@ in the inner margin on both pages. \Blindtext -%\Blindtext +\Blindtext @@ -2589,7 +2661,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same {figure}% {\includegraphics[doubleFULLPAGE, keepaspectratio=false]{images/rheinsberg}}% - {A caption for a double-sided image that will be placed before + {A caption for a double-sided image that will be placed \textbf{after} the image. The image 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}}% @@ -2602,7 +2674,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same \hvFloat[doubleFULLPAGE,capPos=after]% {figure}% {\includegraphics[doubleFULLPAGE]{images/rheinsberg}}% - {A caption for a double-sided image that will be placed before + {A caption for a double-sided image that will be placed \textbf{after} the image. The image 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}}% @@ -2613,14 +2685,17 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same \hvblindtext \hvblindtext -\hvblindtext + +\Blindtext + +\Blindtext \begin{lstlisting} \hvFloat[doubleFULLPAGE,capPos=before]% {figure}% {\includegraphics[height=\paperheight,width=2\paperwidth, keepaspectratio=false]{images/rheinsberg}}% - {A caption for a double-sided image that will be placed after + {A caption for a double-sided image that will be placed \textbf{before} the image. The image 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}}% @@ -2631,7 +2706,7 @@ and the right part on page~\pageref{bar-2}. All three labels points to the same \hvFloat[doubleFULLPAGE,capPos=before]% {figure}% {\includegraphics[height=\paperheight,width=2\paperwidth,keepaspectratio=false]{images/rheinsberg}}% - {A caption for a double-sided image that will be placed after + {A caption for a double-sided image that will be placed \textbf{before} the image. The image 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}}% @@ -2673,7 +2748,7 @@ There will be pagenumbers and a caption can be rotated on the right of the objec The parameter is \texttt{doublePAGE}}% {fig:doublePAGE0} -%\hvblindtext +\hvblindtext \Blindtext @@ -2697,7 +2772,7 @@ and the rest of the text area is filled with text. \end{lstlisting} -%\hvFloatSetDefaults +\hvFloatSetDefaults \marginnote{Fig. \ref{fig:doublePage0sH}} \hvFloat[doublePage,sameHeight]% @@ -2717,6 +2792,8 @@ and the rest of the text area is filled with text. \hvblindtext + + \begin{lstlisting} \hvFloat[doublePage,capPos=right,capVPos=top]% {figure}% @@ -2730,7 +2807,7 @@ and the rest of the text area is filled with text. \end{lstlisting} -%\hvFloatSetDefaults +\hvFloatSetDefaults \marginnote{Fig. \ref{fig:doublePage0}} \hvFloat[doublePage,capPos=right,capVPos=top]% @@ -2747,7 +2824,7 @@ and the rest of the text area is filled with text. \Blindtext -\hvblindtext +\Blindtext @@ -2765,7 +2842,7 @@ and the rest of the text area is filled with text. \end{lstlisting} -%\hvFloatSetDefaults +\hvFloatSetDefaults \marginnote{Fig. \ref{fig:doublePage0sH2}} \hvFloat[doublePage,,bindCorr=inner]% @@ -2782,7 +2859,7 @@ and the rest of the text area is filled with text. \Blindtext -\hvblindtext +\Blindtext @@ -2947,12 +3024,10 @@ With \Lcs{hvDefFloatStyle} one can define a special style to get rid of the indi \end{BDef} For example: -\begin{verbatim} -\hvDefFloatStyle{RightCaption}{floatPos=htb, capWidth=0.5, capPos=after, capVPos=bottom, objectPos=center} -\end{verbatim} - - \begin{lstlisting} +\hvDefFloatStyle{RightCaption}{floatPos=htb, capWidth=0.5, capPos=after, + capVPos=bottom, objectPos=center} + \hvFloat[style=RightCaption]{figure}{\includegraphics{images/rose}}% {Caption vertically centered right beside the float with a caption width of \texttt{0.5\textbackslash columnwidth}.}{fig:style} @@ -2967,10 +3042,6 @@ For example: \texttt{0.5\textbackslash columnwidth}.}{fig:style} -\Blindtext - -\Blindtext - \section{Global float setting} Instead of writing the following sequence into the preamble: @@ -2990,7 +3061,7 @@ optional package options to set the global placement: \usepackage[figure=tb,table=t]{hvfloat-fps} \end{verbatim} -\Blindtext +%\Blindtext \Blindtext |