Reputation: 51
Currently when I use the single back-ticks like that
, the background color is not rendered when I knit the pdf (only the font, see the capture below). However everything is working for code blocks, so I am wondering if there are some tweaks around.
I tested the answer from issue 50727217, but the font is not rendered like 'code'.
I just want to display R-markdown inline code like markdown does.
The inline code I want to have a gray background color will not be used to run code within R markdown, only to highlight some code elements (like a path, a function's name etc.).
Upvotes: 1
Views: 847
Reputation: 1044
First run library(kableExtra)
, then try the following inline code: `r text_spec("(vectorizer.pickle)", color="white", background = "gray")`
.
You can also make the text bold and play with hexadecimal colors to find the right shade of gray you want:`r text_spec("(vectorizer.pickle)", bold = T, color="white", background = "#918C8B")`
.
It worked for me. This is the pdf output:
Upvotes: 1