Manolo Martínez wrote:
I am working right now with a long document that has chapters as
separate files, included in a master document. I'm having the following
problem: chapter 5 exports to pdf perfectly on its own but, when
included in the master document, this latter document does not export
-although it does when chapter 5 is not included.
It looks as if something is leading .lyx astray, because the four errors
it finds are:
missing $ inserted
extra }, or forgotten $
missing $ inserted
missing } inserted
Has anybody ever come across a problem like this?
I have had problems with inclusions sometimes. First, the obvious:
* Both documents are the same document class with the same
document class options?
* No preamble differences?
* Both documents are the same language?
A less obvious problem is when the document inclusion happens in a place
where you cannot have more than one paragraph, or at least not a
complete included document. Bad places to have a input/include are:
* nested inside something else, such as a box or table
* in a heading
* in an enumeration/bullet list
* in the middle of some text, especially if that section of text
is in a foreign language or highlighted in some way.
Input/include should be in a paragraph of its own, on the outermost
level and with no markup.
Some things to try:
Put the cursor next to the include/input thing. (Try both sides.)
Check that the paragraph is of type "standard", and that there is no
foreign language or other markup in effect.
If you don't find anything, try pressing enter on both sides of the
input inset. This shouldn't really change the document, as the inset
should be in a paragraph of its own already. This ensures that it is.
If all else fails, try exporting the master document to latex. Then
examine the result, especially around the inclusion. Maybe you find the
problem, or maybe you find a LyX bug of some kind.