在具有不同布局的文档集中显示布局标记

在具有不同布局的文档集中显示布局标记

是否有任何包允许在布局多次变化的文档中显示布局标记?我正在使用这些工具在整个文档中geometry发出\newgeometry命令,但它不会更新显示的布局,showframe包或类的工具也不会更新memoir

编辑:正如 Werner 指出的那样,showframe该包的选项geometry可以正确显示通过发出\newgeometry命令设置的任何更新的页面布局。

我的问题出在,我发出\pagecolor命令时,页面颜色似乎隐藏了根据geometry包排版的布局线。我的困惑只会加剧,因为showframe包布局线没有被页面颜色隐藏(尽管包在某些页面上的布局是错误的)。所以,这一切都归结为与页面颜色的冲突。

即使我使用 的geometry选项showframe进行“调试”结束,并且我并不介意在开发的那个阶段没有页面颜色,但是是否可以覆盖此问题并同时显示页面布局geometry以及页面颜色?

顺便问一下,鉴于该问题实际上与最初发布的问题不同,我是否应该提出一个新问题?

答案1

回应您的请求“我感兴趣的不是裁切标记,而是不同的布局区域,例如文本块、页眉和页脚以及边距注释。”

要查看不同的页面尺寸,我查阅了“正常布局”图像“Killmargins” 包?

\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}

在此处输入图片描述

经过编辑,将每个文本区域呈现为不同的钩子,并采用不同的颜色饱和度。

REEDITED 考虑了 2018.12.01 TeX 内核的改变\smash

答案2

showframe新的页面布局通过以下选项显示geometry

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

在此处输入图片描述

相关内容