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?

1 Answer 1

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

5
  • 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, 2015 at 1:12
  • 1
    @dbliss Please see my updated answer. Sep 21, 2015 at 1:18
  • 1
    @dbliss With a rectangle, add something like minimum height=1cm to the \node options. Sep 21, 2015 at 1: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, 2015 at 17:57
  • @dbliss No without seeing the actual code. Did you run the code two or three rimes? Sep 21, 2015 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .