I love tack-sharp images, so tripods and stopped-down apertures are standard equipment in my bag. But sometimes getting maximum depth of field may be a bit problematic even with high f-numbers, especially in macro photography or if lens diffraction starts to creep in at f-stops higher than 16.
Fortunately, focus stacking can help. Just take several identical exposures, varying the focus points each time from closer positions to those further away from the camera. Then use software like CombineZP to stitch the images together.
Take the image above. Even at f/13, the depth of field was limited due to the short distance from the lens (Canon 50mm f/1.8 prime). So the final product was made using three images stitched together. Digital filters courtesy of Topaz Labs and Nill PhotoFX. And FYI: CombineZP is freeware, so feel free to Google it and start experimenting.
Exposure Data: ISO 100, f/13, 1″