Graphics, Figures & Tablessubfig | Are Sub-sub-figures possible? - Multiple levels

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sumesh
Posts: 8
Joined: Tue Jun 16, 2009 5:05 am

subfig | Are Sub-sub-figures possible? - Multiple levels

Post by sumesh »

I am using the subfig package. I can compile with

Code: Select all

\begin{figure}
  \subfloat[]
  {
    \subfloat[]{}
    \subfloat[]{}
  }
\end{figure}
to get multiple levels. But the figure numbers go for a toss. How do I achieve multiple levels ? For example \subsubfloat? Is that possible? If not is there another alternative any body knows?

Thanks,
sumesh
Last edited by localghost on Thu Mar 15, 2012 8:04 pm, edited 1 time in total.

Recommended reading 2024:

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

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

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

subfig | Are Sub-sub-figures possible? - Multiple levels

Post by sommerfee »

sumesh wrote:How do I achieve multiple levels ? For example \subsubfloat? Is that possible? If not is there another alternative any body knows?
The subfig package is not prepared to handle multiple levels at all.

The caption package actually is, but currently only two levels are implemented (\setcaptiontype and \setcaptionsubtype, both will use the same internal command \caption@@settype). So the main work would be defining the necessary counters and commands (see subcaption package as example, this is a simple package which uses the 2nd-level commands offered by the caption package) and define \setcaptionsubsubtype which would use \caption@@settype{subsub}. Furthermore \caption@subsubtypehook can be used for 3rd level stuff, ones defined this will be called by \caption@@settype automatically. (See source code of the caption package for details.)

BUT: What are you trying to archive? Do you really need a 3rd captioning level with own counters etc.? If you are revealing us your needs maybe there is a (much) simpler way to get an appropriate solution.
sumesh
Posts: 8
Joined: Tue Jun 16, 2009 5:05 am

subfig | Are Sub-sub-figures possible? - Multiple levels

Post by sumesh »

Thank you for your reply. This is what I want. One possibility is to split it into two parts. But it makes much more sense in my case to have them together the following way.

Code: Select all

\begin{figure}
\caption{Effect of some12+thing12 on something else}
  \subfloat[Effect of some on something else]
  {
    \subfloat[Effect of some-1 on something else]{some-1.eps}
    \subfloat[Effect of some-2 on something else]{some-2.eps}
  }
  \subfloat[Effect of thing on something else]
  {
    \subfloat[Effect of thing-1 on something else]{thing-1.eps}
    \subfloat[Effect of thing-2 on something else]{thing-2.eps}
  }
\end{figure}
Thanks, Let me know if there is a simpler solution than what I asked for.

regards,
sumesh
Post Reply