您的位置:首页 > 产品设计 > UI/UE

CTex cannot open TrueType font file for reading 简单的解决方法

2013-08-02 10:37 337 查看
在实验室安装CTex时,显示的错误如下:

!pdfTex error: pdflatex.exe (file simkai.ttf): cannot open TrueType font file for reading

==>Fatal error occurred, no output PDF file produced!

texify: pdffatex.exe failed for some reason (see log file).

……

PDFTeXify failed to create a pdf file.

For possible explainations start the command from the Command Promt...

很明显这是字体集出了问题,还会出现两种情况,可以进一步验证是否是字体集的问题:

【1】新建一个文件(路径或者文件名中带有中文),保存后输入一下代码:

\documentclass{article}

\begin{document}

hello,this is the first CTex!

\end{document}

编辑时会显示“系统找不到指定文件”的错误。这是因为字符集出现问题导致CTex无法识别中文,因此无法识别你的路径。

【2】新建一个文件(路径和文件名全部为英文),保存后输入如下代码:

\documentclass{article}

\begin{document}

hello,this is the first CTex!

\end{document}

【注意:上面的空格和标点都要是英文的】

看能否生成一个正确的pdf文件,如果不能,应该是其它地方出了问题。如果能,则可以继续做如下实验:将上面的代码改成这样:

\documentclass{article}

\begin{document}

hello ,world 你好!

\end{document}

【注意:上面的标点是中文的】

此时如果能生成的话,只会显示“ hello world”,而中文的不管你怎么改都不会显示。

我试验了一上午,看了很多的网页,有的说下载字体包,有的说要更新宏文件,试验了很多方法也不行,最后采用了一个最简单的方法:

【解决方法】在你的“C://windows//fonts//”目录下搜索“楷体”,看看是否有“楷体 常规”的文件,如果没有,好!到别人电脑里找找,如果有,直接将该文件拷到上面的目录中。结果问题就解决了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐