Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following code defined in a class file I am writing:



\textbf{#1} & 
\TextField[name=#1,charsize=8pt,bordercolor={1 1 1}, height=12pt, width=360pt,value=#2]{#3}

When I use this new command in an external file:


\textfieldintable{Employee Full Name}{Your Name}{}


I get a form field that one can type in, in the second column (in addition to the label in the first column).

However, if I change the code above to:

\TextField[name=#1,charsize=8pt,bordercolor={1 1 1}, height=12pt, width=\the\textfieldlength,value=#2]{#3}

the form field vanishes. The first column of the table still gets the #1 argument as it should. The same thing happens if I use \textfieldlength, \the\labellength, \labellength, or \testlength instead of \the\textfieldlength.

What is going on? Why can't I use a variable as the value for width= key in \TextField?

share|improve this question
Please add what's necessary to make the code a compilable example. –  egreg May 1 '14 at 16:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.