Generaluser defined variable

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
vivelafete
Posts: 11
Joined: Fri Nov 27, 2009 12:38 pm

user defined variable

Post by vivelafete »

it is possible to do something like:

\new_length{width_p3_table1_col1}{1234cm}

and then use the variable later in a table like p{width_p3_table1_col1}.

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: user defined variable

Post by frabjous »

The syntax is:

\newlength{\width_p3_table1_col1}
\setlength{\width_p3_table1_col1}{1234cm}

and then:

p{\width_p3_table1_col1}
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: user defined variable

Post by phi »

Beware: underscores and digits are not allowed in control sequence names.
Post Reply