如何重复绘画

如何重复绘画

我想在水平方向上以一定距离重复绘制一个图形以形成一个组;然后垂直移动整个组以一定距离,如所附的第 1 页所示ions.tex

有没有更简单的方法,例如使用(对于每个),使其看起来像所包含的第 5-9 页那样ions.tex

ions.tex

\documentclass{beamer}
\usepackage{beamerthemesplit}
\usetheme{PaloAlto}
\setbeamertemplate{navigation symbols}{}
\usepackage{tikz}   
\definecolor{darkgreen1}{rgb}{0.,0.55,0.1}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{verbatim}

\begin{document}

% begin individual ions     -------------------------------

% begin frame
\begin{frame}[fragile,t]%[plain,]
 \frametitle
{Polarization}%0


\begin{figure}
\begin{minipage}[c]{.7\textwidth}
\vskip -.52cm
\hskip -2.02cm
  \includegraphics [width=1.568\textwidth]{./Used/Ions/3dNerve/s3d-00-beig----_--.JPG}
\end{minipage}


\visible<1>
{
\begin{minipage}[c]{.7\textwidth}
\vskip -12.6cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\vskip -.7cm
\hskip -.06cm
{{\textcolor{red}{{\huge{\textbf{{Na}}}}}}}
}
\end{minipage}
}



\visible<1>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -8.2cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\hskip -.75cm
{{\textcolor{red}{{\huge{\textbf{{K}}}}}}}
}
\end{minipage}
}



\visible<1->
{
\begin{minipage}[c]{.7\textwidth}
{
\vskip -12.7cm
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,green,fill=green, fill opacity=0.4]
(0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\end{tikzpicture}
\vskip -.55cm
\hskip .04cm
{{\textcolor{darkgreen1}{{\huge{\textbf{{Cl}}}}}}}
}
\end{minipage}
}



\visible<1->
{
\begin{minipage}[c]{.7\textwidth}
{
\vskip -8.7cm
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,green,fill=green, fill opacity=0.4]
(0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\end{tikzpicture}
\vskip -.55cm
\hskip -.22cm
{{\textcolor{darkgreen1}{{\Large{\textbf{{HCO$_{3}$}}}}}}}
}
\end{minipage}
}




\visible<2>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -14.8cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\vskip -.7cm
\hskip -.06cm
{{\textcolor{red}{{\huge{\textbf{{Na}}}}}}}
}
\end{minipage}
}



\visible<2>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -13.8cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\hskip -.75cm
{{\textcolor{red}{{\huge{\textbf{{K}}}}}}}
}
\end{minipage}
}




\visible<3>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -14.2cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\vskip -.7cm
\hskip -.06cm
{{\textcolor{red}{{\huge{\textbf{{Na}}}}}}}
}
\end{minipage}
}



\visible<3>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -17.8cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\hskip -.75cm
{{\textcolor{red}{{\huge{\textbf{{K}}}}}}}
}
\end{minipage}
}




\visible<4>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -15.cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\vskip -.7cm
\hskip -.06cm
{{\textcolor{red}{{\huge{\textbf{{Na}}}}}}}
}
\end{minipage}
}



\visible<4>
{
\begin{minipage}[c]{.7\textwidth}

\vskip -21.cm
{
\begin{tikzpicture} [baseline=.12cm]
\draw [thin,orange,fill=yellow]
(.25,.25) --  (.25,0) --  (.5,0) --  (.5,.25) --  (.75,.25) --  (.75,.5) --  (.5,.5) --  (.5,.75) --  (.25,.75) --  (.25,.5) --  (0,.5) --  (0,.25) -- cycle ;
\end{tikzpicture}
\hskip -.75cm
{{\textcolor{red}{{\huge{\textbf{{K}}}}}}}
}
\end{minipage}
}

\end{figure}


\end{frame} 
% end frame

% end individual ions     -------------------------------
















% begin frame
\begin{frame}[fragile,t]%[plain,]
 \frametitle
{Polarization}%1


\begin{figure}

\begin{minipage}[c]{.7\textwidth}
\vskip -.52cm
\hskip -2.02cm
  \includegraphics[width=1.568\textwidth]{./Used/Ions/3dNerve/s3d-00-beig----_--.JPG}
\end{minipage}




\begin{minipage}[c]{.7\textwidth}
\vskip -11.8cm
\visible<1-2>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip -1.6cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.7cm
\visible<1-2>
{{\textcolor{red}{{\huge{\textbf{{Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na}}}}}}}
\end{minipage}




\begin{minipage}[c]{.7\textwidth}
\vskip -11.6cm
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip 1.2cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\hskip 1.8cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\hskip 1.8cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\end{tikzpicture}
}
\vskip -.5cm
\hskip 1.2cm
{{\textcolor{darkgreen1}{{\huge{\textbf{{Cl~~~~Cl~~~~Cl}}}}}}}
\end{minipage}




\begin{minipage}[c]{.7\textwidth}
\vskip -9.4cm
\visible<1-2>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip 2.1cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.5cm
\visible<1-2>
{{\textcolor{red}{{\huge{\textbf{{~~~~~~~~~~~~~~K~~~~~K}}}}}}}
\end{minipage}




\begin{minipage}[c]{.7\textwidth}
\vskip -9.cm
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip -.6cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\hskip 1.8cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\hskip 3.6cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\hskip 1.8cm
\draw [thick,green,fill=green](0,.25) -- (.75,.25) -- (.75,.5)  -- (0,.5);
\end{tikzpicture}
}
\vskip -.45cm
\hskip -.88cm
{{\textcolor{darkgreen1}{{\Large{\textbf{{HCO$_{3}$~~~HCO$_{3}$~~~~~~~~~~~~~~~~~~~HCO$_{3}$~~~HCO$_{3}$}}}}}}}
\end{minipage}

\end{figure}




\begin{minipage}[c]{1\textwidth}
\vskip -3.cm
\begin{center}
\visible<1>
{\textcolor{brown}{{\Large{\textbf{{Polarized State}}}}}}
\end{center}
\end{minipage}

\begin{minipage}[c]{1\textwidth}
\vskip -3.8cm
\begin{center}
\visible<2>
{\textcolor{brown}{{\Large{\textbf{{A stimulus causes \\depolarization of the nerve fibre}}}}}}
\end{center}
\end{minipage}

\begin{figure}




\begin{minipage}[c]{.7\textwidth}
\vskip -17.6cm
\visible<3>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip -1.6cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.7cm
\visible<3>
{{\textcolor{red}{{\huge{\textbf{{Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na}}}}}}}
\end{minipage}


\begin{minipage}[c]{.7\textwidth}
\vskip -16.cm
\visible<3>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip 2.1cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.5cm
\visible<3>
{{\textcolor{red}{{\huge{\textbf{{~~~~~~~~~~~~~~K~~~~~K}}}}}}}
\end{minipage}


\end{figure}




\begin{figure}

\begin{minipage}[c]{.7\textwidth}
\vskip -17.8cm
\visible<4>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip -1.6cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.7cm
\visible<4>
{{\textcolor{red}{{\huge{\textbf{{Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na}}}}}}}
\end{minipage}


\begin{minipage}[c]{.7\textwidth}
\vskip -21.4cm
\visible<4>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip 2.1cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.5cm
\visible<4>
{{\textcolor{red}{{\huge{\textbf{{~~~~~~~~~~~~~~K~~~~~K}}}}}}}
\end{minipage}

\end{figure}




\begin{figure}

\begin{minipage}[c]{.7\textwidth}
\vskip -19.6cm
\visible<5>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip -1.6cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.7cm
\visible<5>
{{\textcolor{red}{{\huge{\textbf{{Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na~~~~~Na}}}}}}}
\end{minipage}


\begin{minipage}[c]{.7\textwidth}
\vskip -24.8cm
\visible<5>
{
\begin{tikzpicture}% [baseline=1.2in]
\hskip 2.1cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\hskip 1.85cm
\draw [thick,orange,fill=yellow] (.25,.25) -- (.25,0) -- (.5,0) -- (.5,.25) -- (.75,.25) -- (.75,.5) -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5) -- (0,.5) -- (0,.25) -- (.25,.25) ;
\end{tikzpicture}
}
\vskip -.7cm
\hskip -1.5cm
\visible<5>
{{\textcolor{red}{{\huge{\textbf{{~~~~~~~~~~~~~~K~~~~~K}}}}}}}
\end{minipage}


\end{figure}




\begin{minipage}[c]{1\textwidth}
\vskip -13.1cm
\begin{center}
\visible<5>
{\textcolor{brown}{{\Large{\textbf{{Reversed Polarized (Depolarized) State}}}}}}
\end{center}
\end{minipage}


\end{frame} 
% end frame


\end{document} 

离子1[![离子2[![离子3[![离子4[![离子5[![离子6[![离子7[![离子8[![离子9]1]1]1]1]1]1]1]1 [ s3d-00-beig----_--.JPG]2

在此处输入图片描述

答案1

我回答了你的LaTeX 社区交叉发布并在那里回答。这个 TikZ 建议我的答案是:

有几种可能性:

  • 存储一系列 TikZ 命令的经典宏
  • \savebox对于 TikZ 图片,然后\usebox将此框打印为副本多次
  • TikZ\foreach循环
  • TikZpic对象

由于前两个是经典的 LaTeX,因此我展示了一个 TikZ\foreach循环解决方案:

\begin{tikzpicture}
  \foreach \pos in {0,...,5} {
    \node at (1.85*\pos,0) { \tikz\draw [thick,orange,fill=yellow]
      (.25,.25) -- (.25,0) -- (.5,0)   -- (.5,.25)  -- (.75,.25) --
      (.75,.5)  -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5)  --
      (0,.5)    -- (0,.25) -- (.25,.25) ;} ;}
\end{tikzpicture}

答案2

我写的另一个解决方案这是 TikZ 图片示例

  • 全局定义一个图片风格并给它一个名字,你可以随时使用它(当然你也可以在本地这样做)
  • 使用循环命令或其他命令将其应用于任何 TikZ 绘图

完整示例:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikzset{
  cross/.pic = {
    \draw [thick,orange,fill=yellow]
      (.25,.25) -- (.25,0) -- (.5,0)   -- (.5,.25)  -- (.75,.25) --
      (.75,.5)  -- (.5,.5) -- (.5,.75) -- (.25,.75) -- (.25,.5)  --
      (0,.5)    -- (0,.25) -- (.25,.25) ;}
}
\tikz \pic foreach \pos in {0,...,5} at (1.85*\pos,0) {cross};
\end{document}

例子

答案3

您要求重复某段内容一段距离。重复某段内容以填充可用空间的标准 TeX 机制是\leaders,它是 的泛化\dotfill。还有 ,\cleaders它与 相同,但居中。

也可以看看:如何用纯 TeX 打印一行点(或任何其他字符)?

\documentclass{article}
\usepackage[paperwidth=12cm,paperheight=7cm,margin=15mm]{geometry}
\usepackage{tikz}
\begin{document}

\noindent \vrule$\leftarrow$ left margin \hfill right margin $\rightarrow$\vrule

\bigskip

\noindent \vrule$\leftarrow$ left margin \dotfill right margin $\rightarrow$\vrule

\bigskip

\noindent \vrule$\leftarrow$ left margin \leaders \hbox{\tt :-)} \hfill right margin $\rightarrow$\vrule

\bigskip

\noindent
\vrule$\leftarrow$
\cleaders
    \hbox{\hskip 2mm%
        \tikz[baseline={(0,0)}] \draw [line width=.2mm,fill=yellow]
        (0,0) circle[radius=4mm] (1.5mm,1.5mm) circle[radius=.2mm] (-1.5mm,1.5mm) circle[radius=.2mm]
        (-135:2.5mm) arc[start angle=-135,end angle=-45,radius=2.5mm];%
        \hskip 2mm}
    \hfill
$\rightarrow$\vrule

\end{document}

在此处输入图片描述

相关内容