'Subscripts in Rmarkdown using Rstudio visual editor

I´m having some trouble keeping subscript letters in place when I switch back and forth between R studio visual editor. For some reason

a~1~

which works well when knitted transforms to

a\~1\~

if I dare switching to the visual editor. A similar thing was happening in the previous version when citing references, but got fixed. Is there a current workaround to use subscripts in RStudio without having to worry about using the visual editor?

Thanks!

PS. I´m using the latest Rstudio version



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source