TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing documentation that includes three documents for different audiences:

  1. Public
  2. Staff
  3. Developers

In the Developers document, I would like to reference a table or section in the Staff document using \ref{} or an analogous command.

Depending on the best way to do this, an alternative way to phrase this question might be "how can I write three interlinked but distinct documents?


share|improve this question
I think this is a duplicate of tex.stackexchange.com/questions/3060/… – Will Robertson Dec 2 '10 at 6:50
possible duplicate of How to reference another document in latex? – David LeBauer Dec 2 '10 at 6:53
up vote 5 down vote accepted

Look at xr. I think that it does what you want.

share|improve this answer

This depends on what you want. You might consider creating five documents: a preamble, postamble, and your other three, and then creating a fifth document that just does this:


You should be able to create a preamble that makes whatever customizations you want for each document in terms of layout, special numbering or whatever.

Then if you wanted to publish separately, it would just be a matter of stringin g the right \include statements together.

Also (adding this after some research) you may want to look at the subdocs package.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.