1

When I use the following code:

\usetikzlibrary{calc}
\begin{tikzpicture}
\draw (0,0) circle (.2*tan(10) and .4*tan(10));
\end{tikzpicture}

... then I get an error message. How can I solve this problem?

Bobyandbob
  • 4,899
Laplacian
  • 960
  • What is the error message? What does a full document which we can compile to replicate the error message look like? – Dai Bowen Feb 28 '17 at 12:03
  • Package tikz Error: Giving up on this path. Did you forget a semicolon?. \draw (0,0) circle (.2*tan(10)) It is the error message and the code above itself is the full document for this question. – Laplacian Feb 28 '17 at 12:12
  • the code in the question is not complete - no \documentclass, \usepackages, \begin{document} or \end{document} so if I compile your code I will not replicate your error but a missing \documentclass instead. – Dai Bowen Feb 28 '17 at 12:39

1 Answers1

2

It seems to work if we put the computed radii in brackets.

Some reference per request :

Martin Scharrer explains it here better than I can.

The output

enter image description here

The code

\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
  \draw (0,0) circle ({.2*tan(10)} and {.4*tan(10)});
\end{tikzpicture}
\end{document}

Cheers,

marsupilam
  • 6,383