Re: eps-png-eps conversion
Duncan == Duncan Simpson [EMAIL PROTECTED] writes: Duncan If I understood it correctly last time I saw it epsi files are Duncan eps files with a comment that contans a bitmap representation Duncan of the image. Un*x systems usually have ghostscript and at Duncan least some programs that know one of the way to use it (xdvi Duncan knowns how to get ghostscript to render into a window, for Duncan example). LyX might prefer getting ghostscript to generate png Duncan or something similar but either way the bitmap is just a waste Duncan of space. The problem we have here is not that it wastes space, but that some tools alledgedly choke on this preview. JMarc
Re: eps->png->eps conversion
> "Duncan" == Duncan Simpson <[EMAIL PROTECTED]> writes: Duncan> If I understood it correctly last time I saw it epsi files are Duncan> eps files with a comment that contans a bitmap representation Duncan> of the image. Un*x systems usually have ghostscript and at Duncan> least some programs that know one of the way to use it (xdvi Duncan> knowns how to get ghostscript to render into a window, for Duncan> example). LyX might prefer getting ghostscript to generate png Duncan> or something similar but either way the bitmap is just a waste Duncan> of space. The problem we have here is not that it wastes space, but that some tools alledgedly choke on this preview. JMarc
Re: eps-png-eps conversion
Perhaps this'll do it ;-) \converter epsi eps if [ $$i != $$o ]; then cp -f $$i $$o; fi Sorry all, I totally forgot to follow this up. Anyways, I tried this with 122cvs (from a few days ago now) and it worked well for me, as far as i can see. One question, what happens if $$i=$$o? Thanks, Rod
Re: eps-png-eps conversion
On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: Perhaps this'll do it ;-) \converter epsi eps if [ $$i != $$o ]; then cp -f $$i $$o; fi Sorry all, I totally forgot to follow this up. Anyways, I tried this with 122cvs (from a few days ago now) and it worked well for me, as far as i can see. One question, what happens if $$i=$$o? The converter returns an exit status of 0 (success) having done nothing. Since you told me that LaTeX is perfectly happy with your epsi files, then this should be sufficient to overcome any pedantry on the part of LyX and just let things work. The converter mechanism is very powerful, but sometimes I think we try too hard to configure it so that it will acommodate different systems automatically. Angus
Re: eps-png-eps conversion
The converter returns an exit status of 0 (success) having done nothing. Since you told me that LaTeX is perfectly happy with your epsi files, then this should be sufficient to overcome any pedantry on the part of LyX and just let things work. Indeed; this seems to be the right behaviour. I certainly get output that looks fine. The converter mechanism is very powerful, but sometimes I think we try too hard to configure it so that it will acommodate different systems automatically. _ rod | Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea. | They Might Be Giants, Lincoln
Re: eps-png-eps conversion
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: Perhaps this'll do it ;-) \converter epsi eps if [ $$i != $$o ]; then cp -f $$i $$o; fi Sorry all, I totally forgot to follow this up. Anyways, I tried this with 122cvs (from a few days ago now) and it worked well for me, as far as i can see. One question, what happens if $$i=$$o? Angus The converter returns an exit status of 0 (success) having done Angus nothing. Since you told me that LaTeX is perfectly happy with Angus your epsi files, then this should be sufficient to overcome any Angus pedantry on the part of LyX and just let things work. OK, I think we have to stop and think a bit here. As far as I understand the situation, the detection of epsi files has been added to lyx 1.2.1 because there were some epsi files that dvips (or is it convert?) could not digest easily. So the idea at this time was to use eps2eps to strip out the preview from epsi files and make them work effortlessly. However, there are problems with that 1/ I forgot to apply a patch from Herbert to define properly the epsi converters in 1.2.1 (this is fixed now) 2/ since epsi and eps files have the same extension (.eps) the converter will try to run eps2eps with the same name twice, which is a very bad idea. And now, the solution proposed by angus does not count, since we might as well get rid of epsi support. Therefore, I see two solutions: 1/ get rid of the special epsi support. Has there been a thorough examination of what kind of files create problems, and which programs are affected (dvips? ghostscript?). If this is solved by upgrading those programs, then I would consider that we should get rid of the special epsi support and tell people to upgrade their faulty tools. 2/ if we _need_ epsi support, then we should fix the Converter class so that it behaves correctly when the from and to formats have the same extension. I see two ways a) use a temporary file when invoking the converter and then rename the file. This means though that the converter will overwrite the original file, which may not be a good idea b) let the converter modify the name of the output file, like foo.eps1 instead of foo.eps. Dekel, is that feasible? I am really surprised by the number of people who use this crappy epsi format that nobody really needs. I guess this is related to the use of windows tools to create the files. If we really get too annoyed by this problem, I think the solution would be to tell people to just generate eps files without previews. I'd really want to get help on this, since this is one of the few reasons that make me delay the 1.2.2 release. JMarc
Re: eps-png-eps conversion
On Wednesday 09 October 2002 10:57 am, Jean-Marc Lasgouttes wrote: Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: Perhaps this'll do it ;-) \converter epsi eps if [ $$i != $$o ]; then cp -f $$i $$o; fi Sorry all, I totally forgot to follow this up. Anyways, I tried this with 122cvs (from a few days ago now) and it worked well for me, as far as i can see. One question, what happens if $$i=$$o? Angus The converter returns an exit status of 0 (success) having done Angus nothing. Since you told me that LaTeX is perfectly happy with Angus your epsi files, then this should be sufficient to overcome any Angus pedantry on the part of LyX and just let things work. OK, I think we have to stop and think a bit here. As far as I understand the situation, the detection of epsi files has been added to lyx 1.2.1 because there were some epsi files that dvips (or is it convert?) could not digest easily. So the idea at this time was to use eps2eps to strip out the preview from epsi files and make them work effortlessly. However, there are problems with that Sure. I was just trying to give Rod something that would work for him. I believe I sent the 'cp' fix to him personally, not to the list and only after he told me that LaTeX could deal with his epsi files. Therefore, I see two solutions: [snip] Actually, since it is us that invokes the converter, why don't we ensure that file names are unique. Eg static int counter = 0; string const tofilebase = tostr(++counter) + ...; Angus
Re: eps-png-eps conversion
Therefore, I see two solutions: 1/ get rid of the special epsi support. Personally, this would suit me, but I hesitate to say that it will work for everyone. 2/ if we _need_ epsi support, then we should fix the Converter class so that it behaves correctly when the from and to formats have the same extension. I see two ways This might seem to be a better general solution. I could imagine that the need to filter files might crop up again, especially if backends other than latex are to be used. I am really surprised by the number of people who use this crappy epsi format that nobody really needs. I guess this is related to the use of windows tools to create the files. If we really get too annoyed by this problem, I think the solution would be to tell people to just generate eps files without previews. In vague defense of epsi, in this case it was generated on purpose, as I had the need (at the time) to share then with windows users. If they don't get a preview in Word, they tend to get a little upset. Anyways, just my thoughts. Thanks for the help with this, Rod _ rod | Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea. | They Might Be Giants, Lincoln
Re: eps-png-eps conversion
If I understood it correctly last time I saw it epsi files are eps files with a comment that contans a bitmap representation of the image. Un*x systems usually have ghostscript and at least some programs that know one of the way to use it (xdvi knowns how to get ghostscript to render into a window, for example). LyX might prefer getting ghostscript to generate png or something similar but either way the bitmap is just a waste of space. If you are using windows then people probably except you to use word, which can not use ghostscript even if it is installed. You can see a version of the picture if it is epsi, but not it is jsut eps, and not either format on a non-postscript printer. GSview is installed widely but the use of anything not mauled by microsoft, especially if it is GPL or LGPL, is obviously an unamerican activity (at least according to M$'s anti-GPL FUD). LyX can use this fact to show that free software is not only cheaper but also better quality too :-) -- Duncan (-: software industry, the: unique industry where selling substandard goods is legal and you can charge extra for fixing the problems.
Re: eps->png->eps conversion
> > Perhaps this'll do it ;-) > \converter epsi eps "if [ $$i != $$o ]; then cp -f $$i $$o; fi" > "" > Sorry all, I totally forgot to follow this up. Anyways, I tried this with 122cvs (from a few days ago now) and it worked well for me, as far as i can see. One question, what happens if $$i=$$o? Thanks, Rod
Re: eps->png->eps conversion
On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: > > Perhaps this'll do it ;-) > > \converter epsi eps "if [ $$i != $$o ]; then cp -f $$i $$o; > > fi" "" > > Sorry all, I totally forgot to follow this up. Anyways, I > tried this with 122cvs (from a few days ago now) and it worked > well for me, as far as i can see. > > One question, what happens if $$i=$$o? The converter returns an exit status of 0 (success) having done nothing. Since you told me that LaTeX is perfectly happy with your epsi files, then this should be sufficient to overcome any pedantry on the part of LyX and just let things work. The converter mechanism is very powerful, but sometimes I think we try too hard to configure it so that it will acommodate different systems automatically. Angus
Re: eps->png->eps conversion
> > The converter returns an exit status of 0 (success) having done > nothing. Since you told me that LaTeX is perfectly happy with > your epsi files, then this should be sufficient to overcome any > pedantry on the part of LyX and just let things work. Indeed; this seems to be the right behaviour. I certainly get output that looks fine. > The converter mechanism is very powerful, but sometimes I think > we try too hard to configure it so that it will acommodate > different systems automatically. _ rod | "Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea." | They Might Be Giants, Lincoln
Re: eps->png->eps conversion
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: >> > Perhaps this'll do it ;-) > \converter epsi eps "if [ $$i != $$o >> ]; then cp -f $$i $$o; > fi" "" >> >> Sorry all, I totally forgot to follow this up. Anyways, I tried >> this with 122cvs (from a few days ago now) and it worked well for >> me, as far as i can see. >> >> One question, what happens if $$i=$$o? Angus> The converter returns an exit status of 0 (success) having done Angus> nothing. Since you told me that LaTeX is perfectly happy with Angus> your epsi files, then this should be sufficient to overcome any Angus> pedantry on the part of LyX and just let things work. OK, I think we have to stop and think a bit here. As far as I understand the situation, the detection of epsi files has been added to lyx 1.2.1 because there were some epsi files that dvips (or is it convert?) could not digest easily. So the idea at this time was to use eps2eps to strip out the preview from epsi files and make them work effortlessly. However, there are problems with that 1/ I forgot to apply a patch from Herbert to define properly the epsi converters in 1.2.1 (this is fixed now) 2/ since epsi and eps files have the same extension (.eps) the converter will try to run eps2eps with the same name twice, which is a very bad idea. And now, the solution proposed by angus does not count, since we might as well get rid of epsi support. Therefore, I see two solutions: 1/ get rid of the special epsi support. Has there been a thorough examination of what kind of files create problems, and which programs are affected (dvips? ghostscript?). If this is solved by upgrading those programs, then I would consider that we should get rid of the special epsi support and tell people to upgrade their faulty tools. 2/ if we _need_ epsi support, then we should fix the Converter class so that it behaves correctly when the from and to formats have the same extension. I see two ways a) use a temporary file when invoking the converter and then rename the file. This means though that the converter will overwrite the original file, which may not be a good idea b) let the converter modify the name of the output file, like foo.eps1 instead of foo.eps. Dekel, is that feasible? I am really surprised by the number of people who use this crappy epsi format that nobody really needs. I guess this is related to the use of windows tools to create the files. If we really get too annoyed by this problem, I think the solution would be to tell people to just generate eps files without previews. I'd really want to get help on this, since this is one of the few reasons that make me delay the 1.2.2 release. JMarc
Re: eps->png->eps conversion
On Wednesday 09 October 2002 10:57 am, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> On Wednesday 09 October 2002 9:10 am, Rod Pinna wrote: > >> > Perhaps this'll do it ;-) > \converter epsi eps "if [ $$i > >> > != $$o > >> > >> ]; then cp -f $$i $$o; > fi" "" > >> > >> Sorry all, I totally forgot to follow this up. Anyways, I > >> tried this with 122cvs (from a few days ago now) and it > >> worked well for me, as far as i can see. > >> > >> One question, what happens if $$i=$$o? > > Angus> The converter returns an exit status of 0 (success) > having done Angus> nothing. Since you told me that LaTeX is > perfectly happy with Angus> your epsi files, then this should > be sufficient to overcome any Angus> pedantry on the part of > LyX and just let things work. > > OK, I think we have to stop and think a bit here. As far as I > understand the situation, the detection of epsi files has been > added to lyx 1.2.1 because there were some epsi files that > dvips (or is it convert?) could not digest easily. So the idea > at this time was to use eps2eps to strip out the preview from > epsi files and make them work effortlessly. However, there are > problems with that Sure. I was just trying to give Rod something that would work for him. I believe I sent the 'cp' fix to him personally, not to the list and only after he told me that LaTeX could deal with his epsi files. > Therefore, I see two solutions: [snip] Actually, since it is us that invokes the converter, why don't we ensure that file names are unique. Eg static int counter = 0; string const tofilebase = tostr(++counter) + ...; Angus
Re: eps->png->eps conversion
> Therefore, I see two solutions: > > 1/ get rid of the special epsi support. Personally, this would suit me, but I hesitate to say that it will work for everyone. > > 2/ if we _need_ epsi support, then we should fix the Converter class > so that it behaves correctly when the from and to formats have the > same extension. I see two ways This might seem to be a better general solution. I could imagine that the need to filter files might crop up again, especially if backends other than latex are to be used. > I am really surprised by the number of people who use this crappy epsi > format that nobody really needs. I guess this is related to the use > of windows tools to create the files. If we really get too annoyed by > this problem, I think the solution would be to tell people to just > generate eps files without previews. In vague defense of epsi, in this case it was generated on purpose, as I had the need (at the time) to share then with windows users. If they don't get a preview in Word, they tend to get a little upset. Anyways, just my thoughts. Thanks for the help with this, Rod _ rod | "Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea." | They Might Be Giants, Lincoln
Re: eps->png->eps conversion
If I understood it correctly last time I saw it epsi files are eps files with a comment that contans a bitmap representation of the image. Un*x systems usually have ghostscript and at least some programs that know one of the way to use it (xdvi knowns how to get ghostscript to render into a window, for example). LyX might prefer getting ghostscript to generate png or something similar but either way the bitmap is just a waste of space. If you are using windows then people probably except you to use word, which can not use ghostscript even if it is installed. You can see a version of the picture if it is epsi, but not it is jsut eps, and not either format on a non-postscript printer. GSview is installed widely but the use of anything not mauled by microsoft, especially if it is GPL or LGPL, is obviously an unamerican activity (at least according to M$'s anti-GPL FUD). LyX can use this fact to show that free software is not only cheaper but also better quality too :-) -- Duncan (-: "software industry, the: unique industry where selling substandard goods is legal and you can charge extra for fixing the problems."
Re: eps-png-eps conversion
Dekel == Dekel Tsur [EMAIL PROTECTED] writes: Dekel On Fri, Aug 23, 2002 at 04:05:42PM +0200, Jean-Marc Lasgouttes Dekel wrote: Rod Some of the images that it happens for for me are rasters Rod converted to eps. Some however are just eps (or epsi) files. Rod Actually, maybe it is only the epsi files it's converting. I know Rod I have in the past called some epsi files .eps. It seems an epsi-eps converter is missing in 1.2.1. Can you add one, with the command line eps2eps $$i $$o and see if it helps? Dekel epsi is EPS, so no conversion should be needed! OK, I finally found a little time to look at that. It seems that in the flurry of patch sent by Herbert, what was forgotten is an epsi-eps converter. I fixed that now in cvs. Rod, I would appreciate a lot if you could try that out. Dekel, from what I understand, it happens that dvips chokes on some epsi files and this is why herbert added this epsi support. However, it would certainly be nice if we could get rid of that. In particular, if we could find evidence that reasonably new versions of dvips do not chike on these files, I would be very happy to tell people 'upgrade dvips!'. Kind of problem with dvips can be seen at http://www.mail-archive.com/lyx-users@lists.lyx.org/msg08962.html There are probably newer reports, but I could not find them. I would really appreciate if somebody could (1) check that everything is fine now and (2) think about a better solution to support epsi. JMarc
Re: eps-png-eps conversion
OK, I finally found a little time to look at that. It seems that in the flurry of patch sent by Herbert, what was forgotten is an epsi-eps converter. I fixed that now in cvs. Rod, I would appreciate a lot if you could try that out. I've installed 122cvs, run reconfigure, exited, and restarted. I now get a whole series of errors such as Executing command:eps2eps '_home_rpinna_docs_thesis_results_C1-le1-CF-1MPa_C1-CF-1MPa-ld-100-ESuVar-0imp.eps' '_home_rpinna_docs_thesis_results_C1-le1-CF-1MPa_C1-CF-1MPa-ld-100-ESuVar-0imp.eps' Error: /typecheck in --.unread-- Operand stack: true --nostringval-- true 0 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop --nostringval-- 1 1 3 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1003/1123(ro)(G)-- --dict:0/20(G)-- --dict:67/200(L)-- Current allocation mode is local AFPL Ghostscript 7.03: Unrecoverable error, exit code 1 Oddly, if I go to the file, and type eps2eps input.eps output.eps I don't get the error. Both the original file and the converted file are viewable in ghostscript. Rod _ rod | Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea. | They Might Be Giants, Lincoln
Re: eps-png-eps conversion
Looking in the tmp directory, the eps file that gets left there only appears to contain the postscript prolog. Rod _ rod | Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea. | They Might Be Giants, Lincoln
Re: eps->png->eps conversion
> "Dekel" == Dekel Tsur <[EMAIL PROTECTED]> writes: Dekel> On Fri, Aug 23, 2002 at 04:05:42PM +0200, Jean-Marc Lasgouttes Dekel> wrote: Rod> Some of the images that it happens for for me are rasters Rod> converted to eps. Some however are just eps (or epsi) files. >> Rod> Actually, maybe it is only the epsi files it's converting. I know Rod> I have in the past called some epsi files .eps. >> It seems an epsi->eps converter is missing in 1.2.1. Can you add >> one, with the command line "eps2eps $$i $$o" and see if it helps? Dekel> epsi is EPS, so no conversion should be needed! OK, I finally found a little time to look at that. It seems that in the flurry of patch sent by Herbert, what was forgotten is an epsi->eps converter. I fixed that now in cvs. Rod, I would appreciate a lot if you could try that out. Dekel, from what I understand, it happens that dvips chokes on some epsi files and this is why herbert added this epsi support. However, it would certainly be nice if we could get rid of that. In particular, if we could find evidence that reasonably new versions of dvips do not chike on these files, I would be very happy to tell people 'upgrade dvips!'. Kind of problem with dvips can be seen at http://www.mail-archive.com/lyx-users@lists.lyx.org/msg08962.html There are probably newer reports, but I could not find them. I would really appreciate if somebody could (1) check that everything is fine now and (2) think about a better solution to support epsi. JMarc
Re: eps->png->eps conversion
> OK, I finally found a little time to look at that. It seems that in > the flurry of patch sent by Herbert, what was forgotten is an > epsi->eps converter. I fixed that now in cvs. Rod, I would appreciate > a lot if you could try that out. I've installed 122cvs, run reconfigure, exited, and restarted. I now get a whole series of errors such as Executing command:eps2eps '_home_rpinna_docs_thesis_results_C1-le1-CF-1MPa_C1-CF-1MPa-ld-100-ESuVar-0imp.eps' '_home_rpinna_docs_thesis_results_C1-le1-CF-1MPa_C1-CF-1MPa-ld-100-ESuVar-0imp.eps' Error: /typecheck in --.unread-- Operand stack: true --nostringval-- true 0 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop --nostringval-- 1 1 3 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1003/1123(ro)(G)-- --dict:0/20(G)-- --dict:67/200(L)-- Current allocation mode is local AFPL Ghostscript 7.03: Unrecoverable error, exit code 1 Oddly, if I go to the file, and type eps2eps input.eps output.eps I don't get the error. Both the original file and the converted file are viewable in ghostscript. Rod _ rod | "Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea." | They Might Be Giants, Lincoln
Re: eps->png->eps conversion
Looking in the tmp directory, the eps file that gets left there only appears to contain the postscript prolog. Rod _ rod | "Beneath the waves, the waves / That's where I will be / | I'm going to see the cow beneath the sea." | They Might Be Giants, Lincoln
Re: eps-png-eps conversion
On sobota 24 sierpie 2002 12:34 am, Rod Pinna wrote: AFAIK, epsi is an EPS file with a bitmap thumbnail (stored as a Postscript comment). Yup. I have some files in that format, as I sometimes have a need to share graphs with word users. Using .epsi means that they get a nice preview in word. Also, Word can print them out on non-ps printers. Side note: Word prints the previews only on non-ps printers. These look butt ugly and make many not-knowing-any-better people think that you've sent them some crap-quality graphics. Word doesn't really work with .eps files unless you've got a way to print out postscript files. For majority of users that means that .eps files and Word are a big no-no. Cheers, Kuba Ober
Re: eps->png->eps conversion
On sobota 24 sierpie 2002 12:34 am, Rod Pinna wrote: > > AFAIK, epsi is an EPS file with a bitmap thumbnail (stored as a > > Postscript comment). > > Yup. I have some files in that format, as I sometimes have a need to share > graphs with word users. Using .epsi means that they get a nice preview in > word. Also, Word can print them out on non-ps printers. Side note: Word prints the previews only on non-ps printers. These look butt ugly and make many not-knowing-any-better people think that you've sent them some crap-quality graphics. Word doesn't really work with .eps files unless you've got a way to print out postscript files. For majority of users that means that .eps files and Word are a big no-no. Cheers, Kuba Ober