# Vertically centering text on a page doesn't work?

minimal example:

\documentclass[oneside]{memoir}

\setstocksize{8.5in}{3.6666in}
\settrimmedsize{8.5in}{3.6666in}{*}
\settrims{0in}{0in}
\settypeblocksize{9.0in}{32pc}{*}
\setlrmarginsandblock{0.37in}{*}{1}
\setulmarginsandblock{0.1in}{*}{1}
\checkandfixthelayout
\clearpage\thispagestyle{empty}

\begin{document}
\begin{vplace}[1]
test
\end{vplace}
\end{document}

-
How is this a minimal example? Everything in your preamble has nothing to do with the problem, as far as I can tell. –  Will Robertson Aug 27 '10 at 8:47
I didn't realize that. –  Neil G Aug 30 '10 at 11:07

The environment, as you've discovered, is clearly broken. For now, you can work around it with

\documentclass{memoir}
\begin{document}
\null
\begin{vplace}[1]
test
\end{vplace}
\end{document}


I'll contact Lars about the problem.

-
Heh, beat me to it. –  TH. Aug 27 '10 at 8:55
while you're talking to Lars, could you ask him to check out the proportionality? I've just noticed that with [0.5] the proportions aren't quite right, and with [1], the text definitely appears a bit "low on the page", maybe by about one \baselineskip? –  Brent.Longborough Aug 27 '10 at 13:12
@daleif: So sorry, Lars, I didn't mean to talk past you, just didn't realise you were you... –  Brent.Longborough Aug 27 '10 at 14:05
I think (from writing similar code years ago) that you're right that the output will be off by one \baselineskip. But I'm too lazy to do the measurements and trial'n'error to get it right :) –  Will Robertson Aug 27 '10 at 15:39

Fixed in the next memoir release

/daleif

-
Shouldn't that be "\daleif"? –  Brent.Longborough Aug 27 '10 at 14:06

You can add \hrule height0pt before the \begin{vplace}. From reading the documentation, it seems like it should work, but it doesn't. It looks like a bug in memoir to me.

\newenvironment{vplace}[1][1]{%
\par\vspace{\stretch{#1}}%
}{%
\vspace*{\stretch{1}}%
\par}


I think that should be

\newenvironment{vplace}[1][1]{%
\par
\vspace*{\stretch{#1}}
}{%
\par
\vspace{\stretch{1}}%
}

-
Good point about using \vspace* in there (which I missed at first!). That's probably the best redefinition. –  Will Robertson Aug 27 '10 at 9:01