Sorry, this has probably been tried more than once, but I ended up with the following broken code below.
Briefly, I attempted to:
- define a
\instituteand\supervisorcommand; - redefine the
\maketitlecommand (taking into account the provided institute/supervisor).
\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{wallpaper} % background figure on title page
% copied from Pandoc default template
\providecommand{\institute}[1]{}
\makeatletter
% copied from https://tex.stackexchange.com/a/196650/95423
\newcommand{\@supervisor}{}
\newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}}
\makeatother
\title{The Limits of Individual Plasticity}
\author{Edward \textsc{Prendick}}
\institute{Island of Doctor Moreau}
\supervisor{Dr. \textsc{Moreau}}
\date{1896}
\makeatletter
\def\maketitle{%
\begin{titlepage}%
\begin{center}%
\ThisULCornerWallPaper{0.2}{logo-univ}\par
\vspace*{2.5cm}
\huge\@title
\vspace{1.5cm}
\Large\@author
\vspace{1.5cm}
\normalsize
A thesis for the degree of PhD
\vfill
\normalsize
Supervised by:\\
\@supervisor\\
\vspace{0.8cm}
%\includegraphics[width=0.4\textwidth]{logo/logo-lab}
\normalsize
\@institute
\@date
\end{center}%
\end{titlepage}%
}
\makeatother
\begin{document}
\maketitle
\end{document}
Would anyone tell me why it fails with:
! Undefined control sequence.
\maketitle ...} \par \par \normalsize \@institute
\par \@date \par \end {cen...
l.58 \maketitle
?

\par! Could you tell me why we need the two newcommand, first\@supervisor, then\supervisor? – PlasmaBinturong Apr 21 '20 at 16:35newcommandthat redefines\@supervisorto expand to the argument given to\supervisor– Alessandro Cuttin Apr 21 '20 at 16:41\institute(as in my question). Does it mean that the document class handles it natively? For example I think it works for beamer. – PlasmaBinturong Apr 21 '20 at 16:45\providecommanddefines a new command if it isn't already defined – Alessandro Cuttin Apr 21 '20 at 16:53