[Tex/LaTex] the difference between \usepackage{showframe} and \usepackage[showframe]{geometry}

geometrymargins

Some times I see the use of \usepackage{showframe}, but other times I see the use of \usepackage[showframe]{geometry}. What is the difference between using one or the other? i.e., When I should use \usepackage{showframe} instead of \usepackage[showframe]{geometry}?

Best Answer

If you run

\documentclass[letterpaper]{article}
\usepackage{showframe}
\begin{document}
\the\textwidth; \the\textheight
\end{document}

framelines around the text-, header-, and footer-blocks will be drawn, and the text output will be

345.0pt; 550.0pt

That's roughly 4.77" and 7.61", or 12.1cm and 19.3cm. The same dimensions would obtain if the showframe package weren't loaded at all.

If, on the other hand, you run

\documentclass[letterpaper]{article}
\usepackage[showframe]{geometry}
\begin{document}
\the\textwidth; \the\textheight
\end{document}

you'll still get the framelines, but the textblock parameters are given by

430.00462pt; 556.47656pt

That's roughly 5.95" and 7.70", or 15.1cm and 19.6cm.

There may also be differences in terms of the heights and widths of the header, footer, and margin blocks, but I haven't checked.