diff --git a/Vagrantfile b/Vagrantfile index 5be0177..a2796ee 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -68,6 +68,7 @@ Vagrant.configure(2) do |config| sudo apt-get update sudo apt-get install -y dvipng \ graphviz \ + imagemagick \ inkscape \ make \ mscgen \ diff --git a/book/util/convert.sh b/book/util/convert.sh index 99ba90f..fece80c 100755 --- a/book/util/convert.sh +++ b/book/util/convert.sh @@ -17,8 +17,9 @@ if [ "${1##*.}" = "svg" ]; then echo "Dimensions " ${W} "x" ${H} if [ ${W} -gt 500 ]; then - ${INKSCAPE} ${1} --export-width=500 --export-area-snap --export-area-drawing --export-png=${DIRNAME}/${BASENAME}.png + ${INKSCAPE} ${1} --export-width=1000 --export-area-snap --export-area-drawing --export-png=${DIRNAME}/${BASENAME}.png ${INKSCAPE} ${1} --export-width=500 --export-area-snap --export-area-drawing --export-pdf=${DIRNAME}/${BASENAME}.pdf + convert ${DIRNAME}/${BASENAME}.png -resize '500' ${DIRNAME}/${BASENAME}.png # sips --resampleWidth 500 ${DIRNAME}/${BASENAME}.png # sips --resampleWidth 1000 ${DIRNAME}/${BASENAME}.pdf else diff --git a/book/util/convertpkt.sh b/book/util/convertpkt.sh index 9ca6bc4..ec60497 100755 --- a/book/util/convertpkt.sh +++ b/book/util/convertpkt.sh @@ -17,8 +17,9 @@ if [ "${1##*.}" = "svg" ]; then echo "Dimensions " ${W} "x" ${H} if [ ${W} -gt 500 ]; then - ${INKSCAPE} ${1} --export-width=500 --export-area-drawing --export-png=${DIRNAME}/${BASENAME}.png + ${INKSCAPE} ${1} --export-width=1000 --export-area-drawing --export-png=${DIRNAME}/${BASENAME}.png ${INKSCAPE} ${1} --export-width=500 --export-area-drawing --export-pdf=${DIRNAME}/${BASENAME}.pdf + convert ${DIRNAME}/${BASENAME}.png -resize '500' ${DIRNAME}/${BASENAME}.png # sips --resampleWidth 500 ${DIRNAME}/${BASENAME}.png # sips --resampleWidth 1000 ${DIRNAME}/${BASENAME}.pdf else