r - tikzDevice 主标题,不带粗体
问题描述
我最近开始在 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}$}
. 当像示例中一样,将普通字体的数学与粗体文本配对时,这尤其令人不快。我有兴趣\bfseries
从 R 中删除,因为我需要在 for 循环中生成多个图。
解决方案
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()
推荐阅读
- html - 是否有一种 BEM 方法,我可以只使用一个 div 构建一个包含许多元素的标题?
- entity-framework - 如何在外部管理(添加)ASP.NET Core 3.1 应用程序的用户
- php - 即使设置了密钥,Memcached get 也可能返回“未找到”
- python - 使用 Keras 的神经网络无效维度错误
- powershell - 运行 powershell 脚本以远程获取当前用户 regkey?
- python - 如何并排绘制数据框的图形?
- c# - 跨不同构建器重用构建器步骤
- json - json:不支持的类型:func()
- linux - 在 React 应用程序上激活谷歌分析
- c# - 如何使用 .NET Core 2.1 在 C# 中创建 .xlsx 文件?