2014-01-06 58 views
3

我试图在knitr创建的数字标题中斜体化一些文本。我有一个.Rnw文件下面的代码,我使用knitr将其转换为.tex文件:由knitr生成的乳胶图标题中的斜体文本

<<plot_setosa, fig.cap="A plot of $\\textit{setosa}$">>= 

plot(iris[iris$Species == "setosa",]) 

@ 

我怎样才能italicise在图题setosa?

回答

6

尝试:

<<plot_setosa, fig.cap="A plot of \\textit{setosa}">>= 

plot(iris[iris$Species == "setosa",]) 

@ 

无需为$$