title: Where is the .tex file kept when compiling Rmd in Rstudio server
body: <p>This may sound like a dumb question, but I'd like to know where is the .tex file saved, when I compile a pdf document from a Rmd file, using RStudio server.
  I added the keep_tex option, so the header of Rmd looks like this :</p>
  
  <pre><code>---
  output:
    pdf_document:
      keep_tex: yes
  ---
  </code></pre>
  
  <p>Then when I compiled, the output looks like this</p>
  
  <pre><code>  |......................                                           |  33%
    ordinary text without R code
  
    |...........................................                      |  67%
  label: plot
  
  
  processing file: test.Rmd
  cropping /tmp/Rtmpb1x3Q0/preview-3bfe24922427.dir/test_files/figure-latex/plot-1.pdf
  PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.
  ==&gt; 1 page written on `/tmp/Rtmpb1x3Q0/preview-3bfe24922427.dir/test_files/figure-latex/plot-1.pdf'.
    |.................................................................| 100%
    ordinary text without R code
  
  
  /usr/lib/rstudio-server/bin/pandoc/pandoc test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output /tmp/Rtmpb1x3Q0/preview-3bfe24922427.dir/test.tex --template /home/myusername/R/x86_64-pc-linux-gnu-library/3.1/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in' 
  output file: test.knit.md
  
  /usr/lib/rstudio-server/bin/pandoc/pandoc test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output /tmp/Rtmpb1x3Q0/preview-3bfe24922427.dir/test.pdf --template /home/myusername/R/x86_64-pc-linux-gnu-library/3.1/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in' 
  
  Output created: /tmp/Rtmpb1x3Q0/preview-3bfe24922427.dir/test.pdf
  </code></pre>
  
  <p>I'd like to find the intermediate .tex file (or test.knit.md), and do a bit of editing. Except it is no where to be found. Not in the working directory, or /home/myusername/, or /, or /tmp/Rtmpb1x3Q0/. 
  I'd really appreciate it if someone has the answer.</p>