\begin{example}
Is there a way to modify the color of the word "Example 1" and also being able to tpye
on the same line with the word Example 1?
\end{example}
Asked
Active
Viewed 978 times
1
-
Surely, but it depends on how you defined the example environment. – Bernard Sep 07 '16 at 23:45
1 Answers
1
Changing the foreground <colour> for the example environment is achieved using
\setbeamercolor{block title example}{fg=<colour>}
For using an "inline example", you can define your own environment, say inlineexample:
\documentclass{beamer}
\let\Tiny\tiny% http://tex.stackexchange.com/a/94159/5764
\setbeamertemplate{theorems}[numbered]
\newenvironment{inlineexample}
{\par\vskip\medskipamount
\refstepcounter{theorem}%
{\usebeamercolor[fg]{block title example}\translate{Example}~\theexample}:}
{\par\vskip\smallskipamount}
\begin{document}
\begin{frame}
\frametitle{Frame title}
\begin{example}
Is there a way to modify the color of the word ``Example~\theexample'' and
also being able to type on the same line with the word Example~\theexample?
\end{example}
\setbeamercolor{block title example}{fg=red}
\begin{example}
Is there a way to modify the color of the word ``Example~\theexample'' and
also being able to type on the same line with the word Example~\theexample?
\end{example}
\begin{inlineexample}
Is there a way to modify the color of the word ``Example~\theexample'' and
also being able to type on the same line with the word Example~\theexample?
\end{inlineexample}
\end{frame}
\end{document}
Werner
- 603,163

