I have a set of documents each with references that look like:
\ref{figure1}
and so on. This is no problem when building each document separately,but creates many
duplicate references when using \include{} to create a composite document. Is is possible to redefine the \ref and \label commands to automatically include the source filename in the reference and label. Otherwise, I would have to hand-edit all my source files with new references to solve the duplicate references problem in the composite document. For example, document1.tex would have references like
\ref{figure1_document1}
and document2.tex would likewise have the following:
\ref{figure1_document2}
But I would like this to happen automatically by re-defining the commands instead of having to hand-edit each of the source files.
Any tips appreciated!