2

I've spent the best part of an hour trying to make a footer/header on my title page and I'm getting so frustrated, any help appreciated.

I just need my university name at the top and my supervisor at the bottom. I've tried various things, the only thing that's worked was overriding the {empty} style with a head and footer. But then when I try to make an abstract paragraph on the next page, its putting the same header and footer in there. I think its because the abstract uses \thispagestyle{empty} as well, but I don't know how to override it. Any help appreciated.

\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

I think creating a custom titlepage is more suited than to fiddle with page headers and footers.

\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}
0

As you correctly say, the page style that is used in the report class on the page with a title is empty. You can redefine this using \fancypagestyle{empty}{....}. In order to restrict these effects to just the title page you should put the command in the body of the document, rather than the preamble, and enclose it together with the title page itself in a group \bgroup...\egroup:

Sample output

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.