Re: [preliminary patch] moving XFig files

2004-11-07 Thread Andre Poenitz
On Tue, Nov 02, 2004 at 10:28:33AM +, Andreas Vox wrote: Which, by the way, is now conceptually very easy. Just write a postscript parser and away you go... Shouldn't be as hard as parsing LaTeX, don't you think so? :-) Not at all. Ghostscript can do it just fine and provides enough

Re: [preliminary patch] moving XFig files

2004-11-07 Thread Andre Poenitz
On Tue, Nov 02, 2004 at 10:28:33AM +, Andreas Vox wrote: > < Which, by the way, is now conceptually very easy. Just write a > < postscript parser and away you go... > > Shouldn't be as hard as parsing LaTeX, don't you think so? :-) Not at all. Ghostscript can do it just fine and provides

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Angus Leeming
Georg Baum wrote: BTW, am I correct that LyX does not support EPS files which reference other files ... yet ;-) ? Yes. But this is something that only very few programs support. Do you want to create a .eps mover? Which, by the way, is now conceptually very easy. Just write a postscript

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Andreas Vox
Angus Leeming [EMAIL PROTECTED] writes: Georg Baum wrote: BTW, am I correct that LyX does not support EPS files which reference other files ... yet ? Yes. But this is something that only very few programs support. Do you want to create a .eps mover? Which, by the way, is now

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Georg Baum
Am Dienstag, 2. November 2004 11:28 schrieb Andreas Vox: Angus Leeming [EMAIL PROTECTED] writes: Which, by the way, is now conceptually very easy. Just write a postscript parser and away you go... Shouldn't be as hard as parsing LaTeX, don't you think so? :-) I am not so sure ;-)

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Angus Leeming
Georg Baum wrote: > >> BTW, am I correct that LyX does not support EPS files which >> reference other files ... yet ;-) ? > > Yes. But this is something that only very few programs support. Do > you want to create a .eps mover? Which, by the way, is now conceptually very easy. Just write a

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: < Georg Baum wrote: < < > < >> BTW, am I correct that LyX does not support EPS files which < >> reference other files ... yet ? < > < > Yes. But this is something that only very few programs support. Do < > you want to create a .eps mover? < < Which,

Re: [preliminary patch] moving XFig files

2004-11-02 Thread Georg Baum
Am Dienstag, 2. November 2004 11:28 schrieb Andreas Vox: > Angus Leeming <[EMAIL PROTECTED]> writes: > < Which, by the way, is now conceptually very easy. Just write a > < postscript parser and away you go... > > Shouldn't be as hard as parsing LaTeX, don't you think so? :-) I am not so sure

Re: [preliminary patch] moving XFig files

2004-11-01 Thread John Weiss
On Sat, Oct 30, 2004 at 01:48:47PM +, Andreas Vox wrote: Unfortunately it also resolves all contained file references relative to the directory of the symlink, not relative to the original file. So there's no real advantage to copying, Okay, then I'm confused and don't understand what it

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Angus Leeming
John Weiss wrote: BTW: While Windoze doesn't have native symlinks, it does have shortcuts. Additionally, with the Cygwin libraries, you can have symlinks under Windoze. They work only with the Cygwin programs, but that's a non-issue since (I assume) we need Cygwin for the Win-version of

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Andreas Vox
John Weiss [EMAIL PROTECTED] writes: Okay, then I'm confused and don't understand what it is you're doing. I was under the impression that the files in question weren't generated, but were pre-existing EPS files. I was also under the impression that you were moving everything to a

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Georg Baum
Andreas Vox wrote: If I understand correctly, it' s not the problem with EPS files themselves but with XFig files which reference EPS files, and TeX files which reference EPS files which are either pre-existing or generated from XFig, and about the resulting DVI files which have the same

Re: [preliminary patch] moving XFig files

2004-11-01 Thread John Weiss
On Sat, Oct 30, 2004 at 01:48:47PM +, Andreas Vox wrote: > Unfortunately it also resolves all contained file references > relative to the directory of the symlink, not relative to the > original file. So there's no real advantage to copying, Okay, then I'm confused and don't understand what

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Angus Leeming
John Weiss wrote: > BTW: While Windoze doesn't have native symlinks, it does have > shortcuts. Additionally, with the Cygwin libraries, you can have > symlinks under Windoze. They work only with the Cygwin programs, but > that's a non-issue since (I assume) we need Cygwin for the Win-version >

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Andreas Vox
John Weiss <[EMAIL PROTECTED]> writes: > Okay, then I'm confused and don't understand what it is you're doing. > I was under the impression that the files in question weren't > generated, but were pre-existing EPS files. I was also under the > impression that you were "moving" everything to a

Re: [preliminary patch] moving XFig files

2004-11-01 Thread Georg Baum
Andreas Vox wrote: > If I understand correctly, it' s not the problem with EPS files themselves > but with XFig files which reference EPS files, and TeX files which > reference EPS files which are either pre-existing or generated from XFig, > and about the resulting DVI files which have the same

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Angus Leeming
John Weiss wrote: On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. Question: Why move the files? Will LaTeX not respect

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Andreas Vox
John Weiss [EMAIL PROTECTED] writes: On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. Question: Why move the files? Will

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Georg Baum
Am Freitag, 29. Oktober 2004 19:49 schrieb Angus Leeming: It looks very clever. Didn't realise I'd helped write tex_copy.py. I used lyxpreview2bitmap.py as a base, and this really helped! I see why the $$l stuff is necessary, but... Well done anyway, for working it all out. You clearly have

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Angus Leeming
John Weiss wrote: > On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: >> The attached patch enables us to move XFig files to the temp directory >> and continue to generate DVI files, etc that show any included picture >> files. > > Question: > > Why move the files? Will LaTeX not

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Andreas Vox
John Weiss <[EMAIL PROTECTED]> writes: > > On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: > > The attached patch enables us to move XFig files to the temp directory and > > continue to generate DVI files, etc that show any included picture files. > > Question: > > Why move the

Re: [preliminary patch] moving XFig files

2004-10-30 Thread Georg Baum
Am Freitag, 29. Oktober 2004 19:49 schrieb Angus Leeming: > It looks very clever. Didn't realise I'd helped write tex_copy.py. I used lyxpreview2bitmap.py as a base, and this really helped! > I see why the $$l stuff is necessary, but... Well done anyway, for working > it all out. You clearly

Re: [preliminary patch] moving XFig files

2004-10-29 Thread Georg Baum
Georg Baum wrote: I did, and I could not break it, but I found another reason to use this mover stuff: Bug 605 is still not completely fixed. Consider the following situation: master.lyx includes sub/child.lyx sub/child.lyx includes sub/pic.fig (external material, relative file name)

Re: [preliminary patch] moving XFig files

2004-10-29 Thread Angus Leeming
Georg Baum wrote: Here comes an updated patch. It is basically the same plus Changelogs and documentation. Does anybody have objections? It is really necessary to document the new external template fetaures in Customization.lyx now. I started to do this, but it is not finished yet. It looks

Re: [preliminary patch] moving XFig files

2004-10-29 Thread John Weiss
On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. Question: Why move the files? Will LaTeX not respect symlinks? (Moving ... as in

Re: [preliminary patch] moving XFig files

2004-10-29 Thread Georg Baum
Georg Baum wrote: > I did, and I could not break it, but I found another reason to use this > mover stuff: Bug 605 is still not completely fixed. Consider the > following situation: > > master.lyx includes sub/child.lyx > sub/child.lyx includes sub/pic.fig (external material, relative file name)

Re: [preliminary patch] moving XFig files

2004-10-29 Thread Angus Leeming
Georg Baum wrote: > Here comes an updated patch. It is basically the same plus Changelogs and > documentation. Does anybody have objections? > > It is really necessary to document the new external template fetaures in > Customization.lyx now. I started to do this, but it is not finished yet. It

Re: [preliminary patch] moving XFig files

2004-10-29 Thread John Weiss
On Fri, Oct 22, 2004 at 09:59:40PM +0100, Angus Leeming wrote: > The attached patch enables us to move XFig files to the temp directory and > continue to generate DVI files, etc that show any included picture files. Question: Why move the files? Will LaTeX not respect symlinks? (Moving ... as

Re: [preliminary patch] moving XFig files

2004-10-26 Thread Georg Baum
Andreas Vox wrote: If you care about overwriting files you could test for existence of $2. This is not necessary here. Either $2 is in a temp dir, was previously created by the very same script and needs to be updated. Or it is not in the temp dir, and the caller of the script checked for its

Re: [preliminary patch] moving XFig files

2004-10-26 Thread Georg Baum
Andreas Vox wrote: > If you care about overwriting files you could test for > existence of $2. This is not necessary here. Either $2 is in a temp dir, was previously created by the very same script and needs to be updated. Or it is not in the temp dir, and the caller of the script checked for

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Alfredo Braunstein wrote: Andreas Vox wrote: Alfredo Braunstein [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? No idea about portability and such. Works on MacOSX (bash). forgot to mention, bash too ;-) Apparently the default on MacOSX is pwd -L

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Georg Baum wrote: Am Freitag, 22. Oktober 2004 22:59 schrieb Angus Leeming: I won't apply this until I've finished the stuff above, but it now works as-is. Perhaps someone else would like to test it out? I did, and I could not break it, but I found another reason to use this mover stuff:

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Alfredo Braunstein wrote: Incidentaly, is there a more elegant (shell script) way to ascertain whether two directories are the same than: # If the to and the from files are in the same directory, # then we're done. PRESENT_DIR=`pwd` cd `dirname $1` FROM_DIR=`pwd` cd `dirname $2`

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? test -e FOO is a bash extension. Also, dirname does nothing more than strip everything after the final '/' character. /foo/bar/../baz.cpp and /foo/baz.cpp will appear to be in different directories.

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Stephan Witt
Andreas Vox wrote: Angus Leeming [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? test -e FOO is a bash extension. Also, dirname does nothing more than strip everything after the final '/' character. /foo/bar/../baz.cpp and /foo/baz.cpp will appear to be in different

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Stephan Witt wrote: Andreas Vox wrote: Angus Leeming [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? test -e FOO is a bash extension. Also, dirname does nothing more than strip everything after the final '/' character. /foo/bar/../baz.cpp and /foo/baz.cpp will

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming [EMAIL PROTECTED] writes: I think we're getting a little too involved with generics here, given that this script is to be used to move .fig files into the temp directory only. I think that the test below should do the job and should be portable. PRESENT_DIR=$PWD cd `dirname

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Andreas Vox wrote: I think we're getting a little too involved with generics here, given that this script is to be used to move .fig files into the temp directory only. I think that the test below should do the job and should be portable. PRESENT_DIR=$PWD cd `dirname $1` || exit $?

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming [EMAIL PROTECTED] writes: Andreas Vox wrote: Doesn't resolve symlinks on Mac and I repeat: this script is to be used to move .fig files into the temp directory only. The worst case is that the directories are flagged as different and so 'sed' is used rather than 'cp'.

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Andreas Vox wrote: Doesn't resolve symlinks on Mac and I repeat: this script is to be used to move .fig files into the temp directory only. The worst case is that the directories are flagged as different and so 'sed' is used rather than 'cp'. Explain to me why that is a problem in real

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Angus Leeming wrote: Doesn't resolve symlinks on Mac and I repeat: this script is to be used to move .fig files into the temp directory only. The worst case is that the directories are flagged as different and so 'sed' is used rather than 'cp'. Explain to me why that is a problem in real

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming [EMAIL PROTECTED] writes: ... I thought it was about not accidently overwriting some files. Ach! Should I test for that? Hmmm. As it stands the script will overwrite an existing $2 if 'sed' is used and will not if 'cp' is used. I guess I'll change that to 'cp'

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Alfredo Braunstein wrote: > Andreas Vox wrote: > >> Alfredo Braunstein <[EMAIL PROTECTED]> writes: >> >>> what about [ `dirname "$1"` -ef `dirname "$2"` ] ? >>> >>> No idea about portability and such. >> >> Works on MacOSX (bash). > > forgot to mention, bash too ;-) > >> Apparently the

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Georg Baum wrote: > Am Freitag, 22. Oktober 2004 22:59 schrieb Angus Leeming: >> I won't apply this until I've finished the stuff above, but it now works >> as-is. Perhaps someone else would like to test it out? > > I did, and I could not break it, but I found another reason to use this > mover

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Alfredo Braunstein wrote: >> Incidentaly, is there a more elegant (shell script) way to ascertain >> whether two directories are the same than: >> >> # If the "to" and the "from" files are in the same directory, >> # then we're done. >> PRESENT_DIR=`pwd` >> cd `dirname "$1"` >> FROM_DIR=`pwd` >>

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: > > what about [ `dirname "$1"` -ef `dirname "$2"` ] ? > > "test -e FOO" is a bash extension. > Also, "dirname" does nothing more than strip everything after the final '/' > character. "/foo/bar/../baz.cpp" and "/foo/baz.cpp" will appear to be in >

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Stephan Witt
Andreas Vox wrote: Angus Leeming <[EMAIL PROTECTED]> writes: what about [ `dirname "$1"` -ef `dirname "$2"` ] ? "test -e FOO" is a bash extension. Also, "dirname" does nothing more than strip everything after the final '/' character. "/foo/bar/../baz.cpp" and "/foo/baz.cpp" will appear to be in

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Stephan Witt wrote: > Andreas Vox wrote: >> Angus Leeming <[EMAIL PROTECTED]> writes: >> >> what about [ `dirname "$1"` -ef `dirname "$2"` ] ? >>> >>>"test -e FOO" is a bash extension. >>>Also, "dirname" does nothing more than strip everything after the final >>>'/' character.

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: < I think we're getting a little too involved with generics here, given that < this script is to be used to move .fig files into the temp directory only. < I think that the test below should do the job and should be portable. < < PRESENT_DIR=$PWD < < cd

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Andreas Vox wrote: > < I think we're getting a little too involved with generics here, given > that < this script is to be used to move .fig files into the temp > directory only. < I think that the test below should do the job and > should be portable. < > < PRESENT_DIR=$PWD > < > < cd `dirname

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: < Andreas Vox wrote: < > Doesn't resolve symlinks on Mac < < and I repeat: this script is to be used to move .fig files into the temp < directory only. The worst case is that the directories are flagged as < different and so 'sed' is used rather than

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Andreas Vox wrote: > < > Doesn't resolve symlinks on Mac > < > < and I repeat: this script is to be used to move .fig files into the > temp directory only. The worst case is that the directories are flagged > as different and so 'sed' is used rather than 'cp'. Explain to me why > that is a problem

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Angus Leeming
Angus Leeming wrote: >> < > Doesn't resolve symlinks on Mac >> < >> < and I repeat: this script is to be used to move .fig files into the >> temp directory only. The worst case is that the directories are flagged >> as different and so 'sed' is used rather than 'cp'. Explain to me why >> that is a

Re: [preliminary patch] moving XFig files

2004-10-25 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: > >> ... I thought it was > >> about not accidently overwriting some files. > > > > Ach! Should I test for that? Hmmm. As it stands the script will overwrite > > an existing "$2" if 'sed' is used and will not if 'cp' is used. I guess > > I'll change that

Re: [preliminary patch] moving XFig files

2004-10-24 Thread Georg Baum
Am Freitag, 22. Oktober 2004 22:59 schrieb Angus Leeming: I won't apply this until I've finished the stuff above, but it now works as-is. Perhaps someone else would like to test it out? I did, and I could not break it, but I found another reason to use this mover stuff: Bug 605 is still not

Re: [preliminary patch] moving XFig files

2004-10-24 Thread Georg Baum
Am Freitag, 22. Oktober 2004 22:59 schrieb Angus Leeming: > I won't apply this until I've finished the stuff above, but it now works > as-is. Perhaps someone else would like to test it out? I did, and I could not break it, but I found another reason to use this mover stuff: Bug 605 is still not

Re: [preliminary patch] moving XFig files

2004-10-23 Thread Alfredo Braunstein
Andreas Vox wrote: Alfredo Braunstein [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? No idea about portability and such. Works on MacOSX (bash). forgot to mention, bash too ;-) Apparently the default on MacOSX is pwd -L rather than pwd -P as stated in the

Re: [preliminary patch] moving XFig files

2004-10-23 Thread Alfredo Braunstein
Andreas Vox wrote: > Alfredo Braunstein <[EMAIL PROTECTED]> writes: > >> what about [ `dirname "$1"` -ef `dirname "$2"` ] ? >> >> No idea about portability and such. > > Works on MacOSX (bash). forgot to mention, bash too ;-) > Apparently the default on MacOSX is "pwd -L" rather than "pwd

[preliminary patch] moving XFig files

2004-10-22 Thread Angus Leeming
The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. The next step is to add an ability to iterate over the specialized copier functions and ascertain which ones have been added and which ones have

Re: [preliminary patch] moving XFig files

2004-10-22 Thread Alfredo Braunstein
Angus Leeming wrote: The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. The next step is to add an ability to iterate over the specialized copier functions and ascertain which ones have been

Re: [preliminary patch] moving XFig files

2004-10-22 Thread Andreas Vox
Alfredo Braunstein [EMAIL PROTECTED] writes: what about [ `dirname $1` -ef `dirname $2` ] ? No idea about portability and such. Works on MacOSX (bash). Apparently the default on MacOSX is pwd -L rather than pwd -P as stated in the manpage, so the original script would not work on Mac.

[preliminary patch] moving XFig files

2004-10-22 Thread Angus Leeming
The attached patch enables us to move XFig files to the temp directory and continue to generate DVI files, etc that show any included picture files. The next step is to add an ability to iterate over the specialized copier functions and ascertain which ones have been added and which ones have

Re: [preliminary patch] moving XFig files

2004-10-22 Thread Alfredo Braunstein
Angus Leeming wrote: > The attached patch enables us to move XFig files to the temp directory and > continue to generate DVI files, etc that show any included picture files. > > The next step is to add an ability to iterate over the specialized copier > functions and ascertain which ones have

Re: [preliminary patch] moving XFig files

2004-10-22 Thread Andreas Vox
Alfredo Braunstein <[EMAIL PROTECTED]> writes: > what about [ `dirname "$1"` -ef `dirname "$2"` ] ? > > No idea about portability and such. Works on MacOSX (bash). Apparently the default on MacOSX is "pwd -L" rather than "pwd -P" as stated in the manpage, so the original script would not