diff --git a/makeBooke.sh b/makeBooke.sh index ba45339..2c3f0d6 100755 --- a/makeBooke.sh +++ b/makeBooke.sh @@ -70,9 +70,20 @@ cd $builddir # The version of xetex on Squeeze doesn't do pass the A5 landscape instruction # down to the PDF generator. So split out and do manually. -xelatex -no-pdf $output -xelatex -no-pdf $output -xdvipdfmx -p a5 -l $outputxdv +# +# And, sigh, this fails on Sid. The first page comes out as A4 portrait. +# So try to work out which we are using and run the appropriate command. +ver=`xetex -version | head -n 1` +ver=${ver/*TeX Live /} +ver=${ver/\/*/} +if [ "$ver" == "2009" ]; then + xelatex -no-pdf $output + xelatex -no-pdf $output + xdvipdfmx -p a5 -l $outputxdv +else + xelatex $output + xelatex $output +fi xelatex $outputa4 mv $outputpdf $dir/$1.pdf