[OS X TeX] changing a caption

Sr Sur igaoss at gmail.com
Mon Feb 15 20:22:25 CET 2010


Obviously that helps Ross!!!!!

it works like a Swiss Clockwork!!!!

Thanks!!!

On 15 February 2010 19:31, Ross Moore <ross at ics.mq.edu.au> wrote:

> 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.
>
> e.g.,
>  something like the following in the preamble:
>
> \DeclareRobustCommand{\captiononly}[1]{\docaptiononly{#1}}
> \newcommand{\docaptiononly}[1]{}%   default is to gobble contents
> \newcommand{\insidecaption}[1]{ (#1)}%  use this method to show it
> \newcommand{\prevpagethefigure}{\thechapter.\arabic{figure}%
>  \captiononly{begins on the previous page}}% use the *robust* command
>
> \newenvironment{prevpagefigure}
>  {\let\docaptiononly\insidecaption
>  \let\thefigure\prevpagethefigure
>  \begin{figure}}
>  {\end{figure}}
>
>
> Now use:
>  \begin{prevpagefigure}
>   ...
>   \caption{...}%  as per normal
>   \label{...}%    as per normal
>  \end{prevpagefigure}
>
>
> 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
>
> ------------------------------------------------------------------------
> 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
> ------------------------------------------------------------------------
>
>
>
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
>
>


-- 
Atte: Sr. Sur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20100215/43608fc9/attachment.html>


More information about the macostex-archives mailing list