Extension internals¶
References between distinct PDF documents¶
Sphinx references point to the source file of their targets. That matches the HTML builder well, because generally one source file turns into one HTML output file. However, the LaTeX builder generally puts multiple source files into a single output file.
- Collect
latex_documentnodes: iterate over all source files and traverse their doctrees. - Assemble doctrees of
latex_documentnodes: use Sphinx’ built-in assembling logic. - Determine which source files went into which
latex_documentnodes: traverse the doctree of eachlatex_documentnode looking forstart_of_filenodes.