如何使用删除页面的页眉或页脚memoir
?
当我说“删除”时,读作“不占用页面空间”;我想利用该空间使块更高。
(非)工作示例
\documentclass[a5paper]{memoir}
% Using a5paper to see differences more easily
\makepagestyle{myplain}
\makeevenfoot{plain}{}{}{}
\makeevenhead{plain}{}{A plain style}{\thepage}
\makeoddfoot{plain}{}{}{}
\makeoddhead{plain}{}{A plain style}{\thepage}
\setheadfoot{\baselineskip}{0pt} % <-- no effect?
\checkandfixthelayout
\begin{document}
\pagestyle{myplain}
First page. Nothing special.
\vspace*{\fill}
End of the page.
\clearpage
\pagestyle{myplain}
Second page. Compare to third page
(if your pdf viewer allows you to see pages side by side)
\vspace*{\fill}
End of the page.
\clearpage\pagestyle{plain}
Third page.
\vspace*{\fill}
End of the page.
\clearpage\pagestyle{myplain}
Fourth page.
\vspace*{\fill}
End of the page.
\end{document}
在上面的例子中,两种页面样式上的文本块具有相同的大小。
也许这与答案有关:如果我的文档没有页脚,那么不页面样式可以有一个。但在这种情况下……我是否必须删除默认页面样式?
编辑:以下是我解决这个问题的方法。我仍然收到警告,但效果是我想要的。
\documentclass[10pt,extrafontsizes,landscape,twocolumn,article]{memoir}
\usepackage{lipsum}
% Page setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Size of the block of text (height, width) %%%%%%%%%%%%%%%%%%%%%%%%%%
% A4: 29.7 cm x 21 cm
\settypeblocksize{19cm}{23.7cm}{*} % vertical, horizontal, ratio
\setheadfoot{\baselineskip}{0pt}
\setlrmargins{*}{*}{1} % left, right, ratio
\setulmargins{*}{*}{1} % upper, lower, ratio
\setlength{\columnsep}{2cm}
\checkandfixthelayout
% Page style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makepagestyle{myplain}
\makeevenhead{myplain}{\footnotesize \thepage}{}{\footnotesize Author}
\makeoddhead{myplain}{\footnotesize Author}{}{\footnotesize \thepage}
\makeevenfoot{myplain}{}{}{}
\makeoddfoot{myplain}{}{}{}
\pagestyle{myplain}
\begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
First page. Nothing special.
\vspace*{\fill}
\lipsum[1]
\vspace*{\fill}
End of the page.
\clearpage
\lipsum[4-15]
\end{document}
生成警告
Class memoir Warning: The material used in the footer is too large
(8.39996pt) for the given foot skip (0.0pt), it is recommended to
either increase the foot skip or redesign the fotoer
(in both cases you will find help in the memoir manual). on input line 41.
[1{/usr/local/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
[2]
Class memoir Warning: The material used in the footer is too large
(8.39996pt) for the given foot skip (0.0pt), it is recommended to
either increase the foot skip or redesign the fotoer
(in both cases you will find help in the memoir manual). on input line 44.
答案1
感谢@daleif 的评论!
正如 @daleif 所解释的那样,只需设置页脚的高度即可(\footskip
如第 9 页所示回忆录手册\setlength{\footskip}{9pt}
)。唯一的变化是在设置边距之后、之前的某处添加一行\checkandfixthelayout
。
\documentclass[10pt,extrafontsizes,landscape,twocolumn,article]{memoir}
\usepackage{lipsum}
% Page setup %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Size of the block of text (height, width) %%%%%%%%%%%%%%%%%%%%%%%%%%
% A4: 29.7 cm x 21 cm
\settypeblocksize{19cm}{23.7cm}{*} % vertical, horizontal, ratio
\setheadfoot{\baselineskip}{0pt}
\setlrmargins{*}{*}{1} % left, right, ratio
\setulmargins{*}{*}{1} % upper, lower, ratio
\setlength{\columnsep}{2cm}
\setlength{\footskip}{9pt}
\checkandfixthelayout
% Page style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makepagestyle{myplain}
\makeevenhead{myplain}{\footnotesize \thepage}{}{\footnotesize Author}
\makeoddhead{myplain}{\footnotesize Author}{}{\footnotesize \thepage}
\makeevenfoot{myplain}{}{}{}
\makeoddfoot{myplain}{}{}{}
\pagestyle{myplain}
\begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
First page. Nothing special.
\vspace*{\fill}
\lipsum[1]
\vspace*{\fill}
End of the page.
\clearpage
\lipsum[4-15]
\end{document}