% `sc-test6.tex', part of the LaTeX package `sidecap' % 2003-02-21 % Rolf Niepraschk and Hubert G\"a\ss{}lein -- niepraschk@ptb.de \listfiles \documentclass[a4paper]{article} %\usepackage[colorgrid,gridunit=pt]{eso-pic} \usepackage{sidecap} %\usepackage[ragged]{sidecap} \input{sc-test-common} \begin{document} \section*{The \texttt{sidecap} package (text in body of floats)} If you need to put text inside the body of a floating environment, you'll have to put it inside a \verb|\parbox| or a \verb|minipage| environment. (This is necessary due to the way the \textsf{sidecap} package grabs the body of the float.) For example, the first pair of floats in this document (fig.~\ref{fig:wrong} and tab.~\ref{tab:wrong}) contain essentially the following: % \begin{verbatim} \begin{minipage}{0.5\textwidth}% text text ... text text. \end{minipage}% \end{verbatim} % Note that the alignment of the caption with respect to text in the body is wrong. \begin{SCfigure}[][hb] \FIG[0.078\textwidth]{3} \caption{`SCfigure' \CAPi} \label{fig:wrong} \end{SCfigure} \begin{SCtable}[][hb] \FIG[0.078\textwidth]{3} \caption{`SCtable' \CAPi} \label{tab:wrong} \end{SCtable} To fix this problem, you'll have to use some extra effort. \clearpage For example, the second pair of floats (fig.~\ref{fig:right} and tab.~\ref{tab:right}) contain essentially the following: % \begin{verbatim} \begin{minipage}{0.5\textwidth}% \strut text text ... text text. \unskip\strut \end{minipage}% \end{verbatim} % Now the caption is properly aligned with the first or last line of the text in the float's body. \begin{SCfigure}[][hb] \FIG[0.078\textwidth]{4} \caption{`SCfigure' \CAPi} \label{fig:right} \end{SCfigure} \begin{SCtable}[][hb] \FIG[0.078\textwidth]{4} \caption{`SCtable' \CAPi} \label{tab:right} \end{SCtable} Still, there is a flaw in the captions: Due to the small \verb|\linewidth| the linebreaking and\slash or word spacing may be awful. Use one of the \texttt{raggedright}, \texttt{raggedleft}, or \texttt{ragged} package options. \end{document}