简体   繁体   English

Latex:Python模块TEX中的错误

[英]Latex: Error in python module TEX

I do experiments in working with Latex and converting text to pdf. 我在使用Latex并将文本转换为pdf时进行了实验。 Latex figured using PyLatex module, but there is a problem with the printing of Unicode. Latex使用PyLatex模块,但是Unicode打印存在问题。 I found the only way out is to use the Python module "TEX". 我发现唯一的出路是使用Python模块“ TEX”。 But again there is some problem I can not solve. 但是同样有一些我无法解决的问题。 In carrying out my program to get Linux Terminal displays error: 在执行我的程序以获取Linux Terminal时显示错误:

sergen-pc:~$ python /home/sergen/PythonExp/latex.py
Traceback (most recent call last):
  File "/home/sergen/PythonExp/latex.py", line 27, in <module>
    tex.convert('/home/sergen/PythonExp/full.tex', 'tex', 'pdf', max_runs=3)
  File "/usr/local/lib/python2.7/dist-packages/tex.py", line 149, in convert
    raise ValueError(log)
ValueError: This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdftex 2016.5.1)  20 OCT 2016 20:03
entering extended mode
 %&-line parsing enabled.
**/tmp/tex-temp-UzNg43/texput.tex
(/tmp/tex-temp-UzNg43/texput.tex)
! Emergency stop.
<*> /tmp/tex-temp-UzNg43/texput.tex

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

I can not understand what is the reason, or in the folder 'tmp' which tex refuses to read/write, whether in the guts of the tex module? 我不明白是什么原因,或者是在tex拒绝读/写的文件夹“ tmp”中,无论是在tex模块的胆量中? If you know another Python module to convert the files to PDF, I will be happy to try it. 如果您知道另一个将文件转换为PDF的Python模块,我将很乐于尝试。

Solved. 解决了。 When using the module, I pointed out the path to the file to convert, and it was necessary to extract its contents, and to give the module. 使用模块时,我指出了要转换的文件的路径,有必要提取其内容并提供模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM