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.
This commit is contained in:
Jim Hague 2012-04-13 16:20:43 +01:00
parent 7c72d2e1ee
commit c0453ec772
1 changed files with 14 additions and 3 deletions

View File

@ -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.
#
# 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