# [texhax] placing a rule against the top (or bottom) edge of a page

Wed Nov 18 18:43:38 CET 2009

I'm trying to do this and it isn't happening:

\documentclass{minimal}
\usepackage[margin=0bp,paperwidth=2in,paperheight=2in]{geometry}
\begin{document}%
\newlength{\textlineheight}%
\newsavebox{\scratch}%
\setbox\scratch=\vtop{\strut}%
\textlineheight=\ht\scratch%
\noindent\begin{picture}(0,0)\put(0,0)%
{\rule[\textlineheight]{2in}{1bp}}%
\end{picture}%
\end{document}

The centerline of the rule falls 1.096bp short of the top of the page
--- why?

William

--