0

I would like to create a new command, like \alert, but in other colours and if it was possible to combine it with the comand \pmb.

I mean in the first frame shows 2x+1 and after a click \pmb{2x+1} (in blue, for instance)

Thak you in advance

  • 1
    Welcome to TeX SX! What is your question about? – Bernard Dec 2 '18 at 23:25
  • 1
    Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is \pmb?), and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say. – Andrew Dec 2 '18 at 23:31
  • Does this help? – user121799 Dec 3 '18 at 3:08
  • Note that \pmb{2x+1} is wider than 2x+1 – egreg Dec 6 '18 at 21:33
1

You could define a command that uses alert, just in a different colour:

\documentclass{beamer}

\newcommand<>{\myalert}[1]{%
    \begingroup
        \setbeamercolor{alerted text}{fg=blue}%
        \alert#2{#1}%
    \endgroup
}

\begin{document}

\begin{frame}

\alert<1>{test}

\myalert<3-5>{sdf}

\end{frame}

\end{document}

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.