如何從單一頁面中刪除數字,但標題仍保持不變?我想刪除該號碼,並且我嘗試過的所有方法,標題也被刪除,或者標題被頁碼替換。
我fancyhdr
通常用來定義頁首和頁尾。
\documentclass{article}
\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\lhead{name}
\chead{}
\rhead{affiliation}
\lfoot{}
\cfoot{}
\rfoot{\thepage}
\begin{document}
\thispagestyle{empty} %removes both header and footer (dont want that)
\newpage
\pagestyle{headings} %footer is gone, but header shows the page number,
and not what i have set the header to be
\end{document}
答案1
您可以定義一個空腳的新頁面樣式:
\documentclass{article}
\usepackage{fancyhdr,lipsum}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\lhead{name}
\chead{}
\rhead{affiliation}
\lfoot{}
\cfoot{}
\rfoot{\thepage}
\fancypagestyle{zzz}{
\lhead{name}
\chead{}
\rhead{affiliation}
\lfoot{}
\cfoot{}
\rfoot{}
}
\begin{document}
\thispagestyle{zzz} % empty foot
\lipsum
\newpage
and not what i have set the header to be
\end{document}