---
title: "esc"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
A. An amount between $5 and $10.
B. An amount between \$5 and \$10.
C. An amount between \\$5 and \\$10.
X. An equation $1 and 1 = 2$.
Y. An equation \$1 and 1 = 2\$.
Z. An equation \\$1 and 1 = 2\\$.
I've got a similar, but different question here. Please comment if I need to add clarification to differences. I'm asking two different questions and hope that's obvious.
Anyways, the output of knitting the .Rmd above is shown below. Why does example X
properly invoke LaTeX, where example A
does not? X
and A
seem almost identical to me, and I'm left wondering why they both don't transform whatever is inside the dollar signs $
into LaTeX text?
I'm aware I could use \(
and \)
to replace $
and $
. I just want to know why $
and $
doesn't properly call LaTeX in my example. It seems arbitray that it works for X
, but not A
, although I doubt it's arbitrary.