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.

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

Why does the following code trigger the error ! Dimension too large. when compiling it with pdflatex, even though the dimension should only be 11in (which is below \maxdimen)?



\pgfkeys{/pgf/fpu=true, /pgf/fpu/output format=fixed}
\pgfmathparse{10in + 1in}
\node at ( 0, \y ) { y-position: \y };


Basically I want to be able to calculate node positions using PGF's FPU, due to the \maxdimen limitation. Expressions like sqrt(pow(10in, 2) + pow(12in, 2)) don't seem to be possible in TikZ, even tho the actual result is only ~15.6in.

share|improve this question
up vote 8 down vote accepted

The result is within TeX dimension limits but you use the value without a unit, 794.96.... is understood as centimeters and it becomes 22K+ pts. So add pt after the \y

\node at ( 0, \y pt ) { y-position: \y };

enter image description here

share|improve this answer
This seems to work, makes sense. Is the result of \pgfmathresult always implicitly converted to pt, even though inches are used in the calculation? – watain May 7 '14 at 8:35
@watain Yes, TeX and hence TikZ works with pt and internally things are always converted to pt. – percusse May 7 '14 at 8:36

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.