Am Sonntag, 7. März 2004 20:15 schrieb Angus Leeming:
> Georg Baum wrote:
> > The question now is: How to solve that name clash? It seems that the
> > current filename mangling needs to be replaced by something else.
> > One possibility:
> > 
> > _  <->  _0
> > /  <->  _1
> > .  <->  _2
> > 
> > or something similar.
> 
> Looks like a very good idea. But I'd suggest using something human 
> readable as the mangling. Eg, this:
> 
> dir1/main.lyx
> dir2/sub.lyx
> dir3/sub.lyx
> 
> becomes:
> main.lyx
> dot_dot_slash_dir2_slash_sub.lyx
> dot_dot_slash_dir3_slash_sub.lyx

This does not solve the problem unless I misunderstood you. Counterexample:

main.lyx
dir/sub.lyx
dir_slash_sub.lyx

becomes

main.lyx
dir_slash_sub.lyx
dir_slash_sub.lyx

> Ie, we do not mangle '.' in the file name. Further, I don't see any 
> need to mangle '_' itself.

But not mangling '_' is one part of the problem I described above: The name 
test/a.eps gets mangled to test_a.eps, which happens to be the name of 
another, already existing file that has nothing to do with the first one. 
We don't need the subdirectory here, the very same would happen for 
test.a.eps and test_a.eps.
For the same reasons the file main.lyx needs to be mangled, too.

> My understanding is that you intend to place all included files in the 
> directory of the master lyx file.

Yes.

> Will it cope with this: 

Yes, but I don't see why this should be problematic. I do mangle every 
absolute filename, so it should be safe.

> main.lyx
> foo1/doc/sub.lyx # contains \includegraphics{../image.eps}

I guess you mean ../fig/image.eps?

> foo1/fig/image.eps
> foo2/doc/sub.lyx # contains \includegraphics{../image.eps}

ditto?

> foo2/doc/image.eps

I guess you mean foo2/fig/image.eps?

> Presumably the temp dir should contain
> 
> main.lyx
> foo1_doc_sub.lyx
> foo1_fig_image.eps
> foo2_doc_sub.lyx
> foo2_fig_image.eps

Exactly, if I guessed right. Otherwise please explain a bit more detailed.


Georg

Reply via email to