From 83d049ff0c3147a792845c6949bfd82eb3b1cadf Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 8 Jul 2002 12:50:49 +0000 Subject: [PATCH] Make the cropping work and then turn it off by default. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4547 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/lyxpreview2ppm.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/scripts/lyxpreview2ppm.sh b/lib/scripts/lyxpreview2ppm.sh index 38c75186f3..8c60f9efdb 100644 --- a/lib/scripts/lyxpreview2ppm.sh +++ b/lib/scripts/lyxpreview2ppm.sh @@ -116,8 +116,8 @@ rm -f ${SEDSCRIPT} EXECUTABLE="extracting metrics"; CHECK_STATUS # The ppm files have spurious (?! say some !) white space on the left and right -# sides. If you don't want this set REMOVE_WS=0. -REMOVE_WS=1 +# sides. If you want this set REMOVE_WS=1. +REMOVE_WS=0 which pnmcrop > /dev/null STATUS=$? @@ -126,17 +126,16 @@ if [ ${STATUS} -ne 0 ]; then REMOVE_WS=0 fi -if [ REMOVE_WS -eq 1 ]; then +if [ ${REMOVE_WS} -eq 1 ]; then TMP=.${BASE}.ppm - for FILE=`ls ${BASE}???.ppm` + for FILE in `ls ${BASE}???.ppm` do - pnmcrop -left -right ${FILE} > ${TMP} + pnmcrop -left ${FILE} | pnmcrop -right > ${TMP} STATUS=$? if [ ${STATUS} -eq 0 ]; then mv -f ${TMP} ${FILE} fi done - rm -f ${TMP} fi # All was successful, so remove everything except the ppm files and the