Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何添加“目录”到侧边栏的索引中? #165

Closed
justinplus opened this issue Dec 8, 2016 · 5 comments
Closed

如何添加“目录”到侧边栏的索引中? #165

justinplus opened this issue Dec 8, 2016 · 5 comments

Comments

@justinplus
Copy link
Contributor

\addcontentsline{toc}{chapter}{目录}

尝试过上面的命令,但将“目录”加到侧边栏索引的同时,也会将“目录”加入目录中(有点绕),如下图。
screenshot from 2016-12-08 16-32-52

有没有其它的办法,只在侧边栏的索引中添加“目录”链接?
thx

@weijianwen
Copy link
Collaborator

试试 \currentpdfbookmark{Table of contents}{name} 行不行,我在 http://tex.stackexchange.com/questions/167056/make-table-of-contents-appear-on-a-pdf-index 看到的。

@justinplus
Copy link
Contributor Author

使用\pdfbookmark\currentpdfbook命令都可以,
但需要再在前面加\cleardoublepage,不然openright的时候会链接到空白页。

...
%% 目录、插图目录、表格目录
\cleardoublepage
\pdfbookmark{\contentsname}{toc}
\tableofcontents
\listoffigures
...

需要我提交pull request吗?

@weijianwen
Copy link
Collaborator

能截图让我看看效果吗?如果能把“目录”这一项从目录页中拿掉,但又能在PDF索引栏中保留“目录”入口,确实是更加符合直觉的做法。请提交PR到dev分支,做成一个干净的commit。

@justinplus
Copy link
Contributor Author

justinplus commented Dec 10, 2016

效果图如下,(敏感信息处理掉了)

screenshot from 2016-12-10 10-25-17

@weijianwen
Copy link
Collaborator

好的,麻烦提交PR到dev分支,做成一个干净的commit。

@weijianwen weijianwen changed the title 如何添加“目录”到侧边栏的索引中? [wiki] 如何添加“目录”到侧边栏的索引中? May 16, 2017
@weijianwen weijianwen changed the title [wiki] 如何添加“目录”到侧边栏的索引中? 如何添加“目录”到侧边栏的索引中? May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants