[texhax] keyval options in the closing part of an environment

José Romildo Malaquias j.romildo at gmail.com
Mon Apr 26 03:01:12 CEST 2010

I want to define a new environment using an environment from the

In order to simplify the problem, let's consider the following LaTeX
document, which demonstrates the original problem:




    This is a test.


The problem is the use of the options in the closing part of the
environment. Here I want to use the \includegraphics command with the
options passed to the env environment.

pdflatex fails with the error:

  ! Package keyval Error: width=3cm undefined.

  See the keyval package documentation for explanation.
  Type  H <return>  for immediate help.
  l.15 \end{env}

How can I solve this problem? Any hints?



More information about the texhax mailing list