# ...create a tightly cropped picture?

If you've got a figure that needs to be cropped then pdfcrop or Briss are great tools as I mentioned on the LaTeX page. But if you're creating your own picture, you can cut out the extra step using the standalone package. As the documentation indicates, all you have to do is make sure that the document is using the standalone document class (rather than typical arguments of article or book). The picture is then cropped to the content plus a default border. The border can be adjusted as an option of documentclass by either

• border=< length (all sides)>
• border={< length (left/right) > <length (bottom/top)>}
• border={<length (left)><length (bottom)><length (right)><length (top)}

So, for example

\documentclass[border=12pt]{standalone}

will give a 12 pt border for each side around the figure while

\documentclass[border={4pt 8pt}]{standalone}

puts 4pts of space on the left and right but 8pt above and below the picture. Finally,

\documentclass[border={4pt 8pt 12pt 24pt}]{standalone}

will put 4pts of space on the left, 8pt below, 12pt to the right, and 24pt above.

Compare the border of the output below, where the first line is

\documentclass[tikz=true,border={0pt 2pt 2pt 8pt}]{standalone}