4

With geometry, I want to center text body and margin notes together, namely to center textwidth + marginparsep + marginparwidth parts of horizontal elements.

I think one option would be to include margin notes into total body by includemp and center the total body. But that would screw up the current layout of my document and I have to adjust hscale all over again.

So how could I do it?

Naitree
  • 575

1 Answers1

4

You can set one of the margins to be short by \marginparsep + \marginparwidth:

enter image description here

\documentclass{article}
\usepackage{geometry}
\geometry{
  paper=letterpaper,
  margin=2in,
  inner=\dimexpr2in-\marginparsep-\marginparwidth,
  twoside,% Optional
  showframe% Just for this example
}

\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. \marginpar{This is a margin paragraph.}
Cras a lorem eget mauris sagittis vehicula et nec nunc. 
Phasellus pulvinar purus nec risus varius, quis mollis mi porta.

\newpage

Lorem ipsum dolor sit amet, consectetur adipiscing elit. \marginpar{This is a margin paragraph.}
Cras a lorem eget mauris sagittis vehicula et nec nunc. 
Phasellus pulvinar purus nec risus varius, quis mollis mi porta.

\end{document}
Werner
  • 603,163