title: Use R/exams exams2pdf() to produce a PDF document
body: <p>I am new to the R/exams package and I try to produce a pdf document from one of the templates provided by the developers. (<a href="http://www.R-exams.org/templates/confint3/" rel="nofollow noreferrer">http://www.R-exams.org/templates/confint3/</a>)</p>
  
  <p>I am able to compile a Rnw file into a HTML document using the commands</p>
  
  <pre><code>library("exams")
  exams2html("confint3.Rnw")
  </code></pre>
  
  <p>When calling the function 
  <code>exams2pdf("confint3.Rnw")</code>
  it gives the error message</p>
  
  <pre><code>! LaTeX Error: File `Sweave.sty' not found.
  </code></pre>
  
  <p>I have Latex installed and there are no problems using it in general. I do not understand:</p>
  
  <ol>
  <li>Do I need to tell <code>exams2pdf()</code> the location of the latex installation? </li>
  <li>Do I need to define a template (as <code>plain.tex</code>) first? How should it look like?</li>
  <li>What is it that I do not understand?</li>
  </ol>
  
  <p>I looked at the documentation of the exams package, I also tried <code>exams2pdf()</code> after installing and calling <code>library("tinytex")</code>.</p>
  
  <p>Any help where to look at or what to do is highly appreciated. Thank you!</p>
  
  <p>Minimal example:</p>
  
  <pre><code>install.packages("exams")
  install.packages("tth")
  library("exams")
  
  set.seed(1090)
  exams2html("confint3.Rnw")
  set.seed(1090)
  exams2pdf("confint3.Rnw")
  </code></pre>