Italic text in the form of a latex figure created by knitr

I am trying to highlight text as a picture created by knitr. I have the code below in a .Rnw file and I convert it to a .tex file using knitr:

<<plot_setosa, fig.cap="A plot of $\\textit{setosa}$">>= plot(iris[iris$Species == "setosa",]) @ 

How can I highlight the setose in the title of the picture?

+3
source share
1 answer

Try:

 <<plot_setosa, fig.cap="A plot of \\textit{setosa}">>= plot(iris[iris$Species == "setosa",]) @ 

No need for $$

+6
source

Source: https://habr.com/ru/post/1238547/


All Articles