# TOC for book and preview

I am writing a book, which has a shorter version called "preview". How could I arrange (in LaTeX, xelatex) that the preview PDF remains as it is (shorter) but that it presents the TOC of the "complete" book?

A nice bonus (but not necessary) would be if the missing references from the preview TOC to non-existing pages would not have a link to the corresponding pages (which, logically, are missing from the preview, as the preview is shorter).

-

write the complete book and create a new document which uses package `pdfpages`. Then you can do a
``````\includepdf[pages={1-3}]{file}
which includes only the first pages of your book. `{1-3}` is the page range if the TOC is on that range.
How about pages numbered with roman numbers? I am using `\frontmatter`. Haven't tested your solution yet, just asking. –  Flavius Mar 24 '13 at 20:20