Re: Compiling Root document from child document?
On 11.07.08, bigblop wrote: > If I compile the child separately the references from my .bib file does not > show (only appears as question marks). Insert the bibtex references inside a branch in the child document. Either do not define this branch in the master or set it "off" there. GM
Re: Compiling Root document from child document?
Ha! That was exactly what I needed! I just put: \bind "M-1" "master-buffer-update pdf2" in my bind file and know the master is compiled from the child when I press Alt-1. A perfect and simple solution. Thanks. Jürgen Spitzmüller-2 wrote: > > bigblop wrote: >> Is there someway to compile the main.lyx file from a child document? > > If you have opened the child document from the master document (or after > you > have once processed the master), you can compile the master from the child > with the command "master-buffer-update pdf2" (for pdflatex, as an example; > there's also master-buffer-view and you can substitute pdf2 by any output > format). You can either input this command in the minibuffer, or you can > create your own toolbar or menu item or shortcuts for this. In fact, you > can > even replace the standard commands "buffer-view" and "buffer-update" with > these, since if no master is found, the document itself gets compiled. > > In 1.6, things will get a bit easier. There you can allocate a master > buffer > to a child in the document dialog, so the first step is not needed > anymore. > > Jürgen > > -- View this message in context: http://www.nabble.com/Compiling-Root-document-from-child-document--tp18411658p18417389.html Sent from the LyX - Users mailing list archive at Nabble.com.
Re: Compiling Root document from child document?
[EMAIL PROTECTED] wrote: >> bigblop wrote: >>> If I compile the child separately the references from my .bib file does >>> not show (only appears as question marks). > It can be done, but it's a bit more advanced and I'm not sure I remember > how I did it. Here is an example how I did it: In the main document, put these two lines in the preamble: , [master.lyx preamble] . \usepackage{comment} \excludecomment{subbib} '-' In the child documents, you have to include the following in the preamble: , [child.lyx preamble] . \usepackage{comment} \includecomment{subbib} '-' In the master document, you can include the bibliography normally. In the child documents, however, you have to embed it in the 'subbib' environment (which is created by the package 'comment' and the command 'includecomment'). This has to be done in ERT, not with the bibliography-dialog: , [child.lyx document] --. \begin{subbib} \bibliographystyle{} \bibliography{} \end{subbib} '' When you now compile the master document, the 'subbib' environments are ignored. If you compile a child document, they are included. Regards, Dominik.-
Re: Compiling Root document from child document?
bigblop wrote: > Is there someway to compile the main.lyx file from a child document? If you have opened the child document from the master document (or after you have once processed the master), you can compile the master from the child with the command "master-buffer-update pdf2" (for pdflatex, as an example; there's also master-buffer-view and you can substitute pdf2 by any output format). You can either input this command in the minibuffer, or you can create your own toolbar or menu item or shortcuts for this. In fact, you can even replace the standard commands "buffer-view" and "buffer-update" with these, since if no master is found, the document itself gets compiled. In 1.6, things will get a bit easier. There you can allocate a master buffer to a child in the document dialog, so the first step is not needed anymore. Jürgen
Re: Compiling Root document from child document?
James Sutherland-4 wrote: > > > On Jul 11, 2008, at 3:16 PM, bigblop wrote: > >> >> If I compile the child separately the references from my .bib file >> does not >> show (only appears as question marks). >> >> But based on your answer it seems that my wish is not possible - you >> say >> that I still have to manually skip to the main file to get the whole >> document updated (or even a child to look correct). >> > Right. You must compile the main file, not the children, if you want > the full document with proper cross references. > > This is no different than LaTeX. There you still must compile the > "main" file and not the children. In LaTeX the problem is even a bit > worse because a "child" will not compile at all because all of the > latex preamble stuff is missing. So LyX seems to be better than LaTeX > in this regard, although not perfect since, as you point out, > references are broken... > > I know that it works with Kile for linux. There its possible to make a project where you define a compile command that always compiles the master eventhough you are currently editing a child. It seems that it would just be a matter of defining a shortkey to compile a user specified .lyx file (in this case main.lyx) -- View this message in context: http://www.nabble.com/Compiling-Root-document-from-child-document--tp18411658p18414397.html Sent from the LyX - Users mailing list archive at Nabble.com.
Re: Compiling Root document from child document?
True.. cross references to other child documents will not work, "only" bibilography referenes. That only works if a bibliography section is also inserted in the child - which is not a good idea. -- View this message in context: http://www.nabble.com/Compiling-Root-document-from-child-document--tp18411658p18414369.html Sent from the LyX - Users mailing list archive at Nabble.com.
Re: Compiling Root document from child document?
On Fri, 11 Jul 2008, James Sutherland wrote: If I compile the child separately the references from my .bib file does not show (only appears as question marks). It can be done, but it's a bit more advanced and I'm not sure I remember how I did it. Perhaps I did it by using the preamble of the child document to define a custom command that defines the .bib-file to use, and then inserted that custom command at the end of the child document. Anyway, I know it can be done. If it's important, ask for it and I'll see if I can dig out my old thesis files. But based on your answer it seems that my wish is not possible - you say that I still have to manually skip to the main file to get the whole document updated (or even a child to look correct). You could perhaps define your own keyboard sequence that does this for you? In the general case though, how would the child document know which document that is it's master? Or... why can't a child document belong to two or more master documents? Right. You must compile the main file, not the children, if you want the full document with proper cross references. True.. cross references to other child documents will not work, "only" bibilography referenes. regards, Christian -- Christian Ridderström, +46-8-768 39 44http://www.md.kth.se/~chr
Re: Compiling Root document from child document?
On Jul 11, 2008, at 3:16 PM, bigblop wrote: If I compile the child separately the references from my .bib file does not show (only appears as question marks). But based on your answer it seems that my wish is not possible - you say that I still have to manually skip to the main file to get the whole document updated (or even a child to look correct). Right. You must compile the main file, not the children, if you want the full document with proper cross references. This is no different than LaTeX. There you still must compile the "main" file and not the children. In LaTeX the problem is even a bit worse because a "child" will not compile at all because all of the latex preamble stuff is missing. So LyX seems to be better than LaTeX in this regard, although not perfect since, as you point out, references are broken...
Re: Compiling Root document from child document?
If I compile the child separately the references from my .bib file does not show (only appears as question marks). But based on your answer it seems that my wish is not possible - you say that I still have to manually skip to the main file to get the whole document updated (or even a child to look correct). James Sutherland-4 wrote: > > > On Jul 11, 2008, at 2:07 PM, bigblop wrote: > >> >> I have made a main.lyx file that includes a few child documents as >> input >> files. But when I am compiling a child document the whole document >> does not >> get updated. This means that each time I want to se the changes I >> have made >> I need to compile the main.lyx file which is rather annoying. >> >> Is there someway to compile the main.lyx file from a child document? > > "Annoying" to one is a "nice feature" to another. This is actually > really a nice feature in LyX because you can actually compile and view > child documents independently from the parent, and with different > formatting (line spacing, margins, etc.). This is not easily done in > LaTeX. > > I just switch the focus in LyX back to the "main" file and compile > it. Then you get the whole thing. > > James > > -- View this message in context: http://www.nabble.com/Compiling-Root-document-from-child-document--tp18411658p18412701.html Sent from the LyX - Users mailing list archive at Nabble.com.
Re: Compiling Root document from child document?
On Jul 11, 2008, at 2:07 PM, bigblop wrote: I have made a main.lyx file that includes a few child documents as input files. But when I am compiling a child document the whole document does not get updated. This means that each time I want to se the changes I have made I need to compile the main.lyx file which is rather annoying. Is there someway to compile the main.lyx file from a child document? "Annoying" to one is a "nice feature" to another. This is actually really a nice feature in LyX because you can actually compile and view child documents independently from the parent, and with different formatting (line spacing, margins, etc.). This is not easily done in LaTeX. I just switch the focus in LyX back to the "main" file and compile it. Then you get the whole thing. James