On 19 May 2012 09:30, stefano franchi <stefano.fran...@gmail.com> wrote: > On Fri, May 18, 2012 at 8:59 PM, Richard Heck <rgh...@comcast.net> wrote: >> On 5/18/12 7:31 AM, Ray Rashif wrote: >>> >>> Hi guys >>> >>> I want to confirm that this is a bug. I've noticed some old threads on >>> this [1] but I believe it's a little different. >>> >>> When the master document includes the bibliography, opening the child >>> document and adding a citation works. So, while editing, the child >>> document is aware of the bib database. When compiling for preview, >>> however, that knowledge is lost and citations are replaced with >>> "(author?)" and the like. Obviously, there is no reference list for >>> that child document. >>> >>> Wouldn't it be possible to actually integrate the child document while >>> rendering? Do not show the references, but do show citations that are >>> valid (i.e. that exists in the bib included in the master doc). You >>> can reproduce this with a template [2]. >>> >> There are various ways to handle this. The problem, such as it is, is due >> to the fact that, if you compile the child document "standalone", then it's >> treated as its own document, and not as a child. Option 1 is to compile >> the master document instead, which you can do from the View menu, and >> assign a shortcut to do. Option 2 is more complicated, and involves putting >> a bibliography inset into the child, but protecting it with a LaTeX if-then >> construct, so that it isn't actually included when you compile the master. >> >> So it's not really a bug, but a consequence of how LyX handles children. > > Third option: > > Always compile from the master document, but include only the child > document you want to compile. That will bring in the frontmatter, > probably (depending on how you structured your master/children), but t > might do what you want. The command is in Document>>Settings
Thanks guys. Yes, that's correct, I know I can view the master document and that's what I've been doing. Even though I knew it was inherent due to how LyX works I perceived it as a bug, simply because I expected the child to inherit most other stuff (since it can already work with the bib database while editing). For now I don't see much of a problem but I don't know how I'm going to deal with it once I'm in the range of hundreds of pages and a number of chapters. The last two workarounds mentioned should get me going, but I think the third option is the best approach since I'd want the child to inherit everything. A couple pages worth of abstracts and references shouldn't add that much of a compile time. -- GPG/PGP ID: C0711BF1