尝试使用R latex2exp软件包,语法有问题。尝试使用文本Z(u +下标字母符号然后)创建标签。无法解决如何获得字母的下标以中括号未下标的原因而终止。
R代码示例
require(latex2exp) plot(1,2) text(1,2,TeX('Z(u$_\\alpha$)'),cex = 4)
用括号括起来就可以了:
plot(1, 2, pch = 19) text(1, 2.4, latex2exp::TeX('$Z(u_{\\alpha})$'), cex = 4)
另请参阅latex2exp::latex2exp_examples()
latex2exp::latex2exp_examples()