resources

LaTeX Resources

Instead of trying to write lots of LaTeX help myself, I’ve decided to post links to good LaTeX resouces. Here’s one which is very comprehensive. I may write crash-tutorials about specifics but there’s really no need to re-invent the wheel trying to write how to make glossaries and indexes.

Advertisements
Tutorials

Using BibTeX for References

Using BibTeX can really take the hassle out of quoting references in your technical reports. Here’s a crash-tutorial on how to use it.

First, learn LaTeX. I’ll try posting some good links for this later. You can always search on “latex guide” or “latex help” to see lots of tutorials. It’s really easy and fun once you get to know it.

Anyway, once you’ve got your text in the LaTeX source, read ahead. Let’s assume there’s a paper which you have used titled, “Estimation of design effects in cluster surveys”.

Go to scholar.google.com. Click on “Scholar Preferences” at the top and in the “Bibliography Manager” section of the options, select “Show links to import citations into: BibTeX”. Save prefs. (You only need to do this option thingy once per session.)

Now, search for the paper you wish. You should see the paper in the results. Click on “Import into BibTeX”.

For the paper mentioned above, I get this BibTeX source:

@article{katz1994ede,
title={{Estimation of design effects in cluster surveys}},
author={Katz, J. and Zeger, S.L.},
journal={Ann Epidemiol},
volume={4},
number={4},
pages={295--301},
year={1994}
}

Copy this text and paste it in a file called “mypaperRefs.bib”. (Or anything you like.) This is your BibTeX source file and you should paste BibTeX sources of all your references in this single file.

Once you collect all the BibTeX references in this file, it’s time to start quoting references in your paper. Here’s how you quote a reference:

“Katz and Zeger \cite{katz1994ede} have described …”

See that the cite key is mentioned in the BibTeX source. You just need to use the key and LaTeX will do the rest for you.

At the end of the paper, you need to tell LaTeX the style of your bibliography and the BibTeX source file:

\bibliographystyle{plain}
\bibliography{mypaperRefs}     

Note: mypaperRefs is the BibTeX source filename without the extension. This BibTeX source needs to be in the same folder as your .tex file. More on bibliography styles later. Also note that you will need to compile your LaTeX source file around three times before the numbering gets fixed.

Uncategorized

Using Tables with LaTeX

Using tables with LaTeX is a little tricky. The good thing is, once you get the hang of it, it’s really very clean. Here’s a crash-tutorial on how to use tables.

We want to make this table:

Cat/Term apple recipe pudding
COOKING 1 0.37 0.37
SOCCER 0 0 0

And here’s the code to do it:

\begin{table}
    \centering
    \begin{tabular}{|l|c|c|c|}
        \hline
        Cat/Term & apple  & recipe    & pudding \\ \hline
        COOKING  & 1      & 0.37      & 0.37    \\ \hline
        SOCCER   & 0      & 0         & 0       \\ \hline
    \end{tabular}
    \caption{Example representation of a user profile}
    \label{fig:sampleM}
\end{table}

Most of this is self-explanatory if you know a little LaTeX. I’ll give a short guide on the rest. (Feel free to ask if you have any problems.)

The {|l|c|c|c|} means that there should be four columns: first one left aligned and the rest centered. Between each column, there should be a line. Try removing one of these pipes to see the difference.

The first \hline is used to insert a line at the top of the table.

Then, each line represents a row with the ampersands marking the column separations.

Each \hline at the end of rows means there should be a line between the rows. Try removing one of these to see what it does.

Of course, the \\ means line break; or in this case, row break.

Hope this helps.

Announcements

Back to Peshawar

After attending CSEE&T and ICIET conferences, I am back to Peshawar. Besides getting to travel half way around the globe without spending much, I now have two publications to my name. You can take a look at them here.

Announcements, research

20th International CSEE&T – (in progress)

I’ve been in Dublin City University (DCU) for two days waiting for the conference to start. Today was the first day. We had a presentation from two guys from Carnegie Mellon University. The presentation, besides being very informative, was absolutely entertaining. Anyway, these guys conduct seminars (mostly small ones of two days) and I’ve persuaded them to do one in Peshawar. They have estimated the cost to around $12,000 which comes around to PKR. 7,00,000 — which isn’t much for universities. I’ll talk about this to concerned people when I get back to Pakistan.

I have to get back to the conference in 10 minutes, so more updates later.