Writing Papers with LaTex

I have been writing a lot of Latex code lately, and thought I would write about my Latex setup.


I am a big Emacs. Basically all my programming in emacs and Latex is the reason for that. I started using Emacs because it has fabulous mode AUCTex for editing Latex documents. It makes it so much easier to do cross-referencing in the documents, inserting citations and it provides preview of math. It is really nice.

Latex Structure

Generally I have my papers structured as below

|_ main.tex
|_ preamble.tex
|_ commands.tex
|_ introduction.tex
|_ semantics.tex
|_ experiments.tex
|_ abstract.tex
|_ lncs.cls
|_ sources.bib
|_ graphics 

main.tex is the main files that includes everything else.

Prototypical it would look something like


My preamble.tex only includes the package I use for the paper, while commmands.tex contains all the commands I define through the paper. I define a lot of commands for symbolc I use throughout the paper. That way I can easily change what symbol is used by changing the command instead of editing the entire document. A prerequisite for that is of course that your co-authors agree on using the same commands.


As noted above all of the packages I use are included in the preamble.tex file. My most commonly used packages are natbib, cleveref, hyperref and wrapfig. natbib is nice since it gives you two cite commands ‘\citep’ works exactly like the normal cite command whereas \citet cites the name of the authors as well. cleveref is useful since it automates prefixing figure numbers by Figure. So instead of writing Figure~\ref{label} I only write \cref{label} and it will take care of figuring out that it is a Figure. hyperref insert links into the pdf and wrapfig allows you to insert figures into the running text such that the text “float” around the figure.

Spell Checking

Being a non-native english speaker I occacionally need help with the grammar. Until now I have been unsuccesfull to find a good tool for helping me here. The closest thing is LanguageTool but its not .tex aware so you get a lot of error due to LanguageTool not understanding .tex.