From 21928105d72c2b349ae7309dafeedabf7ef6632f Mon Sep 17 00:00:00 2001
From: mstsirkin <mstsirkin@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Mon, 25 Nov 2013 12:25:16 +0000
Subject: virtio: LaTeX: Do not include leading numbers in the TOC link

... making them black on the way.

Warning! This is a hack and it depends on the hyperref
package version.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@109 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 virtio-v1.0-csd01.tex | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'virtio-v1.0-csd01.tex')

diff --git a/virtio-v1.0-csd01.tex b/virtio-v1.0-csd01.tex
index 96f2b41..b5f8ac4 100644
--- a/virtio-v1.0-csd01.tex
+++ b/virtio-v1.0-csd01.tex
@@ -36,6 +36,7 @@
 \usepackage{tocloft}
 \renewcommand{\cftdot}{\normalfont.}
 \renewcommand{\cftchapdotsep}{4.5}
+\usepackage{etoolbox}
 \setmainfont[Mapping=tex-text]{Arial}
 \setromanfont{Arial}
 \setmonofont{Courier New}
@@ -72,5 +73,11 @@
 \titleformat{\paragraph}[hang]{\color{oasis1}\normalfont\normalsize\bfseries}{\color{oasis1}\theparagraph}{1em}{#1}
 \titleformat{\subparagraph}[hang]{\color{oasis1}\normalfont\normalsize\bfseries}{\color{oasis1}\thesubparagraph}{1em}{#1}
 
+% hyperref toc hack - do not include the chapter/section number in the link
+\makeatletter
+\def\process@contentsline#1#2{#1{#2}\hyper@linkstart{link}{\Hy@tocdestname}}
+\patchcmd{\contentsline}{\hyper@linkstart{link}{\Hy@tocdestname}{#2}}{\process@contentsline#2}{}{}
+\makeatother
+
 % main document
 \input{main.tex}
-- 
cgit v1.2.3

