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.

I'm using the memoir class and have a figure that is continued on the next page. The markup is roughly this:

\captiondelim{: }

\begin{figure}
  % ...
  \caption{Foo bar}
\end{figure}

\begin{figure}
  % ...
  \contcaption{(Continued)}
\end{figure}

This results in two figures with the captions

Figure 1: Foo bar

and

Figure 1: (Continued)

Is there any chance to change the caption delimiter (automatically) for "contcaption"s, such that the result would be (the colon must still be there for normal captions though):

Figure 1 (Continued)

I tried to understand what the \concaption command actually does, but it didn't look like there was a simple solution...

share|improve this question

3 Answers 3

up vote 7 down vote accepted

Assuming that in a figure environment you just have a \contcaption, never accompanied by a \caption command, which seems a reasonable assumption, you can do it with

\documentclass{memoir}

\usepackage{etoolbox}

\captiondelim{: }
\preto{\contcaption}{\captiondelim{ }} % change \captiondelim

\begin{document}

\begin{figure}[htp]
  % ...
  \caption{Foo bar}
\end{figure}

\begin{figure}[htp]
  % ...
  \contcaption{(Continued)}
\end{figure}

\begin{figure}[htp]
  % ...
  \caption{Oh}
\end{figure}

\end{document}

enter image description here

share|improve this answer
    
ahh, that was a good one, hadn't though of that. –  daleif Aug 22 at 9:47

Not really no. I think the easiest thing is to use

\newcommand\mycontcaption[1]{
  \begingroup
  \captiondelim{~}
  \contcaption{#1}
  \endgroup
}

and then use

\mycontcaption{(Continued)}
share|improve this answer
    
That's perfect! I didn't know about "begingroup" and "endgroup"... –  Niko Aug 22 at 9:35

An automatic solution can be obtained with the caption package: it has a \ContinuedFloat switch that defines the figure environment in which it is used, as of type continuedfloat for which we can define a specific formatting:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}

\usepackage{caption}
\DeclareCaptionFormat{continued}{ #1~(continued)}
\captionsetup[ContinuedFloat]{format=continued}

\begin{document}

  \begin{figure}
        \centering
        \includegraphics[scale = 0.4]{Piero_di_Cosimo_1}
    \caption{Piero di Cosimo}
    \end{figure}

  \begin{figure}\ContinuedFloat
        \centering
        \includegraphics[scale = 0.3]{Piero_di_Cosimo_2}
    \caption{}
    \end{figure}

\end{document} 

enter image description here

share|improve this answer

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.