On Mon, May 04, 2015 at 05:48:44PM +0200, Jean-Marc Lasgouttes wrote:

> Le 04/05/2015 17:37, Enrico Forestieri a écrit :
> >>A relative path is always possible, at least in linux: think
> >>   ../../home/foo/myfiles/foo.lyx
> >>which is actually an absolute path to a file in another user's homedir.
> >
> >Wrong example. The relative path would be ../foo/myfiles/foo.lyx (but
> >see below).
> 
> Except that my homedir is /home/lasgoutt/ :)

So, to access /home/foo/myfiles/foo.lyx from there you use the above relpath.

> Another example: if I have some image files in ~/lib/images/ and they are
> referred to as relative paths, then I cannot move freely my lyx file in
> another directory, only save-as will do. This is not intuitive either.

This is also true if you have your images in a doc subdir. You have to move
the whole subtree. Then, it is not uncommon having a figs directory
alongside a docs directory, but you can move your subtree and everything
works, while the poor user that decides for a different layout is left
arbitrarily alone because he cannot move the superior subtree.

> >Nothing wrong if you always work on the same computer and do not
> >collaborate with others. The way LyX deals with relative paths is
> >an arbitrary obstacle to collaborative work. If all paths were
> >relative, I could make an archive starting from root (/) like this:
> >
> >usr/local/texfiles/.....
> >home/user/figs/....
> >home/user/docs/...
> 
> I would hate to receive from somebody a tar file that creates an arbitrary
> complicated directory tree on my harddisk. And then I have to remember that
> the .lyx file I want to edit is in
>   home/forenr/papers/work_with_jean_marc/new/updated/article.lyx ?

This was an extreme example, please let not go into examples and
counter-examples. Everyone can produce examples in favor of one
solution or the other. The point is that LyX puts obstacles to legitimate
choices.

> If I want to collaborate, I put all the relevant files in a directory in a
> nicely organized manner. And then LyX will just do what is needed.
> Collaborating has a price in terms of a little bit of organization. There is
> nothing wrong with that.

Right. But having a figs directory (containing images common to several
documents) alongside docs1, docs2, ..., directories is an organization
which is arbitrarily discouraged by LyX.

> >But LyX, stubbornly insists in not using relative paths in certain
> >cases based on an arbitrary decision.
> 
> As far as I know, LyX proposes, it does not insist if you decide to change
> the path returned by Browse...

Note that this is not intuitive and caused bug 7540, which would not have
occurred if LyX was behaving as proposed, and which caused the introduction
of two different methods that arbitrarily discriminate whether a layout
will be allowed or not.

-- 
Enrico

Reply via email to