将 tikzpicture 放入 beamer 中

将 tikzpicture 放入 beamer 中

我正在尝试在 Beamer 中添加 tikzpicture。但是,我无法在 TikZ 中使用诸如 等\pause功能enumerate

这是我目前得到的结果。我想在每个点之后更改enumerate环境。\pause

\documentclass{beamer}
%\usecolortheme{beaver}
\usepackage{textpos}
\usepackage{comment}
\usepackage{tikz}
\usepackage{graphicx}
%\usepackage[a4paper,left=2.0cm, right=2.0cm, top=4.5cm, bottom=2.5cm]{geometry}
\usetikzlibrary{snakes}

\begin{document}

\begin{frame}{Time Line of the Model}


\begin{tikzpicture}
 %draw horizontal line
 \draw (-2,0) -- (10,0);

 %draw vertical lines
 \foreach \x in {-1.5,3,8}
   \draw (\x cm,3pt) -- (\x cm,-3pt);

 %draw nodes
 \draw (-1.5,0) node[above=3pt] {$ 0 $};
 \draw (3,0) node[above=3pt] {$ 1 $};
 \draw (8,0) node[above=3pt] {$ 2 $};

\small
\node[align=left, below] at (0,-.5)%
{
1) The board of directors \\ offers the manager a \\ contract ($\omega_0, \omega_p, \omega_v$).\\\\ 
2) The short-term $v_S$, \\and the long-term $v_L$  \\ projects are initiated \\ by the manager.\\\\
3) The manager is \\ (partially) compensated \\ a fixed wage of $\omega_0$.\\\\
4) The IPO price of the \\stock  $p_0$ is determined \\by the investors
};


\node[align=left, below] at (4.5,-.5)%
{
1) Speculators observe\\ costly noisy signals $\theta_S $ \\ and $\theta_L)$ of the value of \\ short- and long-term \\ project. \\\\
2) The market for the firm's \\ shares opens for trade;\\ and the resulting market \\ price is $p$.\\\\
3) The manager is \\ (partially) compensated \\ an amount of $\omega_p p$.
};


\node[align=left, below] at (8.5,-.5)%
{
1) The terminal value \\of the firm $v$ is realized.\\\\
2) The manager is \\  (partially) compensated \\an amount of $\omega_v v$.
};
\end{tikzpicture}
\end{frame}
\end{document}

答案1

我会使用columns环境来分割您的页面;tikzpicture对于顶部的线来说,它效果很好,但没有必要将它用于所有其他部分。

截屏

请注意,columns环境采用可选参数来指定垂直对齐方式;我使用了[t]for top。环境允许您使用以下方式指定每一列

\begin{column}{<width>}
    content
\end{column}

我已经完成了,并将所有手册列表更改为。现在您可以在每个列表末尾enumerate添加并获得所需的显示:)请参阅第 12.7 节\pause\item文档更多细节。

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}{Time Line of the Model}


\begin{tikzpicture}
    %draw horizontal line
    \draw (-2,0) -- (10,0);

    %draw vertical lines
    \foreach \x in {-1.5,3,8}
    \draw (\x cm,3pt) -- (\x cm,-3pt);

    %draw nodes
    \draw (-1.5,0) node[above=3pt] {$ 0 $};
    \draw (3,0) node[above=3pt] {$ 1 $};
    \draw (8,0) node[above=3pt] {$ 2 $};

\end{tikzpicture}
\small
\begin{columns}[t]
    \begin{column}{.4\textwidth}
        \begin{enumerate}
            \item The board of directors offers the manager a  contract ($\omega_0, \omega_p, \omega_v$). 
            \item The short-term $v_S$, and the long-term $v_L$   projects are initiated  by the manager.
            \item The manager is  (partially) compensated  a fixed wage of $\omega_0$.
            \item The IPO price of the stock  $p_0$ is determined by the investors
        \end{enumerate}
    \end{column}%
    \begin{column}{.35\textwidth}
        \begin{enumerate}
            \item  Speculators observe costly noisy signals $\theta_S $  and $\theta_L)$ of the value of  short- and long-term  project. 
            \item The market for the firm's  shares opens for trade; and the resulting market  price is $p$.
            \item The manager is  (partially) compensated  an amount of $\omega_p p$.
        \end{enumerate}
    \end{column}%
    \begin{column}{.25\textwidth}
        \begin{enumerate}
            \item The terminal value of the firm $v$ is realized.
            \item  The manager is   (partially) compensated an amount of $\omega_v v$.
        \end{enumerate}
    \end{column}
\end{columns}
\end{frame}
\end{document}

相关内容