3

I'm preparing a presentation where i want paragraphs to be hidden, if they weren't mentionet yet. Therefore I'm using a

\pause

between paragraphs. In addition i'd like to highlight the latest paragraph. Therefore I'm using

\alert<+>{here comes a paragraph}

The result then is,

\alert<+>{here comes a paragraph} \pause
\alert<+>{here comes another paragraph} \pause
\alert<+>{three is the magic number} \pause

which means that i need to press the next-page-button two times, when I need to jump to the next paragraph. Is there a posibility to combine alert an pause without needing two keypresses?

  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – dexteritas Jul 13 '17 at 8:17
6

You can say \alert<1> to have the text alerted on page 1. Then you get

\documentclass{beamer}
\begin{document}
\begin{frame}
  \frametitle{Test}
  \alert<1>{here comes a paragraph} \pause

  \alert<2>{here comes another paragraph} \pause

  \alert<3>{three is the magic number} %\pause
\end{frame}
\end{document}

I commented the last \pause since it will generate one more page without any alerts.

An alternative is to use an itemize with no bullets. Then you can set the alerts for each uncovered item,

\begin{frame}
  \frametitle{Test}
  \begin{itemize}[<alert@+|+->]
  \item[] here comes a paragraph
  \item[] here comes another paragraph
  \item[] three is the magic number
  \end{itemize}
\end{frame}

This will add a space to left of the paragraph. To get rid of that one can use list instead, but that does not seem to be supported by beamer so the alert and step functionallity has to be set onthe items.

  \begin{list}{}{%
      \leftmargin=0pt
      \labelwidth=0pt
      \labelsep=0pt
    }
  \item<alert@+|+-> here comes a paragraph
  \item<alert@+|+-> here comes another paragraph
  \item<alert@+|+-> three is the magic number
  \end{list}

If it is something used a lot it can be put in an environment with the paragraphs as a command

\newenvironment{MyList}{%
  \begin{list}{}{%
      \leftmargin=0pt
      \labelwidth=0pt
      \labelsep=0pt
    }}
  {\end{list}}
\newcommand\MyItem{\item<alert@+|+->}
\begin{frame}
  \frametitle{Test 4}
  \begin{MyList}
  \MyItem here comes a paragraph
  \MyItem here comes another paragraph
  \MyItem three is the magic number
  \end{MyList}
\end{frame}

All alternatives give more or less the same result (there is some more space to the left in the second version):

enter image description here

1

Just remove the \pause - they introduce an additional overlay as <+> itself already creates a new one.

\documentclass{beamer}
\begin{document}
\begin{frame}
  \frametitle{Test}
  \alert<+>{here comes a paragraph}

  \alert<+>{here comes another paragraph}

  \alert<+>{three is the magic number}
\end{frame}
\end{document}

enter image description here

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.