`
zzjjzzgggg
  • 浏览: 116079 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

Lyx2.0 epstopdf

阅读更多
  
Lyx 2.1.x
Document/settings/Output
将Output format 改为xelatex即可省去以下所有关于eps的麻烦。

======================================================

Lyx2.0.0已经放出,但发现epstopdf仍有问题,这是显然的,因为Lyx最终是调用mictex下的epstopdf,根源出在epstopdf上。

    Lyx1.6时可以用那个bat文件替换原来的epstopdf.exe。但在Lyx2.0下有问题,应该是目录问题。因为用Lyx view时,首先是将eps、tex文件拷贝到临时目录里,对临时目录中的文件进行编译处理,在Lyx2.0时发现不对,conventer老报错说找不到eps文件,搞不清楚为啥找不到,可能和工作目录有关。

    解决方法如下:
    1. 将如下代码保存为epstopdf.py,这个文件放在Lyx2.0根目录\Resources\scripts里面,在converter里面通过$$s/scripts/epstopdf.py来引用它。
import os
import sys

fname=sys.argv[1]
cmd='''gswin32c -dSAFER -dNOPAUSE -dQUIET -dBATCH -dEPSCrop -sDEVICE=pdfwrite -sOutputFile="%s.pdf" "%s"''' % (os.path.splitext(fname)[0], fname)
os.system(cmd)


    2. 修改eps to pdf的conventer为: python -tt $$s/scripts/epstopdf.py $$i

    3. 保存就ok了

============================================
Yes, batch files do not work anymore on Windows. You have to invoke your batch file as "cmd /c file.bat".
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics