I have a problem inserting an equation into a tikz node. I'm used to insert successive equations that are separated with 'align', but with my equation (succesive lines, put together with two braces), I does not work, I cannot seem to find the answer to this. I'm using: tikz
, tikzlibrary
, amsmath
, amssymb
and amsmath
.
I think the problem is with the two braces, and the encapsulated equation…
\begin{equation}
if \;
\left\{
\begin{aligned}
x_{ref}=x_1+1\\
x_{ref}=x_2+1\\
x_{ref}=x_3+1\\
\end{aligned}
\right\rbrace
\end{equation}
Best Answer
There are several possible problems. The only obvious problem in your snippet is that you have empty lines inside the
equation
environment, which is not permitted.That said, egreg is correct in saying that you cannot have an
equation
environment inside a node, unless you set thetext width
of the node. That makes thenode
aminipage
like box, and makes it possible to useequation
. You could of course also add aminipage
inside thenode
, but that is more messy, I think.In the code below I also added egreg's suggestion of inline math.