Mercurial > dottes
comparison makeBooke.sh @ 115:c4efe8b5eea1
Add internal hyperlinks to the book.
Don't put the links in a different colour, so it still prints well.
| author | Jim Hague <jim.hague@acm.org> | 
|---|---|
| date | Fri, 16 Mar 2012 10:37:48 +0000 | 
| parents | a63e39fc3410 | 
| children | 19ba410d891f | 
   comparison
  equal
  deleted
  inserted
  replaced
| 114:7be0ada7bed7 | 115:c4efe8b5eea1 | 
|---|---|
| 43 while read filename | 43 while read filename | 
| 44 do | 44 do | 
| 45 title=`$dir/abctitle.py --latex $filename` | 45 title=`$dir/abctitle.py --latex $filename` | 
| 46 name=`basename $filename .abc` | 46 name=`basename $filename .abc` | 
| 47 echo -E "\begin{center}" >> $builddir/$output | 47 echo -E "\begin{center}" >> $builddir/$output | 
| 48 echo -E "\includegraphics[width=\textwidth]{$graphicsdir/$name}" >> $builddir/$output | 48 echo -E "\phantomsection" >> $builddir/$output | 
| 49 echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth]{$graphicsdir/$name}}" >> $builddir/$output | |
| 49 echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output | 50 echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output | 
| 50 echo -E "\end{center}" >> $builddir/$output | 51 echo -E "\end{center}" >> $builddir/$output | 
| 51 done | 52 done | 
| 52 | 53 | 
| 53 cat dottes.tex.firstlines >> $builddir/$output | 54 cat dottes.tex.firstlines >> $builddir/$output | 
| 55 find $booke -name "*.abc" | sort | | 56 find $booke -name "*.abc" | sort | | 
| 56 while read filename | 57 while read filename | 
| 57 do | 58 do | 
| 58 title=`$dir/abctitle.py --latex $filename` | 59 title=`$dir/abctitle.py --latex $filename` | 
| 59 name=`basename $filename .abc` | 60 name=`basename $filename .abc` | 
| 60 echo -E "$title & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output | 61 echo -E "\hyperlink{$name}{$title} & \raisebox{-.25\height}{\includegraphics[width=0.6\textwidth]{$graphicsdir/firstline-$name}} \\\\" >> $builddir/$output | 
| 61 done | 62 done | 
| 62 | 63 | 
| 63 cat dottes.tex.footer >> $builddir/$output | 64 cat dottes.tex.footer >> $builddir/$output | 
| 64 | 65 | 
| 65 cp $outputa4 $builddir | 66 cp $outputa4 $builddir | 
