我最近开始使用R中的tikzDevice创建要在LaTeX中编译的绘图。然而,我还没有找到一种方法来摆脱主标题中的粗体字体。
作为示例,我在R中创建了以下图:
library(tikzDevice)
tikz(file = 'example.tex', standAlone = TRUE)
plot(1, main = 'Plot of $\\hat{\\beta}$')
dev.off()这会产生必要的LaTeX输出,但会引入{\bfseries Plot of $\hat{\beta}$}。在示例中,当正常字体的数学与粗体文本配对时,这尤其令人不快。我感兴趣的是从R中删除\bfseries,因为我需要在for循环中生成几个图。
发布于 2018-08-23 17:17:08
tikzDevice只是转换R图。而在R中,标题默认以粗体显示。您可以使用font.main = 1来更改这一点
library(tikzDevice)
tikz(file = 'example.tex', standAlone = TRUE)
plot(1, font.main = 1, main = 'Plot of $\\hat{\\beta}$')
dev.off()https://stackoverflow.com/questions/51977721
复制相似问题