[OS X TeX] changing a caption

Ross Moore ross at ics.mq.edu.au
Mon Feb 15 13:31:56 EST 2010

Hi Sr.

On 16/02/2010, at 3:44 AM, Sr Sur wrote:

> Hi everybody,
> I'm trying to change the caption of a single figure, I need to put  
> a flag between the number of the figure and the colon, I've used  
> this line to redefine it in the preamble of the figure:
> \renewcommand{\thefigure}{\thechapter.\arabic{figure} (begins in  
> the page before)}
> With this I obtain the result that i want. But there are two  
> problems with this way....
> 1. the flag appears in the list of tables....
> 2. The flag also apears in the text when you reference the figure...
> Is there any way to put the flag and avoid the points 1 and 2???

You need to define some markup that only has a non-trivial
meaning within a specific environment; e.g., within those
figures that need the special captions.

  something like the following in the preamble:

\newcommand{\docaptiononly}[1]{}%   default is to gobble contents
\newcommand{\insidecaption}[1]{ (#1)}%  use this method to show it
   \captiononly{begins on the previous page}}% use the *robust* command


Now use:
    \caption{...}%  as per normal
    \label{...}%    as per normal

This should handle the visual appearance properly.
Check the contents of the  .lof  file; it should be like

\contentsline {figure}{\numberline {0.1\captiononly {begins on the  
previous page}}{\ignorespaces ... }}{3}

but \captiononly  will just cleanly gobble its content.

Similarly in the .aux file you should get:

\@writefile{lof}{\contentsline {figure}{\numberline {0.1\captiononly   
{begins on the previous page}}{\ignorespaces ...  }}{3}}
\newlabel{whatever}{{0.1\captiononly  {begins on the previous page}}{3}}

but again the \captiononly  gobbles what follows,
when you use   Figure~\ref{whatever} .

> thanks!!!!!!!!
> -- 
> Atte: Sr. Sur

Hope this helps,


Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the MacOSX-TeX mailing list