subfiles icon indicating copy to clipboard operation
subfiles copied to clipboard

subfiles+xr-hyper, problems with links when renaming the PDF (ArXiv policy): a workaround

Open ouboub opened this issue 5 months ago • 0 comments

There was a discussion about subfiles and xr-hyper on the ArXiv. https://tex.stackexchange.com/questions/751660/xr-hyper, subfiles, the ArXiV: not all links work in the pdf file generated by the ArXiV][xr-hyper-subfiles-the-arxiv-not-all-links-work-in-the-pdf-file-generated-by-t/751680#751680]]

The solution, as proposed in the subfile manual and illustrated in the example, requires all files to include

\externaldocument[M-]{main}

In the generated file main.pdf, the links work as expected. However, when the file is renamed, as happens automatically on the ArXiv, links that contain the prefix {M- fail to display correctly, because they still refer to main.pdf, which no longer exists under that name.

Ulrike Fischer has suggested a workaround: replace

\externaldocument[M-]{main}

with

\externaldocument[M-]{main}[] % then all links in the main file are internal.

It would be prudent to include this clarification in the manual.

Uwe Brauer

ouboub avatar Sep 29 '25 15:09 ouboub