In the code below, everything is OK until I insert a blank line instead of one of the \\
's. Upon inserting a blank line, I'll get some errors. How can I get rid of these errors?
\documentclass{article}
\newsavebox\mybox
\newcommand{\Class}[1]
{
\sbox{\mybox}{\begin{tabular}{l}#1\end{tabular}}
\fbox{\parbox{\wd\mybox}{\texttt{#1}}}
}
\begin{document}
\Class
{double Width\\
double Height\\
double Perimeter\\
double Area\\
}
\usebox\mybox
\end{document}
Edit:
My indented output is:
#`` twice in both a tabular and a parbox? Surely it makes more sense just to put the
\fbox` around the tabular?