Skip to content

Instantly share code, notes, and snippets.

@TakashiUNUMA
Created January 4, 2014 03:18
Show Gist options
  • Save TakashiUNUMA/8251155 to your computer and use it in GitHub Desktop.
Save TakashiUNUMA/8251155 to your computer and use it in GitHub Desktop.
This script prints a LaTeX format that includes bounding box informations.
#!/bin/sh
if test $# -lt 1 ; then
echo "USAGE: sh $(basename $0) [figure(s)]"
exit 1
fi
infiles=$*
WIDTH="140mm"
DIR="pictures/"
for infile in ${infiles} ; do
identify -format "%f %w %h" ${infile} | awk '{print "\\includegraphics[bb= 0 0 "$2,$3", width='${width}']{'${DIR}'"$1"}"}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment