6

The code snippet below works well on my Mac but under Linux I get the error messages

"! Illegal unit of measure (pt inserted)."
"! Missing number, treated as zero."
! Package calc Error: `s' invalid at this point."

for line 3 of the example.

\begin{tikzpicture}[thick,scale=0.9]
\draw (0, 0) -- (0, -4); %works
\draw ({3.5 / sqrt(2)}, {3.5 / sqrt(2)}) -- ({4 / sqrt(2)},{4 / sqrt(2)});
\end{tikzpicture}

Does anybody know what the problem could be?

9
  • 2
    Try putting the braces around the whole formula to protect the parentheses: ({4/sqrt(2)},{4/sqrt(2)}). Jun 11, 2012 at 8:49
  • 1
    Which TeX distributions do use use on the mac and Linux machines, resp.?
    – Mico
    Jun 11, 2012 at 8:51
  • @Andrew Stacey Thank you but changing the brackets (as shown now in the original post) did not solve the problem
    – user695652
    Jun 11, 2012 at 9:01
  • In which case, the answers to Mico's comment are extremely important as on my Linux machine it compiles with no difficulties. But I'm using the latest TeXLive so that might be significant. Jun 11, 2012 at 9:05
  • 1
    It also work fine with MiKTeX 2.9 / PGF 2.10 Jun 11, 2012 at 12:46

0

Browse other questions tagged or ask your own question.