# Timothy Wood - Using LaTeX

## Using LaTeX

LaTeX is a typesetting program that lets you turn your words into beautiful PDFs for publishing. Unfortunately, its syntax can be a bit obtuse, and getting it to lay things out precisely the way you'd like is often difficult.

If you need a basic introduction to LaTeX, try some of these sites (which I have simply stolen from google and have not thoroughly reviewed).

And here is a very useful website for auto generating latex code for tables.

### LaTeX Basic Template

Here is a basic template for a two column latex document. This is just a header file and it pulls in the paper contents from abstract.tex and section1.tex.

template.tex
% Start a two column document
\documentclass[10pt,twocolumn]{article}
% Import some useful packages
\usepackage{subfigure}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{color}
\usepackage{url}

\begin{document}

\title{An Exciting Paper on Interesting Topics}

Department of Computer Science,
University of XYZ\\
Email: you@school.edu
}
\date{}
\maketitle

% the input command pulls in text from another *.tex file
\input{abstract}
\input{section1}

% Assumes you have references in a bibtex file: refs.bib
\bibliographystyle{plain}
\bibliography{refs}

\end{document}


### Saving Space in LaTeX

There is an hour left until your paper deadline and you are half a page over the limit! What can you do to save that space? The first thing to do is remove widows. You probably have many paragraphs that end with a line containing just a few words. These are "widows", and they waste a lot of space. To most effectively eliminate widows, start at the rear of your paper and move to the front, rephrasing paragraphs with bad widows.

The following tips are a bit more on the shady side–they will adjust the formatting of your document in ways which may violate the style guidelines of the conference or journal you are submitting to. Use these only if they do not require a strict style file, and don't blame me if your paper gets rejected (which is definitely possible)!

• Reduce space below figure captions. This can save a lot of space if you have many figures in your document. Put this command in your template somewhere.
  %% Reduce the space below all figures and captions
\addtolength{\textfloatsep}{-5mm}
• Use the Times font package. The default latex font is kind of ugly, plus times is slightly smaller (although equally readable, I would argue). The command goes at top of template file.
  %% use times font (default font is slightly bigger)
\usepackage{times}
• Reduce spacing between list elements. This will reduce the separation between items in an unbulleted list (should also work for "enumerate" blocks).
  %% To reduce spacing between lists
\item ...
\end{itemize}
• Use smaller fonts inside captions. This looks better and saves a bit of space.
% Different font in captions
\newcommand{\captionfonts}{\small}

\makeatletter  % Allow the use of @ in command names
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\captionfonts #1: #2}}%
\ifdim \wd\@tempboxa >\hsize
{\captionfonts #1: #2\par}
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother   % Cancel the effect of \makeatletter

Most of these tips are from here.