sphinx-doc/sphinx

pdftlatex builds - Index printing only the page number where glossary term is defined, not used.

Open

#11,814 建立於 2023年12月24日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)Python (5,625 star) (1,985 fork)batch import
builder:latexhelp wantedtype:enhancement

描述

Describe the bug

Summary

I'm using a new/boilerplate project generated via sphinx-quickstart, and am building a .pdf via the pdflatex builder. I have created a glossary which allows me to reference terms; e.g. via:

:term:`AK`

In general, this feature works great, and allows for a very nicely formatted doc.

Snippet:

********
Glossary
********

.. glossary::

    AK
      Attestation Key.

Render:

image

However, the auto-generated index appears to be broken. I was expecting the index to contain a listing of each-and-every page on which a term is used, but it seems to only print/render the page on which the term is defined, e.g.:

Snippet:

\indexentry{AK@\spxentry{AK}|hyperindexformat{\spxpagem}}{29}

Render:

image

The term AK / Attestation Key is used dozens of times throughout the document, so I was expecting the term to have numerous page numbers associated w/ it in the index.

Question

How do I remedy/fix this issue? I'm able to achieve the desired input with a standalone LaTeX document using glossaries, so, my guess is a mis-config in this rST/Sphinx project.

Thank you.

How to Reproduce

Example provided above, with in-line screenshots/render.

Environment Information

~$ sphinx-build --bug-report
Please paste all output below into the bug report template


Platform:              linux; (Linux-5.4.0-166-generic-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        6.2.1
Docutils version:      0.19
Jinja2 version:        3.0.3
Pygments version:      2.17.2

Sphinx extensions

extensions = [
    'sphinx.ext.imgmath',
    'sphinx.ext.ifconfig',
    'sphinxcontrib.bibtex',
]

Additional context

N/A.

貢獻者指南