Select File > Settings and choose LaTeX in the left list.
Modify code for the different headers.
If the Sweave functionality from Xpose4 is used, enter the default LaTeX preamble in the Sweave/knitr header field. The preamble specifies what “packages” are to be loaded prior to running the code, along with details about page layout, etc.