2

My university has a titlepage template that they want us to use for the masters thesis.

However, it adds an additional empty page before and after the titlepage (gives two afterwards, so one unwanted). I found out that short titles dont have the problem. Any ideas how to fix it? It doesn't help if I break my title manually.

Also, the name of the university ends up on the third page sometimes...

The sty file we are given is:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{MA_Titlepage}[2010/04/25]


\newcommand*{\betreuer}[1]{\def\@betreuer{#1}}
\betreuer{}
\newcommand*{\ausarbeitungstyp}[1]{\def\@ausarbeitungstyp{#1}}
\ausarbeitungstyp{}
\newcommand*{\geburtsdatum}[1]{\def\@geburtsdatum{#1}}
\geburtsdatum{}
\newcommand*{\geburtsort}[1]{\def\@geburtsort{#1}}
\geburtsort{}
\newcommand*{\institut}[1]{\def\@institut{#1}}
\institut{}
\newcommand*{\authornew}[1]{\def\@authornew{#1}}
\authornew{}

\renewcommand\maketitle{\begin{titlepage}
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil

\begin{center}%

\parbox{10cm}{\begin{center}\Huge\bfseries \@title \par\end{center}}\\
\vspace{1em}
{\Large
\vspace{1em}
\@authornew}\\
\vspace{1em}
Born   \@geburtsdatum \ in \@geburtsort\\
\vspace{1em}
{\large \@date}
\vspace{15em}

{\large \@ausarbeitungstyp}\\
\vspace{1em}
{\large \@betreuer}\\
\vspace{1em}
\centerline{{\large\sc \@institut}}
\vspace{15em}

\centerline{{\large\sc Mathematische Fakult\"at der}}
\vspace{1em}
\centerline{{\large\sc Universitaet Nordpol}}

\end{center}

\vfil\null
\clearpage
\thispagestyle{empty}\mbox{}
\clearpage
\pagenumbering{arabic}

\end{titlepage}

  \setcounter{footnote}{0}%
  \global\let\maketitle\relax
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}


\endinput

and I am currently using it via

\documentclass[11pt, a4paper, UKenglish]{article}

\usepackage[UKenglish]{babel}
\usepackage{MA_Titlepage}

\authornew{X Y}
\geburtsdatum{1st April 1900}
\geburtsort{New York, U.S.A.}
\date{\today}

\betreuer{Advisor: Prof. Dr. Z Z}
\institut{Mathematical Institute}

\title{This is only an example}

\ausarbeitungstyp{Master's Thesis  Mathematics}

\begin{document}

    \maketitle

\end{document}

If I replace "This is only an example" by "example" I get what I want.

Bananach
  • 627

2 Answers2

6

Hmm an "interesting" set of macros:-)

Assuming you don't want to get into discussions about changing your institution's template you could do

\documentclass[11pt, a4paper, UKenglish]{article}

\usepackage[UKenglish]{babel}
\usepackage{MA_Titlepage}

\authornew{X Y}
\geburtsdatum{1st April 1900}
\geburtsort{New York, U.S.A.}
\date{\today}

\betreuer{Advisor: Prof. Dr. Z Z}
\institut{Mathematical Institute}


\title{This is only an example}


\ausarbeitungstyp{Master's Thesis  Mathematics}

\begin{document}

\noindent\begin{minipage}{\textwidth}
\vspace*{-60pt}
    \maketitle
\end{minipage}

\end{document}
David Carlisle
  • 757,742
  • Thanks, but I would actually prefer making a minor change to the template (as long as the fonts and fontsizes stay the same) than having that ugly \vspace in MY text :) Tell me what you think is off in the template and it shall be changed :) – Bananach Dec 17 '14 at 21:11
  • @Bananach I started do do that but basically it needs rewriting, It shouldn't have \null it shouldn't have \vfill it shouldn't have \centerline it shouldn't have \sc it probably shouldn't have the two \clearpage it shouldn't have {\large..} without a paragraph break before the } and that's just a first look:-) Obviously you could push the minipage and vspace that I suggest here into the start and end of the definition of \maketitle in the package, so your document just has \maketitle – David Carlisle Dec 17 '14 at 21:17
  • 1
    Hm, I will talk to my advisor about using a different template/changing the official template. I guess there is no point in all students figuring the changes out themselves – Bananach Dec 17 '14 at 21:22
4

The command \null\vfil seems to be wrong there, but the template looks a little bit weird, in my point of view. (See What is \null and when do we need to use it? on \null please)

Instead of directly editing the template (well, one should do that anyway) a quick solution is to patch out the \null\vfil command using \patchcmd from etoolbox package.

\documentclass[11pt, a4paper, UKenglish]{article}

\usepackage[UKenglish]{babel}
\usepackage{MA_Titlepage}

\usepackage{etoolbox}

\patchcmd{\maketitle}{\null\vfil}{}{}{}


\authornew{X Y}
\geburtsdatum{1st April 1900}
\geburtsort{New York, U.S.A.}
\date{\today}

\betreuer{Advisor: Prof. Dr. Z Z}
\institut{Mathematical Institute}



\title{This is only an example}

\ausarbeitungstyp{Master's Thesis  Mathematics}

\begin{document}

    \maketitle

\end{document}
  • Thanks for the suggestion, I will just remove it in the template. What else do you think is off? Also if you say I can just remove the two commands, do you know what they were supposed to be good for? – Bananach Dec 17 '14 at 21:15