Menu

#382 Problem reading x coordinate after `to[in=...,out=...]`

v1.0 (example)
closed-works-for-me
nobody
None
5
2019-12-01
2016-02-25
Ignasi
No

Following code shows the problem. When a coordinate after a to[...] command is defined with an expression with parenthesis a double pair of braces is needed arround x's component expression. After to (without options) or after -- one pair of braces is enough.

\documentclass[tikz]{standalone}
\usetikzlibrary{}
\begin{document}
\begin{tikzpicture}

%works
\draw (0,0) -- ++({0.5+0.5*(0.5+1)},{0.5+0.5*(0.5+1)});

%works
\draw (1,0) to ++({0.5+0.5*(0.5+1)},{0.5+0.5*(0.5+1)}); 

%DOESN'T WORK
%\draw (2,0) to[in=10, out=30] ++({0.5+0.5*(0.5+1)},{0.5+0.5*(0.5+1)}); 

%Works with a second pair of braces on x coordinate
\draw (3,0) to[in=10, out=30] ++({{0.5+0.5*(0.5+1)}},{0.5+0.5*(0.5+1)}); 
\end{tikzpicture}
\end{document}

Another example: http://tex.stackexchange.com/q/295838/1952

Thanks,

Ignasi

Discussion

  • Stefan Pinnow

    Stefan Pinnow - 2019-12-01
    • status: open --> closed-works-for-me
     
  • Stefan Pinnow

    Stefan Pinnow - 2019-12-01