I have functions that create html and markdown. For html I can make the html rendered correctly inside a Quarto or RMarkdown chunk by passing the created character strings through htmltools::HTML()
, and to make them rendered from the console I just use htmltools::browsable(htmltools(HTML(strings)))
. When I produce markdown, e.g. a $\LaTeX$ math expression such as $\alpha$
I can render in a chunk by passing the string through knitr::asis_output
. For both approaches I need not bother with results='asis'
in the chunk header. When outside a chunk the html is rendered in the RStudio View panel or by popping up your default browser if not in RStudio.
Is there a corresponding way to render constructed markdown strings in a view window from the console?