0

I have managed to get a master.rnw include a child.rnw, however, I can maintain the formatting of the child document based on the preamble in the master.

Master.Rnw

\documentclass[11pt,a4paper, titlepage]{article}
\usepackage[margin=0.5in]{geometry}
\renewcommand{\familydefault}{\sfdefault}%sets fonts across document
\geometry{a4paper,verbose,tmargin=7.5cm,bmargin=0.5cm,lmargin=0.5cm,rmargin=0.5cm}
\usepackage{tikz,Sweave,fancyvrb}
\title{}
\date{}
\begin{document}
\SweaveOpts{concordance=TRUE}
\AddToShipoutPictureBG{%
  \AtPageUpperLeft{%
    \raisebox{-\height}{\includegraphics[width=\paperwidth]{/ header.png}}
  }
}
\leavevmode\newline
\SweaveInput{TCPQuote_CYB_short.Rnw}
\end{document}

Child.Rnw

% !Rnw root = Master.Rnw
\SweaveOpts{concordance=TRUE}
\LARGE
\color{blue}
\noindent
\begin{center}
\textbf\underline{ALL}
\end{center}
\leavevmode\newline
\fcolorbox{greylight}{greylight}{
   \parbox[c][2cm]{19.75cm}{
           \begin{tikzpicture}
              \node[anchor=north west,inner sep=0] (image) at (0,0) 
              {\includegraphics[width=2cm,height=2cm,keepaspectratio]{/why.png}};
              \node[align=left,{blue},font={\small\bfseries}] at (image.north) {Why?};
           \end{tikzpicture}
}}

Any idea how I include things such as the following to format the child?

\geometry{a4paper,verbose,tmargin=7.5cm,bmargin=0.5cm,lmargin=0.5cm,rmargin=0.5cm}
0

IGNORE ME! solution was simply to add in

\small

for the font in my child.rnw!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.