diff options
author | Karl Berry <karl@freefriends.org> | 2012-03-05 23:22:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-03-05 23:22:05 +0000 |
commit | 6f4efefcd6d0e97ded44d129e5838d89b4870bc8 (patch) | |
tree | db9dcab00d115631c8d19a456f2d7b2d3624e9a5 /Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex | |
parent | 3ddbe9fca8914466748f42368d9c6468bc99ffab (diff) |
hvfloat (5mar12)
git-svn-id: svn://tug.org/texlive/trunk@25570 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex | 68 |
1 files changed, 57 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex index 1e743f5e6b4..65bbf3882a4 100644 --- a/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex +++ b/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex @@ -30,11 +30,11 @@ \usepackage{multicol} \usepackage[pdftitle={hvfloat - Rotating Objects and Captions}, pdfauthor={Herbert Voß}, urlcolor=blue, linktocpage, a4paper, colorlinks=true]{hyperref} % -\newcommand{\CMD}[1]{{\small\ttfamily\textbackslash{}#1}} -\newcommand{\ENV}[1]{{\small\ttfamily#1} Environment} +\newcommand\CMD[1]{{\small\ttfamily\textbackslash{}#1}} +\newcommand\ENV[1]{{\small\ttfamily#1} Environment} % \begin{document} -\title{Package \texttt{hvfloat}\\Rotating Objects and Captions\\ver 1.0} +\title{Package \texttt{hvfloat}\\Rotating objects and captions\\ver 1.1} \author{Herbert Voß\thanks{\protect\url{voss@perce.de}}} \date{\today} \maketitle @@ -107,7 +107,7 @@ reference to the not existing table \ref{dummy} is no problem. There are following options:\\[1ex] \begin{table}[!htb] \caption{The Options for the Macro \texttt{hvFloat}}\label{tab:options} -\begin{tabularx}{\textwidth}{lcX} +\begin{tabularx}{\textwidth}{lcX}\hline Option & Default &Description\\\hline \texttt{floatPos} & \texttt{htb} & This is the same placement option like the one from the floats.\\ \texttt{rotAngle} & 0& The value for the angle if both, the object and the caption should be rotated in the same way.\\ @@ -129,6 +129,7 @@ Option & Default &Description\\\hline \texttt{useOBox} & \texttt{false} & Instead of passing the object as parameter to the \texttt{hvFloat}, the contents maybe saved in the box \texttt{\textbackslash hvOBox} With \texttt{useOBox=true} the contents of this box will be used.\\ \texttt{nonFloat} & \texttt{false} & The object isn't put in a floating environment. It is printed as standard text with an additional caption. The float counters are increased as usual and can be referenced. +\\\hline \end{tabularx} \end{table} @@ -155,11 +156,12 @@ Code for figure \ref{fig:0}: \begin{tabularx}{\textwidth}{l|l|X} Name & Type & Description\\\hline \texttt{hvFloat} & command & places object and caption in different ways\\ + \texttt{hvFloatEnv} & environment & places object and caption exactly Here\\ \texttt{figcaption} & command & writes a figure caption in a non floating environment\\ \texttt{tabcaption} & command & writes a table caption in a non floating environment\\ \texttt{setDefaults} & command & sets all options to the defaults \end{tabularx}% -}[Caption on top of a table]{With the only Option \texttt{capPos=t} to place the caption on top of the table, which is often the default}{tab:0} +}{With the only Option \texttt{capPos=t} to place the caption on top of the table, which is often the default}{tab:0} Code for table \ref{tab:0}: \begin{lstlisting}[xrightmargin=-8em,xleftmargin=-3em] @@ -167,6 +169,7 @@ Code for table \ref{tab:0}: \begin{tabularx}{\textwidth}{l|l|X} Name & Type & Description\\\hline \CMD{hvFloat} & command & places object and caption in different ways\\ + \texttt{hvFloatEnv} & environment & places object and caption exactly Here\\ \CMD{figcaption} & command & writes a figure caption in a non floating environment\\ \CMD{tabcaption} & command & writes a table caption in a non floating environment\\ \CMD{setDefaults} & command & sets all options to the defaults @@ -444,6 +447,7 @@ The object has to be passed as an parameter to the \texttt{hvFloat} macro. This \begin{tabular}{l|l|l} Name & Type & Description\\\hline \texttt{hvFloat} & command & places object and caption in different ways\\ +\texttt{hvFloatEnv} & environment & places object and caption exactly Here\\ \texttt{figcaption} & command & writes a figure caption in a non floating environment\\ \texttt{tabcaption} & command & writes a table caption in a non floating environment\\ \texttt{setDefaults} & command & sets all options to the defaults @@ -455,6 +459,7 @@ The object has to be passed as an parameter to the \texttt{hvFloat} macro. This \begin{tabular}{l|l|l} Name & Type & Description\\\hline \texttt{hvFloat} & command & places object and caption in different ways\\ + \texttt{hvFloatEnv} & environment & places object and caption exactly Here\\ \texttt{figcaption} & command & writes a figure caption in a non floating environment\\ \texttt{tabcaption} & command & writes a table caption in a non floating environment\\ \texttt{setDefaults} & command & sets all options to the defaults @@ -524,16 +529,57 @@ The code for figure \ref{fig:text}: \end{lstlisting} + +\section{Environment \texttt{hvFloatEnv}}\label{sec:env} + +With the environment \texttt{hvFloat} one can place an object exactly on that position where the +environment is defined. For captions the use of \CMD{captionof} is recommended: + +\begin{hvFloatEnv} +\captionof{table}{A caption for a nice table} +\begin{tabular}{@{} l c r @{}}\hline +left & center & right \\ +L & C & R \\\hline +\end{tabular} +\end{hvFloatEnv} + +\begin{lstlisting} +\begin{hvFloatEnv} +\captionof{table}{A caption for a nice table} +\begin{tabular}{@{} l c r @{}}\hline +left & center & right \\ +L & C & R \\\hline +\end{tabular} +\end{hvFloatEnv} +\end{lstlisting} + +The environment has an optional argument for setting the line width which is preset to \CMD{textwidth}. +The object is always centered. + +\begin{hvFloatEnv}[0.5\textwidth] +\captionof{table}{A caption for a nice table} +\begin{tabular}{@{} l c r @{}}\hline +left & center & right \\ +L & C & R \\\hline +\end{tabular} +\end{hvFloatEnv} + +\begin{lstlisting} +\begin{hvFloatEnv}[0.5\textwidth] +\captionof{table}{A caption for a nice table} +\begin{tabular}{@{} l c r @{}}\hline +left & center & right \\ +L & C & R \\\hline +\end{tabular} +\end{hvFloatEnv} +\end{lstlisting} + + + \appendix \section{Problems} \begin{itemize} \item[] With the \texttt{nonfloat} option all objects are left aligned, \verb|\centering| doesn't work here. Only God knows why ...\hfill \textbf{solved!} -\item[] Optional Arguments for a short caption doesn't work for the \verb|nonfloat| option.\hfill \textbf{solved!} -\end{itemize} - -\section{To Do} -\begin{itemize} -\item[] Using the \texttt{float} package to create by default a new \ENV{float}, when the one which is passed to \CMD{hvfloat} is not defined. \end{itemize} |