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

Tom Schneider toms at ncifcrf.gov
Wed Nov 1 14:22:29 CET 2006


> 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?
> 
> 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
>     - convert the image to PostScript
>     - include the file's name in the \includegraphics
> and if anything changes, you have to repeat.
> 
> 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).
> This takes only 5-10 seconds.

Anything done by hand is difficult, especially if one has to do it a
second time, so I avoid it.  Basically I program everything.

I use imagemagick:

http://www.imagemagick.org/script/index.php
http://www.imagemagick.com/

Then I build tcsh scripts that manipulate the images.  Everything is
done automatically.  (Bash or perl would probably be better but
csh/tcsh are available widely.  You might be able to cygwin under
windows or get a real operating system ;-)

Tom

  Dr. Thomas D. Schneider
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research Nanobiology Program
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  toms at ncifcrf.gov
  permanent email: toms at alum.mit.edu (use only if first address fails)
  http://www.ccrnp.ncifcrf.gov/~toms/


More information about the texhax mailing list