Helge Hafting wrote:

> On Wed, May 05, 2004 at 09:46:12AM +0200, Georg Baum wrote:
>> 5) Fix the real problem behind: double data definition. Define a new
>> format for included lyx files that is identical to the normal one but
>> without the header information (similar to latex). Currently lyx tries to
>> pretend that files made for inclusion are also usable without the master
>> file.
> This is very useful, see below.

Only as long as there is no better solution.

>> This
>> might work sometimes, but not in general (imagine the case that the
>> master file has a new command defined in the preamble that is used in the
>> included document).
>> 
> Not a problem, see below.

It is. You don't know wether the subdocument can be compiled at all, and
even if it can be compiled, you don't know wether the output is the same as
in the master document (think of \renew... stuff in the preamble).
If you are a careful user, and know all the possible problems, you can
ensure manually that everything is ok. This might work perfectly for you,
but in general I think it is better to enforce the correctness technically.

> Now your'e demanding that included file must be of type
> "subdocument" that cannot exist on its own.
> 
> Before, the demand was that included files must be the same document
> class as the master, or it _might_ not work.
> 
> Either way there is a limit on what can be included, but your way
> has additional restrictions.  Dividing up a large document (or book)
> in several parts _is_ common.  Printing such a part on its own
> without the master _is_ common too, so this should work!

Don't be afraid. I did not say that this not important. I also did not say
that the proposed change should be implemented without a solution for the
mentioned problems. Finally, I won't do any work on this in the near
future.

> It is not a problem when the subdocument is the same type
> as the master, because any command defined in the master's preamble
> is then also defined in the subdocument's preamble, so the
> result is the same when the subdocument is printed on its own.
> (A big project naturally gets its own document class.  Smaller
> cases can copy preamples around if need be.)

Copying things around does not work in practice. Been there, done that and
ended up putting everything in a .tex file that is included in every
preamble. Unfortunately this means also that I had to set things in .tex
that are settable from within lyx (paragraph indent/skip for example).

Custom document classes have their own problems in lyx: I have to create
a .layout file, and I need to distribute it to co-workers, they have to put
it in some special place, reconfigure lyx. This problem would vanish if
the .layout files could be embedded into the .lyx file, but then we have
again the double data definition problem.

> I have a book, where each chapter is a file.  Today I can print
> a single chapter and send it away for review.  With your shceme
> I first have to print the entire book (much slower) to find which
> pages make up that chapter, then print again selecting only
> those pages.  (Of course this "printing" isn't on paper, I
> make a pdf).  And of course I might even be unable to print the
> entire book at times, because a co-writer might be busy
> editing some other chapter making it temporarily broken.

Of course there should be an intelligent and easy way to print only selected
parts, and this is not the only problem. As I said, there are some problems
associated with this approach, but I still think that the problems can be
solved and that it is the better solution.


Georg


Reply via email to