![章节未编号---包含 PDF 的目录条目](https://linux22.com/image/426809/%E7%AB%A0%E8%8A%82%E6%9C%AA%E7%BC%96%E5%8F%B7---%E5%8C%85%E5%90%AB%20PDF%20%E7%9A%84%E7%9B%AE%E5%BD%95%E6%9D%A1%E7%9B%AE.png)
我正在将 PDF 文档嵌入到报告中,并希望在目录中添加所有部分。我使用了建议的方法这里。
\includepdf[scale=0.8,pages=1-38,pagecommand={\thispagestyle{fancy}},
addtotoc={6-8, section, 1, {Introduction}, intro,
8-9, section, 2, {Overview}, over,
9-14, section, 3, {Results}, res,
14-15, section, 4, {Discussion}, dis,
15-16, section,5, {Implications}, imp,
16-17, section, 6, {Limits}, lim,
18-19,section,7,{Methods and Analysis},met,
18-19,subsection,1,{Participants},met1,
18-20,subsection,2,{Survey},met2,
20-24,section,8,{Analysis},an,
24-32,section,9,{References},ref,
33-38,section,10,{Suplement},sup}]{a.pdf}
问题是我的章节在第 3 节之后没有在目录中编号。不幸的是,我无法解决这个问题,有办法解决它吗?
答案1
使用您提供的示例,我收到错误“选项 addtoc 中的页码不是数字”。您上面提供的链接演示了该命令的正确用法。这里的解决方案是仅说明您的部分开始的页面,并且第三个数字不是您希望在目录中显示的数字,而是条目的深度:
\includepdf[scale=0.8,pages=1-38,pagecommand={\thispagestyle{fancy}},
addtotoc={6, section, 1, {Introduction}, intro,
8, section, 1, {Overview}, over,
9, section, 1, {Results}, res,
14, section, 1, {Discussion}, dis,
15, section,1, {Implications}, imp,
16, section, 1, {Limits}, lim,
18,section,1,{Methods and Analysis},met,
18,subsection,2,{Participants},met1,
18,subsection,2,{Survey},met2,
20,section,1,{Analysis},an,
24,section,1,{References},ref,
33,section,1,{Suplement},sup}]{a.pdf}