In Rmarkdown, knitting to PDF, if I write an equation like
\begin{equation}
y = x^2
\end{equation}
then I get a numbered equation in the PDF output.
If I write an equation like
$$ y=x^3 $$
Then the equation isn't numbered. I like being able to control which equations are numbered and which aren't, so having two ways to do it, one of which produces numbering, is good. But, the equations that I write with \begin{}....\end{}
don't get a rendered preview in the editor in Rstudio, while the equations written with $$...$$
do get rendered. Is there some way to get the numbering without losing the previewing?