You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Welcome to Test MultiPDF XREF's documentation!
==============================================
.. toctree::
:caption: Contents:
doc1
doc2
doc1.rst:
User Guide
##########
This is the user guide
.. _ref1:
Installation
------------
Here is how you install.
doc2.rst
Developer Guide
###############
This is the dev guide
.. _ref2:
Build enviro
------------
Here is how you build
.. _ref3:
Testing
-------
You can also do internal refs.
Check out :ref:`ref2` for build environ.
Check out :ref:`ref1` for user guide.
then run: make latex or make latexpdf and observe (in dev.pdf):
The TeX output generated looks like:
You can also do internal refs.
\sphinxAtStartPar
Check out {\hyperref[\detokenize{doc2:ref2}]{\sphinxcrossref{\DUrole{std,std-ref}{Build enviro}}}} for build environ.
\sphinxAtStartPar
Check out \DUrole{xref,std,std-ref}{ref1} for user guide.
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
The text was updated successfully, but these errors were encountered: