【问题标题】:Remove Chapter title from header on all pages, latex book class从所有页面的标题中删除章节标题,乳胶书类
【发布时间】:2020-09-25 18:27:15
【问题描述】:

已编辑以包含可重现的示例。

所以,我发现很多人询问如何从后续页面的标题中添加章节标题,但我需要相反。我正在使用花哨的页眉,但除了从页眉中删除的页码之外需要所有内容(页面需要位于每个页面的右上角)。我使用的代码从每章的第一页中删除了标题,但每个后续页面的左侧标题中都有章节名称。我正在使用\documentclass[12pt,oneside]{book}。 下面是头代码:

\documentclass[12pt,oneside]{book}
\usepackage{fancyhdr}            % Permits header customization. See header section below.
\fancypagestyle{plain}{
    \lhead{}
    \fancyhead[R]{\thepage}
    \fancyhead[L]{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyfoot{}
}

\begin{document}
\chapter{Starting Here}
Some stuff
\newpage
New stuff

\end{document}

我必须提交具有特定格式要求的文档,并希望继续使用 fancyhdr 包。非常感谢任何帮助。

【问题讨论】:

标签: latex


【解决方案1】:

当您的 MWE 加载 fancyhdr 包时,您实际上并没有将它用于普通页面,因为没有 \pagestyle{fancy} 或类似的。这意味着您的代码只自定义普通页面,就像它们用于章节的第一页一样。

如果您也想自定义普通页面:

\documentclass[12pt,oneside]{book}
\usepackage{fancyhdr}            % Permits header customization. See header section below.
\fancypagestyle{plain}{
    \lhead{}
    \fancyhead[R]{\thepage}
    \fancyhead[L]{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyfoot{}
}

\pagestyle{fancy}
\fancyhead[R]{\thepage}
\fancyhead[L]{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}


\begin{document}
\chapter{Starting Here}
Some stuff
\newpage
New stuff

\end{document}

【讨论】:

  • 非常感谢!这对更好地了解乳胶非常有帮助!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-07
  • 1970-01-01
相关资源
最近更新 更多