0

I'm using the polynom package in my beamer. I would like the numbers to appear little by little, one in each frame

\begin{frame}{Divisão Automática}
  \begin{alertblock}{a.}
     \polylongdiv[style=D]{x^2 + 12x + 35}{x + 7}
  \end{alertblock}
\end{frame}

Thanks!

3

1 Answer 1

1

Using the reference cited by @Alan Munn, (here), and adding your alertblock and a theme, in this case \usetheme{Copenhagen}, the following MWE produces the steps of your polynom division.

\documentclass{beamer}
\usetheme{Copenhagen}
\usepackage{polynom}
\usepackage{pgffor,calc}

\newlength\boxwidth
\newlength\boxheight

\begin{document}
\begin{frame}{Divisão Automática}
  \begin{alertblock}{a.}
    \settowidth\boxwidth{\polylongdiv[style=D]{x^2 + 12x + 35}{x + 7}}%
    \settototalheight\boxheight{\polylongdiv[style=D]{x^2 + 12x + 35}{x + 7}}%
    \foreach \i in {1,...,7} {%
      \only<\i>{\parbox[t][\boxheight]{\boxwidth}{\polylongdiv[style=D,stage=\i]{x^2 + 12x + 35}{x + 7}}}%
    }
  \end{alertblock}
\end{frame}
\end{document}

enter image description here


Commands \boxwidth and \boxheight are used to predefine the height of the box, without it, the alertblock will not fit the whole expression.

enter image description here

1
  • @Alan Munn, I'm sorry. I believe we were editing the question at the same time. Your comments were shown to me even before I finish my revision while I was preparing the answer and explanation.
    – FHZ
    Jun 4, 2022 at 19:25

You must log in to answer this question.

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