Mercurial > dottes
changeset 120:4b0025be9d22
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.
author | Jim Hague <jim.hague@acm.org> |
---|---|
date | Fri, 13 Apr 2012 16:20:43 +0100 |
parents | 15ce1ecb5ba3 |
children | 586631d3b9be |
files | makeBooke.sh |
diffstat | 1 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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