1

I was trying to format my report to have 2.5cm margins all around by doing:

 \documentclass[10pt,a4paper,twoside]{report}

   \usepackage{geometry}
    \geometry{verbose, tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}

but it gives me the warning:

Package geometry Warning: The marginal notes overrun the paper. Add 50.86812pt and more to the right margin.

If I remove the twoside class option from document class report, it doesn't give that warning. Can you guys give me an explanation for why this happens and a possible solution?

2

Let us try the following compilable code:

\documentclass[10pt,a4paper,twoside]{report}

\usepackage{geometry}
\geometry{%
  verbose, 
  tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm,
  showframe % <=========================================================
}

\begin{document}

Test
\newpage
Test 2
\end{document}

Please see that I used package option showframe to visualize the typing area and margins. That gives you the resulting pdf:

resulting pdf

The margins are going out of the pager size as I visualized with the red arrows ...

Now let us set the length for the margins to be 2cm (option marginpar):

\documentclass[10pt,a4paper,twoside]{report}

\usepackage{geometry}
\geometry{%
  verbose, 
  tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm,
  marginpar=2cm, % <====================================================
  showframe % <=========================================================
}

\begin{document}
Test
\newpage
Test 2
\end{document}

That compiles without your error message and gives you the following result:

result two

As you can see now the margins fits the pagersize, therefore no error message ...

To see the default marginpar you can use package layout with a little hack to display the length in mm:

\documentclass[10pt,a4paper,twoside]{report}

\usepackage{geometry}
\geometry{%
  verbose, 
  tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm,
% marginpar=2cm, % <====================================================
  showframe % <=========================================================
}

\usepackage{layout} % <=================================================
\makeatletter % length in mm! <=========================================
\renewcommand*{\lay@value}[2]{%
  \strip@pt\dimexpr0.351459\dimexpr\csname#2\endcsname\relax\relax mm%
}
\makeatother


\begin{document}
Test
\newpage
Test 2
\newpage
\layout % <=============================================================
\end{document}

with the resulting third layout page:

layout page

  • So by adding that the margin notes size is 2cm and the border between the margin nodes and the page is 0.5cm to the total of 2.5cm right border? And what is the default marginpar value? – Miguel Saraiva May 5 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.