生成pdf时出错指定LaTex编译器或确保已安装latexmk或pdfLaTex

问题描述

我正面临与PyLaTeX: pylatex.errors.CompilerError: No LaTex compiler was found相同的问题,但尚未找到答案。我正在使用Windows,并且安装了MixTexpylatex软件包。

我正在首先尝试将其添加到其他代码中,但不是runnig。

from pylatex import Document,Section,Subsection
from pylatex.utils import italic
import pdflatex

def document(doc):
    geometry_options = {"tmargin": "1cm","lmargin": "10cm"}
    doc =Document(geometry_options=geometry_options)
    
    with doc.create(Section('Results')):
         doc.append('Something')
    doc.generate_pdf('Results',clean_tex=False,compiler='pdfLaTeX')
    tex = doc.dumps() 

我想在这里获得一些帮助。错误是一样的:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python\python38-32\lib\tkinter\__init__.py",line 1883,in __call__
    return self.func(*args)
  File "generalcode.py",in validation
    doc.generate_pdf('Resultados',compiler='pdfLaTeX')
  File "C:Python\python38-32\lib\site-packages\pylatex\document.py",in generate_pdf
    raise(CompilerError(
pylatex.errors.CompilerError: No LaTex compiler was found
Either specify a LaTex compiler or make sure you have latexmk or pdfLaTex installed.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)