# HG changeset patch # User Jim Hague # Date 1334330443 -3600 # Node ID 4b0025be9d22796e9df99544345d0d9827c1ab53 # Parent 15ce1ecb5ba35ffeba929859d36a4b34f5b7234a Try to cope with Squeeze and Sid xetex problems. On Sid, "xdvipdfmx -p a5 -l" outputs its first page in A4 portrait. So guess which we're using and use the appropriate invocation. diff -r 15ce1ecb5ba3 -r 4b0025be9d22 makeBooke.sh --- a/makeBooke.sh Fri Apr 13 15:57:02 2012 +0100 +++ b/makeBooke.sh Fri Apr 13 16:20:43 2012 +0100 @@ -70,9 +70,20 @@ # 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