自訂頁首和頁尾

自訂頁首和頁尾

我正在寫我的學士論文,首頁的要求是:

  • 標題中 - 機構名稱
  • 中間 - 論文的標題
  • 頁尾 - 城鎮和年份

我怎樣才能做到這一點?

我嘗試使用該fancyhdr套件並設法更改標題,但這僅適用於我的論文中的頁面,而不適用於第一頁。標題不必加底線。另外,在接下來的頁面上,我不希望出現任何標題。

這是我到目前為止所擁有的:

\documentclass[a4paper,10pt]{report}
\usepackage{fancyhdr}

\pagestyle{fancy}
\lhead{}
\chead{Institution}
\rhead{}
\title{Title}
\author{Author}

\begin{document}
\end{document}

答案1

嘗試這個:

\documentclass[a4paper,10pt]{report}
\usepackage{fancyhdr}

% \pagestyle{fancy}
\fancypagestyle{empty}{%
    \fancyhf{}% removes h/f
    \fancyhead[c]{\Huge{Instituion}}% Your inst name
    \fancyfoot[r]{Town and year}
}
\renewcommand{\headrulewidth}{0pt}% removes header line

\title{Title}
\author{Author}

\begin{document}
\maketitle
    
\begin{abstract}
\thispagestyle{plain}
    Here goes your abstract
\end{abstract}
\end{document}

答案2

或者這樣

\pagestyle{fancy} % options: empty , plain , fancy

\renewcommand{\headrulewidth}{0} % remove the line

\lhead{}\chead{Institution}\rhead{}
\lfoot{}\cfoot{}\rfoot{Town \& Year}

相關內容