On Tuesday 26 March 2002 4:11 pm, Kayvan A. Sylvan wrote: > On Tue, Mar 26, 2002 at 09:20:53AM +0100, Herbert Voss wrote: > > Kayvan A. Sylvan wrote: > > >Latest CVS, a document that was loading just fine as of a few days > > > ago... Now I can no longer ``View Postscript''. > > I found the problem. A recent change makes LyX output the absolute path > to the graphics file (instead of a relative path).
It will only output the absolute path if the file is stored as an absolute path. If you store it as relative to your doc, then it'll output the relative path. That has to conform to the principle of least surprise. > This bombs on Cygwin (but works on Linux/Unix) because the path > output looks like this: > > \includegraphics[% > scale=0.4]{/home/Kayvan/src/calendar/dia/calgen.eps} > > Since I am using fpTeX and not a cygwin compiled tetex, this will not work. > > What's interesting is that at the beginning of the LaTeX file, LyX outputs: > > \def\input@path{{C:/cygwin/home/Kayvan/src/calendar/}} > > Now, adding the C:/cygwin to the beginning of the graphics file path > causes it to work. > > If we are going to output the absolute path, we should make sure to > output the right path for Cygwin-based systems. I'm not sure what the right solution is here. Modify MakeAbsPath for cygwin? I don't think that we should do anything to fix files that are already stored as absolute paths but are stored incorrectly. That would just introduce special code to deal with living on the bleeding edge. What do you think? Patches accepted of course... Angus