Bo Peng wrote:
Will it be possible to add child documents as well? Assuming
you get the permissions, of course.
It is not considered now, but I will see what I can do later. With
separate .lyx files, you can open a child document without loading the
master one. Embedding child documents will disable this.
Of course - but then embedding is a voluntary thing.
Sometimes, embedding child documents is useful for
the same reasons that embedding figures is useful - you
need to transport the whole work, and it'd be nice
to bring it all in a single file.
3. Embedded file.lyx file is a zip file, with file.lyx, manifest.txt
and embedded files. There is no subdirectory in this zip file.
What happens if the user inserts the graphics
"a/nameclash.eps" and "b/nameclash.eps" and then
tries to embed both? Maybe subdirectories are
needed?
The implementation may change dramatically. Right now, a/nameclash.eps
is stored as nameclash.eps, while b/nameclash.eps is stored as
_1_nameclash.eps, and a manifest file is used to hold their original
pathnames.
I see. But wouldn't it be simpler to just store the subdirectory
then? Zip supports subdirectories, and then you don't
need to program "name mangling". With bad luck, there
might be a _l_nameclash.eps file too, occuring before
or after the b/nameclash.eps file. :-/
There is also the point that a .zip with subdirectories
can be unpacked by the user running "unzip/winzip" directly,
and the resulting unpacked files should "just work" with LyX. :-)
Finally, this raises the question if zip is the archive format
we want to use. I assume it is available on all the platforms
that runs LyX?
lyx already requires zlib which has zip support. My implementation
copies zlib/contrib/minizip to perform zip/unzip, which should work on
all platforms that support zlib.
Fine then. Taking advantage of libraries already in use
is a good thing.
Helge Hafting