I am trying to add a frame around a text which would be centered and vertically aligned to the middle of the box but I can only center the text.
What should I do to align the text to the middle of the box?
\documentclass[12pt,a4paper,oneside]{letter}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}
\noindent\fbox{\parbox{\linewidth\fboxrule\fboxsep}{\center\textbf{my text here}}}
\end{document}


\fbox{{\parbox{.5\linewidth}{\centering\rule{1cm}{2cm}}}}looks vertically aligned to me. Did you take into account theydescender of themy text herein asserting the vertical centering? – jfbu Dec 2 '12 at 22:40