0

I'm using xr package for referencing to external documents. I want to add external document title to a reference.

How it could be obtained?

1

1 Answer 1

1

Consider the following. If you set up xr so that \ref{A-mnemonic} returns the section number, then \ref{A-name} will return "document name". As a bonus, \pageref{A-name} will return the last page number.

\documentclass{article}

\makeatletter
\AtEndDocument{\def\@currentlabel{document name}%
\label{name}}
\makeatother

\begin{document}
\section{Section}\label{mnemonic}

\ref{mnemonic}

\ref{name}

\pageref{name}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .