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
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}
myalert bleeds out from the group when using metropolis theme and ends up interfering on alertblock environment. One way to get around this problem is by calling an empty \alert{} right after \endgroup. Another way is by using \begingroup \alt#2{\usebeamercolor[fg]{example text}#1}{#1}% \endgroup
instead. Even using \setbeamercolor{alerted text}{fg=orange} doesn't solve the problem.
– Leone
Jan 11 '22 at 03:01
\pmb?), and this makes it really hard to help you. A MWE should start with a\documentclasscommand, 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. – Dec 02 '18 at 23:31\pmb{2x+1}is wider than2x+1– egreg Dec 06 '18 at 21:33