On 19 March 2013 15:01, Richard Heck <[email protected]> wrote: > On 03/19/2013 01:00 AM, Nick Fort wrote: > > On 19 March 2013 00:04, Richard Heck <[email protected]> wrote: > >> On 03/18/2013 05:57 AM, Nick Fort wrote: >> >> Hi, >> >> I've stumbled upon an issue with LyX 2.0.5.1: using enumitem in an >> included file inside another does not appear to work. >> >> For example, take the enumitem-example.lyx file from here: >> http://wiki.lyx.org/Tips/Enumitem, and include it in another file of the >> same class, with the enumitem module loaded. >> >> When compiled on its own, enumitem-example.lyx creates the PDF without >> a problem. When this file is included in another LyX file (also of class >> "article", with the enumitem module loaded), a bunch of LaTeX errors occur: >> >> "Missing \endcsname inserted. >> Extra \endcsname." >> >> I haven't seen anything similar on the web about this -- is there a >> workaround/fix to this issue? Or am I doing something wrong? >> >> You have to load the enumitem module in the master document. If it's >> only in the child, the master does not see it. >> >> rh >> >> > I created a new master file to test this -- in it, I added the enumitem > module. I then included in that master file the child document. As soon as > I removed the enumitem module from the child, LyX gave me four "Layout not > found" errors, specifically relating to the enumitem-resume layout. The PDF > then builds, but (a) includes a page break before the child document, and > (b) does not actually use any of the enumitem features, i.e. the lists are > stock-standard. > > Sorry, I should have been more explicit: You need to load the module in > the master AND the child. Modules do not get inherited by children. There > is a reason for this (the fact that what is a child can also be used not as > a child), although I agree that it is counter-intuitive. > > Richard > > Sorry, I actually got what you meant some time after I sent that reply. Indeed, I remember LyX throwing an error when I tried to load a module child in a no-module parent. I also now see that the files I attached were wrong. Sigh -- sorry about that!
What I should have stated more clearly is that what you say (module in parent and child) is what I tried initially when I got the "Missing \endcsname inserted. Extra \endcsname." If you have a look at the files I've attached now, does it build for you, or do you also get the "endcsname" error? Thanks, Nick
enumitem_child_with_module.lyx
Description: Binary data
parent_with_module_load_child_with_module.lyx
Description: Binary data
