Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The following creates a figure with three images arranged appropriately. If I remove the two \caption{} lines, it numbers the main subfigures as I'd like, and keeping the two \caption{} lines puts subfigure letters in the right place for the sub-subfigures, but the letters are wrong.

How can I change the subfigure identification from a, b, c, d to a, b1, b2, b or something similar?

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{fancyref}
\usepackage{subcaption}
\begin{document}
\begin{figure}
  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=\textwidth]{wu8_wedges}
    \caption{With wedges.}
    \label{fig:wedges}
  \end{subfigure}
  \begin{subfigure}{0.5\textwidth}
    \begin{subfigure}{\textwidth}
      \centering
      \includegraphics[width=\textwidth]{wu8_flat1}
      \caption{}
      \label{fig:flat1}
    \end{subfigure}
    \begin{subfigure}{\textwidth}
      \centering
      \includegraphics[width=\textwidth]{wu8_flat2}
      \caption{}
      \label{fig:flat2}
    \end{subfigure}
    \caption{Without wedges}
    \label{fig:flat}
  \end{subfigure}
  \caption{Interactions between the railcar and the man's feet.}
  \label{fig:interactions}
\end{figure}
\end{document}
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

One possibility would be to manually adjust the counters and \thesubfigure:

\documentclass{article}
\usepackage{amsmath}
\usepackage[demo]{graphicx}
\usepackage{fancyref}
\usepackage{subcaption}

\begin{document}

\begin{figure}
  \begin{subfigure}{0.5\textwidth}
    \centering
    \includegraphics[width=.95\textwidth]{wu8_wedges}
    \caption{With wedges.}
    \label{fig:wedges}
  \end{subfigure}%
  \begin{subfigure}{0.5\textwidth}
    \begin{subfigure}{\textwidth}
      \renewcommand\thesubfigure{\alph{subfigure}1}
      \centering
      \includegraphics[width=.95\textwidth]{wu8_flat1}
      \caption{}
      \label{fig:flat1}
    \end{subfigure}
    \begin{subfigure}{\textwidth}
      \addtocounter{subfigure}{-1}
      \renewcommand\thesubfigure{\alph{subfigure}2}
      \centering
      \includegraphics[width=.95\textwidth]{wu8_flat2}
      \caption{}
      \label{fig:flat2}
    \end{subfigure}
    \addtocounter{subfigure}{-1}
    \caption{Without wedges}
    \label{fig:flat}
  \end{subfigure}
  \caption{Interactions between the railcar and the man's feet.}
  \label{fig:interactions}
\end{figure}

\end{document}

enter image description here

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

share|improve this answer
    
and especially do not print it out ;) –  jjdb May 23 '13 at 10:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.