Error when running latexpdf for Cookiecutter template

113 Views Asked by At

This is part of the Sphinx document I'm trying to generate a PDF for:

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

I'm using make latexpdf. This generally works correctly, except for this bit. I can't get LaTeX to cooperate with these Cookiecutter links, though it looks fine in HTML. I've tried formatting the links in various ways in Sphinx, but it always ends up generating the same LaTeX, which generates the following error:

! Extra }, or forgotten \endgroup.
<recently read> }
                 
l.129 ...}\}/setup.py}{Python setup configuration}
                                                  ^^M

The generated LaTeX itself contains:

126: 
127: \item {} 
128: \sphinxAtStartPar
129: \sphinxhref{\{\{cookiecutter.project\_slug\}\}/setup.py}{Python setup configuration}
130: 

I admittedly don't know much about LaTeX, but this line looks fine to me. It seems to escape all the { and } that it should, and open and close the rest properly?

0

There are 0 best solutions below