Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

todolist directive generates wrong hyperlinks in LaTeX PDF output #12520

Closed
jfbu opened this issue Jul 8, 2024 · 2 comments
Closed

todolist directive generates wrong hyperlinks in LaTeX PDF output #12520

jfbu opened this issue Jul 8, 2024 · 2 comments

Comments

@jfbu
Copy link
Contributor

jfbu commented Jul 8, 2024

Describe the bug

The LaTeX mark-up for todo directives uses a \label which can not work because there is no associated counter. As a result from the Todo List, the links go generally to the section title, not to the actual todo item.

Here is a screenshot where the target of the second item in the todo list is shown.
Capture d’écran 2024-07-08 à 22 09 46

How to Reproduce

index.rst

Welcome to FOO's documentation!
===============================

TEST
====

section 1
---------

.. todo::

   Implement TODOs!


Some text


Some more text

.. todo::

   Implement TODOs! Do it ! (2)


section 2
---------

.. todolist::

conf.py

project = 'FOO'
copyright = '2024, JFB'
author = 'JFB'
version = '0'
release = '0'
extensions = ['sphinx.ext.todo']
todo_include_todos = True
todo_link_only = True
language = 'en'
# master_doc = 'index'

Environment Information

Sphinx version: 7.4.0+/7eb77f237
Python version: 3.12.3 (CPython)
Docutils version: 0.21.2 
Pygments version: 2.18.0
Jinja2 version: 3.1.4

Sphinx extensions

['sphinx.ext.todo']

Additional context

No response

@jfbu
Copy link
Contributor Author

jfbu commented Jul 17, 2024

This was fixed by merge of #12508. An update to CHANGES.rst will be done a posteriori later. Closing.

@jfbu jfbu closed this as completed Jul 17, 2024
jfbu added a commit to jfbu/sphinx that referenced this issue Jul 18, 2024
AA-Turner pushed a commit that referenced this issue Jul 18, 2024
Also reformulate 2 other LaTeX entries there-in to adopt the same style as other bug-has-been-fixed entries rather than reproducing the original bug description.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2024
@jfbu
Copy link
Contributor Author

jfbu commented Aug 17, 2024

This was actually a duplicate of #8807.

@jfbu jfbu added this to the 7.4.0 milestone Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant