LaTeX Lessons Learned

This post is a collection of lessons learned as a LaTeX newbee. Hopefully these will help others save some time when starting out. LaTeX can be pretty daunting on first sight.

List Line Spacing
The following code-snippet shows how to reduce the line-spacing between enumerate/itemize list items:
\item\setlength{\parskip}{-3pt} Item line one.
\item Item line two.
\item Item line three.
\item Item line four.
Page Margins
There are many different ways to control page margins. The easiest solution I've come across is to use the following package declaration for 1 inch margins all around:
BibTeX Bibliography Title Casing
If you're using BibTeX in your LaTeX documents, you may have noticed that Titles in the Biblography/References section at the end of your documet get converted into sentence-case format. That is, the first letter of the Title is capitalized and everything else is made lowercase. This is fine in some cases but an issue when titles contain acronyms or names. I experienced this using the natbib package, but it appears to be caused by the underlying bibtex parser package. The easiest cludge to prevent this is to add double curly braces around your title properties in your bibtex library file. For example:
title = {{1484.12.1 IEEE Standard For Learning Object Metadata}},
organization = {IEEE Learning Technology Standards Committee},
revision = {15 July 2002},
year = {2002},
url = {},
Cross-referencing to figures, sections, chapters or even footnotes can all be done using the \label command. Examples include:
Foo bar.
As noted in Section \ref{sec:intro}, foo is a bar.

``Some long quote.''\footnote{Author, Source, \url{...}\label{fn:quote}}
Foo bar ``another quote from same source''\footref{fn:quote}

Figures and Images
\caption{A picture's worth a thousand words}
If using TeXnicCenter in Windows, be very careful when using the spelling checker! When correcting a word that has no suggestions you can edit the text directly in the top-part of the dialog. This however seems unstable and it's easy to either replace a word with a whole paragraph or the other way around. I prefer just creating a PDF output, copy-pasting the text in MS Word, correcting any red squiggles in the LaTeX source.

More to come later...


Popular posts from this blog

Wkhtmltopdf font and sizing issues

Import Google Contacts to Nokia PC Suite

Can't delete last blank page from Word