From 694eac1077fb9a92ba88ed5f068f0e7667f74d61 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Fri, 16 Mar 2012 10:37:48 +0000 Subject: [PATCH] Add internal hyperlinks to the book. Don't put the links in a different colour, so it still prints well. --- dottes.tex.header | 10 ++++++++++ makeBooke.sh | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dottes.tex.header b/dottes.tex.header index 5c70e6b..363d5f3 100644 --- a/dottes.tex.header +++ b/dottes.tex.header @@ -5,6 +5,16 @@ \usepackage{fancyhdr} \usepackage{longtable} +\usepackage{hyperref} +\hypersetup{ + bookmarks=true,% + colorlinks=true,% + citecolor=black,% + filecolor=black,% + linkcolor=black,% + urlcolor=black +} + % ----- Common variables \def \build {\input{buildno.txt}} diff --git a/makeBooke.sh b/makeBooke.sh index 18712b4..23bbb8e 100755 --- a/makeBooke.sh +++ b/makeBooke.sh @@ -45,7 +45,8 @@ find $booke -name "*.abc" | sort | title=`$dir/abctitle.py --latex $filename` name=`basename $filename .abc` echo -E "\begin{center}" >> $builddir/$output - echo -E "\includegraphics[width=\textwidth]{$graphicsdir/$name}" >> $builddir/$output + echo -E "\phantomsection" >> $builddir/$output + echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth]{$graphicsdir/$name}}" >> $builddir/$output echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output echo -E "\end{center}" >> $builddir/$output done @@ -57,7 +58,7 @@ find $booke -name "*.abc" | sort | do title=`$dir/abctitle.py --latex $filename` name=`basename $filename .abc` - echo -E "$title & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output + echo -E "\hyperlink{$name}{$title} & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output done cat dottes.tex.footer >> $builddir/$output