Page LayoutText not in first line when pageheight small

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Perry123
Posts: 2
Joined: Tue May 17, 2011 5:41 pm

Text not in first line when pageheight small

Post by Perry123 »

Hello, I'm trying to render a little textbox with pdflatex
(custom-sized with the geometry package). The example below
produces the expected result: horizontally centered "text"
in the first line. I also show the margin for better orientation.

Code: Select all

\documentclass[8pt]{extarticle}
\usepackage[papersize={250pt,80pt},margin=5pt,nohead,nofoot]{geometry}
\geometry{showframe}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\begin{document}
\centering text
\end{document}
However, when I change the page height from 80pt to below 77pt,
the "text" moves away from the top margin; at 60pt, it is roughly
vertically centered. How can I fix this so that it remains at the
top even for shorter pages?

Thank you for any ideas.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Perry123
Posts: 2
Joined: Tue May 17, 2011 5:41 pm

Re: Text not in first line when pageheight small

Post by Perry123 »

Ok, I'm feeling stupid now. The problem apparently goes away when I remove the \geometry{showframe} command. Seems to be a bug in geometry.
Post Reply