title: Render latex text from within r function in rmarkdown?
body: <p>I am working within RStudio 1.1.383 using rmarkdown. I am trying to render to Latex a string that is created within a knitr chunk so that it appears as latex code within the document. </p>
  
  <p>So far I have experimented with the 'results=' options in the chunk header and find that results='asis' enables it to be rendered once the document is knitted, but I have not been able to find a way to enable the result to be rendered using the preview feature that allows you to run a single chunk and see the results within the .Rmd editor. </p>
  
  <p>Any help on this matter would be appreciated.</p>
  
  <p>A minimal example is included below that should be copied into a .Rmd file before rendering.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Michael</p>
  
  <pre><code>---
  title: "Minimal Example"
  output: html_document
  ---
  
  ```{r}
  str &lt;- "$$\\alpha \\cdot \\beta = \\delta$$"
  
  # this doesn't show in the preview 'run chunk feature'
  cat(str, "\n")
  
  # neither does this
  writeLines(str)
  ```
  </code></pre>