[Tuglist] Environment slide in pdfscreen.sty
David Kastrup
tuglist@tug.org.in
12 Jun 2002 09:59:32 +0200
Manoj K N <knm@india.ti.com> writes:
> On Tue, Jun 11, 2002 at 09:29:33PM +0530, Radhakrishnan CV wrote:
>
> > Figure environment can't be used inside slide because it is already a
> > minipage. However you can make use of \caption command provided you
> > define \@captype.
> >
> > \def\@captype{figure}
>
> It did not work, but its following variant worked:
>
> \makeatletter\newcommand{\@captype}{figure}\makeatother
>
> What is the difference? With the first command, the following error
> appeared.
>
> ! Undefined control sequence.
> <argument> c@\@captype
>
> l.184 \caption
> {Binary Symmetric Channel}\label{fig:bsc}
> ?
The difference is the \makeatletter...\makeatother that allows making
@ part of command names. That the first version does not immediately
give an error message does not mean a thing: you redefine the macro
\@ with a mandatory argument of captype to evaluate to figure.
Now, when you will write
\@captype
in your text (without \makeatletter, \makeatother), it will produce
figure, if you type \@ followed by anything else you will get a "use
of \@ does not match its definition" error.
Anyhow, the better answer would have been to use the float package
and redefine the float parameters for figure and table to H
(non-floating) since floats on slides don't make sense.
Another possibility would have been the capt-of package.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de