我遇到了一个问题,较长的\section
标题会与自身重叠。我正在使用memoir
类,它同时打印在页面开头和页面本身中(见屏幕截图),在我的情况下它们重叠了。
有人知道如何解决这个问题吗?
答案1
以下是重现上述问题的最小文档:
\documentclass{memoir}
\usepackage{lipsum}
\begin{document}
\chapter{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]
\end{document}
正如 Marco 在评论中所建议的那样,一种可能的解决方案是使用分段命令的可选参数来防止标题过长:
\documentclass{memoir}
\usepackage{lipsum}
\begin{document}
\chapter[Title in headings and in ToC]{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]
\end{document}
如果出于某种原因,您必须在标题中保留长标题(我不建议对如此长的标题这样做),那么您可以增加长度\headheight
;但是,这会在不包含长标题的页面中产生非常糟糕的结果(顶部有太多空白),您还必须修改底部边距。以下代码说明了长度的变化和获得的糟糕结果:
\documentclass{memoir}
\usepackage{lipsum}
\begin{document}
{
\setlength{\headheight}{9\onelineskip}
\chapter{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]
}
\end{document}
请注意,我在示例中使用的花括号使更改保持本地化。
答案2
MWE,很简单。你的头部高度太小,你的日志文件中应该会对此发出警告。这里有一个 MWE 来修复它。我会使用其他地方建议的可选标题文本。
\documentclass[a4paper]{memoir}
\setheadfoot{3\onelineskip}{\footskip}
\checkandfixthelayout
\begin{document}
\section{this is a verry very long header that has no meaning what so
ever but is jsut used to illustrate a point made in a posting online}
\end{document}