I am just copied/pasted the solution posted for the following question.
how to get a newline in \fbox?
My problem is that box does not appear in the center of frame.
Below is the snap shot of my code along with its pdf version
I am just copied/pasted the solution posted for the following question.
how to get a newline in \fbox?
My problem is that box does not appear in the center of frame.
Below is the snap shot of my code along with its pdf version
The code in the linked solution works as expected. The problem in your case is that you are using an old version of beamer in which an explicit end of paragraph was needed before \end{frame} for commands such as \centering to have effect. Add an explicit end of paragraph (a blank line or \par) before \end{frame}:
\documentclass{beamer}
\usepackage{vietnam}
\usepackage{varwidth}
\begin{document}
\begin{frame}
\centering
\fbox{\begin{varwidth}{\textwidth}
\centering
One billion searches per second $\Rightarrow$ 36 yrs \\ All this to recover only $10$ bits !
\end{varwidth}}
\end{frame}
\end{document}
I'd suggest you to update your LaTeX system.
\centering– Aug 07 '15 at 15:30\end{varwidth}}and\end{frame}. – Gonzalo Medina Aug 07 '15 at 15:30beameris outdated. The problem is that \centering needs an end of paragraph to work properly; old versions ofbeamerhad this problem and an explicit end of paragraph (a blank line) was required. This is not the case in newest versions. You should really update your LaTeX installation. – Gonzalo Medina Aug 07 '15 at 15:36