Ctex出现的问题:“Latex failed to create dvi file”的解决办法

2012-12-20 09:39 阅读 907 次 评论关闭

相信很多在用CTEX 2.7的人都遇到“Latex failed to create dvi file”的问题,逛遍了大大小小的论坛也没有找到什么好的解决方案。但是,幸运的你找到了这里!

网上流传这一个办法:“只需将系统时间调到2005年或者2006年,成功运行第一次后,再将系统时间调整过来就可以正常使用了。”

本人亲测,把时间调整到2005或者2006年之后的确可以正常使用,但是调整回正常时间之后还是不能正常使用。

但是,这是一个明显的线索,问题可能和时间有关系。接着我进入了命令行编译文件,出现了一下的结果:

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)
Running miktex-pdftex.exe...
This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (INITEX)
entering extended mode
("C:\Program Files\MiKTeX 2.8\tex\latex\config\latex.ini"
(C:\Users\Edin\AppData\Roaming\MiKTeX.8\tex\generic\config\pdftexconfig.tex)
("C:\Program Files\MiKTeX 2.8\tex\latex\base\latex.ltx"
("C:\Program Files\MiKTeX 2.8\tex\latex#CONTENT#miktex\texsys.cfg")
./texsys.aux found
\@currdir set to: ./.
Assuming \openin and \input
have the same search path.
Defining UNIX/DOS style filename parser.
catcodes, registers, compatibility for TeX 2, parameters,
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter <return> to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! LaTeX source files more than 5 years old!.
l.545 ...aTeX source files more than 5 years old!}
No pages of output.
Transcript written on latex.log.
miktex-makefmt: miktex-pdftex.exe failed on latex.ini.
initexmf.exe: The operation failed for some reason.
initexmf.exe: Data: C:\Program Files\MiKTeX 2.8\miktex\bin\miktex-makefmt.exe
I can't find the default format file!

你的结果可能有点不一样,但是注意红色部分,应该是完全相同的,说是source文件已经是5年之前的了,需要升级,果然和时间有关系。升级似乎也比较麻烦,进而继续摸索,终于找到了以下方法!

1.打开 “Ctex安装路径\MiKTeX\tex\latex\base\latex.ltx”,具体路径可能和这个有点差异,但是一定要找到latex.ltx这个文件,

2.找到 “\ifnum\count@>65”,改为 “\ifnum\count@>100” (或者其他大于100的数),

3.保存文件,大功告成!Enjoy Latex!

版权声明:本文著作权归原作者所有,欢迎分享本文,谢谢支持!
转载请注明:Ctex出现的问题:“Latex failed to create dvi file”的解决办法 | 猎微网
分类:LaTeX 标签:, ,

评论已关闭!