'Rmarkdown: backticks are not formatting output as code when writing inline
How can I make a text appear like code in Rmarkdown output? Like this: text formatted as code?
Putting my text between backticks is not producing this effect (like it has done above). Instead text is being formated verbatim.
Thanks
Solution 1:[1]
It seems the backsticks are not working for pdf output (https://community.rstudio.com/t/highlighting-text-inline-in-rmarkdown-or-bookdown-pdf/35118/4).
I was able to solve this by using the soul and xcolor packages and by incluind the following line in my header:
\usepackage{soul, xcolor}
\definecolor{codegray}{rgb}{0.95,0.95,0.95}
\sethlcolor{codegray}
Now I can use the tag hl{text} to produce the desired result. Although I still have to switch all my backticks by this tag in my document.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gustavo Mirapalheta |
