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.

Tuesday, August 25, 2009

Ditch MSWord, OOWriter, etc..Go LaTeX

So you have another one of these book reports to write. You go through trauma, trying to figure out what to put on paper. Eventually when you do figure out what goes into your report, comes the problem of making the report look nice & professional like!

Has it not ever occurred to you the word processors we normally use bite us only too hard when it comes to formatting lengthy documents? The pictures are never there where you originally put it. Paragraphs break at the most uncanny locations. Alignments, white spaces, line spacing....arrgh the list is endless...

Would it not be cool, if you could just write whatever you wanted to be in your report and leave adding makeup part to the word processor? Well, you can. All you have to do is get used to using LaTex (pronounced either "Lah-tech" or "Lay-tech") .

Here is what you need to get yourself going. I was doing this on Windows OS. AFAIK creating LaTeX documents can be done on Linux environments as well. I am yet to explore on that particular phase.
  • Download a text editor that can compile & parse LaTeX source. I use WinEdt. Pretty good it is!
  • You need a few supplementary software. These are mandatory. So don't ask questions. Just have them installed before you compile your LaTeX source.... :D
  • There is no need for any of these software to be installed in a particular order. Just be a little cautious about the platform you are on when installing stable binary distributions of these aforementioned software.
You will be writing your document on the text editor. What you will have to do extra is to add the formatting tags where necessary in the text.

The following code is a simple structure of a LaTex document.




\documentclass[a4paper,11pt]{report}

\usepackage[pdftex]{graphicx}
\usepackage{fancyheadings}
\pagestyle{headings}



\begin{document}
\title{Coffee Tales}
\author{Sachini Weerawardhana}

\maketitle

\begin{abstract}
This is a silly document. No need for abstracts here!
\end{abstract}

\newpage
\tableofcontents


\chapter{Introduction}
This will be the first chapter with the title Introduction. Has two sections; dummy section 1 & dummy section 2

\section{dummy section 1}

\section{dummy section 2}


\chapter{How To Make Good Coffee}
Sections below describes how you can find out yourself if your coffee mug sucks or not!

\section {Is Good Coffee Hard to Find?}
OK so, good coffee is hard to find. Want to know why?

\chapter{Coffee Makers Inside Vehicles?}
Some incoherent nonsense goes here.


\end{document}




Write all that on a new document in WinEdt, save the document as .tex & compile. That is all there is to it! Tutorial here has super help to get you started. A post following this would be describing how you can make a customized cover page using LaTex

Tuesday, August 4, 2009

The Pessimist


So, here I was talking to somebody and the somebody has been awfully nice and more than tolerant with my insolent ways. Suddenly it dawns on me how easily I forget good things that have happened to me throughout this short life of mine.

Yeah...I have been plagued by pessimistic behavior for as long as I can remember. People I meet more often than not say very nice things about me! And do I give a "word"? EN-OH! How rude, crude and lewd!!! Looking back now, I realize I have a lot to be thankful for and lot to be tagged as so freakin' lucky....It is such a shame much as a sponge my brain is it has become a sponge that absorbs only slime!! :D Of course people do like to be revered, appreciated and treated like heroes. I am sure most of you still realize the value in helping people & being supportive. While some help expecting something else in return, there are those who genuinely want to see good things happen to people. I am not sure to what category I fall into, but one thing I do know is that if I happen to make you feel good about something and you feel you need to appreciate me for that, DON'T BOTHER! I wouldn't remember the good things you would probably say anyway....

Many a times people have complained that I am too hardhearted & behave like a rock. The irony of that claim however is that, I am also immune to the message that claim carries. Ignoring what is not relevant and what I think is bullshit come naturally to me. Perhaps doing that a little too much is risky I reckon....but I am a survivor being the person I am. Hence I am a happy person.

Perhaps it is just that I am too neutral and not a pessimist per se. And I do not normally see the glass as half empty. I just see it as somebody thought the drink was shit!! :D

Shinedown Shines Down

My tastes in music have never ceased to baffle me. But no complains! I luv my taste in music. :D


It is kinky, electrifying, soothing, calming, ear-splitting, irritating all at the same time. The spectrum of genres spans from alternative rock, country, hiphop, r&b, pop, gospel to who-knows-what music! I do have to admit that I listen mostly to english numbers. Why?? Sinhala music nowadays sound so strangely similar to Shaggy mumbling in sinhala, Twista rapping in Sinhala & so on and so forth. For some reason oriental music is yet to see the spawning of new generation talent that have their own identities...


When I listen to music I first go for the tones & then to the lyrics. What keeps me attached to a particular number is in fact the lyrics! Probably that should explain why I am a fan of rock music. Although sometimes they can be brutal to the ears, they usually carry meaningful lyrics. This is one of my most recent attractions!

Enjoy!

Saturday, August 1, 2009

Seven Reasons Why I Think A Couch Is The Best Place In The World


So I have just unearthed my deepest, darkest desire for couches. The realization of my attachment for the object in discussion has left me left thinking "Gee, I had no idea couches can be such fun generators!!!" However, I find it much to my disappointment that couches, good, plush ones in particular are quite short in supply here. (Sad Face) If I were the honorable minister of recreational activities & youth affairs, my first official duty after taking office would be to submit an order for good two dozen couches to be located at odd places in Colombo! (Excited Face)

So, here I begin my justification for my officially joining the couch lovers' club. To the less bright who have eerie attractions to my ramblings, reader discretion is advised. The following statements do contain, and is intended to be treated as euphemisms to incidents of superior mental pleasure.


HASH ONE
Leather is a sexy material. (Wicked Grin). As my sudden outburst of emotion implies, I love to park myself on leather. Not only does the material responds well to sudden alterations of temperature, it also feels good upon physical contact. If leather is sexy, leather with soft fillings in between is pure psychotic bliss! Given the chance to choose between a leather couch & a normal couch I would raise both hands in favor of leather. If I were to own a leather couch I would not bother to crowd the oasis of recline with cushions & such like pathetic excuses to decor. I would want the couch naked & all to myself!


HASH TWO
Couches are great places for conversation. Both verbally and otherwise. Since I happen to be quite weak in gossiping (so I think) (GrinningFace) and talking about shopping & clothes & shoes, I find this "otherwise" part much to my fancy. One can just sit on a couch and stare at the ceiling and nobody would question why. Well, even if one nosy, busy-body just happens to impede your train of thought with a goofy question you could just mumble some incoherent nonsense and be on your merry way! See...no feathers ruffled! Peace Rules!!


HASH TWO DOT ONE
Before you bust a vessel wondering why two dot one instead of three, I felt the need of jotting a line on "otherwise" class. "Otherwise" is an abstract class which can be implemented in ways that tickles your imagination. Let me just terminate this elaboration indicating that my implementation of this particular abstract class is quite baffling. (Wink)


HASH THREE
I do the most important things in my life lying horizontal! I will start the list with sleeping. It goes on to studying, idling, reading to eating. Yeah, I have spent a good number of hours of my life eating lying flat on my back. Couches are superb places to eat at, or drink at, or do whatever you feel like doing at. Too bad the couch at my place has failed to live up to my expectations. (Flat Face). Oh well, there shall be other couches that would undoubtedly careen into my life at some point, opening doors to a world of fun & excitement. (Evil Grin)


HASH FOUR
Couches are usually located at places having good food and drinks; again the exception being the couch at my place! What a rip off!!! (Indignant Face) There is nothing like having a steaming cup of coffee or some icky sticky delectable food item before you when you are on a couch! Food tastes extra nice, IMHO, when you have it at a nice place. My idea of a nice place spells C-O-U-C-H.


HASH FIVE
Couches mean extreme physical proximity. Extreme I say.
After thought - "Somethings are best left to the imagination of the readers..."


HASH SIX
Research shows that the best sitting position is not the 90 degree angle you and I are forced to sit in. Apparently sitting at obstuse angles in the thang to do if you want to avoid uncomfortable aches & pains. (Chuckles) More couch please!


HASH SEVEN
For me couches have always been more relaxed seating arrangements than chairs. Less edgy. More comfy & Easier on ones muscles. (smile)

To all the couchos....come hither & partake! (GRIN)