Mercurial > dottes
changeset 323:1a240d1e2032
Go back to using the filename as the hyperlink name.
Latex hyperlinks don't cope with having accented characters in the hyperlink name.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Thu, 18 Jul 2013 15:37:23 +0100 |
parents | b4a0161e8870 |
children | c1c7e993a180 |
files | dottes.tex makeBookeTunePages.sh |
diffstat | 2 files changed, 18 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/dottes.tex Thu Jul 18 15:27:57 2013 +0100 +++ b/dottes.tex Thu Jul 18 15:37:23 2013 +0100 @@ -46,33 +46,33 @@ \makeatother % Show the main tune graphic and optional change. -% Args are tune title, tune subtitle, composer, tune graphic filename, -% change title. -\newcommand{\showtune}[5]{% +% Args are tune name, tune title, tune subtitle, composer, tune graphic +% filename, change name, change title. +\newcommand{\showtune}[7]{% \vfill \begin{center} \phantomsection \begin{tabular*}{\textwidth}{@{} p{0.25\textwidth} @{\extracolsep{\fill}} c >{\raggedleft\arraybackslash}p{0.25\textwidth} @{}} - & \Large{#1} & \emph{#3} \\ - \ifemptyarg{#2}{}{% - & #2 & \\ + & \Large{#2} & \emph{#4} \\ + \ifemptyarg{#3}{}{% + & #3 & \\ }% \end{tabular*} \hypertarget{#1}{% - \includegraphics[width=\textwidth,height=0.85\textheight,keepaspectratio]{#4} + \includegraphics[width=\textwidth,height=0.85\textheight,keepaspectratio]{#5} } - \addcontentsline{toc}{section}{#1} + \addcontentsline{toc}{section}{#2} \end{center} - \ifemptyarg{#5}{}{% - Change: \hyperlink{#5}{#5} + \ifemptyarg{#6}{}{% + Change: \hyperlink{#6}{#7} }% } % Show the tune first line. Generate table row. -% Args are the tune title and the first line graphic filename. -\newcommand{\showfirstline}[2]{% - \hyperlink{#1}{#1} & % - \raisebox{-.4\height}{\includegraphics[width=0.77\textwidth]{#2}} \\ +% Args are the tune name, tune title and the first line graphic filename. +\newcommand{\showfirstline}[3]{% + \hyperlink{#1}{#2} & % + \raisebox{-.4\height}{\includegraphics[width=0.77\textwidth]{#3}} \\ } % ----- Paper size document setup
--- a/makeBookeTunePages.sh Thu Jul 18 15:27:57 2013 +0100 +++ b/makeBookeTunePages.sh Thu Jul 18 15:37:23 2013 +0100 @@ -45,13 +45,15 @@ composer=`$dir/abcfield.py --field C --latex $filename` changefile=`$dir/abcfield.py --field N $filename | grep "Change:" | sed -e "s/Change: *//"` + changename="" changetitle="" if [ -n "$changefile" ]; then + changename=`basename $changefile .abc` changetitle=`$dir/abcfield.py --field T --latex $booke/$changefile` fixtitle "$changetitle" changetitle=$retval fi - echo -E "\showtune{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$changetitle}" >> $tunesoutput + echo -E "\showtune{$name}{$title}{$subtitle}{$composer}{$graphicsdir/$name}{$changename}{$changetitle}" >> $tunesoutput - echo -E "\showfirstline{$title}{$graphicsdir/firstline-$name}" >> $indexoutput + echo -E "\showfirstline{$name}{$title}{$graphicsdir/firstline-$name}" >> $indexoutput done