各位大侠好:
我用LyX写好了一段文档导出代码如下:
%% LyX 2.0.4 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper]{ctexart}
\usepackage{CJK}
\pagestyle{headings}
\usepackage[active]{srcltx}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\special{papersize=\the\paperwidth,\the\paperheight}
\makeatother
\usepackage{ctex}
\begin{document}
\begin{CJK}{GBK}{}%
\title{报告}
\maketitle
\section{Introduction}
\section{Materials and Methods}
\section{Results and Discussion}
\section{Conclusion}
<<plot>>=
plot(1:100)
@
\end{CJK}
\end{document}
在R里执行的时候报如下的错:
> knit2pdf("testLyx.Rnw")
processing file: testLyx.Rnw
|>>>>>>>>>>>>>>>>>>>>>> | 33%
ordinary text without R code
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | 67%
label: plot
|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%
ordinary text without R code
output file: E:\work\testLyx.tex
错误: running 'texi2dvi' on 'testLyx.tex' failed
LaTeX errors:
! LaTeX Error: File `srcltx.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
此外: 警告信息:
运行命令'"d:\CTEX\MiKTeX\miktex\bin\texi2dvi.exe" --quiet --pdf "testLyx.tex" -I "d:/PROGRA~1/R/R-215~1.0/share/texmf/tex/latex" -I "d:/PROGRA~1/R/R-215~1.0/share/texmf/bibtex/bst"'的状态是1
请问是怎么回事?
我在LyX里生成pdf的时候也是报错,无法成功,请高手指教。
谢谢!