\section{Child can specify its parents} <>= set_parent('knitr-main.Rnw') @ My parent is \textsf{knitr-main.Rnw}. <>= 1+1 @ I'm not a complete LaTeX document, but you can compile me nonetheless. I'll borrow the preamble from my parent.