Helge Hafting wrote:

> Georg Baum wrote:
>>Only as long as there is no better solution.
>>  
>>
> An having unprintable include-book, include-report, include-letter and so
> on is a better solution?

I never wanted unprintable documents. I only said that subdocuments should
not have the lyx header, and they should know nothing about the document
class (so only one include type and not include-letter etc). That means a
subdocument is not complete without a master file. That does not mean that
is it unprintable, because you would do that from the master document. As I
said, that should be as easy as it is right now, e. g. the include inset
could have a state "activated/deactivated" (or something similar to
\includeonly in latex), or you would mark some paragraphs and say "print
selection" or something else. The latter would even be more flexible than
it is now.

>>It is. You don't know wether the subdocument can be compiled at all,
>>  
>>
> Yes, I often know that. The subdocument isn't necessarily planned
> as such, it could very well be a standalone document with some
> content I want included in something larger.

True. Therefore conversion needs to be easy and as far as possible
automatic.

>>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).
>>  
>>
> Using latex in the preamble is the users responsibility. And
> nothing whatsoever in the preamble is a very common case,
> it applies to every non-expert or latex-ignorant user.
> 
> Want to use more latex packages? Add support for them in lyx
> instead. :-)

THis is of course the best solution, but unfortunately there will always be
packages that lyx does not support :-(

> Feel free to warn if there _is_ a preamble, or ideally only if the
> included document's preamble isn't identical to the
> master document preamble. If the document types match
> and the preambles match (or doesn't exist) then there is no problem.

This warning was exactly the thing that the original poster considered
useless.

>>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.
>>
>>  
>>
> Nonexpert users doesn't put stuff in the preamble, experts knows
> how the preamble works.  It seems to me problem you try to prevent
> applies to a narrow group.

I don't agree. If somebody has a document that is so large that it is useful
to split it up in parts, then the probability is high that some special
stuff is needed.
Also while you can expect that expert users know how the preamble works, it
happens that you open a document that you created 6 months ago and forgot
that it was a subdocument. Then you change something, and later you wonder
why the original master document does not work anymore.

>>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.
>>  
>>
> Not a problem if the documents are of the same class. They really
> should be, or you'll get trouble even without preambles. Chapters and
> sections doesn't exist in "letter", so including a book or article
> may fail without any preamble magic.

I am talking of documents of the same class here. If you have a book with 10
chapters, one file per chapter, you have 11 definitions of the layout if
the .layout file is embedded in the .lyx file. Who ensures that they are
the same? This is exactly the problem of double data definition that I want
to avoid.

> I see nothing wrong in making a new feature-poor document class
> that can be included in anything.  (Useful if you want to include
> something both in reports and articles, for example.  And
> if you don't care to match the document types.)  This should solve
> your problem.  But please don't plan restrictions that hit power
> users just so some newbie won't get a latex error.  That will happen
> anyway if they experiment with latex commands (ERT or preambles).

I think you still misunderstand me: I do not want to restrict any type of
user. Printing selected parts or converting a document for standalone usage
should be as easy as it is now.

Anyway, I did not want to start such a long discussion, and since there are
more important things right now, nothing will happen for a long time. I
only wanted to point out that there are problems with the current approach.


Georg

Reply via email to