首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tikzDevice不适用于基本示例

tikzDevice不适用于基本示例
EN

Stack Overflow用户
提问于 2017-01-13 16:19:08
回答 1查看 984关注 0票数 0

考虑以下示例:

代码语言:javascript
复制
library(tikzDevice)
tikz("test.tex")
plot(1:10)
dev.off()

一旦创建了绘图,就会产生一个错误,代码很多,但在接近尾声时出现了错误:

代码语言:javascript
复制
("C:\ProgramError in getMetricsFromLatex(TeXMetrics, verbose = verbose) : 
TeX was unable to calculate metrics for the following string
or character:

    m

Common reasons for failure include:
  * The string contains a character which is special to LaTeX unless
    escaped properly, such as % or $.
  * The string makes use of LaTeX commands provided by a package and
    the tikzDevice was not told to load the package.

The contents of the LaTeX log of the aborted run have been printed above,
it may contain additional details as to why the metric calculation failed.
In addition: Warning messages:
1: In readLines(texLog) :
  incomplete final line found on 'C:\Users\cgmil\AppData\Local\Temp\Rtmp6FouwP/tikzStringWidthCalc.log'
2: In readLines(texLog) :
  incomplete final line found on 'C:\Users\cgmil\AppData\Local\Temp\Rtmp6FouwP/tikzStringWidthCalc.log'

到底怎么回事?

EN

回答 1

Stack Overflow用户

发布于 2017-06-29 08:14:25

有点晚了..。

C:\Users\cgmil\AppData\Local\Temp\Rtmp6FouwP/中,您应该有一个包含绘图tikz代码的.tex文件。只需替换最后两行

代码语言:javascript
复制
\makeatletter
\@@end

通过

代码语言:javascript
复制
\end{document}
\end{tikzpicture}

然后编译文档。将安装新的软件包,它应该可以正常工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41630123

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档