The ToC is generated by a set of \contentsline
macros which are written into a .toc
file by the sectioning macros. You can use that macro to produce your own ToC. If your other document is also a LaTeX document than you could use its .toc
file as a base.
The format of \contentsline
(with hyperref
loaded) is:
\contentsline {<type>}{<content, may include \numberline>}{<page>}{<label>}
Example:
\contentsline {chapter}{\numberline {1}Chapter text}{1}{chapter.1}
\contentsline {section}{\numberline {1.1}Section text}{1}{section.1}
\contentsline {subsubsection}{Subsubsection text}{8}{section*.3}
You might not need to provide anything for the labels because that ToC will most likely not be hyperlinked.
If you want that ToC to be smaller than normal put it into a \scalebox{<factor>}{<content>}
and scale it down. If you place it inside a {minipage}{<width>}
environment it will be drawn with this given width.
You need to add the ToC heading by yourself using \chapter*
or better \section*
:
\begin{minipage}{8cm}
\section*{Some other ToC}
\contentsline {chapter}{\numberline {1}Chapter text}{1}{}
\contentsline {section}{\numberline {1.1}Section text}{1}{}
\contentsline {subsubsection}{Subsubsection text}{8}{}
\end{minipage}