PyLatex 在文档顶部打印包的名称

PyLatex 在文档顶部打印包的名称

当我尝试使用 PyLatex 编译文件中的 LaTeX 模板时,生成的 pdf 在文档顶部有使用的包名称。这可能是什么原因?使用 TeXstudio 可以正确生成文件。在此处输入图片描述

latex_document = 

os.path.join(os.path.dirname(os.path.dirname(__file__)),'path')
with open(latex_document, encoding = 'UTF-8') as file:
    tex= file.read()    
doc = Document('name')

doc.packages.append(Package('tabularx'))
[...]
doc.append(NoEscape(tex))
doc.generate_pdf(compiler='C:/Users/User/AppData/Local/Programs/MiKTeX/miktex/bin/x64/pdflatex', clean_tex=False)

相关内容