3

I am creating a question & answer slide on Beamer. Using the overlay of Beamer I would like to show different contents following this sequence:

  1. State the question and the possible answers
  2. Add the computation
  3. Overlay a green checkmark on the right answer

Up to now I have reached only this result. So the third passage needs some improvement.

\documentclass{beamer}

\usepackage{xcolor,pifont}
\newcommand*\colourcheck[1]{%
\expandafter\newcommand\csname #1check\endcsname{\textcolor{#1}
{\ding{52}}}%
}
\colourcheck{green}

\begin{document}

\begin{frame}
\frametitle{Percent}
\begin{itemize}
  \item If the production of hybrid cars tripled last year, 
  by how many percent did it increase?
\end{itemize}
\centering
\begin{minipage}{0.795\textwidth}
\begin{columns}
 \begin{column}{0.2\textwidth}
  \begin{enumerate}[(A)]
    \item 100\%
    \item[\only<1-2>{(B)}\only<3>{\makebox[-11pt]
    {(B)}\greencheck}]200\%
    \item 300\%
    \item 400\%
    \item 500\% 
  \end{enumerate}
\end{column}
 \begin{column}<+(1)->{0.8\textwidth}
  For example, if production was 10 cars, and it
  tripled to 30 cars, the increase was 20 cars, which
  is 200\% of 10. \bigskip

  $\displaystyle \dfrac{30-10}{10} \times 100\% = \dfrac{20}{10} \times
  100\% = 200\%$
 \end{column}
\end{columns}
\end{minipage}
\end{frame}

\end{document}

Basically, I would like the (B) letter to remain in the slide and overlay a green tick symbol at the "third" slide.

Checkmark styling: option to increase/decrease its size + add a black border to the symbol.

UPDATE: using this code \item[\only<1-2>{(B)}\only<3>{\makebox[-11pt]{(B)} \greencheck}] 200\%, but this code does not properly enumerate the letters after the (B).

Slide 1 of 1 Slide 2 of 1 Slide 3 of 1

0

1 Answer 1

3

I think that, if you leave the enumerate labels alone, you can get a better result. This is still rather manual, but in line with what you were attempting. Still, it should work.

\documentclass{beamer}

\usepackage{xcolor,pifont}
\newcommand*\colourcheck[1]{%
\expandafter\newcommand\csname #1check\endcsname{\textcolor{#1}
{\ding{52}}}%
}
\colourcheck{green}

\begin{document}

\begin{frame}
\frametitle{Percent}
\begin{itemize}
  \item If the production of hybrid cars tripled last year,
  by how many percent did it increase?
\end{itemize}
\centering
\begin{minipage}{0.795\textwidth}
\begin{columns}
 \begin{column}{0.2\textwidth}
  \begin{enumerate}[(A)]
    \item 100\%
    \item 200\% \only<3>{\hspace{-7.5ex}\makebox[-11pt]{\greencheck}}
    \item 300\%
    \item 400\%
    \item 500\%
  \end{enumerate}
\end{column}
 \begin{column}<+(1)->{0.8\textwidth}
  For example, if production was 10 cars, and it
  tripled to 30 cars, the increase was 20 cars, which
  is 200\% of 10. \bigskip

  $\displaystyle \dfrac{30-10}{10} \times 100\% = \dfrac{20}{10} \times
  100\% = 200\%$
 \end{column}
\end{columns}
\end{minipage}
\end{frame}

\end{document}

enter image description here

(animation courtesy of @marmot)

0

You must log in to answer this question.

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