# How do I keep cross-references across several documents accurate?

This is a follow-up to my question about quality system documentation management. That question evolved to a different question and Charles suggested to ask a new one, so I'll just quote it here.

I am looking into something more like a document management system integrated with LaTeX.

What aspect of document management am I looking at, for example?
Quality systems have a lot of documents that cross-reference each other. For example, Q01 - Quality Manual and a five dozen other documents mention T01 - Test Procedure A somewhere in the body text and also in its References section. If, sometime in the future, T01 - Test Procedure A changes its title to T01 - Steps In Performing Procedure A, obviously it will be tedious work to look through the other documents that reference T01. Of course, this might require re-compiling the other documents, but that's surely better than wading through them one by one.

I think this can be easily achieved with a good reference management system (to me, SVN is great in doing this). All tex files should have in common a bibliograpghic file, and all documents should be listed in that file.

The people in charge of mantaining the T01 document, in case of a change in the bibliographic data, should update the corresponding entry in the .bib file (and the changes are tracked by svn).

So, whenever a change in the .bib file occurs, the next time the Q01 document is re-compiled, the reference updates automatically.

However, this requires an agreement on how to structure the documents' tree and the use of a versioning system. Subversion helps in both.

The xr-hyper and hyperref packages are a solution.

Here, an example with two documents.

First, a.tex:

\documentclass{article}
\usepackage{xr-hyper}

\begin{document}
\section{Test Procedure A}
\label{T01}
Test procedure A...
\end{document}


Second, b.tex:

\documentclass{article}
\usepackage{xr-hyper}

If you compile a.tex then b.tex, you get: