当有一个紧凑列表(使用 paralist 包)时,右页眉会在页面中央显示页码。否则,右页眉只显示页码,这是所需的行为。更糟糕的是,当我尝试编写 MWE 时,我无法复制该行为。这只是 200 多页文档中的三四页的问题。
这是我在 MWE 中的努力(我必须使用大量文本才能将紧凑列表推送到正面页面上):
\documentclass[12pt,bindingoffset=0.4in]{bookest}
\geometry{paperwidth=5in, paperheight=8in}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{paralist}
\usepackage{fancyhdr}
\fancyhead[L]{\nouppercase {\rightmark}}
\begin{document}
\chapter{Header Issue}
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\blindtext
\section{tomato}
\begin{multicols}{2}
\begin{compactenum}
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\item The type of employment;
\item The probation period;
\end{compactenum}
\end{multicols}
\blindtext
\blindtext
\blindtext
\end{document}
另外,由于不允许使用多个图形:
第三:
答案1
你是不是使用fancyhdr
直到你发出\pagestyle{fancy}
。问题在于bookest
与 的不良交互multicols
,但可以通过fancyhdr
正确启动来解决:
\documentclass[12pt,bindingoffset=0.4in]{bookest}
\geometry{paperwidth=5in, paperheight=8in}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{paralist}
\usepackage{fancyhdr}
\fancyhf{}
\fancyhead[LO]{\slshape\nouppercase {\rightmark}}
\fancyhead[RO]{\thepage}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{\slshape\nouppercase{\leftmark}}
\pagestyle{fancy}
\setlength{\headheight}{14.5pt}
\begin{document}
仅是序言,其余部分与您的示例一样。
bookest
您可以通过以下方式使用默认设置获得正确的行为
\documentclass[12pt,bindingoffset=0.4in]{bookest}
\geometry{paperwidth=5in, paperheight=8in}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage{paralist}
\setevenhead{\parbox[b]{\textwidth}{\evenheadtext \vskip 5pt \makeheadrule}}
\setoddhead{\parbox[b]{\textwidth}{\oddheadtext \vskip 5pt \makeheadrule}}
\begin{document}
问题在于bookest
使用\vbox
,它采用 的当前值\hsize
来设置段落宽度;当处于环境中间时multicols
,此参数不是完整文本宽度。使用适当的 LaTeX 构造,使用\parbox
,问题就解决了。