# LaTeX

### PDF Resumés with LaTeX

There are a whole host of reasons for why doing your resumé in LaTeX is a good idea. The one that I like the most is that it generates beautiful documents.  There are a few things that go into generating PDF documents from LaTeX which I’ll duscuss a little further down on this page. Before I do though, you might just be interested in seeing the complete development environment, which I store as a Git repository out at GitHub.

I created a style file for my resumé that supports (or at least, doesn’t stop me from doing) a number of formatting insights I’ll go into more detail below:

• I list education, experience, etc. in reverse chronological order. The idea is to ensure the most recent, and thus most relevant, detail is made available before older, less relevant detail.
• The footer of each page identifies the document as being my own resume, and perhaps more importantly, includes the total number of pages in the resume. I do this for a little extra insurance against parts of the resume going missing when it’s being passed around as a hardcopy. Here is the relevant section of the style file that generates the footer:
\newcommand{\ps@resume}{
\renewcommand*{\@oddfoot}{%
\hspace*{\fill}%
{\scshape {\DH@ResumeTitle} of {\DH@ResumeAuthor} -
Page \arabic{page} of \pageref{LastPage}}%
\hspace*{\fill}%
}
\renewcommand*{\@evenfoot}{\@oddfoot}
}
\pagestyle{resume}

Translating it loosely into english, it says, generate and use a new page style called “resume”. The pagestyle is to have no headers. It’s to have both even and odd page footers that print the resume title, its author, the current page number and the last page number. The title and author are variables defined by the style sheet. The command \pageref{LastPage} is made available via the lastpage package.

• I make use of hyperlinks both for internal resume navigation, and to allow people with computer access to follow external hyperlinks to work I’ve been involved with. This is done with the hyperref package.

Here is the style file I created for my resumé. Here is the resumé source if you want an example of how to use the style sheet.

On generating PDF files

PDF files generated from LaTeX source are typically created off the back of DVI files via the dvipdf utility, or alternately, directly from the LaTeX source via pdflatex. Pdflatex will generally produce smaller, cleaner monitor readable output so I use it as my poison of choice.

The only drawback I’ve found to date is including encapsulated postscript formmated vector graphics (eps files). The eps files need converting to something pdftex is happy to process (such as PDF). Much of my LaTeX work is under a Windows environment . Unfortunately, Windows favours GUI interfaces more than character. For those of us who suffer the curse of Windows, a basic eps2pdf GUI utility was written to make it less painful.

Fonts can also be a problem when generating PDF files. Fortunately, someone’s figured out how to make your PDF documents look good on-screen.

I’ve been writing papers lately, and found a wonderful biblography style file that displays URLs in a nice monospaced font, allowing me to hyperlink into the refrenced pages from within the generated PDF file. It’s a must have if you reference web material alot.

Some useful related links:

### On embedding GIF files

For certain types of images (tables with simple colour schemes are my favourite), GIF files can be alot smaller than a more popular graphic file format such as JPEG. Unfortunately, the owners of the GIF file format, after getting the entire world addicted to it decided to demand royalties from software that implemented the format. This left freeware packages in the lurch, and thus the PNG format was born.

The PNG file format fills the same niche as GIF files in terms of encoded image size, but the format is open. LaTeX, being a freeware initiative won’t include GIF format graphics, but will take PNG file formats easily (of course, now that the GIF patent has expired we may see LaTeX distros allow GIF images in time). What we need to solve this little dilema is a GIF to PNG file format converter. ‘Nuff said.

Once you’ve got a png version of your gif file, a simple latex command like:

 \includegraphics{myShinyNewPngFile.png}

should do the trick nicely.

### On making Subfigures

I’m in the habit of supplying two sub-figures side-by side in a parent figure in my papers to conserve space. In the preamble of the tex file, I place the following two lines for the subfigure package:

 \usepackage[pdftex]{graphicx} \usepackage{subfigure} 

The top package import gives me access to a rich graphics import environment, configured to work with pdflatex. The second package allows me to take my imported images and makes sub-figures out of them. Here’s a real-world example of the sub-figure package being used:

\begin{figure}
\vspace*{-\baselineskip}
\subfigure[Here is the first picture]{
\begin{minipage}[t]{0.47\textwidth}
\includegraphics[width=\textwidth]{pics/png/FirstPic.png}
\vspace*{-1.5\baselineskip}
\end{minipage}
\label{figure:FirstPic}
}
\subfigure[Here is the second picture]{
\begin{minipage}[t]{0.47\textwidth}
\includegraphics[width=\textwidth]{pics/png/SecondPic.png}
\vspace*{-1.5\baselineskip}
\end{minipage}
\label{figure:AFigureOfTwoSubFigures}
}
\caption{A caption for the pictures}
\label{figure:PatternResults}
\vspace*{-\baselineskip}
\end{figure}

The \vspace* commands are to remove what I consider to be excessive whitespace paddding around the figure. I use minipage environments covering close to half of the width of the page to have the figures side-by side. The label commands are to allow me to reference individual sub figure entries, or the figure generally. Finally, the images are png files. They pixelise badly, so in a perfect world, I’d have exported these graphs to pdf files via Acrobat Distiller or PrimoPDF to get them to render well.

### On editing LaTeX with VIM

Vim (VI improved) is my text editor of choice. It’s fast and with a little learning, easy to implement mass changes with very easily. It supports text hilighting of LaTeX commands well enough for my liking too.There are Windows and Linux distributions available, which is a golden rule for me when looking for support utilities to work on my material regardless of operating system.

Once, a very, very long time ago I figured out how to run aspell (a freeware spell checker) from within vi. I’d forgotten completely, beyond the fact that I used macros and bound them to a given key. Thankfully this individual thought to write down how to spellcheck from within vi.

There is a free vim manual available which might help you get to the deeper tricks om vim faster.