title: tikz: set appropriate x value for a node
body: <p>This question resulted from the question <a href="https://stackoverflow.com/questions/2772972/latex-curly-braces-outside-math">here</a></p>
  
  <p>I want to produce a curly brace which spans some lines of text.
  The problem is that I have to align the x coordinate manually, which is not a clean solution.</p>
  
  <p>Currently I use</p>
  
  <pre><code>\begin{frame}{Example}
  
  \begin{itemize}
  \item The long Issue 1
  \tikz[remember picture] \node[coordinate,yshift=0.7em] (n1) {}; \\
  spanning 2 lines
  
  
  \item Issue 2
    \tikz[remember picture] \node[coordinate, xshift=1.597cm] (n2) {};
  \item Issue 3
  
  \end{itemize}
  
  \visible&lt;2-&gt;{
  \begin{tikzpicture}[overlay,remember picture]
    \draw[thick,decorate,decoration={brace,amplitude=5pt}]
          (n1) -- (n2) node[midway, right=4pt] {One and two are cool};
  \end{tikzpicture}
   } % end visible
  
  \end{frame}
  </code></pre>
  
  <p>which produces the desired result:</p>
  
  <p><img src="https://imgur.com/aD4VR.png" alt="tikz example1"></p>
  
  <p>The unsatisfying thing is, that I had to figure out the xshift value  of 1.597cm by trial and error (more or less)</p>
  
  <p>Without xshift argument the result is:</p>
  
  <p><img src="https://imgur.com/7jGGZ.png" alt="tikz example 1"></p>
  
  <p>I guess there is an elegant way to avoid the explicit xshift value.</p>
  
  <p>The best way would it imho be to calculate the maximum x value of two nodes and use this, (as already suggested by <a href="https://stackoverflow.com/users/310165/geoff">Geoff</a>)</p>
  
  <p>But it would already be very handy to be able to explicitly define the absolute xvalues of both nodes while keeping their current y values. This would avoid the fiddly procedure of adapting the third post decimal position to ensure that the brace looks vertical.</p>