GeneralInstalling "subfig" Package in TeXworks for Mac

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
knut-o
Posts: 3
Joined: Sun Feb 20, 2011 9:23 pm

Installing "subfig" Package in TeXworks for Mac

Post by knut-o »

How do I install the subfig package in texWorks for mac?
and where do i find it? I need it in order to use \ContinueFloat

Or is there any other way to have two figures on two different pages and still have the right catpion (a), (b), (c)...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: Installing "subfig" Package in TeXworks for Mac

Post by sommerfee »

\ContinuedFloat is provided by the caption package, and will be extended by the subfig package so it works with subfigures created with the subfig package, too. So if you need \ContinuedFloat, but don't have any subfigures, loading the caption package is sufficient.
knut-o
Posts: 3
Joined: Sun Feb 20, 2011 9:23 pm

Re: Installing "subfig" Package in TeXworks for Mac

Post by knut-o »

Hi. thanks for quick answer.

I see now that the subfig packege already is included.


This is the coad with \ContinuedFloat
but it still doesn't work..

\begin{figure}[h]
\begin{center}
\subfloat[]{\label{fig:plot/a/normal.pdf}\includegraphics[width=0.5\textwidth]{plot/a/normal.pdf}}
\subfloat[]{\label{fig:plot/a/scale-location.pdf}\includegraphics[width=0.5\textwidth]{plot/a/scale-location.pdf}}
\end{center}
\end{figure}

\begin{figure}
\ContinuedFloat
\begin{center}
\subfloat[]{\label{fig:plot/a/ResidualsVSfitted.pdf}\includegraphics[width=0.5\textwidth]{plot/a/ResidualsVSfitted.pdf}}
\subfloat[]{\label{fig:plot/a/residualsVSleverage.pdf}\includegraphics[width=0.5\textwidth]{plot/a/residualsVSleverage.pdf}}
\end{center}
\end{figure}


I get this message:

! Package caption Error: Continued `figure' after `??'.

See the caption package documentation for explanation.
Type H <return> for immediate help.
...

l.79 \ContinuedFloat
knut-o
Posts: 3
Joined: Sun Feb 20, 2011 9:23 pm

Re: Installing "subfig" Package in TeXworks for Mac

Post by knut-o »

No need to answer.. found it out..

was just to put \caption[]{} under subfloat
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Installing "subfig" Package in TeXworks for Mac

Post by sommerfee »

knut-o wrote:was just to put \caption[]{} under subfloat
Yes, unfortunately the current implementation of \ContinuedFloat needs a \caption additional to \ContinuedFloat. (Currently I'm not able to change this because it would break the subfig package.) For that reason the upcoming version 3.2 will include a command called \phantomcaption which does not typeset a caption but fulfill the need of \ContinuedFloat for a caption.
hari
Posts: 1
Joined: Thu May 12, 2011 8:21 pm

Re: Installing "subfig" Package in TeXworks for Mac

Post by hari »

@knut-o
Can you please write here those lines again after putting \caption[]{} under subflot? I am getting error.

Thanks a lot
Hari
Post Reply