[texhax] easiest way to process hundreds of screenshots in a book in LaTeX?

Hartmut Henkel hartmut_henkel at gmx.de
Wed Nov 1 14:23:10 CET 2006

On Wed, 1 Nov 2006, Niall Mansfield wrote:

> I'm working on a book that contains hundreds of screenshots and
> diagrams that will need to be cropped, resized, and occasionally have
> callouts added.  What's the *easiest* way to do this?

Organize your task. Create subdirectories for screenshots and derived
images. Use a Makefile. Put conversion rules from xwd format to .png
into it. Don't convert to PostScript EPS. Use pdflatex.

> How do other people handling very large numbers of graphical
> inclusions without going nuts?
> Background
> ------------
> For a small number of screenshots, using \includegraphics{xyz.ps} is
> acceptable, but for large numbers it's overwhelming because for each
> screenshot you have to:
>     - capture the image (using 'xwd' or similar on Unix)
>     - somehow crop the image to the right size

Define a rule for it in the Makefile. E. g. convert -crop, often also
pnmcrop helps. Great for automatic tight cropping of diagrams!

But why screenshots at all? Screenshots have bad resolution. Doesn't
your generating application provide high-quality output?

>     - convert the image to PostScript

Better use PNG + pdflatex. Or pdflatex with vector images if you can get
these from your graphics application.

>     - include the file's name in the \includegraphics
> and if anything changes, you have to repeat.

Just type 'make'.

> LaTeX is perfect for the text and for structuring the book.  However,
> including screenshots is one area where Microsoft Word is superb:
>     - capture screenshot (with Alt PrintScreen)
>     - Ctrl-V to paste it into your Word doc
>     - drag to resize, or use the crop tool to hide unwanted pieces
>       (and "cropping" really is just hiding -- the cropped parts
>       are still there and can be re-exposed later if you change
>       your mind).

"Pfusch" IMHO, see above. BTW, the hiding feature is available also in
the graphics package via the viewport option.

> This takes only 5-10 seconds.

For each of more than 100 shots? With any claim of evenness or
precision? I would go nuts after 10.

Regards, Hartmut

More information about the texhax mailing list