[texhax] A new question not in the TeX FAQ
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Fri Oct 31 15:43:22 CET 2008
Jeney Gábor schrieb:
> I am an associate professor at the Budapest University of Technology and
> Economics, using (and also teaching) LaTeX, and I have the following
> question which I have not been able to find any explanation up to now:
>
> inside the \label statement, it is not possible to use the \usebox
> command. It is quite strange, since any other commands can be used
> there. I show the code which helped me to discover the problem:
\documentclass{article}
\newsavebox{\tabBox}
\newenvironment*{tabl}[3]{% #1: caption, #2: label, #3: columns
\def\tabcaption{#1}
\def\tablabel{#3}
\begin{lrbox}{\tabBox}
\tabular{#3}
}{\endtabular\end{lrbox}%
\begin{table}[htb]
\centering
\caption{\tabcaption}\label{\tablabel}
\medskip
\usebox\tabBox
\end{table}}
\begin{document}
\begin{tabl}{Wise statements}{wise}{c|r@{,}l}
Expression & \multicolumn{2}{c}{Value} \\\hline
$\pi$ & 3&1415927 \\
$\pi^\pi$ & 36&46216 \\
$\pi^{\pi^\pi}$ & 80662&666
\end{tabl}
\end{document}
Herbert
More information about the texhax
mailing list