[Tex/LaTex] Vertically centering text

articlehorizontal alignmentvertical alignment

I have a block of text that I want to be in the center of the page, i.e. there is the same amount of space between the top of the paper and the start of the bock and between the bottom of the paper and the end of the block.
The block has to be centered regardless of other blocks on the page

To be more specific, I want to write a letter that consists of two paragraphs, centered vertically on the page. There also has to be an address on the top, but I do not want this to influence the centering.

I want to achieve the effect from this question, but not for Beamer.

Best Answer

Try this:

\documentclass{article}% or book, report, etc
\usepackage{lipsum}
\begin{document}
\lipsum[1] % some text
\clearpage % go to next page.
\mbox{}
\vfill
\lipsum[2] % more text, vertically centered
\vfill
\mbox{}
\clearpage % go to next page
\lipsum[3] % yet more text
\end{document}

Or if you want the middle text centered with respect to the before and after texts then delete the two \clearpage and \mbox{} macros.