# Blank page causing duplicate page one.

Newbie here. I get a blank,numbered page after running the following \maketitle command in my document.

Is this part of the report class that I am using? How can i remove the blank page?

\def\maketitle{%\begin{titlepage}
\thispagestyle{empty}
\let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}
\null
\vfil
\begin{center}
\title{Final Year Project Interim Report\\[0.5cm]\rule{4cm}{1pt}\\[0.7cm]
\textbf{\projecttitle}}\\[1cm]
\author{\LARGE \studentname}\\[0.5cm]\rule{4cm}{1pt}\\[0.5cm]
\textsf{\Large  Blah[0.5cm]
\textsf{\Large  \textbf{Supervisor:}  \supervisorname}\\[0.5cm]
\textsf{\Large  \textbf{Mentor:}  \moderatorname}\\[1.8cm]
\includegraphics[height=6cm]{logo}\\[1cm]
\textsf{\Large Blah\vfill
\normalsize \today}
\end{center}
\vfil
\null
%\end{titlepage}
}


It occurs to me that I might not have provided enough information. If so let me know.

edit: the (as minimal as i could) working example:

tex file:

\documentclass[]{final_report}
\usepackage{graphicx}
\usepackage{hyperref}

\def\studentname{asdn}
\def\projecttitle{asd}
\def\supervisorname{asd}
\def\moderatorname{asd}

\begin{document}

\maketitle

\label{endpage}

\end{document}

\end{article}


cls file:

\ProvidesClass{final_report}
\setlength{\parindent}{0cm}
\renewcommand{\baselinestretch}{1.2}
\parskip=1em

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[CO]{\small\textsf{Page \thepage~of~\pageref{endpage}}}

\def\ps@plain{%
\def\@oddfoot{\normalfont\hfil\small\textsf{Page \thepage~of~\pageref{endpage}}\hfil}%
\def\@evenfoot{\normalfont\hfil\small\textsf{Page \thepage~of~\pageref{endpage}}\hfil}}

\renewcommand{\normalsize}{\fontsize{11pt}{11pt}\selectfont}
\renewcommand{\title}[1]{\textsf{\Huge{#1}}}
\renewcommand{\author}[1]{\textsf{\Huge{#1}}}
\newcommand{\subtitle}[1]{\textsf{\textbf{\Large{#1}}}}
\newcommand{\code}[1]{\texttt{\footnotesize{#1}}}

\renewcommand{\section}{\@startsection
{section}%                    % the name
{1}%                          % the level
{0mm}%                        % the indent
{10.6mm}%             % the beforeskip
{4.2mm}%           % the afterskip
{\LARGE\bfseries\sffamily}}  % the style

\renewcommand{\subsection}{\@startsection
{subsection}%                    % the name
{2}%                          % the level
{0mm}%                        % the indent
{6.4mm}%             % the beforeskip
{1.1mm}%           % the afterskip
{\Large\bfseries\sffamily}}  % the style

\renewcommand{\subsubsection}{\@startsection
{subsubsection}%                    % the name
{3}%                          % the level
{0mm}%                        % the indent
{4.2mm}%             % the beforeskip
{1.1mm}%           % the afterskip
{\normalsize\bfseries\sffamily}}  % the style

%\renewcommand\chapter{
%  %\thispagestyle{empty}
%  \pagestyle{fancy}
%  \doublespacing
%  \global\@topnum\z@
%  \@afterindentfalse
%  \secdef\@chapter\@schapter
%}

\renewcommand\chapter{
\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}

%% Chapter headings should be centered, uppercase, and at the top of the page.
{ \parindent \z@ \raggedright \normalfont
%\centering
\ifnum \c@secnumdepth >\m@ne
\huge\textsf{\@chapapp\space \thechapter:}
% \par\nobreak
%\vskip 20\p@
\fi
\interlinepenalty\@M
\huge \bfseries \textsf{#1}\par\nobreak
\rule{5cm}{0.5pt}
\vskip 20\p@
} }

%\vspace*{50\p@}%
{ \parindent \z@ \raggedright
%\centering
\normalfont
\interlinepenalty\@M
\huge \bfseries  \textsf{#1}\par\nobreak
\rule{5cm}{0.5pt}
\vskip 20\p@

}}

\renewenvironment{abstract}{%
\chapter*{\abstractname}%
}

\makeatletter
\renewcommand{\l@chapter}{\bfseries\@dottedtocline{1}{0em}{2.3em}}
\renewcommand{\l@section}{\normalfont\@dottedtocline{2}{2em}{2.3em}}
\renewcommand{\l@subsection}{\normalfont\@dottedtocline{3}{2em}{2.3em}}
\renewcommand{\l@subsubsection}{\normalfont\@dottedtocline{4}{2em}{2.3em}}
\makeatother

\def\maketitle{%\begin{titlepage}
\thispagestyle{empty}
\let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}
\null
\vfil
\begin{center}
\title{bla\\[0.5cm]\rule{4cm}{1pt}\\[0.7cm]
\textbf{\projecttitle}}\\[1cm]
\author{\LARGE \studentname}\\[0.5cm]\rule{4cm}{1pt}\\[0.5cm]
\textsf{\Large blah[0.5cm]}
\textsf{\Large  \textbf{Supervisor:}  \supervisorname}\\[0.5cm]
\textsf{\Large  \textbf{Mentor:}  \moderatorname}\\[1.8cm]
\includegraphics[height=6cm]{logo}\\[1cm]
\textsf{\Large blah\\\vfill
\normalsize \today}
\end{center}
\vfil
\null
%\end{titlepage}
}

\pagestyle{plain}

-
Hi Mark, welcome to tex.sx. It is always good to post a complete minimal example that illustrates your problem. This way people can compile it and have a closer look. –  Martin Scharrer Mar 6 '11 at 23:10
@Mark: Welcome to TeX.SX! There are many syntax problems in your code. Please check the braces: each opening brace must be followed by a closing brace later. Have a look at Preventing page break after title page for a working example of a title page, similar to yours, and a possible solution. –  Stefan Kottwitz Mar 6 '11 at 23:11
\textsf{\Large blah[0.5cm] is missing a closing brace, is my guess. I suspect you may be the victim of university style guides and gemerally working (but old) LaTeX code that does most of what's required. Assuming there's not a quick solution to the maketitle problem, can we get a link to the university's style guide? It may be easy enough to just recreate a style with memoir or some other class and set of packages to remove some of the older code. –  Mike Renfro Mar 7 '11 at 0:43
I guess while trying to anonymize the style file, you deleted }\\ at the position @Mike indicated. If I add that, then the file compiles and there aren't any blank pages. –  Caramdir Mar 7 '11 at 2:50
In addition to everything else mentioned, it's utterly wrong to include \makeatletter\makeatother in a class file. –  Harald Hanche-Olsen Mar 7 '11 at 10:45

The comments show that the problem was solved, though it appears not to be known exactly what solved it. Here is an “answer” to save the question from counting as unsolved in the future. It's community wiki, so anybody can add to it if they have anything useful to say.

-