This is an old revision of the document!

# All one file

Lots of people feel more organized if they have an outer paper.tex which \includes intro.tex, litreview.tex etc. I used to do that too. Now I find that one large file is better. Here's why

1. You obviously have your document in some version control system. If you move a block of text from one file to another, none of the VCSs know how to deal with that in the presence of conflicts. In LaTeX it's very common to have to move a block of text, because one needs to move figures. Of course you don't do that till the very end, right? Yes, that's exactly when you don't want a mass of conflicts, and yet it's exactly the point when everyone is frantically trying to fix their section.
2. If you want to globally search and replace it's much easier to do so in a single file. Yes, of course you should have had the notation right before you started. But you didn't.
3. If you really think compilation is too slow without \includeonly, try texify –quiet first.

# Inline macro definitions

Lots of people feel more organized if they have all their macro definitions at the top of the file (or in macros.tex). I agree, for generic macros. However, for symbols, I prefer to define them at the point in the text when they are first introduced. This means that you get an error if you try to refer to \params before they're defined. Example:

\section{Methods}
In this section we blather on for a while about what we're going to do, and
then in paragraph two, we'll actually tell you.  If I accidentally try to talk
about $\img$ here, I'll get an error.

\def\img{\mathcal{I}}
\def\samp{\mathbf{g}}
\def\nsamp{n}
We consider an image $\img$ as a list of samples $\{\samp_i\}_{i=1}^\nsamp$.

# Misc stuff to paste in the top

% -*- compile-command: "texify --pdf -V --quiet main.tex" -*-

% Silence includegraphics
\setkeys{Gin}{quiet=true}

\usepackage{xspace}
\newcommand{\etal}{\emph{et al.}\xspace}