LaTeX tips for scientific papers
This page addresses a number of common beginner mistakes or difficulties when using LaTeX for scientific papers.
Correcting the bounding box
If you’re using pdflatex to generate PDF output from your LaTeX source, then you usually have to provide PDF-format figures to include in the document. Quite often, the PDF figures you start with have a lot of empty space outside
of the figure itself. In other words the “bounding box” that is encoded in the file is too large. This space is usually unimportant when printing the figure on a sheet of paper by itself or viewing the figure on your computer monitor, but it creates problems when you try to incorporate the figure into a LaTeX (or other) document, since the extra space forces LaTeX to shrink the whole figure unnecessarily to make it fit within the allotted space on the page (e.g., a single column).
I almost always find it necessary to first crop
the PDF figure to eliminate any extra space outside the figure itself, so that the latter nicely fills the entire column (or two columns) and doesn’t put unnecessary empty space between the figure and the caption and/or the top of the page.
On a Macintosh, the cropping is very easy:
- Open the PDF figure in Preview.
- In the “Tools” menu, select “Rectangular Selection.”
- Use the mouse to select a bounding box that just barely encloses the figure (including plot labels, etc.).
- In the “Tools” menus, select “Crop” (or just use Command-K)
- Save the file (e.g., Command-S)
The bounding box will now be correct for your figure.
I don’t know how to easily do the same thing under Windows — possibly it can be done in Acrobat Reader, but that’s just a guess! Please let me know what method you find works on all Windows machines without the need for added software.
Setting the figure width in LaTeX
Equations and symbols