# Using .toc external files

I've a two volume book and I want to put both table of contents in both books. How can I do that? My idea was to use the .toc files, but I don't know how to use external .toc file. Any help. Thanks in advance.

• So you have to separate `.tex` files, one for each volume? Say, `first.tex` and `second.tex`, together with `first.toc` and `second.toc`? Do you use any ToC-related packages like `etoc`, say? – Werner Nov 10 '14 at 7:13
• You can use `\makeatletter\input{volume2.toc}\makeatother` in volume1. – user11232 Nov 10 '14 at 7:26
• @Werner - Yes I've separate .tex files, and I'm not using any ToC-related package. – Humberto Rafeiro Nov 10 '14 at 14:00
• @HarishKumar - Thanks for the suggestion, it works. – Humberto Rafeiro Nov 10 '14 at 14:12

Assuming that you have two volumes `volume1.tex` and `volume2.tex` then you can use
``````\makeatletter
in `volume1.tex` (at an appropriate place) to insert the toc of `volume2` in `volume1` and vice versa.