On 14.06.05, Richard Brown wrote: > Thank you Gunter. I didn't really understand because it's all new to me, > but I just followed your instructions and it worked!! Hurray!!
Good news. You are welcome. > But I don't really follow the "wrapper" idea: you wrote > > > Or you create wrappers for all versions that contain the "right" > > preamble and include the main content (Insert>File>LyX-Document). In > > this case, the inserted file should not contain the setup code in the > > preamble, as this would override the wrapper setting. > > Do I need to have 3 different wrappers (students, teachers, CDscript)? > With different preambles in each? Yes, that was my idea. So the the preamble of exercise-students.lyx would be e.g. \usepackage{ifthen} % create toggles \newboolean{students} \newboolean{teachers} \newboolean{CDscript} % print students part \setboolean{students}{true} \setboolean{teachers}{false} \setboolean{CDscript}{false} > What is the "main content" in each wrapper? The main content is just an include button (Insert>File>LyX) and the file, say exercise-incl.lyx, would contain all parts an also the \ifthenelse{ and } ERT boxes. (It will no longer complile error as stand-alone doucment free due to the missing preamble.) Just decide if it is worth the additional effort. Günter -- G.Milde web.de