Bo Peng wrote:
Well, let us start from the beginning. Hopefully at a level of design. :-)
But I first would like to point out that designs dictate
implementations. If I do not introduce a bundled mode, I can not use a
zip format. I can not switch a file to binary format just because I
insert an embedded inset.
This is just confused. Why on earth couldn't you use zip? That would
simply be a compressed form of what you have.
My design is motivated from a very simple concept: allow a file to be
embedded. An embedded file is anonymous. LyX kindly keeps a link
between an embedded file and its external version, and provides
features such as update from external. But for the most part, an
embedded file is anonymous, just like how they are in applications
such as OO and word. This is all users have to know. As simple as
that.
And my design is based upon exactly the same idea, except that it's
either all files or none.
One day he needed to send his document to a co-author who did not have
access to his subversion server. He thought that embedding all
external files was a better idea than manually zip all external files.
He was happy to find Document->Embedded Files->Embed all, and clicked
it. All related insets appeared to be embedded and his document could
be compiled without any external file. He then sent this file to his
co-author, who could open it directly by lyx. The co-author edited the
document here and there. He inserted and replaced a few more figures,
embeded them and sent the document back. Our user checked the
document, accepted most of the changes and did more edition. He did
not notice that the files are embedded until he tried to save the
changes to his subversion repository. Because the paper was more or
less done, he decided to just submit this version and remove the
external files. He did so and got a less clustered repository. Later
he found out that a file needed to be updated, he un-embeded that
particular file so that he could update it.
Up to here his experience is exactly the same both ways, except that he
hit "Bundle".
He knew he also had the
option to 'update from external' but it was just easier to use an
external file.
So here there is a difference. He could have just updated from external,
or he might just have edited the internal file, using the Edit entry on
the context menu. But he did it your way.
A week later, he sends his file to his co-author, who finds he can't
compile it. The two of them have a long email exchange trying to figure
out why. In the end, our frustrated author has to post to the user list,
where the problem is eventually debugged: One of the graphics files and
one of the BibTeX files aren't embedded. The user is given the advice:
If you're going to embed, then just embed everything, and edit the files
either using update from external or by using the Edit menu item. To
which the user replies: Can't there just be a setting that forces
everything to be embedded, rather than my having to remember all of
this? To which people say: Sounds like you would have preferred
Richard's solution.
Before he graduated, he decided to make his customized layout file
available to others. He made a copy of his thesis, removed the content
but kept the university class and layout files, and posted it to a
shared place. He received some thank-you cards from fellow students
who could simply open that file, fill in there content.
It is weird to have a document to be a file + a directory. This is
unheard-of and is unnatural. All computer users have this notion of a
document being a file, possibly with some links to external files
(html or latex with external file). I do not know what other word I
can use to describe your 'document', it is simply unnatural.
See JMarc's message.
You can argue that this filename.lyxdir directory is external to
filename.lyx, nothing has changed. No, my external files are files
that are created by me, generated by my script. I know what their
names are because I named them. I created a directory structure for
them so that I know where to find figure 2 of chapter 4. They are my
external files, not filename.lyxdir/figures/figure2_copy_3.png.
I won't reply to messages about how YOU work. I'm sorry, but I'm not
interested in developing a special version of LyX that satisfies you.
That's what private branches are for.
Richard