Re: problems with .eps-files
Regarding your problems with figures, i've had this problem also, for 2 reasons: some programs don't generate the bounding box correctly, and most programs put your small figure in the middle of (or anywhere in) a mostly blank page. I found that running the ps file in ps2epsi corrects all my problems. As a bonus, it generates a small preview in the file. I'm not sure if lyx takes that preview to display in its WYSIWYM interface, but i think so because it seems faster to display the on-screen preview of epsi files than plain ps. If it doens't, maybe it should ... :) I take figures from Matlab, mostly (diagram printouts and plots), and i have the student version, which prints a "Student Version of Matlab" annoying line in the bottom. So what i always do is to disable page border and put it in landscape mode in Matlab's print dialog, enable print to file, print. Then i run the file through this: awk '!($1 == "(Student")' $1 $1.tmp ps2epsi $1.tmp $1 rm -f $1.tmp (yes, bad shell syntax --- it should handle the argument filename's extension much better, but i'm no shell wizard and i need to finish my thesis before learning bash better) This script removes that annoying line from the postscript and generates the bbox and removes the surrounding blank. The result is consistently good. Since other programs won't put that annoying text, you can still use the script, it just won't do anything in the first line (unless you DO have a "Student" text somewhere in the figure and you want to keep it :) ). Hope that helps. It took me a while to find a solution that works and that's simple. -- _ \\ \ Eric St-Jean, ing.stag. [EMAIL PROTECTED] \ \ Space Systems, Xiphos Technologies Inc \ \ (514)848-9640 fax 848-9644 \ \ Montreal, Quebec \ \\
Re: problems with .eps-files
Regarding your problems with figures, i've had this problem also, for 2 reasons: some programs don't generate the bounding box correctly, and most programs put your small figure in the middle of (or anywhere in) a mostly blank page. I found that running the ps file in ps2epsi corrects all my problems. As a bonus, it generates a small preview in the file. I'm not sure if lyx takes that preview to display in its WYSIWYM interface, but i think so because it seems faster to display the on-screen preview of epsi files than plain ps. If it doens't, maybe it should ... :) I take figures from Matlab, mostly (diagram printouts and plots), and i have the student version, which prints a "Student Version of Matlab" annoying line in the bottom. So what i always do is to disable page border and put it in landscape mode in Matlab's print dialog, enable print to file, print. Then i run the file through this: awk '!($1 == "(Student")' $1 $1.tmp ps2epsi $1.tmp $1 rm -f $1.tmp (yes, bad shell syntax --- it should handle the argument filename's extension much better, but i'm no shell wizard and i need to finish my thesis before learning bash better) This script removes that annoying line from the postscript and generates the bbox and removes the surrounding blank. The result is consistently good. Since other programs won't put that annoying text, you can still use the script, it just won't do anything in the first line (unless you DO have a "Student" text somewhere in the figure and you want to keep it :) ). Hope that helps. It took me a while to find a solution that works and that's simple. -- _ \\ \ Eric St-Jean, ing.stag. [EMAIL PROTECTED] \ \ Space Systems, Xiphos Technologies Inc \ \ (514)848-9640 fax 848-9644 \ \ Montreal, Quebec \ \\
Re: problems with .eps-files
Regarding your problems with figures, i've had this problem also, for 2 reasons: some programs don't generate the bounding box correctly, and most programs put your small figure in the middle of (or anywhere in) a mostly blank page. I found that running the ps file in ps2epsi corrects all my problems. As a bonus, it generates a small preview in the file. I'm not sure if lyx takes that preview to display in its WYSIWYM interface, but i think so because it seems faster to display the on-screen preview of epsi files than plain ps. If it doens't, maybe it should ... :) I take figures from Matlab, mostly (diagram printouts and plots), and i have the student version, which prints a "Student Version of Matlab" annoying line in the bottom. So what i always do is to disable page border and put it in landscape mode in Matlab's print dialog, enable print to file, print. Then i run the file through this: awk '!($1 == "(Student")' $1 >$1.tmp ps2epsi $1.tmp $1 rm -f $1.tmp (yes, bad shell syntax --- it should handle the argument filename's extension much better, but i'm no shell wizard and i need to finish my thesis before learning bash better) This script removes that annoying line from the postscript and generates the bbox and removes the surrounding blank. The result is consistently good. Since other programs won't put that annoying text, you can still use the script, it just won't do anything in the first line (unless you DO have a "Student" text somewhere in the figure and you want to keep it :) ). Hope that helps. It took me a while to find a solution that works and that's simple. -- _ \\ \ Eric St-Jean, ing.stag. [EMAIL PROTECTED] \ \ Space Systems, Xiphos Technologies Inc \ \ (514)848-9640 fax 848-9644 \ \ Montreal, Quebec \ \\
Re: problems with .eps-files
IIRC gs adjust the bbox when you convert eps - eps. Try gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps What about this? #!/bin/sh # eps2eps -- in order to correct bounding box # $Id: eps2eps,v 1.3 2000/10/29 23:38:18 matej Exp $ # $Log: eps2eps,v $ # Revision 1.3 2000/10/29 23:38:18 matej # TMP setting in true side of if. # # Revision 1.2 2000/10/29 23:35:34 matej # Correction of if command -- shit! # # Revision 1.1 2000/10/29 23:28:59 matej # Initial revision # if [ -z $2 ] then TMP=` mktemp /tmp/eps2eps.XX ` cp $1 $TMP INPUT=$TMP OUTPUT=$1 else INPUT=$1 OUTPUT=$2 fi gs -dBATCH -dNOPAUSE -sDEVICE=epswrite -sOutputFile=$OUTPUT $INPUT trap "rm $TMP* 2/dev/null" 0
Re: problems with .eps-files
IIRC gs adjust the bbox when you convert eps - eps. Try gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps What about this? #!/bin/sh # eps2eps -- in order to correct bounding box # $Id: eps2eps,v 1.3 2000/10/29 23:38:18 matej Exp $ # $Log: eps2eps,v $ # Revision 1.3 2000/10/29 23:38:18 matej # TMP setting in true side of if. # # Revision 1.2 2000/10/29 23:35:34 matej # Correction of if command -- shit! # # Revision 1.1 2000/10/29 23:28:59 matej # Initial revision # if [ -z $2 ] then TMP=` mktemp /tmp/eps2eps.XX ` cp $1 $TMP INPUT=$TMP OUTPUT=$1 else INPUT=$1 OUTPUT=$2 fi gs -dBATCH -dNOPAUSE -sDEVICE=epswrite -sOutputFile=$OUTPUT $INPUT trap "rm $TMP* 2/dev/null" 0
Re: problems with .eps-files
> IIRC gs adjust the bbox when you convert eps -> eps. Try > gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps What about this? #!/bin/sh # eps2eps -- in order to correct bounding box # $Id: eps2eps,v 1.3 2000/10/29 23:38:18 matej Exp $ # $Log: eps2eps,v $ # Revision 1.3 2000/10/29 23:38:18 matej # TMP setting in true side of if. # # Revision 1.2 2000/10/29 23:35:34 matej # Correction of if command -- shit! # # Revision 1.1 2000/10/29 23:28:59 matej # Initial revision # if [ -z $2 ] then TMP=` mktemp /tmp/eps2eps.XX ` cp $1 $TMP INPUT=$TMP OUTPUT=$1 else INPUT=$1 OUTPUT=$2 fi gs -dBATCH -dNOPAUSE -sDEVICE=epswrite -sOutputFile=$OUTPUT $INPUT trap "rm $TMP* 2>/dev/null" 0
Re: problems with .eps-files
On Thu, 26 Oct 2000, Wolfgang Engelmann [EMAIL PROTECTED]: However, I am having problems with the bounding box. Some of the figures overlay the horizontal line of my (fancy style) header or sometimes even the text in the header. How can I trim the figure to avoid it? IIRC gs adjust the bbox when you convert eps - eps. Try gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps *Problem 2* When I view my book.ps under ghostview, it stops displaying the pages before the end. View it in gs (running from a terminal) and take a look at the output. gs filename.ps -- Philipp Lehman [EMAIL PROTECTED]
Re: problems with .eps-files
On Thu, 26 Oct 2000, Wolfgang Engelmann [EMAIL PROTECTED]: However, I am having problems with the bounding box. Some of the figures overlay the horizontal line of my (fancy style) header or sometimes even the text in the header. How can I trim the figure to avoid it? IIRC gs adjust the bbox when you convert eps - eps. Try gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps *Problem 2* When I view my book.ps under ghostview, it stops displaying the pages before the end. View it in gs (running from a terminal) and take a look at the output. gs filename.ps -- Philipp Lehman [EMAIL PROTECTED]
Re: problems with .eps-files
On Thu, 26 Oct 2000, Wolfgang Engelmann <[EMAIL PROTECTED]: >However, I am having problems with the bounding box. Some of the >figures overlay the horizontal line of my (fancy style) header or >sometimes even the text in the header. How can I trim the figure >to avoid it? IIRC gs adjust the bbox when you convert eps -> eps. Try gs -dBATCH -sDEVICE=epswrite -sOutputFile=new.eps old.eps >*Problem 2* When I view my book.ps under ghostview, it stops >displaying the pages before the end. View it in gs (running from a terminal) and take a look at the output. gs filename.ps -- Philipp Lehman <[EMAIL PROTECTED]>