15

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}?

user
  • 4,745
  • 1
    the package is a different package. See here https://ctan.org/pkg/showframe. – Ulrike Fischer Aug 18 '17 at 16:48
  • 4
    showframe just shows the frame, whereas geometry's main usage is to customize the page layout. Compare the results of \documentclass{article}\usepackage{showframe}\begin{document}test\end{document} with \documentclass{article}\usepackage[showframe]{geometry}\begin{document}test\end{document} – Skillmon Aug 18 '17 at 16:48

2 Answers2

8

if you like to see page layout determined by package geometry than you can see it with adding option showframe to package.

In case, when page layout is determined by \documentclass{...} or some other way and you are curious how page layout looks, then you can see it with adding package showframe, which not interfere in layout design. with this package you can also change border thick and color, for example:

%-------------------------------------- only for show page layout
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.25pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
Zarko
  • 296,517
7

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.

Joe Corneli
  • 4,340
Mico
  • 506,678