User:Gwh2/LaTeX Best Practices
From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
Citation Formatting
Add \usepackage{cite} to your preamble to get nicer formatting for multiple-key citations.
Use text~\cite{key} rather than text \cite{key} to keep LaTeX from breaking sentences like
blah blah blah text [1]
Image Formatting
The One True Template for inserting images is:
\begin{figure}[htbp]
\centering
\includegraphics[width=\columnwidth]{filename-no-extension}
\caption{Figure caption}
\label{fig:section:filename-no-extension}
\end{figure}
- LaTeX is incredibly whiny about having the image, caption, and label in that order. Get it wrong, and parts of your paper may have funny references.
- Be sure to exclude the filename extension. That way, when a conference changes its mind and demands an .EPS rather than a .PDF, you can just convert all of your .PDF/.PNG images to .EPS, run
latexinstead ofpdflatex, and not have to change any of your LaTeX code. - Starting the label with "fig:section:" helps for code completion. (You are using an editor with code completion, right?)