0

I am trying to mimic a common textbook/study guide typesetting where every page's body (not header nor footer) have a "Notes" area on the outside margin. I have been looking at geometry, but it is non-native to have the header be text + margin. I copied the "includeall" layout in the geometry package documentation in the section "Body Size", and then a modification of that showing what I am looking for. The red text "Notes" would be great to include at the top of every page, but I can probably do that as part of the header as a floating text box, if necessary.

Original Page Layout from package Geometry with header and footer set to textwidth

desired page layout modified from other image with header and footer spanning entire non printing margin width

3
  • Note: I did manage to find "tufte-book" layout that does do a wonderful job of doing this. Although it does a lot more than just reset the body text (moving table captions, for instance). Hard to find documentation for that package, as well. Sep 16, 2022 at 18:02
  • 1
    Do you know the texdoc program? Just try from the OS prompt to run texdoc tufte or go to ctan.org/pkg/tufte-latex
    – Fran
    Sep 16, 2022 at 19:33
  • Try also texdoc caesar or search about caesar_book. Example here.
    – Fran
    Sep 16, 2022 at 19:42

1 Answer 1

0

You can use package fancyhdr:

\documentclass{book}
\usepackage[includemp]{geometry}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{plain}{\fancyhead{}}
\fancyheadoffset[LE,RO]{\dimexpr\marginparsep+\marginparwidth\relax}
\fancyfootoffset[LE,RO]{\dimexpr\marginparsep+\marginparwidth\relax}
\renewcommand{\footrulewidth}{\headrulewidth}% to show the width of footer

\usepackage{lipsum}% dummy text
\begin{document}
\chapter{Foo}
\lipsum
\lipsum[1]\marginpar{\raggedright\lipsum[2]}
\lipsum
\end{document}

enter image description here

Or you could use package scrlayer-scrpage:

\documentclass{book}
\usepackage[includemp]{geometry}

\usepackage[
  headwidth=textwithmarginpar,
  headsepline,plainheadsepline,% to show the width of header
  footwidth=textwithmarginpar,
  footsepline,plainfootsepline% to show the width of footer
]{scrlayer-scrpage}

\usepackage{lipsum}% dummy text

\begin{document}
\chapter{Foo}
\lipsum
\lipsum[1]\marginpar{\raggedright\lipsum[2]}
\lipsum
\end{document}

enter image description here

Then you could add layers for the margin pars:

\documentclass{book}
\usepackage[includemp]{geometry}

\usepackage[
  headwidth=textwithmarginpar,
  headsepline,plainheadsepline,% to show the width of header
  footwidth=textwithmarginpar,
  footsepline,plainfootsepline% to show the width of footer
]{scrlayer-scrpage}

\DeclareNewLayer[
  oddpage,
  background,
  textarea,
  addhoffset=\dimexpr\textwidth+\marginparsep,
  width=\marginparwidth,
  mode=picture,
  contents=\putUL{\raisebox{\dp\strutbox}{Notes:}}%
    % draw marginpar border:
    \putLL{\line(1,0){\LenToUnit{\layerwidth}}}%
    \putLR{\line(0,1){\LenToUnit{\layerheight}}}%
    \putUR{\line(-1,0){\LenToUnit{\layerwidth}}}%
    \putUL{\line(0,-1){\LenToUnit{\layerheight}}}%
]{odd.marginpar}

\DeclareNewLayer[
  evenpage,
  background,
  textarea,
  addhoffset=\dimexpr-\marginparsep-\marginparwidth,
  width=\marginparwidth,
  mode=picture,
  contents=\putUL{\raisebox{\dp\strutbox}{Notes:}}%
    % draw margin par border:
    \putLL{\line(1,0){\LenToUnit{\layerwidth}}}%
    \putLR{\line(0,1){\LenToUnit{\layerheight}}}%
    \putUR{\line(-1,0){\LenToUnit{\layerwidth}}}%
    \putUL{\line(0,-1){\LenToUnit{\layerheight}}}%
]{even.marginpar}
\AddLayersToPageStyle{scrheadings}{odd.marginpar,even.marginpar}
\AddLayersToPageStyle{plain.scrheadings}{odd.marginpar,even.marginpar}

\usepackage{lipsum}% dummy text
\begin{document}
\chapter{Foo}
\lipsum
\lipsum[1]\marginpar{\raggedright\lipsum[2]}
\lipsum
\end{document}

enter image description here

1
  • This is great! I had been trying to play with fancyhdr and it always put the header inside the textwidth. I will try this out with my more complicated document. Sep 21, 2022 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .