TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as unclear what you're asking by Paul Gessler, Torbjørn T., Joseph Wright Feb 7 '15 at 22:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

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

Browse other questions tagged or ask your own question.