设置步骤:
一、放置文件
statweave.module放入lyx的resouces layout文件夹
statweave.sty放入latex可识别的路径
二、lyx中的设置
1、工具,首选项,file handling,file formats:新建格式StatWeave,选择文本格式,短名称:statweave,后缀:swv
2、转换器:添加转换器statWeave to latex(peflatex),to latex(plain),to latex(xetex)。转换器填写:statweave --target tex $$i。应用,保存。
3、工具,首选项,路径:添加statweave和stata的安装路径:C:\Program Files\statweave;F:\Program Files\stata11\StataSE
4、文档设置:
class:article,预定义noae
statweave模块
语言:简体中文,简体中文GBK
导言区:
% Special formatting for chunks and output
\StataweaveOpts{codefmt="formatcom=\color{blue}", outfmt="frame=single"}
三、statweave GUI中的设置
1、运行statweave.jar,打开statweave GUI
2、在statweave GUI 中,option,configure languages, 设置sas,stata,maple,matlab,R的路径:
3、在statweave GUI 中,设置epstopdf路径:edit all config key
convert.eps.pdf.binary,修改为你的epstopdf.exe路径,比如"G:\CTEX\MiKTeX\miktex\bin\epstopdf.exe"(否则死机,lyz无反应)
四、用pdflatex编译