
我花了一個小時的大部分時間試圖在我的標題頁上製作頁腳/頁眉,但我感到非常沮喪,感謝任何幫助。
我只需要頂部是我的大學名稱,底部是我的導師。我嘗試了各種方法,唯一有效的方法是{empty}
用頁首和頁腳覆蓋樣式。但是,當我嘗試在下一頁上建立一個抽象段落時,它會在其中放置相同的頁首和頁尾。我認為這是因為抽像\thispagestyle{empty}
也使用了,但我不知道如何覆蓋它。任何幫助表示讚賞。
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{fancyhdr}
\pagestyle{plain}
\fancyhf{}
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0.4pt}}
\fancyhead[L]{\iffloatpage{}{University}}
\fancyfoot[C]{\iffloatpage{}{Supervisor}}
\begin{document}
\title{\textbf{Title here}}
\author{My name}
\maketitle
\thispagestyle{fancy}
\newpage
\begin{abstract}
Abstract goes here....
\end{abstract}
\end{document}
答案1
我認為建立自訂標題頁比擺弄頁首和頁尾更適合。
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\begin{document}
\begin{titlepage}
University
\vfill
\begin{center}
{\LARGE\bfseries Title here \bigbreak}
{\large My name \medbreak}
\today
\end{center}
\vfill
Supervisor
\end{titlepage}
\begin{abstract}
Abstract goes here....
\end{abstract}
\end{document}
答案2
report
正如您所說,帶有標題的頁面上的類別中使用的頁面樣式是empty
。您可以使用重新定義它\fancypagestyle{empty}{....}
。為了將這些效果限制在標題頁上,您應該將命令放在文件的正文中,而不是序言中,並將其與標題頁本身一起包含在一個群組中\bgroup...\egroup
:
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{fancyhdr}
\begin{document}
\bgroup
\fancypagestyle{empty}{\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[L]{University}
\fancyfoot[C]{Supervisor}}
\title{\textbf{Title here}}
\author{My name}
\maketitle
\newpage
\egroup
\begin{abstract}
Abstract goes here....
\end{abstract}
Text.
\end{document}