title: Rmarkdown, Rstudio: pandoc.exe: Error producing PDF from TeX source
body: <p>I am trying to render a pdf document with the knit pdf button in RStudio, but I keep on getting this error:</p>
  
  <pre><code>! pdfTeX error (font expansion): auto expansion is only possible with scalable 
  fonts.
  \AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                    \fi \fi 
  l.167 
  
  pandoc.exe: Error producing PDF from TeX source
  Error: pandoc document conversion failed with error 43
  </code></pre>
  
  <p>I know there is a lot be found on the internet regarding error 43, but non of them helped me.
  Does anyone know what it means exactly and where I can find the solution? It's peculiar because a few hours ago I had the same error but the rendering went well after adding this in my code:</p>
  
  <pre><code>Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\", sep=.Platform$path.sep))
  </code></pre>
  
  <p>But now the error is back</p>
  
  <p><em>EDIT</em></p>
  
  <p>when trying a minimal example:</p>
  
  <pre><code>---
  title: "test"
  output: pdf_document
  ---
  
  ```{r results="asis"}
  library(stargazer)
  c1 &lt;- c("test1","test1","test2","test2")
  c2 &lt;- c(1,2,3,4)
  data_object &lt;- as.data.frame(cbind(c1,c2))
  names(data_object) &lt;- c("test","test2")
  stargazer(data_object,summary=FALSE,rownames=FALSE,type="html")
  ```
  </code></pre>
  
  <p>The error it gives is:</p>
  
  <pre><code>!pdfTeX error: pdflatex (file ec-lmr10): Font ec-lmr10 at 600 not found
   ==&gt; Fatal error occurred, no output PDF file produced!
  Trying to make PK font ec-lmr10 at 600 DPI...
  Running miktex-makemf.exe...
  miktex-makemf: The ec-lmr source file could not be found.
  miktex-makepk: The application file ttf2pk.exe could not be found.
  
  pandoc.exe: Error producing PDF from TeX source
  Error: pandoc document conversion failed with error 43
  </code></pre>
  
  <p>This is a different error, but still a 43 one. I checked it, but the font ec-lmr10 file is on the system. Somehow it can't  be found.</p>