Wednesday, August 26, 2009

How To Make a Customized Title Page Using LaTex

To do this you need two .tex files. Let us name the original document as report.tex & the title page you will be making as title.tex.

In my report.tex file I write the following code.

\documentclass[a4paper,11pt]{report}

\usepackage[pdftex]{graphicx}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\usepackage{fancyheadings}

\pagestyle{headings}


\begin{document}
\input{./title.tex}

\end{document}



In my title.tex file I put the following code:


\begin{titlepage}

\begin{minipage}{1in}
\begin{tabular}{l}
\includegraphics[width=0.5\textwidth]{./uom}
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}{1in}
\begin{tabular}{r}
\includegraphics[width=0.5\textwidth]{./cse}
\end{tabular}
\end{minipage}


\begin{center}
% Upper part of the page

\textmd{CS5999 Post Graduate Diploma Project Report}
\vfill
% Title
{ \huge \textbf{Exposing Belief-Desire-Intention (BDI) Agents on The Web} }\\[0.4cm]
\begin{center}
\vfill
By\\
\vfill
\large\textbf{S. S. Weerawardhana}
\end{center}

\begin{center}
\textmd{MSc 2008 Registration No: 088274C}\\
\vfill
\large\textbf{Supervisor: Dr. Buddhinath Jayatilleke}
\vfill
May 2009\\
\end{center}

\vfill
\begin{center}
This proposal is submitted in partial fulfillment of the requirement of\\
Master of Science in Computer Science\\
in the\\
Department of Computer Science and Engineering\\
Faculty of Engineering\\
University of Moratuwa\\
\end{center}
\vfill


\end{center}

\end{titlepage}



Make sure you keep title.tex document and the report.tex document in the same location. The importance of this is because in report.tex you get the code line \input{./title.tex}. This means that when report.tex is compiled it should also look for title.tex in the same location & compile both the documents to produce the end result.

See the attachment provided with this post so that you can see what the outcome of this code looks like.

8 comments:

PRADEEBAN said...

It's a great article Sach.
Kudos!!!

Sach said...

tanq kapes...
actually i do feel that more must be written on this. will put up some more related stuff as an when the requirement arises :)

PRADEEBAN said...

I will throw you some questions, if I hit any issue while trying LaTex. You will have to answer them here. :)
Regards.
Pradeeban.

Gihan Lakmal - Athal24 said...

Thanks Guy ....
Wonderful post ....

Amit said...

Wonderful...Thanks a lot. :)

Gil said...

Thanks. It helps me a lot!

Vinay Patel said...

Thank you !!

Jen M. Z. said...

what is

\includegraphics[width=0.5\textwidth]{./uom}

?