Open partofthething opened 4 months ago
I've run into this issue as well. I build both HTML and LaTeX targets and the references render and link fine in HTML and within a single LaTeX document, but not when referencing one LaTeX document from another. Thanks, @partofthething, for this very clear and concise summary of the issue.
Describe the bug
If I set my
latex_documents
setting to something like:but doc2 references sections from doc1, then the LaTeX source built (and therefore the PDF) just shows the reference name (
ref1
) rather than the section name related to the reference.It would be nice if at least the section name (or whatever the ref target is) was printed instead of
ref1
.It would be better if the links could be set up e.g. using something like the LaTeX
xr
package (as described here).It would be best if cross-pdf hyperlinks worked, e.g. using https://ctan.org/pkg/zref
How to Reproduce
conf.py:
index.rst:
doc1.rst:
doc2.rst
then run:
make latex
ormake latexpdf
and observe (in dev.pdf):The TeX output generated looks like:
Environment Information
Sphinx extensions
No response
Additional context
No response