Guy Hindell wrote:
> Hi
>
> I notice that I can include external Tex documents in my lyx files,
> but it seems I can't include another lyx document - i.e. I can't
> make multipart lyx docs. Using Insert->Insert File->Lyx Document
> actually copies the text of the other lyx doc into my current one.
> Is there a clever way to do this?
Sure you can. Insert->Include File pops up a dialog. Enter the lyx
file yo want and there you are. Ususally yo want to Input the file
rather than Include it. (Subtle latex difference.)
> Also (working in the other direction) is it possible to export the
> contents of the lyx file as latex but to not include the
> documentclass{}and preamble so that the resulting .tex file may be
> included in other docs without manually cutting this stuff out?
This should do it:
$ sed '1,/^ *\\begin{document}/{
/^ *\\begin{document}/!d
}' your_file.tex > stripped_fontend.tex
Or put this in stripfront.sed:
1,/^ *\\begin{document}/{
/^ *\\begin{document}/!d
}
and invoke it
$ sed -f stripfront.sed your_file.tex > stripped_fontend.tex
--
Angus