diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/sidecap/sc-test1.tex | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/sidecap/sc-test1.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/sidecap/sc-test1.tex | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/sidecap/sc-test1.tex b/Master/texmf-dist/doc/latex/sidecap/sc-test1.tex new file mode 100644 index 00000000000..726eaad5b5a --- /dev/null +++ b/Master/texmf-dist/doc/latex/sidecap/sc-test1.tex @@ -0,0 +1,141 @@ + +% `sc-test1.tex', part of the LaTeX package `sidecap' +% 2003-02-21 +% Rolf Niepraschk and Hubert G\"a\ss{}lein -- niepraschk@ptb.de + +\listfiles +\documentclass[12pt,a4paper]{article} +%\usepackage[bf,footnotesize]{caption2} +%\usepackage[innercaption,origragged,ragged]{sidecap} +%\usepackage[innercaption,raggedright]{sidecap} +\usepackage{sidecap} + +\input{sc-test-common} + +%\newlength\mylength + +\begin{document} + +\section*{The \texttt{sidecap} package} + +First, a standard \LaTeX\ \texttt{figure} environment +(fig.~\ref{fig:standard}). +Since width of the body of the figure is considerably less than +the document's \verb|\textwidth|, there is much space wasted. + +\begin{figure}[h] + \centering + \FIG[1cm]{1}% + \caption[\SHORTCAPi]{\CAPi} + \label{fig:standard} +\end{figure} + +For such cases, the \textsf{sidecap} package provides the +\verb|SCfigure| and \verb|SCtable| environments to put the +caption beside the body of the floating environment. + +In this document, we used the defaults of the \textsf{sidecap} package: +% +\begin{verbatim} + \usepackage{sidecap} +\end{verbatim} +% +In the text, we used the optional arguments for the following figures +(fig.~\ref{fig:sc1}, \ref{fig:sc2}, and \ref{fig:sc3}). +% +\begin{verbatim} + \begin{SCfigure} ... + \begin{SCfigure}[1.2][bhp] ... + \begin{SCfigure}[][bhp] ... +\end{verbatim} +% +In the first case, no optional arguments were given, so the defaults +(\verb|[1.0][tbp]|) are used. I.e., the caption will be as wide as +the body of the float; and the `float placement specifier' is the same +as for \LaTeX's standard floats (fig.~\ref{fig:sc1}). +In the second case, both optional arguments are given to change the +caption width as well as the placement options (fig.~\ref{fig:sc2}). +To change only the placement, just leave the first optional argument +empty (fig.~\ref{fig:sc3}). + +\begin{SCfigure} + \FIG[1cm]{1}% + \caption[\SHORTCAPi]{\CAPi} + \label{fig:sc1} +\end{SCfigure} + +\begin{SCfigure}[1.2][bhp] + \FIG[1cm]{1}% + \caption[\SHORTCAPi]{\CAPi} + \label{fig:sc2} +\end{SCfigure} + +\begin{SCfigure}[][bhp] + \FIG[1cm]{1}% + \caption[\SHORTCAPi]{\CAPi} + \label{fig:sc3} +\end{SCfigure} + +\clearpage + +Now, a standard \LaTeX\ \texttt{table} environment +(tab.~\ref{tab:standard}). + +\begin{table}[h] + \centering + \caption[\SHORTCAPi]{\CAPi} + \TABi% + \label{tab:standard} +\end{table} + +The only difference between the \verb|SCfigure| and the +\verb|SCtable| environments is the vertical position of the +caption with respect to the body of the float: +The former places the caption bottom-aligned, the latter top-aligned +(compare fig.~\ref{fig:sc1} to tab.~\ref{tab:sc1}). + +Also, like standard \LaTeX, the \textsf{sidecap} package doesn't care +about the contents of the float (cf.\ tabs.~\ref{tab:standard} and +\ref{tab:sc1}). + +\begin{SCtable} + \caption[\SHORTCAPi]{\CAPi} + \FIG[1cm]{1}% + \label{tab:sc1} +\end{SCtable} + +If you want to use all the remaining space for the caption, just +specify a sufficiently large factor in the first optional argument. +E.g., for tab.~\ref{tab:sc2} we used the following: +% +\begin{verbatim} + \begin{SCtable}[50] ... +\end{verbatim} +% +Note, however, that \TeX\ may complain +% +\begin{verbatim} + ! Dimension too large. +\end{verbatim} +% +if the factor times the width of the body is huge enough to exceed +the range \TeX\ is able to represent in a length register. +% +(Max.\ \verb|\maxdimen|% +${}={}$\the\maxdimen +${}\approx 5.76$\,{meters}). + +% VOODOO: +%\setlength +%\mylength=\maxdimen +%\mylength=-\mylength +%\the\mylength + +\begin{SCtable}[50] + \caption[\SHORTCAPi]{\CAPi} + \label{tab:sc2} +% \TABi% + \FIG[1cm]{1}% +\end{SCtable} + +\end{document} |