From 7c72d2e1ee0cffeb693eba7d936096f501a37cf9 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Fri, 13 Apr 2012 15:57:02 +0100 Subject: [PATCH] Fix page size issue on xetex on Squeeze. The version of xetex on Squeeze does not pass the paper size through to the PDF rendered properly. Following a Googled suggestion, split the rendering into two part, and pass the page size explicitly to the PDF generation. This isn't necessary for the booklet because the output is A4 portrait, the default paper size. --- makeBooke.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/makeBooke.sh b/makeBooke.sh index 45ffab8..ba45339 100755 --- a/makeBooke.sh +++ b/makeBooke.sh @@ -18,7 +18,8 @@ booke=$dir/$1 builddir=$dir/build graphicsdir=$dir/graphics/$1 output=dottes.tex -outputpdf=dottes.pdf +outputxdv=${output/%.tex/.xdv} +outputpdf=${output/%.tex/.pdf} outputa4=dottesona4.tex outputa4pdf=dottesona4.pdf @@ -66,8 +67,12 @@ cat dottes.tex.footer >> $builddir/$output cp $outputa4 $builddir cd $builddir -xelatex $output -xelatex $output + +# 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 xelatex $outputa4 mv $outputpdf $dir/$1.pdf