On 2015-12-14, Georg Baum wrote: > Jean-Marc Lasgouttes wrote: >> Would it make sens to add a parametr \is_lyx_doc to our fileformat? We >> could decide to do lots of interesting things (like have all relative >> paths be relative to lib/doc) to files declared this way.
> I am not sure. The whole purpose of \origin is to support the case when > somebody copies a file to a different location outside of LyX (instead of > using "Save As" in LyX, which adjusts all paths correctly). If we now > introduce a setting \is_lyx_doc then we would need to reset this setting > automatically on loading. Otherwise the image references of a document that > was copied from the LyX doc folder to some other location would be wrong. Reading this, I am strongly against this path expansion: * with 2.1, the user has a choice to use relative paths or absolute paths - relative paths are good for "self contained" projects (with graphics under the same directory as lyx...) You can simply pack and move the whole project. - absolute paths are good for "external" files (outside the "project" dir). Moving the "project" will not break them. * with the new mechanism, the user has no longer a choice to use relative paths - choice take away just to please someone unable to read the documentation? * the LyX documentation is not the only project that is better handled with relative paths! > But if we reset the flag, then we get the same trouble that we do currently > get with \origin. Or we make it the responsibility of the user to reset the > flag, but I don't think that this would work: \origin is only for the lazy > users who do not think of copying the referenced files as well if they copy > a LyX document. They will not think of resetting a flag either I guess. >> The >> documentor's toolbar could also magically kick in when editing such a >> file (in non readonly mode). > This would be possible already, by testing for \origin starting with > "/systemlyxdir". Or (if we remove the \origin because it is not required), testing the path. Günter