1

I am wondering, for a document from class article with the following setup:

\documentclass[a4paper,11pt,oneside]{article}

What values should one input into fields top, right, bottom and left (in inches or points) from package geometry to recover the default margin behaviour from the document?

\usepackage[top=¿?, bottom=¿?, left=¿?, right=¿?]{geometry}

I have found the following thread but it does not seem to answer my question: Default margins for geometry package.

Auxiliary, how is can this default behaviour be checked? In particular, if I change the document type or the font size, the default behaviour might no longer be the same.

  • 2
    Did you try the approach from Werner's answer (in the question you linked)? I think it'd help? \usepackage{layouts} ... \begin{document} \pagevalues prints text and paper width/height, margins, header/footer..., values which you can then input in geometry. Combine with \usepackage{showframe} for additional (visual) validation of the settings. Repeat after changing document type or font size. – marquinho Feb 26 '22 at 18:02
  • @marquinho how can I establish a correspondence between the outputs of \pagevalues and the values for the parameters of geometry? Plus, I am not sure how to interpret the output, for example \topmargin has value -37.0pt, does that refer w.r.t. to the default value? – Daneel Olivaw Feb 26 '22 at 18:41

2 Answers2

4

Use the layouts package. For example

\documentclass[12pt]{article}
\usepackage{layouts}
\begin{document}
\begin{figure}
\currentpage
\oddpagelayouttrue
\pagedesign
\caption{Odd page layout for this document}
\end{figure}
\end{document}

will produce a diagram of the page layout and list the values of all the layout parameters.

The package provides many other facilities, such as drawing a proposed page layout.

Zarko
  • 296,517
Peter Wilson
  • 28,066
3

The geometry package has a pass option which will prevent it from changing the paper size or margins set by the document class.

\usepackage[pass]{geometry}

frabjous
  • 41,473
  • Thank you, but I am specifically interested in knowing the values for the default behaviour to benchmark my current margins against the default ones. – Daneel Olivaw Feb 26 '22 at 17:25
  • Not sure this is exact, but \usepackage[right=119pt,left=118pt,top=127pt,bottom=122pt]{geometry} seems pretty darn close for 11pt oneside article class on a4paper. – frabjous Feb 26 '22 at 17:48
  • Thank you, this works! But what are the default {geometry} settings which kick in when you leave the argument empty and you also don't have a paper size specified?

    E.g. \documentclass[10pt]{article} \usepackage[]{geometry}

    Are they set in pt, in, or some ratio, relative to something? What to put instead of [pass] to get the same exact result?

    Need that to leave it as is for now but be able to change in the future.

    – homo_loquens Jan 23 '23 at 13:09
  • 1
    Oh, I got it. This is what is [pass]ed: https://tex.stackexchange.com/a/573030/41937 – homo_loquens Jan 23 '23 at 13:17