标签: pylatex

PyLaTeX:pylatex.errors.CompilerError:未找到 LaTex 编译器

我正在尝试从这里运行确切的代码以获得 pylatex 工作的示例。

在我正在工作的目录中,我从链接中复制并粘贴了:

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


def fill_document(doc):
    """Add a section, a subsection and some text to the document.

    :param doc: the document
    :type doc: :class:`pylatex.document.Document` instance
    """
    with doc.create(Section('A section')):
        doc.append('Some regular text and some ')
        doc.append(italic('italic text. '))

        with doc.create(Subsection('A subsection')):
            doc.append('Also some crazy characters: $&#{}')


if __name__ == '__main__':
    # Basic document
    doc = Document('basic')
    fill_document(doc)

    doc.generate_pdf(clean_tex=False,compiler='pdflatex')
    doc.generate_tex()

    # Document with `\maketitle` command …
Run Code Online (Sandbox Code Playgroud)

python latex pylatex

7
推荐指数
1
解决办法
2057
查看次数

在启动PyLatex或Latexmk时如何隐藏命令提示符弹出窗口

如何隐藏启动和执行pylatex代码期间弹出的命令提示符。我有一个正在处理的页面并生成pdf。运行代码时,我需要隐藏弹出窗口。

谈论这个窗口:

在此处输入图片说明

有没有办法隐藏或不显示latexmk.exe弹出窗口?

我一直在搜寻和搜寻,但没有发现与此问题相关的内容。

python latex cmd python-3.x pylatex

7
推荐指数
1
解决办法
248
查看次数

pylatex 添加水平线

如果我有一个使用 pylatex 设置的简单文档...

import pylatex as pl

geometry_options = {
    "head": "1pt",
    "margin": "0.2in",
    "bottom": "0.2in",
    "includeheadfoot": False}

doc = pl.Document(geometry_options=geometry_options)

doc.append("text")
Run Code Online (Sandbox Code Playgroud)

...如何在文本块后添加一定粗细的黑色水平分隔线?

python latex pylatex

2
推荐指数
1
解决办法
661
查看次数

标签 统计

latex ×3

pylatex ×3

python ×3

cmd ×1

python-3.x ×1