0

I’m trying to define a new environment which display an image and text below it.

I’ve tried the following code:

\newenvironment{essai}[1][]
{   \includegraphics[scale=0.25]{#1}
}
{
}

\begin{essai}{Images/dessin.pdf}
    toto
\end{essai}

But, it throws an error that I do not understand:

! LaTeX Error: File `' not found.

Thanks in advance, any help would be very appreciate

  • 4
    Remove []: \newenvironment{essai}[1]{...}{...} – egreg Jun 7 '18 at 10:11
  • @egreg’s comment, or: Perhaps you want \newenvironment{essay}[2][] {\includegraphics[#1]{#2}} {}. – GuM Jun 7 '18 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.