Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to make a frame transition as seen here. http://www.slideshare.net/thomasmach/hierarchical-matrices-concept-application-and-eigenvalues i.e. from

enter image description here

to

enter image description here

Move from slide 8/67 to 9/67. I am wondering what is the right and the best way to go about.

EDIT: As an example, to the slide below I want to add the arrows and make it look like the slide 9/67 as seen here.

enter image description here

    \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}
share|improve this question
Looks like a classic use of a \tikzmark type of solution. It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. I personally know very little about beamer but if I had something to start with I could certainly enhance it with a \tikzmark to show you how to obtain the desired result. – Peter Grill Oct 14 '12 at 3:59
Thanks Peter. I have added an example code. – user17762 Oct 14 '12 at 4:17
Great. Can you add the second frame as well. – Peter Grill Oct 14 '12 at 4:19
@PeterGrill Well... Thats what I do not know. – user17762 Oct 14 '12 at 4:23

1 Answer

up vote 9 down vote accepted

Here's one possibility: I defined a \mybox command with three mandatory arguments:

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

This command writes <text> in a nice framed box with a <title> at the desired position. Each box will be internally named as box-<number>. Then, \tikzmark is used to place marks in the points where the arrows will end.

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

enter image description here

share|improve this answer
Thanks @Gonzalo – user17762 Oct 14 '12 at 4:36
2  
2 seconds!!!!!! I think my comments gave you the edge you needed to get this done faster. :-) – Peter Grill Oct 14 '12 at 4:38
Is there a way I can make the blue boxes a bit transparent, as shown on the slides? – user17762 Oct 14 '12 at 4:38
Thanks Gonzalo and Peter. Much appreciated. – user17762 Oct 14 '12 at 4:41
1  
@PeterGrill when I saw your first comment I knew I had to type really fast ;-) – Gonzalo Medina Oct 14 '12 at 4:51
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.