5

I have the following code that defines a single frame of a beamer presentation:

\begin{frame}{Focus on Merkel Cells}
  \begin{itemize}
  \item \textbf{1875}: Merkel cells discovered by Friedrich Merkel
  \item \textbf{1969}: Merkel cell-neurite complexes implicated in
    touch reception
  \item \textbf{1969-2014}: Unresolved debate
    \begin{enumerate}
      \item A$\beta$ SAI neurons are mechanoreceptive (analagous to
        olfaction and all other LTMRs)
      \item Merkel cells are mechanoreceptive (analagous to taste and
        hearing)
      \item \alert{\textbf{Both are mechanoreceptive: A$\beta$ SAI rapid, Merkel
            sustained}}
      \end{enumerate}
    \item \textbf{2014}: Explosion of new evidence
  \end{itemize}
\end{frame}

I want to draw an empty black circle around the text A$\beta$ SAI rapid, and I don't care whether other text gets covered up. How can I do this?

abcd
  • 209

1 Answers1

8

Here's an option using TikZ and its tikzmark and fit libraries

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark,fit}

\begin{document}

\begin{frame}{Focus on Merkel Cells}
  \begin{itemize}
  \item \textbf{1875}: Merkel cells discovered by Friedrich Merkel
  \item \textbf{1969}: Merkel cell-neurite complexes implicated in
    touch reception
  \item \textbf{1969-2014}: Unresolved debate
    \begin{enumerate}
      \item A$\beta$ SAI neurons are mechanoreceptive (analagous to
        olfaction and all other LTMRs)
      \item Merkel cells are mechanoreceptive (analagous to taste and
        hearing)
      \item \alert{\textbf{Both are mechanoreceptive: \tikzmark{start}A$\beta$ SAI rapid\tikzmark{end}, Merkel
            sustained}}
      \end{enumerate}
    \item \textbf{2014}: Explosion of new evidence
  \end{itemize}
\begin{tikzpicture}[remember picture,overlay]
\node<2>[draw,line width=2pt,cyan,circle,fit={(pic cs:start) (pic cs:end)}] {};
\end{tikzpicture}  
\end{frame}

\end{document}

The result (compile two or three times to the circle to reach its final position):

Since TikZ and beamer cooperate, you can use overlays as in, for example,

\node<2>[draw,line width=2pt,cyan,circle,fit={(pic cs:start) (pic cs:end)}] {};

so the circle will appear on the second slide.

enter image description here

Using an ellipse (requires the shapes.geometric library):

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark,fit,shapes.geometric}

\begin{document}

\begin{frame}{Focus on Merkel Cells}
  \begin{itemize}
  \item \textbf{1875}: Merkel cells discovered by Friedrich Merkel
  \item \textbf{1969}: Merkel cell-neurite complexes implicated in
    touch reception
  \item \textbf{1969-2014}: Unresolved debate
    \begin{enumerate}
      \item A$\beta$ SAI neurons are mechanoreceptive (analagous to
        olfaction and all other LTMRs)
      \item Merkel cells are mechanoreceptive (analagous to taste and
        hearing)
      \item \alert{\textbf{Both are mechanoreceptive: A\tikzmark{start}$\beta$ SAI rapi\tikzmark{end}d, Merkel
            sustained}}
      \end{enumerate}
    \item \textbf{2014}: Explosion of new evidence
  \end{itemize}
\begin{tikzpicture}[remember picture,overlay]
\node[draw,line width=2pt,cyan,ellipse,inner ysep=15pt,fit={(pic cs:start) (pic cs:end)}] {};
\end{tikzpicture}  
\end{frame}

\end{document}

enter image description here

Gonzalo Medina
  • 505,128
  • perfect, thanks! is there an easy way to flatten the circle a little, make it more of an oval? i tried to replace circle with oval, but that didn't work. a rectangle would work, too. i replaced circle with rectangle, and that was recognized, but the rectangle is too short. i'm not sure how to increase the height. – abcd Sep 21 '15 at 01:12
  • 1
    @dbliss Please see my updated answer. – Gonzalo Medina Sep 21 '15 at 01:18
  • 1
    @dbliss With a rectangle, add something like minimum height=1cm to the \node options. – Gonzalo Medina Sep 21 '15 at 01:19
  • this seemed to be working for me, but when i did a final check of my PDF (i'm printing to PDF), the circle/ellipsis/rectangle was offset (to the right and up, a good deal) from the words of interest. i'm not sure how or why this would've happened, and i didn't see an obvious way to fix it. any ideas? – abcd Sep 21 '15 at 17:57
  • @dbliss No without seeing the actual code. Did you run the code two or three rimes? – Gonzalo Medina Sep 21 '15 at 18:22