4

I'm trying to add a custom footer to the title page of my thesis, in order to insert some text that is required by my university. I'm using fancyhdr to do so. However, the footer appears on the second page and not the first. How can I fix this?

\documentclass[11pt,a4paper,twoside]{book}

\usepackage{fancyhdr}

\usepackage{lipsum}

\fancypagestyle{titlepagestyle}
{
   \fancyhf{}
   \fancyfoot[C]{\emph{This text needs to appear on the title page}}
   \renewcommand{\headrulewidth}{0 mm}
}

\pagestyle{plain} 

\begin{document}

\title{The title}

\author{The author}

\maketitle
\thispagestyle{titlepagestyle}


\mainmatter

\chapter{The chapter heading}

\lipsum[1]

\end{document}

I've also tried using adding a footnote instead of using fancyhdr, with the same result.

2

You can patch the \maketitle like

\usepackage{etoolbox}

\patchcmd{\maketitle}
  {\end{titlepage}}
  {\thispagestyle{titlepagestyle}\end{titlepage}}
  {}{}

Code:

\documentclass[11pt,a4paper,twoside]{book}

\usepackage{fancyhdr}

\usepackage{lipsum}
\usepackage{etoolbox}

\patchcmd{\maketitle}
  {\end{titlepage}}
  {\thispagestyle{titlepagestyle}\end{titlepage}}
  {}{}

\fancypagestyle{titlepagestyle}
{
   \fancyhf{}
   \fancyfoot[C]{\emph{This text needs to appear on the title page}}
   \renewcommand{\headrulewidth}{0 mm}
}

\pagestyle{plain}

\begin{document}

\title{The title}

\author{The author}
%\thispagestyle{titlepagestyle}
\frontmatter
\maketitle
\mainmatter

\chapter{The chapter heading}

\lipsum[1]

\end{document}

enter image description here

2

You really don't have to define a new page style for that: the titling package is here for customising title pages. I used the geometry package with option showframeto help visualise the result:

\documentclass[11pt,a4paper,twoside]{book}

\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{titling}
\usepackage[showframe, nomarginpar]{geometry}
\title{The title}
\author{The author}
\predate{\centering}
\postdate{\vfill\hfill\emph{This text needs to appear on the title page}\hfill}
\usepackage{lipsum}
\pagestyle{plain}

\begin{document}

\maketitle

\mainmatter

\chapter{The chapter heading}

\lipsum[1]

\end{document}

enter image description here

1

A second alternative without patching is use of local footnote without numbering.

enter image description here

Code

\documentclass[11pt,a4paper,twoside]{book}
\usepackage{fancyhdr}
\usepackage{lipsum}  
\fancypagestyle{titlepagestyle}
{
   \fancyhf{}
   \fancyfoot[C]{}%\emph{This text needs to appear on the title page}}
   \renewcommand{\headrulewidth}{0 mm}
}


\pagestyle{plain}     
\begin{document}

\begingroup
\title{The title}
\renewcommand{\thefootnote}{}
\author{The author
\footnote{\hspace{2cm}
This text needs to appear on the title page}}
\maketitle
\endgroup

\thispagestyle{titlepagestyle}
\mainmatter

\chapter{The chapter heading}

adadasdf\footnote{another footnote}
\lipsum[1]

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