TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

Is it possible to write something like this?

\draw[dotted] (pi*0.5,sin(pi*0.5)) -- ++(10,0);

I would like to use the trigonometric functions when entering x, y-parts of the coordinates. I got Package Tikz error. It is incorrect syntax, or this method is not possible?

share|improve this question
up vote 8 down vote accepted

Yes, put braces around your functions.

\draw[dotted] ({pi*0.5},{sin(90)}) -- ++(10,0);

But use degrees otherwise you need to enter <number> r to indicate that they are radians. So the second coordinate is just 1.decimals hence the sine is close to zero but not zero. See the manual for math operations.

share|improve this answer

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.