tikz 中 itemize 列中的文本超出边距

tikz 中 itemize 列中的文本超出边距

我是 tikz 新手,但我不认为问题出在 tikz 本身。我想要获得的很简单,就是一个文件名列表,每个元素都有一个箭头指向 tikz 图像的中间和间隔。

\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}

知道我做错了什么吗?谢谢你的帮助!

答案1

remember picture我认为你在tikzpicture第二栏中遗漏了

截屏

我还从你的序言中删除了一些不必要的包 - 其中很多都是由 加载的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}

答案2

好的伙计们,感谢你们的帮助,我按照我想要的方式工作了,这是解决方案

\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}

框架

相关内容