Knitr制作的乳胶图形标题中的斜体文字 [英] Italicise text in latex figure caption produced by knitr

查看:63
本文介绍了Knitr制作的乳胶图形标题中的斜体文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用斜体将knitr创建的图形标题中的某些文本变为斜体.我在.Rnw文件中包含以下代码,并使用knitr将其转换为.tex文件:

I'm trying to to italicise some text in a figure caption created by knitr. I have the code below in a .Rnw file and I'm converting it to a .tex file using knitr:

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

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

@

如何在图形标题中将setosa斜体化?

How can I italicise setosa in the figure caption?

推荐答案

尝试:

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

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

@

不需要$$

这篇关于Knitr制作的乳胶图形标题中的斜体文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆