[texhax] A new question not in the TeX FAQ

Jeney Gábor jeneyg at hit.bme.hu
Sat Nov 1 14:12:51 CET 2008


Dear Herbert,

I have also provided a solution to the problem (with \newcommand
statement), have you read the whole letter? The focus of my question was
rather that why it is not possible to use the \usebox command inside
\label?

2008. 10. 31, péntek keltezéssel 15.43-kor Herbert Voss ezt írta:
> 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
-- 
Best regards,
                            Gábor JENEY
__________________________________________________________
BME, Dep. of Telecommunications, Mobile Innovation Center |
Office: I.B.116, Tel: +36-1-463-2418, Fax: +36-1-463-3263 |



More information about the texhax mailing list