title: How do I suppress knit2pdf LaTeX output in the R console
body: <p>When running <code>knit2pdf()</code>, it does not suppress the LaTeX output when using <code>quiet = TRUE</code> within the R console. I am running <code>knitr v1.11</code>. A simple example would be:</p>
  
  <h2>test.Rnw file</h2>
  
  <pre><code>\documentclass[a4paper,12pt]{article}
  
  \begin{document}
  some stuff
  \end{document}
  </code></pre>
  
  <h2>R Code</h2>
  
  <pre><code>knitr::knit2pdf(input = "./test.Rnw", quiet = TRUE)
  </code></pre>
  
  <h2>Output to R console:</h2>
  
  <pre><code>This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
  entering extended mode
  (test.tex
  LaTeX2e &lt;2015/01/01&gt; patch level 2
  Babel &lt;3.9m&gt; and hyphenation patterns for 69 languages loaded.
  (C:\MiKTeX\tex\latex\base\article.cls
  Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
  (C:\MiKTeX\tex\latex\base\size12.clo))
  (C:\MiKTeX\tex\latex\graphics\graphicx.sty
  (C:\MiKTeX\tex\latex\graphics\keyval.sty)
  (C:\MiKTeX\tex\latex\graphics\graphics.sty
  (C:\MiKTeX\tex\latex\graphics\trig.sty)
  (C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
  (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def
  (C:\MiKTeX\tex\generic\oberdiek\infwarerr.sty)
  (C:\MiKTeX\tex\generic\oberdiek\ltxcmds.sty))))
  (C:\MiKTeX\tex\latex\graphics\color.sty (C:\MiKTeX\tex\latex\00miktex\color.cfg
  )) (C:\MiKTeX\tex\latex\framed\framed.sty) (C:\MiKTeX\tex\latex\base\alltt.sty)
   (C:\MiKTeX\tex\latex\upquote\upquote.sty) (test.aux)
  (C:\MiKTeX\tex\context\base\supp-pdf.mkii
  [Loading MPS to PDF converter (version 2006.09.02).]
  ) [1{C:/Users/neastwood1/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
  (test.aux) )&lt;C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb&gt;
  Output written on test.pdf (1 page, 10374 bytes).
  Transcript written on test.log.
  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (MiKTeX 2.9 64-bit)
  entering extended mode
  (test.tex
  LaTeX2e &lt;2015/01/01&gt; patch level 2
  Babel &lt;3.9m&gt; and hyphenation patterns for 69 languages loaded.
  (C:\MiKTeX\tex\latex\base\article.cls
  Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
  (C:\MiKTeX\tex\latex\base\size12.clo))
  (C:\MiKTeX\tex\latex\graphics\graphicx.sty
  (C:\MiKTeX\tex\latex\graphics\keyval.sty)
  (C:\MiKTeX\tex\latex\graphics\graphics.sty
  (C:\MiKTeX\tex\latex\graphics\trig.sty)
  (C:\MiKTeX\tex\latex\00miktex\graphics.cfg)
  (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def
  (C:\MiKTeX\tex\generic\oberdiek\infwarerr.sty)
  (C:\MiKTeX\tex\generic\oberdiek\ltxcmds.sty))))
  (C:\MiKTeX\tex\latex\graphics\color.sty (C:\MiKTeX\tex\latex\00miktex\color.cfg
  )) (C:\MiKTeX\tex\latex\framed\framed.sty) (C:\MiKTeX\tex\latex\base\alltt.sty)
   (C:\MiKTeX\tex\latex\upquote\upquote.sty) (test.aux)
  (C:\MiKTeX\tex\context\base\supp-pdf.mkii
  [Loading MPS to PDF converter (version 2006.09.02).]
  ) [1{C:/Users/neastwood1/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
  (test.aux) )&lt;C:/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb&gt;
  Output written on test.pdf (1 page, 10374 bytes).
  Transcript written on test.log.
  [1] "test.pdf"
  </code></pre>
  
  <h2>Session Info:</h2>
  
  <pre><code>R version 3.2.2 (2015-08-14)
  Platform: x86_64-w64-mingw32/x64 (64-bit)
  Running under: Windows 7 x64 (build 7601) Service Pack 1
  
  locale:
  [1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252
  [4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] knitr_1.11
  
  loaded via a namespace (and not attached):
  [1] tools_3.2.2  RODBC_1.3-12
  </code></pre>
  
  <p>My wish is to stop this output from returning to the console. I have thought about maybe running a call to <code>knit2pdf</code> using a shell command and piping the output to <code>&gt;NUL</code> but I am not sure if this would be wise or easy to do?</p>