[Tex/LaTex] How to use the aux file

auxiliary-files

This is not a terribly well-formed question, sorry. I don't really know what information is in the .aux file, or how I can make use of it in other (related) documents. What's the best reference for understanding how this works?

One common thing I would like to be able to do is the following: I have a book that contains lots of \labels. I would like to be able to reference those labels from the solutions manual, which is separately created (as a .tex file) and generated (as a PDF).

Best Answer

If you want to know what is in the aux-file: Open it in an editor and look it up. Actually every package (and you too) can write something to the aux-file if it want. So the aux-file normally contains quite a lot informations which are very document specific and which would cause troubles in another document.

So if you want to read an external aux-file you must be careful. E.g. an aux-file contains lines which should be written to the toc-file (\@writefile{toc}) which you don't want to process in this case. The xr-package mentioned by Boris e.g. loops through external aux-files and looks for \newlabel commands but ignores everything else.