I'm using an environment to work with a form-type of information, I'm trying to use enumerate for automatic numbering. Here's my current output :
And here's my code,
\begin{document}
\begin{tabforms}
\tabform{a.}{Course name}{:}{History of Art}
\tabform{b.}{Credits}{:}{4 (four)}
\tabform{c.}{Lecturer}{:}{Raisa Andriana}
\tabform{d.}{Room}{:}{Main hall Apolo, building A}
\end{tabforms}
\end{document}
As you can see, I'm defining my alphabet numbering manually. It works exactly as I want, however the information add-ups a lot & sometimes I lost track of the alphabets and had to re-order them from the beginning, that's why I'm trying to use enumerate. Here's my environment :
\newenvironment{tabforms}{%
\begin{longtable}{
>{\raggedright\arraybackslash}p{0.1cm}
>{\raggedright\arraybackslash}p{4.5cm}
>{\raggedright\arraybackslash}p{0.1cm}
>{\raggedright\arraybackslash}p{12cm} %%% \\
}}{ \end{longtable} \vspace{-1mm}
}
\newcommand\tabform[4]{%
#1 & #2 & #3 & #4 \\ }
I'm trying to implement enumerate on my code using this :
\begin{enumerate}[label=\alph*.]
\item
\item
\end{enumerate}
Which worked perfectly outside an environment. I tried to implement it inside my environment with no luck, this is what I have tried (manual numbering is still there because I just wanted to know if it worked or not) :
\begin{document}
\begin{tabforms}
\begin{enumerate}[label=\alph*.]
\item \tabform{a.}{Course name}{:}{History of Art}
\item \tabform{b.}{Credits}{:}{4 (four)}
\item \tabform{c.}{Lecturer}{:}{Raisa Andriana}
\item \tabform{d.}{Room}{:}{Main hall Apolo, building A}
\end{enumerate}
\end{tabforms}
\end{document}
It didn't work, I encounter these errors in each item line :
Extra }, or forgotten \endgroup
Missing \endgroup inserted
Missing } inserted
Overfull ...
Is it possible to implement enumerate in this case ? and how do I properly put it ?