-
I've used this pattern extensively with rmarkdown, but the output isn't as expected with quarto: e.g. This simply outputs the same line with code highlighted, instead of interpreting the python command. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Thanks for the question @combiz . As far as I know, knitr and rmarkdown only support inline code in the R language. Consider the follow minimal working
The output of
As mentioned in StackOverflow, you can use the reticulate package to have inline code access to Python variables. |
Beta Was this translation helpful? Give feedback.
-
Yes, unfortunately that inline syntax isn't supported by Jupyter, and we at Quarto are waiting for a portable solution across engines. In this case, you can use jupyter's computational Markdown cells instead, and output the entire paragraph at execution time:
(I haven't tested this one so I might have the syntax slightly wrong, but hopefully the gist is clear.) |
Beta Was this translation helpful? Give feedback.
-
Thank you both @rgaiacs @cscheid, these suggestions are helpful. |
Beta Was this translation helpful? Give feedback.
-
FWIW There has been a recent addition for this in 1.4 : #6190 |
Beta Was this translation helpful? Give feedback.
FWIW There has been a recent addition for this in 1.4 : #6190