I am defining macros for width and height to be used by several plots in my document, as follows:


I think pdflatex just replaces the whole sequence of commands for \tikzheight, resulting in .8.4\columnwidth.

Is there a way to tell pdflatex to process \tikzwidth before "shrinking" it again?

1 Answer 1


If you use length or dimen registers, then you can use real numbers as factors:


Or e-TeX's \dimexpr can be used:

  • Maybe you mean \dimexpr.8\tikzwidth\relax?
    – Leo Liu
    Aug 17, 2012 at 0:32
  • That cannot be used if \tikzwidth is a macro. But a real number can be used as factor for \dimexpr. Aug 17, 2012 at 6:51
  • @HeikoOberdiek the combination \newdimen and \setlength{}{} is exactly what I was looking for. Thanks!
    – freitass
    Aug 17, 2012 at 19:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .