# [XeTeX] Xetex and Arabic poetry

Ross Moore ross at ics.mq.edu.au
Wed Dec 30 22:29:44 CET 2009

Hi Vafa,

On 30/12/2009, at 3:49 PM, Vafa Khalighi wrote:

> This still is under development. I would like to be able to solve
> underfull \hbox messages.

I'll have a closer look at this aspect.

> You have got to run xelatex twice, because the first time you run
> xelatex, it calculates the widest verse and the second time you run
> xelatex, it makes the width of each verse as wide as the widest
> verse, therefore two run of xelatex is required.

Some environments use their contents twice in a single run.
In particular, the displayed-math environments of AMSmath do this.
First they set the display in a box (e.g., a \vbox inside an \hbox )
and measure the dimensions of the result. Discard that box, then
reset the contents using those measurements.
\xymatrix  does this kind of thing too, where the 1st run is used
to determine the size and position of each cell within a complicated
grid-like layout.

> --
> Best wishes,
> Vafa Khalighi

------------------------------------------------------------------------
Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114
------------------------------------------------------------------------