Similar questions have been asked, but none have answered my particular problem.
I am trying to declare in a report a new environment which would be similar to the abstract environment. I have looked at the code in report.cls and found the definition for the abstract environment:
\if@titlepage
\newenvironment{abstract}{%
\titlepage
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null\endtitlepage}
\else
\newenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
In my document I have declared the test environment in the same fashion, and used it as I would use abstract:
\documentclass[]{report}
\newcommand\testname{Test}
\newenvironment{test}{%
\small
\begin{center}%
{\bfseries \testname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation}
{\endquotation}
\begin{document}
\begin{test}
Test
\end{test}
\end{document}
This results in the following error:
./test.tex:15: Undefined control sequence. [\begin{test}]
./test.tex:15: Missing number, treated as zero. [\begin{test}]
If you can't figure out why I needed to see a number,:15: Illegal unit of measure . [\begin{test}]
I understand the problem comes from the \z@ but I understand neither why nor how to fix this.
