1

I'm trying to make a list of definitions. I've defined the enviroment "defi" through a tabular enviroment. I want the definitions to be added automatically to the list with it's corresponding name. This last part, assigning the right name to the definition, is what I'm having trouble with. The enviroment "defi" allows for one variable only, this variable being the name of the definition. I've come up with the following code, the problem happens at the end where I've added a comment; for some reason it won't accept #1 as the name of the definition (an error message will appear).

How could I make it so that it allows me to make #1 the name that appears on the list?

newenvironment{defi}[1][section]
{\begingroup 
\begin{center}
    \begin{tabular}{|m{\w}|} %\w has been defined previously.
        \hline 
        \\
        \textsc{\textbf{Definición}} \scshape (#1)\upshape} 
        {\\
        \hline
    \end{tabular} 
\end{center}
\captionof{table}{#1} %if "#1" is replaced by any word (not a command) then theres no error.
\endgroup}

0 Answers0