I am writing some thesis in Latex and I use some template. At the first page I would like to add my supervisor. In one file there is possibility to add it. There is macro like: \college{}; \author{}; \title{}, but there are no for supervisor something like: "\supervisor{}". Do you know what macro I can use to add supervisor? Thanks.

I am using this template:


There is the file "thesis-info.tex", where I can define \college{}; \author{}; \title{}, etc., but I don't know how to add supervisor...?

  • 10
    Unfortunately we aren't able to read minds ;) Which template do you use? Please provide us with an minimal working example, so that we can help you. – Hackbard_C Aug 16 '14 at 11:09
  • I added link to latex template. – Dawid Aug 16 '14 at 12:12
  • 1
    Thank you! It would be good, if you could also provide a minimal working example as this leaves still a lot of effort to the community. Have a look into your PhDThesisPSnPDF.cls whithin the Macro Definitions and Title Page (\renewcommand{\maketitle}), there you should be able to define your \supervisor{} via copy&paste&rename. – Hackbard_C Aug 16 '14 at 12:55
  • Please, edit the question or close it because the link to drive is broken. – gvgramazio May 13 '18 at 17:42

This is an attempt and works. Please follow the following steps to establish a working directory.

  1. Download all the template into a directory and save the testfile.tex shown below into the same directory.
  2. Open up the class file PhDThesisPSnPDF.cls (a new *.cls name is preferred.)
  3. Add the following lines to line 500 (right after the macro degree) in the -- macro definition section.

    \newcommand{\@supervisor}{} \newcommand{\supervisor}[1]{\renewcommand{\@supervisor}{#1}}

  4. Also insert following lines to line 575 (right after the author position) in the -- title page section (maketitle).

    {\Large \bfseries{\@supervisor} \par} \vspace*{1ex}

  5. Compile textfile.tex

enter image description here

Code: testfile.tex



% Terms from macro definition
\title{A Test on How to Add Supervisor}
\dept{Electrical Engineering}
\author{Candidate Author}
\supervisor{Prof. A.B. Supervisor}
  • Thanks, could you please explain why there are \@supervisor and \supervisor? What do both definitions do? – PlasmaBinturong Apr 21 '20 at 14:48

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.