在下面的MWE中,我的图在RStudio中编译时根本没有轴。但是,当我执行knit2pdf("myfile.Rnw")
并编译生成的.tex文档时,一切正常。为什么?更新:问题只发生在Ubuntu 14.04 Evince(GNOME Document Viewer 3.10.3)中。例如,当在Okular中打开时,一切正常。
\documentclass{article}
\begin{document}
<<>>=
plot(rnorm(100))
@
\end{document}
Rstudio版本0.98.1028(最新)
R块中sessionInfo()
的输出
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8
[3] LC_TIME=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8
[9] LC_ADDRESS=C
[11] LC_MEASUREMENT=en_US.UTF-8
LC_NUMERIC=C
LC_COLLATE=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_NAME=C
LC_TELEPHONE=C
LC_IDENTIFICATION=C
attached base packages:
[1] stats
graphics grDevices utils
datasets
methods
other attached packages:
[1] knitr_1.6
loaded via a namespace (and not attached):
[1] evaluate_0.5.5 formatR_0.10
highr_0.3
[5] tools_3.1.1
来自knitr
:
Sys.which('pdflatex'); cat(system('pdflatex --version', intern = TRUE), sep = '\n')
pdflatex
"/opt/texbin/pdflatex"
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014)
kpathsea version 6.2.0
Copyright 2014 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.10; using libpng 1.6.10
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.03
从终端:
anh@anh-IdeaPad-Y570:~$ which pdflatex; pdflatex --version
/opt/texbin/pdflatex
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014)
kpathsea version 6.2.0
Copyright 2014 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.10; using libpng 1.6.10
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with xpdf version 3.03
答案 0 :(得分:2)
我已经解决了这个问题而无法真正了解原因。 (我向所有花时间帮助的人道歉)。我刚刚安装了texlive 2014
(之前的版本是texlive 2013
,此时此版本已冻结),一切正常。
我认为它不是texi2dvi
,因为尽管一切正常,但knit2pdf()
仍然会发出texi2dvi not found
错误。
我的RStudio版本也没有改变(0.98.953,最新版本为0.98.1028)。
我没有触及RStudio中的任何选项。唯一改变的是从2013年到2014年升级texlive。
如果我现在没有要写的重要文件,我很想重新安装texlive并重新创建问题。