title: How to include mathematical symbols in pseudo code using RMarkdown?
body: <p>I'm writing up an <code>rmarkdown</code> document and I want to include some pseudo code that utilizes the code highlighting feature. I know that if I wanted to include the infinity symbol, I could just use <code>$\infty$</code>, but that doesn't work inside of a code chunk. I also realize that I could skip the code chunk since it's pseudo code and use LaTeX, but I'd rather have the code highlighting as a way to differentiate the text from other raw mathematical text in the document.</p>
  
  <p>Is there a way to achieve this? Something like the following code should appear as <code>D2NN = ∞</code>.</p>
  
  <pre><code>```{r eval=F}
  D2NN = $\infty$
  ```
  </code></pre>