1

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

2
  • 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, 2011 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 Apr 2, 2011 at 5:10

1 Answer 1

4

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} 

enter image description here

2
  • 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, 2011 at 9:31
  • 1
    @egreg I keep the OP's code intact from the link but I agree with you Apr 2, 2011 at 9:42

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.