TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create square images with a fixed size in pixels in LaTeX to be used as buttons. So far, I got the best results using the slides document class in combination with the geometry package, run pdflatex, and then process the resulting PDF using the convert command.

I currently use this as input (I added showcrop to make sure I got the page dimensions right):


This mostly works, but I want the resulting PDF to just include the region I have defined in the geometry command. Currently, a big page is output and processing is very slow when compared to using the standalone package (which has its own issues, see below).

I have tried the preview package, but then top and bottom are cropped.

I also have tried to use the standalone class instead, but then the output is cropped on all sides and for each text used as input I get different sizes. Besides that, slides provides the font I want to use.

Is there a way to have pdflatex output just the region defined with the geometry command (after removing the showcrop option)?

share|improve this question
Remove the dvips option in geometry if you want to use pdflatex. – Ulrike Fischer Feb 2 '14 at 10:39
It was as simple as that. Thank you, you saved my day! If you make that an answer, I will accept it. – Axel Feb 2 '14 at 10:43
What exactly are you doing? LaTeX isn't the best tool to create icons, perhaps a graphics editor (using LaTeX fonts?) is a better fit. – vonbrand Feb 2 '14 at 13:33
Now it already works perfectly. I just don't want to use an editor to create 60 icons for 5 different solutions, so I wrote a script to do it. – Axel Feb 2 '14 at 13:42
up vote 4 down vote accepted

Remove the dvips option in geometry if you want to use pdflatex.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.