You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I think it would be better default behaviour to just print the result, WITHOUT enclosing the result in backticks (which are in turn converted to code tags).
If I don't want the code tags, I have no choice. Whereas if the default behaviour was to not add TAGS, I could just add the tags.
I don't think Sexpr adds any formatting. And this is the behaviour that I would expect.
In particular, I was trying to write a formula in a blog post that included inline output. However, this didn't work because of the code tags (e.g., $2+2 = r 2 + 2$).
Keeping it plain gives the user freedom to do what they want with the resulting output.
Alternative, is there a way of using handles or some other feature to disable the use of <code> tags for inline code in R Markdown?
The text was updated successfully, but these errors were encountered:
I don't think knitr is adding this markup. I believe it must be markdown, which is translating inline to code. AFAIK, markdown was not designed for reproducible document writing. So the inline usage was mainly to highlight code, which is why you are seeing the markup.
@ramnathv I updated the issue to clarify my understanding of the role of knitr and the markdown to html program. I'm essentially asking whether the default behaviour in knitr for inline commands should be to just print the result rather than surrounding the result in backticks. I think this would be more flexible.
Also, I imagine you have not seen what R Markdown can do. It supports inline commands now. See the answer to this question.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Currently, knitr converts
into
and the Markdown converter then generates
However, I think it would be better default behaviour to just print the result, WITHOUT enclosing the result in backticks (which are in turn converted to code tags).
Sexpr
adds any formatting. And this is the behaviour that I would expect.r 2 + 2
$).Alternative, is there a way of using handles or some other feature to disable the use of
<code>
tags for inline code in R Markdown?The text was updated successfully, but these errors were encountered: