Computing Hints and Resources

Hints for LaTeX, R, Sweave, Emacs/ESS, and Arc.

LaTeX

Set Margins

A one-inch margin all around:

\usepackage[margin=1in]{geometry}

A single page, useful for when viewing on the computer:

\usepackage[margin=0.1in,papersize={6.7in,100in}]{geometry}

Double Spacing (and variants)

Replace the 2 with the desired spacing, such as 1.5 for one-and-a-half spacing.

\usepackage{setspace}
\setstretch{2}

Subfloats

To use subfloats in your paper:

\usepackage[format=hang, justification=raggedright]{subfig}

Then include your graphics like this. Spaces matter in this package, so put % at the end of every line.

\begin{figure}%
\subfloat[Caption for first figure.]{%
\includegraphics{fig1a}%
\label{labela}%
}%
\quad %this puts a little space between the figures
% \\ % use this instead to start a new row of figures
\subfloat[Caption for second figure.]{%
\includegraphics{fig1b}%
\label{labelb}%
}%
\caption{Caption for both figures.}%
\label{wholelabel}%
\end{figure}

R

Sweave