# Using \line Inside of \title

I am currently working on formatting a title page for my MSc thesis and am having a hard time getting some lines over and under my title to line up.

Here is what I have so far:

\linethickness{0.05cm}

\title{\line(1,0){450} \\ MSc Thesis \line(1,0){450}}

\author{\Large John Smith \\ \normalsize Supervisor: Dr. John Smith}

\maketitle


As you can see from the picture, the bottom line is further from the title than the top line and I cant figure out how to fix it. Does anyone have any suggestions?

Thanks!

The titling package has several tools to customise the layout of title pages:

\documentclass[a4paper, twoside, 11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{titling}
\makeatletter
\def\supervisor#1{\gdef\@supervisor{#1}}
\supervisor{John Smith, Esq.}
%
\setlength{\droptitle}{2cm}
\maketitlehooka{\thispagestyle{empty}}
\pretitle{\noindent\rule{\textwidth}{0.5mm }\vspace*{3ex}\par\centering\bfseries\LARGE}
\title{MSc Thesis}
\posttitle{\vspace{2ex}\par\rule{\textwidth}{0.5mm}}
\preauthor{\bigskip\begin{center}\Large}
\author{Jack Smith}
\postauthor{\medskip\par\normalsize Supervisor: \@supervisor\par\end{center}}
\predate{\bigskip\begin{center}}
\postdate{\end{center}\cleardoublepage}
\makeatother

\begin{document}

\maketitle

Blablabla

\end{document}


I think that it's better to redefine the environment. In this way you can define a new command for supervisor and don't use author for both you and the supervisor. Also you have more control over the page.

You could create commands like \title, \author, etc... with:

\makeatletter
\newcommand{\@supervisor}{}
\makeatother


You can set the supervisor with \supervisor{Dr. John Smith} and you can use its value with \@supervisor just like \title, \author and similar.

The original definition of the title page is through the titlepage environment.

\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let \footnote \thanks
\null\vfil
\vskip 60\p@
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
{\large
\lineskip .75em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1.5em%
{\large \@date \par}%       % Set date in \large size.
\end{center}\par
\@thanks
\vfil\null
\end{titlepage}%


You could modify it adding lines and supervisor. In the following the complete solution with the result.

\documentclass{article}

\makeatletter
\newcommand{\@supervisor}{}
\makeatother

\title{MSc Thesis}
\author{John Smith}
\supervisor{Dr. John Smith}

\begin{document}

\makeatletter
\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let \footnote \thanks
\null\vfil
\vskip 60\p@
\begin{center}%
\hrule height .5mm
\vspace{25pt}
{\LARGE \@title \par}%
\vspace{25pt}
\hrule height .5mm
\vskip 3em%
{\large
\lineskip .75em%
\begin{tabular}[t]{c}%
{\Large\@author} \\
{\normalsize\@supervisor}
\end{tabular}\par}%
\vskip 1.5em%
{\large \@date \par}%       % Set date in \large size.
\end{center}\par
\@thanks
\vfil\null
\end{titlepage}%
\makeatother

\end{document}


Of course another valid solution is to redefine \maketitle command. However in my humble opinion there is no need for that if you're not going to create a class.

It is probably better to use \hrule in this case,

\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}

\title{
\hrule height 1mm
\vspace{25pt}
MSc Thesis
\vspace{25pt}
\hrule height .25mm
}

\author{\Large John Smith \\ \normalsize Supervisor: Dr. John Smith}

\begin{document}
\maketitle

\end{document}


You can tune the height of each \hrule by passing the right argument, also the width can be adjusted.

Hope that helps.

Romain

• Glad it was what you were looking for, you can accept the answer if you are happy with it :-) – RockyRock May 25 '18 at 22:59
• Using commands like \hrule and \vspace inside the argument of \title is not recommendable: rather, have recourse to the titlepage environment, that lets you format the title page as you wish. @CameronF.: This remarks applies to the original question too. – GuM May 25 '18 at 23:06