[Tex/LaTex] Twolined ovalbox in Beamer class

beamer

I would like to have a twolined Text which has a ovalbox around itself.
I do it with

{\huge \Ovalbox{\textcolor{darkred}{Two lined \\ text}}}

LaTex is ignoring the \\ sign, how can it be accomplished?

Best Answer

Use of tikz is one possible solution. An ellipse shape is defined as ell style.

enter image description here

Code

\documentclass{beamer}
\usepackage{tikz,xcolor}
\usetikzlibrary{shapes}
\tikzset{% 
ell/.style={draw,ellipse,minimum height=3em,text width=10em,line width=2pt, align=center},
}

\begin{document}

\begin{frame}

\begin{tikzpicture}
\node[ell] {\textcolor{red}{\huge Two lined \\ text}};
\end{tikzpicture}
\end{frame}

\end{document}

Edit: If need to move this ovalbox around, for example,

enter image description here

Use [remember picture,overlay] with shift={(x,y)} skill, shown below

\begin{frame}
\begin{itemize}
\item abc
\item This is a tikz node
\begin{tikzpicture}[remember picture,overlay]
\node[ell,shift={(4cm,0cm)}] {\textcolor{red}{\huge Two lined \\ text}};
\end{tikzpicture}
\item def
\end{itemize}
\end{frame}
Related Question