Hi, and welcome!
Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. Not needed for this type of question.
The short answer is that there's no off-the-shelf way to do this within RStudio, without forking it and DIY. The knitr
function pipes the source to pandoc
to \LaTeX only when asked. It might be possible using really deep mojo to send pandoc
an argument to tee
the output to an external window. If it is, I suspect that it would involve either a pandoc
fork, working in Haskell
, or an elaborate combination of tools.
One hack that might work is to use RStudio
for composition and Skim
for viewing by having knitr
keep tex
and using Skim
to render. I forget if Skim
auto-reloads; if it does, that would seem to get you there if the cursor winds up in the right spot.