中添加一个包含的

中添加一个包含的

本文介绍了在 LaTeX TOC 中添加一个包含的 PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

In my document I include a PDF using

includepdf[pages=-]{./mypdf.pdf}

The problem I'm having is how to add a TOC entry for this pdf.

It supposed to be an appendix. I tried adding a new section in the appendix but of course the section name can't be printed on the same page than the included pdf, so the resulting TOC line directs to a wrong page.

If I use addcontentsline I loose the numbering and the page is wrong too because the included pdf actually starts at the next page...

I'm a bit lost here so I would really appreciate if someone knows how to do this.

Note: the pdf I try to include was not generated from LaTex.

解决方案

From the documentation of pdfpages (page 6) it looks like there is an experimental tag called addtotoc. I think you'd use it like:

includepdf[pages=-, addtotoc={<page number>, section, 1, <heading>, <label>}]

Where <page number> is the desired page number of the included PDF (edit) to link to, <heading> is the title in the TOC, and <label> is how you may ef to the section.

这篇关于在 LaTeX TOC 中添加一个包含的 PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:19