[Tugindia] Macro conflicts with endfloat.

H S Rai tugindia@tug.org
Fri, 24 Jan 2003 11:30:11 +0530 (IST)


I defined a macro to place figure easily. It worked fine. But if i
use with package "endfloat" it gave following error:

----------------------------------------------------------
! Undefined control sequence.
\\  ->\let \reserved@e
                       \relax \let \reserved@f \relax \@ifstar {\let \reserv...
l.13 {fig:myLabel}{0.8}
----------------------------------------------------------

The sample tex file is appended below signature.

Any tip or trick to achieve this? Is it possible tha macro first expand
and then endfloat work.

-- 
H.S.Rai

======================================================
\documentclass{report}
\usepackage{graphicx}
\usepackage{endfloat}

\def\myFig#1#2#3#4{\begin{figure}
\centering{\resizebox*{#4\columnwidth}{!}{#1}}
\caption{#2}\label{#3}
\end{figure}}

\begin{document}

\myFig{\includegraphics{fig.eps}}{My caption}
{fig:myLabel}{0.8}

\end{document}
=====================================================

To compile this code, please copy any eps figure as fig.eps in the
same directory where this tex file resides.
--