3

Is there any package that allows for the display of layout marks within a document where the layout changes several times throughout? I'm using the geometry facilities to issuing \newgeometry commands throughout my document, but it doesn't update the displayed layout and neither does the showframe package or the facilities of the memoir class.

EDIT: As Werner has pointed out, the showframe option of the geometry package displays correctly any updated page layout set by issuing \newgeometry commands.

My trouble came out of the fact that I'm issuing also \pagecolor commands and the page color seems to be hiding the layout lines typeset according to the geometry package. My confusion only worsened because the showframe package layout lines were not hidden by the page color (the package got the layout wrong on some pages, though). So, it all boils down to a conflict with the page color.

Even though I'm using geometry's showframe option for "debugging" ends, and I don't mind to have no page color at that stage of development, is it possible to override this problem and have at the same time both the page layout displayed by geometry as well as the page colored?

Btw, should I open a new question given that the problem is actually different from the originally posted one?

8
  • Do you want crop marks? ctan.org/pkg/crop
    – Sigur
    Commented Feb 1, 2014 at 13:09
  • @Sigur: It's not crop marks that I'm interested in, but the different layout areas, such as textblock, header and footer, and margin notes.
    – Marcos
    Commented Feb 1, 2014 at 13:20
  • Maybe this: ctan.org/pkg/layout or try to find layout on CTAN ctan.org/search
    – Sigur
    Commented Feb 1, 2014 at 13:24
  • @Sigur: I know the package, but I found it was maybe just too much for my current needs. I was looking for a more simple alternative.
    – Marcos
    Commented Feb 1, 2014 at 14:59
  • @Marcos: Can you create a minimal working example (MWE) that replicates your current problem? If I create a minimal example the output showframe adjusts to the \newgeometry...
    – Werner
    Commented Feb 14, 2014 at 5:28

2 Answers 2

1

In response to your request "It's not crop marks that I'm interested in, but the different layout areas, such as textblock, header and footer, and margin notes."

To see the different page measures, I consulted the "Normal Layout" image at "Killmargins" package?

\documentclass{article}
\usepackage{everypage}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{calc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{This is also a header test}
\fancyfoot[C]{This is also a footer test}
\AddEverypageHook{\hbox{\color{blue!40}\smash{\hspace{\oddsidemargin}%
  \rule[-\textheight-\headsep-\headheight-\topmargin]{\textwidth}{\textheight}%
}}}
\AddEverypageHook{\hbox{\color{blue!30}\smash{\hspace{\oddsidemargin}%
  \rule[-\headheight-\topmargin]{\textwidth}{\headheight}%
}}}
\AddEverypageHook{\hbox{\color{blue!20}\smash{\hspace{\oddsidemargin}%
  \rule[-\textheight-\headsep-\headheight-\topmargin-\footskip]{\textwidth}{\headheight}%
}}}
\AddEverypageHook{\hbox{\color{blue!10}\smash{\hspace{\oddsidemargin}%
  \hspace{\textwidth}\hspace{\marginparsep}%
  \rule[-\textheight-\headsep-\headheight-\topmargin]{\marginparwidth}{\textheight}%
}}}
\begin{document}
\lipsum[1]\marginpar{this is a margin test}
\lipsum[2-7]
\end{document}

enter image description here

EDITED to present each text region as a different hook, and in a different color saturation.

REEDITED to account for the 2018.12.01 TeX kernel changes to \smash.

0

A new page layout is shown by the showframe option of geometry:

\documentclass[a5paper]{article}
\usepackage[showframe]{geometry}
\usepackage{blindtext}
\begin{document}
\blindtext[4]
\newgeometry{rmargin=5cm}
\blindtext[4]
\restoregeometry
\blindtext[4]
\end{document}

enter image description here

1
  • Please, see my EDIT. I was confused about the actual origin of the problem. Should I open a new question?
    – Marcos
    Commented Mar 4, 2014 at 10:34

You must log in to answer this question.

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