From: Jerry <lan...@qw...> - 2007-08-09 23:24:47
|
This is kind of a low-priority issue but I thought I'd throw it out anyway. There is a spiffy new PDF/PS reader being developed for the Mac called Skim. (OS X has a PDFkit which helps such projects.) The main purpose is to provide a way of reviewing and marking up PDF and PS files such as papers and manuscripts, as well as being a general PDF/PS viewer. It also has the ability to act as a display for TeX output and in that capacity it can optionally check for changes to a file and re-display the file if changes have been made. I've been using Skim lately (in lieu of an AquaTerm fix that was discussed here earlier) to look at PLplot output after my program has finished. I had thought that it would automatically reload the file when my program finished, having noticed that the file had changed. However, this does not happen and I have to manually reload the file. The guys working on Skim have deduced that PLplot must first delete the old file and then make a new file and Skim does not see this as a change to a single file. Jerry |
From: Andrew R. <and...@us...> - 2007-08-13 09:36:34
|
Jerry, When plplot writes any file it uses fopen to open the file first, with the "wb+" options to make the file writeable and to truncate the file if it already exists. This is the standard C way to deal with opening files so I'm surprised it doesn't work. What do the Skim people "recommend" as a way of opening files? Are you using the ps driver or the psttf driver? The psttf driver has to do some more complicated manouvers to get a C++ stream. It first opens and truncates the file as above. It the closes the C stream and opens the file again as a C++ stream. Andrew On Thu, Aug 09, 2007 at 04:24:43PM -0700, Jerry wrote: > This is kind of a low-priority issue but I thought I'd throw it out > anyway. There is a spiffy new PDF/PS reader being developed for the > Mac called Skim. (OS X has a PDFkit which helps such projects.) The > main purpose is to provide a way of reviewing and marking up PDF and > PS files such as papers and manuscripts, as well as being a general > PDF/PS viewer. It also has the ability to act as a display for TeX > output and in that capacity it can optionally check for changes to a > file and re-display the file if changes have been made. I've been > using Skim lately (in lieu of an AquaTerm fix that was discussed here > earlier) to look at PLplot output after my program has finished. I > had thought that it would automatically reload the file when my > program finished, having noticed that the file had changed. However, > this does not happen and I have to manually reload the file. The guys > working on Skim have deduced that PLplot must first delete the old > file and then make a new file and Skim does not see this as a change > to a single file. > > Jerry > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |
From: Jerry <lan...@qw...> - 2007-08-14 06:56:33
|
On Aug 13, 2007, at 2:36 AM, Andrew Ross wrote: > > Jerry, > > When plplot writes any file it uses fopen to open the file first, with > the "wb+" options to make the file writeable and to truncate the > file if > it already exists. This is the standard C way to deal with opening > files so I'm surprised it doesn't work. What do the Skim people > "recommend" as a way of opening files? They didn't recommend anything specifically--the solution I use is to make an edit to the file so that the program sees it as "dirty." Skim has (as do most Mac programs--not sure about non-Mac) a Revert command under the File menu. Before editing the file, Revert is inactive ("grayed out") and after the edit it is active--selecting Revert then loads the contents of the file from the state of it's last "save." > Here is the most relevant comment from the other group: In fact PS files are followed for file changes. So the problem is somewhere else. Probably the PS file is deleted before it is replaced, in which case it's lost track of. > Are you using the ps driver or the psttf driver? Not sure, and don't know how to find out. Suggestions accepted. Jerry > The psttf driver has to > do some more complicated manouvers to get a C++ stream. It first opens > and truncates the file as above. It the closes the C stream and opens > the file again as a C++ stream. > > Andrew > > On Thu, Aug 09, 2007 at 04:24:43PM -0700, Jerry wrote: >> This is kind of a low-priority issue but I thought I'd throw it out >> anyway. There is a spiffy new PDF/PS reader being developed for the >> Mac called Skim. (OS X has a PDFkit which helps such projects.) The >> main purpose is to provide a way of reviewing and marking up PDF and >> PS files such as papers and manuscripts, as well as being a general >> PDF/PS viewer. It also has the ability to act as a display for TeX >> output and in that capacity it can optionally check for changes to a >> file and re-display the file if changes have been made. I've been >> using Skim lately (in lieu of an AquaTerm fix that was discussed here >> earlier) to look at PLplot output after my program has finished. I >> had thought that it would automatically reload the file when my >> program finished, having noticed that the file had changed. However, >> this does not happen and I have to manually reload the file. The guys >> working on Skim have deduced that PLplot must first delete the old >> file and then make a new file and Skim does not see this as a change >> to a single file. >> >> Jerry >> |
From: Jerry <lan...@qw...> - 2007-08-14 11:53:13
|
With the help of the Skim list (and one Christiaan Hofman), we might have figured out why Skim (the PDF-PS reader) isn't reloading changed files. Recall that the initial motivation for automatic reloading was use Skim as a viewer for TeX. Since TeX can write to the file over some period of time, they look for %%EOF to determine if the file is fully written. PLplot does not terminate a PS file that way. Here is his comment: > On Aug 14, 2007, at 4:42 AM, Christiaan Hofman wrote: >> That explains it. We check for %%EOF to find out if the file has been >> fully written. Otherwise we have no way to know if a file is complete >> (and tex writes incrementally, so loading too earl;y can lead to a >> crash). >> >> Christiaan >> Jerry On Aug 13, 2007, at 11:56 PM, Jerry wrote: > > On Aug 13, 2007, at 2:36 AM, Andrew Ross wrote: > >> >> Jerry, >> >> When plplot writes any file it uses fopen to open the file first, >> with >> the "wb+" options to make the file writeable and to truncate the >> file if >> it already exists. This is the standard C way to deal with opening >> files so I'm surprised it doesn't work. What do the Skim people >> "recommend" as a way of opening files? > > They didn't recommend anything specifically--the solution I use is to > make an edit to the file so that the program sees it as "dirty." Skim > has (as do most Mac programs--not sure about non-Mac) a Revert > command under the File menu. Before editing the file, Revert is > inactive ("grayed out") and after the edit it is active--selecting > Revert then loads the contents of the file from the state of it's > last "save." > >> > Here is the most relevant comment from the other group: > > In fact PS files are followed for file changes. So the problem is > somewhere else. Probably the PS file is deleted before it is > replaced, in which case it's lost track of. > >> Are you using the ps driver or the psttf driver? > > Not sure, and don't know how to find out. Suggestions accepted. > > Jerry > >> The psttf driver has to >> do some more complicated manouvers to get a C++ stream. It first >> opens >> and truncates the file as above. It the closes the C stream and opens >> the file again as a C++ stream. >> >> Andrew >> >> On Thu, Aug 09, 2007 at 04:24:43PM -0700, Jerry wrote: >>> This is kind of a low-priority issue but I thought I'd throw it out >>> anyway. There is a spiffy new PDF/PS reader being developed for the >>> Mac called Skim. (OS X has a PDFkit which helps such projects.) The >>> main purpose is to provide a way of reviewing and marking up PDF and >>> PS files such as papers and manuscripts, as well as being a general >>> PDF/PS viewer. It also has the ability to act as a display for TeX >>> output and in that capacity it can optionally check for changes to a >>> file and re-display the file if changes have been made. I've been >>> using Skim lately (in lieu of an AquaTerm fix that was discussed >>> here >>> earlier) to look at PLplot output after my program has finished. I >>> had thought that it would automatically reload the file when my >>> program finished, having noticed that the file had changed. However, >>> this does not happen and I have to manually reload the file. The >>> guys >>> working on Skim have deduced that PLplot must first delete the old >>> file and then make a new file and Skim does not see this as a change >>> to a single file. >>> >>> Jerry >>> > |
From: Alan W. I. <ir...@be...> - 2007-08-14 14:59:10
|
On 2007-08-14 04:53-0700 Jerry wrote: > With the help of the Skim list (and one Christiaan Hofman), we might > have figured out why Skim (the PDF-PS reader) isn't reloading changed > files. Recall that the initial motivation for automatic reloading was > use Skim as a viewer for TeX. Since TeX can write to the file over > some period of time, they look for %%EOF to determine if the file is > fully written. PLplot does not terminate a PS file that way. > > Here is his comment: > > >> On Aug 14, 2007, at 4:42 AM, Christiaan Hofman wrote: >>> That explains it. We check for %%EOF to find out if the file has been >>> fully written. Otherwise we have no way to know if a file is complete >>> (and tex writes incrementally, so loading too earl;y can lead to a >>> crash). >>> >>> Christiaan >>> Andrew, I have just discovered that -dev psttfc and -dev pscairo put the %%EOF postscript command at the end of the postscript file and -dev psc does not. Could you fix that psc problem, please? Once you do so, I am virtually positive that Jerry's troubles with Skim will be over. Jerry, to answer your previous question about which device you are using, the only ways you can choose the device is with the command-line -dev option or interactively from a menu, or with the plsdev command. So you must be doing one of those with either the psc, psttfc, or pscairo devices. The latter two require extra libraries which you probably don't have so I am virtually positive you are using the psc device on those grounds alone, and the lack of %%EOF for that device which I have asked Andrew to fix pretty much clinches it. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |
From: Andrew R. <and...@us...> - 2007-08-14 18:17:31
|
On Tue, Aug 14, 2007 at 07:58:42AM -0700, Alan Irwin wrote: > On 2007-08-14 04:53-0700 Jerry wrote: > > > With the help of the Skim list (and one Christiaan Hofman), we might > > have figured out why Skim (the PDF-PS reader) isn't reloading changed > > files. Recall that the initial motivation for automatic reloading was > > use Skim as a viewer for TeX. Since TeX can write to the file over > > some period of time, they look for %%EOF to determine if the file is > > fully written. PLplot does not terminate a PS file that way. > > > > Here is his comment: > > > > > >> On Aug 14, 2007, at 4:42 AM, Christiaan Hofman wrote: > >>> That explains it. We check for %%EOF to find out if the file has been > >>> fully written. Otherwise we have no way to know if a file is complete > >>> (and tex writes incrementally, so loading too earl;y can lead to a > >>> crash). > >>> > >>> Christiaan > >>> > > Andrew, I have just discovered that -dev psttfc and -dev pscairo put the > %%EOF postscript command at the end of the postscript file and -dev psc does > not. Could you fix that psc problem, please? > Once you do so, I am virtually positive that Jerry's troubles with > Skim will be over. > > Jerry, to answer your previous question about which device you are using, > the only ways you can choose the device is with the command-line -dev option > or interactively from a menu, or with the plsdev command. So you must be > doing one of those with either the psc, psttfc, or pscairo devices. The > latter two require extra libraries which you probably don't have so I am > virtually positive you are using the psc device on those grounds alone, and > the lack of %%EOF for that device which I have asked Andrew to fix pretty > much clinches it. Jerry, Please try the latest svn version which includes the fix for the ps driver to include %%EOF at the end of the file. Hopefully this will solve your Skim problems. Can you let me know if you see a blank page when it refreshes? I see this with ghostview. I know why, I'm just trying to ascertain if this is just a ghostview problem. Andrew |
From: Jerry <lan...@qw...> - 2007-08-15 05:13:47
|
On Aug 14, 2007, at 11:13 AM, Andrew Ross wrote: > On Tue, Aug 14, 2007 at 07:58:42AM -0700, Alan Irwin wrote: >> On 2007-08-14 04:53-0700 Jerry wrote: >> >>> With the help of the Skim list (and one Christiaan Hofman), we might >>> have figured out why Skim (the PDF-PS reader) isn't reloading >>> changed >>> files. Recall that the initial motivation for automatic reloading >>> was >>> use Skim as a viewer for TeX. Since TeX can write to the file over >>> some period of time, they look for %%EOF to determine if the file is >>> fully written. PLplot does not terminate a PS file that way. >>> >>> Here is his comment: >>> >>> >>>> On Aug 14, 2007, at 4:42 AM, Christiaan Hofman wrote: >>>>> That explains it. We check for %%EOF to find out if the file >>>>> has been >>>>> fully written. Otherwise we have no way to know if a file is >>>>> complete >>>>> (and tex writes incrementally, so loading too earl;y can lead to a >>>>> crash). >>>>> >>>>> Christiaan >>>>> >> >> Andrew, I have just discovered that -dev psttfc and -dev pscairo >> put the >> %%EOF postscript command at the end of the postscript file and - >> dev psc does >> not. Could you fix that psc problem, please? >> Once you do so, I am virtually positive that Jerry's troubles with >> Skim will be over. >> >> Jerry, to answer your previous question about which device you are >> using, >> the only ways you can choose the device is with the command-line - >> dev option >> or interactively from a menu, or with the plsdev command. So you >> must be >> doing one of those with either the psc, psttfc, or pscairo >> devices. The >> latter two require extra libraries which you probably don't have >> so I am >> virtually positive you are using the psc device on those grounds >> alone, and >> the lack of %%EOF for that device which I have asked Andrew to fix >> pretty >> much clinches it. > > Jerry, > > Please try the latest svn version which includes the fix for the ps > driver to include %%EOF at the end of the file. Hopefully this will > solve your Skim problems. Can you let me know if you see a blank page > when it refreshes? I see this with ghostview. I know why, I'm just > trying to ascertain if this is just a ghostview problem. > > Andrew > > Andrew, Problem solved. Thanks! I am not seeing a blank page--everything looks fine. Jerry |