1

I'm making a class notes slides for a math course, and some slides contains some exercises. After writing the exercise I want to make a pop up box which contain the solution for that exercise, but I have a problem in doing this.

For example, I have the following code:

\documentclass[9pt]{beamer}
\mode<presentation>
{
  \usetheme[width=1.4cm]{PaloAlto}      
  \usecolortheme{beaver} 
  \usefonttheme{default}
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}
\usepackage{graphicx}
\usepackage{adjustbox} 
\usepackage{pbox}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}

\begin{document}
\begin{frame}{Chapter One}
Find the domain of the function:
$$  f(x)=\sqrt{x^{2}-4}$$

Solution.
\end{frame}
\end{document}

When clicking on "Solution" I want a popup box to appear and contain the solution

$x^{2}-4 \geq 0, x^{2}\geq 4, |x|\geq 2$
2

You could show the solution on the next overlay:

\documentclass[9pt]{beamer}
\mode<presentation>
{
  \usetheme[width=1.4cm]{PaloAlto}      
  \usecolortheme{beaver} 
  \usefonttheme{default}
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}
%\usepackage{graphicx}
\usepackage{adjustbox} 
\usepackage{pbox}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}

\begin{document}
\begin{frame}{Chapter One}
Find the domain of the function:
\[  f(x)=\sqrt{x^{2}-4}\]
\pause
\begin{block}{Solution}
\[x^{2}-4 \geq 0, x^{2}\geq 4, |x|\geq 2\]
\end{block}
\end{frame}
\end{document}

Or if more questions should follow:

\documentclass[9pt]{beamer}
\mode<presentation>
{
  \usetheme[width=1.4cm]{PaloAlto}      
  \usecolortheme{beaver} 
  \usefonttheme{default}
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}
%\usepackage{graphicx}
\usepackage{adjustbox} 
\usepackage{pbox}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}

\begin{document}
\begin{frame}{Chapter One}
Find the domain of the function:
\[  f(x)=\sqrt{x^{2}-4}\]

\begin{onlyenv}<+(1)>
  \begin{block}{Solution}
  \[x^{2}-4 \geq 0, x^{2}\geq 4, |x|\geq 2\]
  \end{block}
\end{onlyenv}

\pause 
next quiz
\end{frame}
\end{document}

Off-topic:

  • So I should click next to show the solution box! Is there any way to just click on the word "Solution" to show the solution box, because there will be other exercises in that slide and I only need to pop up one box solution at a time. – John Mar 13 '18 at 21:11
  • @John Please see my second solution – samcarter is at topanswers.xyz Mar 13 '18 at 21:15
  • The second solution force you to move along the exercises one by one to show the solution to a particular exercise in a list of many exercises, and this will be a little tedious. It would be more flexible if just click on a button near any selected exercise to view its solution as a pop up box. – John Mar 13 '18 at 21:23
1

My reputation is low, no comment allowed. Thus I have to answer: Give fancytooltips a try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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