# Error with hrule

So I'm trying out this code from here, but I keep getting this image: What is happening? I copy-and-pasted the code.

-
Please be more specific. Which code did you copy and paste? The string hrule (in lowercase) doesn't appear on the linked site. –  Caramdir Apr 2 '11 at 5:09
@Caramdir -- sorry, I changed it to hrule because it wasn't working. But I copy and pasted the "University of Beer" stuff –  wrongusername Apr 2 '11 at 5:10

You forgot the third line

\documentclass[pdftex,12pt,a4paper]{report}
\usepackage[pdftex]{graphicx}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\begin{document}
\begin{titlepage}

\begin{center}
%\includegraphics[width=0.15\textwidth]{./logo}\\[1cm]

\textsc{\LARGE University of Beer}\\[1.5cm]
\textsc{\Large Final year project}\\[0.5cm]

% Title
\HRule \\[0.4cm]
{ \huge \bfseries Lager brewing techniques}\\[0.4cm]

\HRule \\[1.5cm]

% Author and supervisor
\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
John \textsc{Smith}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
Dr.~Mark \textsc{Brown}
\end{flushright}
\end{minipage}

\vfill
% Bottom of the page
{\large \today}
\end{center}
\end{titlepage}

\end{document}


-
The option pdftex to \documentclass and to the graphicx package is unnecessary. To say it more clearly, it must never be given, with an up-to-date TeX environment. –  egreg Apr 2 '11 at 9:31
@egreg I keep the OP's code intact from the link but I agree with you –  Alain Matthes Apr 2 '11 at 9:42