[texhax] captions and floats

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Wed Jun 7 19:08:37 CEST 2006


> > Hello all:
> >
> > In hunting through the memoir class, learning about captions, I found
> > this code:
> >
> > \let\@memoldcaption\caption
> > \def\caption{\donemaincaptiontrue\@memoldcaption}
> >
>
> save the old \caption in \@memoldcaption, then define a new which will set
> \donemaincaption to true at the cerybeginning
>
>
> > \let\@memold at caption\@caption
> > \long\def\@caption#1[#2]#3{%
> >  \M at gettitle{#2}\@memold at caption{#1}[#2]{#3}}
> >
>
> again same thing, redefine the normal caption to get some extra code into
> it.
>
> it is very simple when you look at the code.

Maybe someone should mention that \let\a\b sets the command \a equal to the
present definition of \b and nopt to \b itself, so the above definitions are
not indeed circular.

Cheers,  Phil Ratcliffe



More information about the texhax mailing list