如何在投影仪幻灯片中的列表左侧和右侧绘制垂直箭头

如何在投影仪幻灯片中的列表左侧和右侧绘制垂直箭头

我有一张带有项目列表的简单幻灯片。我想在列表左侧绘制一个带有文本的增加(垂直)箭头,并在列表右侧绘制一个减少的箭头,如所附示例所示。我的框架定义为:

\begin{frame}\frametitle{Is there a simple solution to draw arrows?}

\begin{itemize}[<+-| alert@+>]

 \item Politics

 \item Empirical

 \item Simplified mechanistic 

 \item Full dynamics

\end{itemize}

非常感谢您的帮助! 使用...ppt...制作的示例

答案1

像这样?

在此处输入图片描述

梅威瑟:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{calc, positioning, shapes.arrows}

    \begin{document}

\begin{frame}
\frametitle{Is there a simple solution to draw arrows?}
    \centering
\begin{tikzpicture}[node distance=0pt,
SA/.style = {single arrow, draw=blue!40!gray, very thick, fill=blue!20!gray!10,
             minimum height=1.6*\n1,
            }       
                    ]
\node (n)   [text width=0.8\textwidth]
{
    \begin{itemize}[<+-| alert@+>]
\item Politics
\item Empirical
\item Simplified mechanistic
\item Full dynamics
    \end{itemize}
};
\path   let \p1 = ($(n.north)-(n.south)$),
            \n1 = {veclen(\y1,\x1)} in
        node[SA, rotate=90,  xshift=\n1/2,
             above=of n.south west] {Easy to apply}
        node[SA, rotate=-90,  xshift=-\n1/2,
             above=of n.south east] {Transparency};
\end{tikzpicture}

\end{frame}
    \end{document}

正如您所见,itemize 放在tikz节点中,因为箭头使用single arrow形状。

附录: 箭头适合于 itemize 高度(实际上是它的 1.6 倍)。我选择这个有两个原因:

  • 箭头中的文字比项目高度长,
  • 从提供的图片我(现在看来是错误的)得出结论,这是理想的

在下面的 MWE 中,我将箭头高度降低到大约 itemize 中文本的高度,并将字体大小更改为(\largeitemize环境中为,\small在箭头中为)。另外,为了使两个箭头等高,我将其替换minimum widthtext width。这些更改的结果是:

在此处输入图片描述

更正后的代码为:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{calc, positioning, shapes.arrows}

    \begin{document}

\begin{frame}
\frametitle{Is there a simple solution to draw arrows?}

    \centering
\begin{tikzpicture}[node distance=0pt,
SA/.style = {single arrow, draw=blue!40!gray, very thick, fill=blue!20!gray!10,
            inner xsep=0pt, text width=\n1-4ex, align=center,% 4ex compensate vertical space above and below itemize
            font=\small
            }       
                    ]

\node (n)   [text width=0.8\textwidth, font=\large]
{
    \begin{itemize}[<+-| alert@+>]
\item Politics
\item Empirical
\item Simplified mechanistic
\item Full dynamics
    \end{itemize}
};
\path   let \p1 = ($(n.north)-(n.south)$),
            \n1 = {veclen(\y1,\x1)} in
        node[SA, rotate=90,  xshift=0.45*\n1,
             above=of n.south west] {Easy to apply}
        node[SA, rotate=-90,  xshift=-0.55*\n1,
             above=of n.south east] {Transparency};
\end{tikzpicture}

\end{frame}
    \end{document}

答案2

使用下面的代码就可以得到你想要的效果。

\documentclass{beamer}
\usepackage{tikz}
\usepgflibrary{shapes.arrows}

\begin{document}
\tikzstyle{my arrow} = [draw=cyan!75, very thick, single arrow, minimum height=7.5cm, shape border rotate =#1, fill=gray!10]`

\begin{frame}
\frametitle{Is there a simple solution to draw arrows?}
\begin{itemize}[<+-| alert@+>]

    \item Politics \tikz \coordinate (po);

    \item Empirical

    \item Simplified mechanistic 

    \item Full dynamics

\end{itemize}

\begin{tikzpicture}[overlay]
\node at (-0.25,1) [my arrow=90] {\rotatebox{90}{Easy to apply}};
\node at (10,1) [my arrow=-180] {\rotatebox{-90}{Transparency}};
\end{tikzpicture}
\end{frame}
\end{document}

相关内容