From c0453ec77275fdc82358dc9d9462c72f3409f492 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Fri, 13 Apr 2012 16:20:43 +0100 Subject: [PATCH] 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. --- makeBooke.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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