LaTeX技巧647:如何让章节与目录互相链接
(2012-11-29 10:51:45)
标签:
latex超级链接章节目录 |
分类: 小技巧 |
QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载
搜索了下,已经有了解决方案,http://tex.stackexchange.com/questions/60830/make-chapter-titles-link-to-table-of-contents
代码摘录如下:
\documentclass{report}
\usepackage[explicit]{titlesec}
\usepackage{hyperref}
\titleformat{\chapter}[display]
\titleformat{name=\chapter,numberless}[display]
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\else
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\else
\fi}
\makeatother
\begin{document}
\tableofcontents
\chapter{Test Chapter One}
\chapter{Test Chapter Two}
\chapter{Test Chapter Three}
\end{document}