Mercurial > dottes
view makeBookeA4.sh @ 227:b2067a7285c6
Replace background image with GIMP generated purple cloth bitmap.
The old image had joins when it repeated. RReplace with a bitmap
of colour 8000ba with GIMP Aristic/Clothify filter applied with
Blur X/Y 20 and depth 1.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Sat, 23 Feb 2013 11:32:04 +0000 |
parents | 9dd24e61d6dd |
children | 1e4443d58177 |
line wrap: on
line source
#!/bin/bash # # Build the Booke. First assemble the book LaTeX, then build it # into a PDF. # # All EPS and PDF tune graphics must be present already. Run # makeGraphics.sh to make these. # if [ $# != 1 ]; then echo "Usage: makeBookeA4.sh <book dir name>" exit 1 fi dir=`pwd` booke=$dir/$1 builddir=$dir/build graphicsdir=$dir/graphics/$1 output=dottesA4.tex outputxdv=${output/%.tex/.xdv} outputpdf=${output/%.tex/.pdf} mkdir -p $builddir cp buildno.txt $builddir if [ -r $booke/subtitle.txt ]; then cp $booke/subtitle.txt $builddir else touch $builddir/subtitle.txt fi if [ -r $booke/intro.txt ]; then cp $booke/intro.txt $builddir else touch $builddir/intro.txt fi cp dottes.tex.a4header $builddir/$output # Now, for each tune, make the tune graphic and add it, inside a # centre section, so the document. Then add a TOC entry. find $booke -name "*.abc" | sort | while read filename do title=`$dir/abcfield.py --field T --latex $filename` name=`basename $filename .abc` echo -E "\begin{center}" >> $builddir/$output echo -E "\phantomsection" >> $builddir/$output echo -E "\hypertarget{$name}{\includegraphics[width=\textwidth,keepaspectratio]{$graphicsdir/$name}}" >> $builddir/$output echo -E "\addcontentsline{toc}{subsection}{$title}" >> $builddir/$output echo -E "\end{center}" >> $builddir/$output text=$booke/$name.tex if [ -r $text ]; then cat $text >> $builddir/$output fi done cat dottes.tex.firstlines >> $builddir/$output find $booke -name "*.abc" | sort | while read filename do title=`$dir/abcfield.py --field T --latex $filename` name=`basename $filename .abc` 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 cd $builddir xelatex $output xelatex $output mv $outputpdf $dir/$1-A4.pdf cd $dir