title: What is the syntax for using pandoc with RStudio Markdown for conversion to MS Word? How can it be used to include bibliography and inline citations?
body: <p>RStudio now supports directly knitting .Rmd files into docx format --pure gold for someone who is the technical side of most collaborations where the final revisions of the article are going to be done in Word.</p>
  
  <p>However, I had just barely figured out how to get R, knitr, and pandoc to play with each other and so I am looking for some help in making the transition while the documentation is still in its infancy.</p>
  
  <p>My file converts with no problem using the yaml code block as follows:</p>
  
  <pre><code>---
  title: "Testing"
  output: 
    word_document:
      fig_width: 5
      fig_height: 5
      fig_caption: true
  ---
  </code></pre>
  
  <p>and the <a href="http://rmarkdown.rstudio.com/" rel="noreferrer">documentation</a> says that, assuming I have a file 'myLibrary.bib' in the same directory as my .Rmd file, I should be able to add something like this:</p>
  
  <pre><code>    pandoc_args: [
        bibliography: "myLibrary.bib"
      ]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>pandoc_args: [
        --bibliography "myLibrary.bib"
      ]
  </code></pre>
  
  <p>but I can't seem to find any examples of how to format this in the obvious places: <a href="http://rmarkdown.rstudio.com/word_document_format.html" rel="noreferrer">here</a>
  or <a href="http://johnmacfarlane.net/pandoc/README.html" rel="noreferrer">here</a> </p>
  
  <p>Bonus points for code that also links the bibliography to the myJournalFormat.csl file also in the same folder.</p>