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):
\documentclass[preview,border=0.5mm]{slides}
\usepackage[vcentering,dvips]{geometry}
\geometry{papersize={1in,1in},total={1in,1in},showcrop}
\usepackage{amsmath}
\begin{document}
\begin{center}
\tan^{-1}
\end{center}
\end{document}
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)?