TikZ 中的 itemize

TikZ 中的 itemize

我想要进行如图所示的帧转换。http://www.slideshare.net/thomasmach/hierarchical-matrices-concept-application-and-eigenvalues即来自

在此处输入图片描述

在此处输入图片描述

从幻灯片 8/67 移至 9/67。我想知道正确的和最佳的方法是什么。

编辑:例如,在下面的幻灯片中,我想添加箭头,使其看起来像幻灯片 9/67 所示这里

在此处输入图片描述

    \documentclass{beamer} %
    \usetheme{CambridgeUS}
    \usepackage[latin1]{inputenc}
    \usefonttheme{professionalfonts}
    \usepackage{times}
    \usepackage{tikz}
    \usepackage{amsmath}
    \usepackage{verbatim}
    \usetikzlibrary{arrows,shapes}

    \author{Author}
    \title{Presentation title}

    \begin{document}
    \section{Concept}
\subsection{Dense matrices}
\begin{frame}{Dense matrices}
\begin{itemize}
\item Dense matrix
$$
A = \begin{bmatrix}
a_{11} & a_{12} & a_{13} & \cdots & a_{1n}\\
a_{21} & a_{22} & a_{23} & \cdots & a_{2n}\\
a_{31} & a_{32} & a_{33} & \cdots & a_{3n}\\
\vdots & \vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & a_{n3} & \cdots & a_{nn}
\end{bmatrix}
$$
\end{itemize}

\begin{itemize}
\item
$n^2$ entries in the storage.
\item
Matrix vector product: $Ax$ costs $\mathcal{O}(n^2)$.
\item
Matrix matrix product: $AB$ costs $\mathcal{O}(n^\delta)$ flops, $\delta \geq 2.3727$ practically $\mathcal{O}(n^3)$.
\item
Matrix factorizations: LU, QR, SVD etc costs $\mathcal{O}(n^3)$.
\end{itemize}

\end{frame}
\end{document}

答案1

有一种可能性是:我定义了一个\mybox带有三个强制参数的命令:

\mybox{<title>}{<text>}{<position>}

此命令在所需位置写入<text>一个带有 的漂亮框架框。每个框将在内部命名为。然后,用于在箭头结束的位置放置标记。<title>box-<number>\tikzmark

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{tikz}

\definecolor{myred}{RGB}{166,0,0}
\newcounter{boxes}

\newcommand\mybox[3]{%
\stepcounter{boxes}%
\begin{tikzpicture}[remember picture,overlay]
  \node[rectangle,rounded corners,line width=1pt,
      draw=myred,fill=myred!30,text height=20pt,
      text depth=11pt,align=left,fill opacity=0.7,text opacity=1] 
    (box-\theboxes) at #3 {#2};
  \node[rectangle,rounded corners,fill=myred!90,
      font={\Large\color{white}},anchor=west] 
    at ([xshift=10pt,]box-\theboxes.north west) {#1};
\end{tikzpicture}%
}

\newcommand\tikzmark[1]{%
  \tikz[remember picture,overlay] \node (#1) {};}

\begin{document}

\begin{frame}
\[
\begin{bmatrix}
1 & 0 & 0 & 1 \\
1 & 0 & 0 & 1 \\
1 & 0 & 0 & 1 \\
1 & 0 & 0 & 1 \\
\end{bmatrix}
\]

\begin{itemize}
\item First item.
\item Second item.
\item Third and some $\mathcal{O}(\tikzmark{a}n^2)$ flo\tikzmark{b}ps item.
\item Fourth item.
\item Fifth item.
\end{itemize}

\onslide<2>{%
\mybox{Landau symbol}{There is a constant $c$ such that $Ax$ costs no more than $cn^2$ flops.}{(0.5\textwidth,0.63\textheight)}
\mybox{Flops}{1 flop ${} = (\alpha\beta +\gamma \rightarrow \gamma)$}{(0.79\textwidth,0.4\textheight)}

\begin{tikzpicture}[remember picture,overlay]
\draw[line width=1pt,myred,->,shorten >= 6pt] (box-1.south) to[out=270,in=90] (a);
\draw[line width=1pt,myred,->,shorten >= 5pt] (box-2.west) to[out=180,in=90] (b);
\end{tikzpicture}%
}
\end{frame}

\end{document}

在此处输入图片描述

相关内容