我有一个文档使用fancyhdr
(fancy
启用了页面样式),也使用endnotes.sty
创建尾注。但是,带有尾注的页面会在页眉中插入文本“注释”,而这并不是我想要的(页眉应该只包含横幅图形)。我找不到任何关于endnotes.sty
如何在页眉中隐藏此文本的提示,有人能给出建议吗?
下面是一个tex
生成不良行为的简单脚本作为示例:
%% LyX 2.1.1 created this file.
\documentclass[english]{extarticle}
\usepackage{mathpazo}
\usepackage{helvet}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=1cm,headsep=1cm,footskip=1cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{color}
\usepackage{endnotes}
\makeatletter
\usepackage{lipsum}
\makeatother
\usepackage{babel}
\begin{document}
\title{\textcolor{blue}{Endnotes create unwanted text in the header of the
last page}}
\author{A.N. Other}
\maketitle
\subsection*{\lipsum[2]}
\lipsum[2-4]\endnote{This is an endnote}
\lipsum[5-10]
\theendnotes
\end{document}
非常感谢
答案1
endnotes.sty
有
\def\enoteheading{\section*{\notesname
\@mkboth{\MakeUppercase{\notesname}}{\MakeUppercase{\notesname}}}%
\mbox{}\par\vskip-\baselineskip}
更新了标题的标记。您可以将其重新定义为
\renewcommand\enoteheading{\section*{\notesname}\mbox{}\par\vskip-\baselineskip}
完整示例:
\documentclass[english]{extarticle}
\usepackage{mathpazo}
\usepackage{helvet}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=1cm,headsep=1cm,footskip=1cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}
\usepackage{color}
\usepackage{endnotes}
\makeatletter
\usepackage{lipsum}
\makeatother
\usepackage{babel}
\renewcommand\enoteheading{\section*{\notesname}\mbox{}\par\vskip-\baselineskip}
\begin{document}
\title{\textcolor{blue}{Endnotes create unwanted text in the header of the
last page}}
\author{A.N. Other}
\maketitle
\subsection*{\lipsum[2]}
\lipsum[2-4]\endnote{This is an endnote}
\lipsum[5-10]
\theendnotes
\end{document}
生成的文档: