这是我正在尝试为以下内容生成 PDF 的 Sphinx 文档的一部分:
Overview
--------
Use this `Cookiecutter <https://cookiecutter.readthedocs.io>`_ template to generate
an empty Python package. Features include:
* Boilerplate tests and documentation
* `Python setup configuration`_
* Open source software license
* Code style checking via `pre-commit`_
* `GitLab CI/CD integration`_
* `Editorconfig`_
* Miscellaneous files, such as `Changelog`_
* A `README`_
.. _Python setup configuration: {{cookiecutter.project_slug}}/setup.py
.. _pre-commit: {{cookiecutter.project_slug}}/.pre-commit-config.yaml
.. _GitLab CI/CD integration: {{cookiecutter.project_slug}}/.gitlab-ci.yml
.. _Editorconfig: {{cookiecutter.project_slug}}/.editorconfig
.. _Changelog: {{cookiecutter.project_slug}}/CHANGELOG.rst
.. _README: {{cookiecutter.project_slug}}/README.rst
我正在使用make latexpdf
. 这通常可以正常工作,除了这个位。我无法让 LaTeX 与这些 Cookiecutter 链接合作,尽管它在 HTML 中看起来不错。我已经尝试在 Sphinx 中以各种方式格式化链接,但它总是最终生成相同的 LaTeX,这会产生以下错误:
! Extra }, or forgotten \endgroup.
<recently read> }
l.129 ...}\}/setup.py}{Python setup configuration}
^^M
生成的 LaTeX 本身包含:
126:
127: \item {}
128: \sphinxAtStartPar
129: \sphinxhref{\{\{cookiecutter.project\_slug\}\}/setup.py}{Python setup configuration}
130:
诚然,我对 LaTeX 了解不多,但这条线对我来说看起来不错。它似乎逃脱了所有它应该的,并正确地打开和关闭其余部分{
?}