0
votes

I have some documents scanned as pdf, and since I want to hand them in to my university combined as one document, I want to attach a table of contents to make the reader aware of the fact, that there are several documents inside this pdf. So, since I already have the documents and I am not producing them in Latex anymore, I only want to create the table of contents in Latex. Usually, Latex pulls its information for the toc out of the document it won't have this time. So, is there manual way of creating a table of contents, where I can type in myself, which section exists and what page it is on?

Thank you all in advance and have a nice weekend!

PS: I double checked if that topic was already dealt with, but I didn't find anything.

1
Have a look at the pdfpages package. This allows you to stitch the pdfs together and add information for the toc via the addtotoc={....} optionsamcarter_is_at_topanswers.xyz
Awesome, thank you very much!Ramco99
But still, if someone knows how to create ToC entries without them existing, it would still be more practical for me. Is there maybe something like addtotoc without including a pdf, where you can specify the page even if the document doesn't have that many pages?Ramco99

1 Answers

0
votes

So, apparently the answer lies in the .toc file which is auto generated when compiling. This document contains commands with the pattern

\contentsline {section}{\numberline {<number of enumeration>}\ignorespaces <heading>}{<pagenumber>}%

this comment also works when used after the \tableofcontents command.