# [XeTeX] generating a booklet pdf a4 to a5 in XeLaTeX

Axel Kielhorn tex at axelkielhorn.de
Mon Dec 2 09:22:19 CET 2013

Am 02.12.2013 um 08:22 schrieb NMPOST7:

> On 01/12/2013 21:45, NMPOST7 wrote:
>> On 01/12/2013 21:33, Peter Dyballa wrote:
>>> Then you just need to read the documentation! It has hundreds of options you can tweak.
>> They are sorted in paragraphs in the documentation. And KOMASCRIPT has an eye on
>> book binding
>> (could be even two). (I don't remember all the details, I am more interested in
>> writing letters. This takes much less time.)
>>>
>> The problem seems to lie in Polyglossia or in relation to Polyglossia.
>>
>>
>> I just uncommented the line \def\chaptername{അദ്ധ്യായം}
>>
>> Here is the error
>>
>> ! Package polyglossia Error: The current roman font does not contain the Malaya
>> lam script!
>> (polyglossia)                Please define \malayalamfont with \newfontfamily.
>>
>>
>> I just uncommented the line \def\chaptername{അദ്ധ്യായം}
>>
>> The definition for Malayalam font has already been done
>>
>> \newfontfamily\malayalamfont[Script=Malayalam,Mapping=malayalamnumerals]{Rachana}
>>
>>
>
> Well, I emended the definition to the correct one (Polyglossia's requirement)
>
> \gappto\captionsmalayalam{\renewcommand{\chaptername}{}}
>
> For a change, I tried the following, too:
>
> \gappto\captionsmalayalam{\renewcommand{\chaptername}{അദ്ധ്യായം}}
>
> The error still remains.
>
> Apparently, the same problem might arise for other sectioning commands

It seems you have defined a malayalam font.
But you are using a roman font which does not include the malayalam script.

Why?
Well, KOMA Script uses an sf font for sections.

You can redefine the font KOMA uses for sections etc. with:

\setkomafont{disposition}{\malayalamfont}

in the preamble.

If you want to see the chaptername, you have to specify

chapterprefix=on

in the documentclass command.

BTW, I don't think it is a good idea to convert non-latin pdf to PS and back.
If you want n-up formatting have a look at pdfpages.

I use a small LaTeX file to assemble A5 pages onto A4.
This will give you a booklet with 32 A5 pages that you just have to print on a duplex printer and fold in the center.
If you comment signature and uncomment nup and openright you get normal n-up printing.
Uncomment frame for debugging if things don't look right.

%!TEX TS-program = pdflatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper,11pt]{article}
\usepackage{geometry}
\geometry{verbose,a4paper,top=0mm,bottom=0mm,inner=0mm,twoside,nofoot,pdftex}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={-},
landscape,
%nup=1x2,
%openright,
signature=32,
noautoscale,
scale=1,
%frame
]{A5.pdf}
\end{document}

Axel