TransWikia.com

How to include a PDF that appears as its own section in the table of contents

TeX - LaTeX Asked by Marses on July 26, 2021

It’s a bit hard to explain what I want. I have a separate PDF which is an scientific article (with its own title in the pdf of course). I want to include it into my LaTeX document. The way I do that is with:

includepdf[pages=-]{pdf_path.pdf}

When I do this, it seems to automatically call a newpage, which is fine. However, I want the title of the pdf to appear in my LaTeX document’s table of contents, as a section heading. One way I could do that is with:

section{Title of the article}
includepdf[pages=-]{pdf_path.pdf}

But this won’t give me what I want because the "Title of the article" will appear before the automatic newpage, and it will also be a duplicate of the title within the actual pdf. If I suppress the automatic newpage somehow, I would still have the problem that the title would be repeated twice on the same page. Is there a way to have a "hidden" section title, so that the pdf counts as its own section and appears in the table of contents, without the section title actually appearing within the text? Like some label that says "this is a section titled: Title of the article" without actually printing that title in the location where it’s entered.

Is this even possible? Also, let me know if the question is poorly phrased.

Note – I found this question which is seemingly a duplicate, however it remains unanswered, with comments saying that the question wasn’t understood. So I don’t think mine is a duplicate since it hopefully provides a more complete description of the problem: How to include a PDF in LaTeX with a section only appearing in the toc?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP