7

I'm new to tikz but I don't think the problem is tikz itself. What I want to obtain is simple, a list of file names with an arrow for each element pointing to the middle of and interval of a tikz image.

\documentclass[10pt]{beamer}

\usepackage[english]{babel}
\usepackage[latin9]{inputenc}
\usepackage{graphicx,amsmath,amsfonts,float,times,subfig,tikz}
\usepackage[T1]{fontenc}
\usetheme{Boadilla}

\makeatletter
\setbeamercovered{transparent}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\usetikzlibrary{shapes}
\usetikzlibrary{calc}
%\setbeamertemplate{itemize item}{-}


\begin{document}

\begin{frame}
  \frametitle{Creation Of The Database}

  \begin{columns}
    \begin{column}{.8\linewidth}
      \begin{exampleblock}{}
        \begin{itemize} 
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.179600\_tnf1\_180474\_Ped.root} $\tikzmark{n1}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180390\_tnf1\_180474\_Ped.root} $\tikzmark{n2}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180600\_tnf1\_180474\_Ped.root} $\tikzmark{n3}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181233\_tnf1\_180474\_Ped.root} $\tikzmark{n4}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181530\_tnf1\_180474\_Ped.root} $\tikzmark{n5}$
        \end{itemize}
      \end{exampleblock}
    \end{column} \hfill
    \begin{column}{.2\linewidth}
      \begin{tikzpicture}
        \draw (0,0) -- (0,5);

        \node (a) at (0,0) [circle,fill, inner sep = 1.2] {}; 
        \node (b) at (0,1) [circle,fill, inner sep = 1.2] {}; 
        \node (c) at (0,2) [circle,fill, inner sep = 1.2] {}; 
        \node (d) at (0,3) [circle,fill, inner sep = 1.2] {}; 
        \node (e) at (0,4) [circle,fill, inner sep = 1.2] {}; 
        \node (f) at (0,5) [circle,fill, inner sep = 1.2] {};

        \node (t1) at (0,0.5) {};
        \node (t2) at (0,1.5) {};
        \node (t2) at (0,2.5) {};
        \node (t3) at (0,3.5) {};
        \node (t4) at (0,4.5) {};

        \draw (f) node [right] {$181900$}; 
        \draw (e) node [right] {$179600$}; 
        \draw (d) node [right] {$180390$}; 
        \draw (c) node [right] {$180600$}; 
        \draw (b) node [right] {$181233$}; 
        \draw (a) node [right] {$181530$};
      \end{tikzpicture}
    \end{column}
  \end{columns}

  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 0] ($(n1)$) to ($(t1)$);

 \end{frame}
\end{document}

Any idea of what I'm doing wrong? Thanks for the help!

4
  • I think the tikzpicture environment miss the option remember picture: this means that the point t1 isn't know when you are trying to draw the arc. – Claudio Fiandrino Jul 24 '13 at 10:50
  • Welcome to the site! Thanks for providing a MWE :) @ClaudioFiandrino yep, that's what I got too :) – cmhughes Jul 24 '13 at 10:52
  • 1
    @cmhughes I noticed and you were faster than me of 4s :) What about to improve the answer by shrinking a bit the font size of the file names (I guess \footnotesize would suffice)? Upvoting meanwhile. – Claudio Fiandrino Jul 24 '13 at 10:58
  • Thanks for the help, I've added the [remember picture] by the way there still are some things I don't understand, why the file names goes on new line? and why they cross the right margin? – drkg4b Jul 24 '13 at 12:26
7

I think you're missing a remember picture from the tikzpicture in your second column

screenshot

I have also removed some of the unnecessary packages from your preamble- a lot of them are loaded by beamer.

% arara: pdflatex
\documentclass[10pt]{beamer}

\usepackage{tikz}
\usetheme{Boadilla}

\makeatletter
\setbeamercovered{transparent}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\usetikzlibrary{shapes}
\usetikzlibrary{calc}
%\setbeamertemplate{itemize item}{-}


\begin{document}

\begin{frame}
    \frametitle{Creation Of The Database}

    \begin{columns}
        \begin{column}{.8\linewidth}
            \begin{exampleblock}{}
                \begin{itemize} 
                    \item \texttt{RawCh\_NoiseCalib\_Ped.iov.179600\_tnf1\_180474\_Ped.root} $\tikzmark{n1}$
                    \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180390\_tnf1\_180474\_Ped.root} $\tikzmark{n2}$
                    \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180600\_tnf1\_180474\_Ped.root} $\tikzmark{n3}$
                    \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181233\_tnf1\_180474\_Ped.root} $\tikzmark{n4}$
                    \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181530\_tnf1\_180474\_Ped.root} $\tikzmark{n5}$
                \end{itemize}
            \end{exampleblock}
        \end{column} \hfill
        \begin{column}{.2\linewidth}
            \begin{tikzpicture}[remember picture]
                \draw (0,0) -- (0,5);

                \node (a) at (0,0) [circle,fill, inner sep = 1.2] {}; 
                \node (b) at (0,1) [circle,fill, inner sep = 1.2] {}; 
                \node (c) at (0,2) [circle,fill, inner sep = 1.2] {}; 
                \node (d) at (0,3) [circle,fill, inner sep = 1.2] {}; 
                \node (e) at (0,4) [circle,fill, inner sep = 1.2] {}; 
                \node (f) at (0,5) [circle,fill, inner sep = 1.2] {};

                \node (t1) at (0,0.5) {};
                \node (t2) at (0,1.5) {};
                \node (t2) at (0,2.5) {};
                \node (t3) at (0,3.5) {};
                \node (t4) at (0,4.5) {};

                \draw (f) node [right] {$181900$}; 
                \draw (e) node [right] {$179600$}; 
                \draw (d) node [right] {$180390$}; 
                \draw (c) node [right] {$180600$}; 
                \draw (b) node [right] {$181233$}; 
                \draw (a) node [right] {$181530$};
            \end{tikzpicture}
        \end{column}
    \end{columns}

    \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 0] ($(n1)$) to ($(t1)$);

\end{frame}
\end{document}
4

Ok guys, thanks to your help I got it working the way I intended, here is the solution

\documentclass[10pt]{beamer}

\usepackage{tikz}
\usetheme{Boadilla}

\makeatletter
\setbeamercovered{transparent}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\usetikzlibrary{shapes}
\usetikzlibrary{calc}
%\setbeamertemplate{itemize item}{-}


\begin{document}

\begin{frame}
  \frametitle{Creation Of The Database}

  \begin{columns}
    \begin{column}{.8\linewidth}
      \begin{exampleblock}{}
        \begin{itemize}
          \footnotesize{
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.179600\_tnf1\_180474\_Ped.root} $\tikzmark{n1}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180390\_tnf1\_180474\_Ped.root} $\tikzmark{n2}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.180600\_tnf1\_180474\_Ped.root} $\tikzmark{n3}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181233\_tnf1\_180474\_Ped.root} $\tikzmark{n4}$
          \item \texttt{RawCh\_NoiseCalib\_Ped.iov.181530\_tnf1\_180474\_Ped.root} $\tikzmark{n5}$}
        \end{itemize}
      \end{exampleblock}
    \end{column} \hfill
    \begin{column}{.2\linewidth}
      \begin{tikzpicture}[remember picture]
        \draw (0,0) -- (0,5);

        \node (a) at (0,0) [circle,fill, inner sep = 1.2] {}; 
        \node (b) at (0,1) [circle,fill, inner sep = 1.2] {}; 
        \node (c) at (0,2) [circle,fill, inner sep = 1.2] {}; 
        \node (d) at (0,3) [circle,fill, inner sep = 1.2] {}; 
        \node (e) at (0,4) [circle,fill, inner sep = 1.2] {}; 
        \node (f) at (0,5) [circle,fill, inner sep = 1.2] {};

        \node (t1) at (0,4.5) {};
        \node (t2) at (0,3.5) {};
        \node (t3) at (0,2.5) {};
        \node (t4) at (0,1.5) {};
        \node (t5) at (0,0.5) {};

        \draw (f) node [right] {$179600$}; 
        \draw (e) node [right] {$180390$}; 
        \draw (d) node [right] {$180600$}; 
        \draw (c) node [right] {$181233$}; 
        \draw (b) node [right] {$181530$};
        \draw (a) node [right] {$181900$};

      \end{tikzpicture}
    \end{column}
  \end{columns}

  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 180] ($(n1)$) to ($(t1)$);
  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 180] ($(n2)$) to ($(t2)$);
  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 180] ($(n3)$) to ($(t3)$);
  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 180] ($(n4)$) to ($(t4)$);
  \tikz[overlay,remember picture,-latex] \draw[out = 0, in = 180] ($(n5)$) to ($(t5)$);

 \end{frame}

frame

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.