[XeTeX] Arabic prose

Bernd mlist at gmx.de
Fri Jul 1 20:01:11 CEST 2005


Yes, that's exactly what I was trying to do. I think it looks good with 
Jonathan's hint. This is probably as much as we get by a machine typeset 
document.

Bernd.

Otared Kavian schrieb:
> At 16:23 +0200 1/07/05, Bernd wrote:
> 
>> Sorry, not prose, I meant poetry.
> 
>> I'm trying to make one of Abu Nuwas' poems look like a poem.
> 
> 
> Hi Bernd,
> 
> I guess what you want is something which looks like the following PDF 
> attachment, an excerpt from a poem of the Iranian poet Hafez, where the 
> width of each "half verse" (or mesra', as it is called) appearing on a 
> horizontal line is exactly the same.
> In principle this is achieved by a human typesetter by changing the 
> width of some of the "kashida" (the width, somehow) appearing in some 
> letters, as well as the amount of "glue" between words. All this seems 
> to be possible with XeTeX, but when I tried to write some macros using 
> XeTeX and ConTeXt, I didn't have much success...
> 
> In ConTeXt there is a feature which allows to span a group of on a line 
> by adapting the size of the font: for instance one may try:
> \starttext
> \NormalizeFontWidth \tmp {These words fit on the line} {\hsize} {cmr10}
> \hbox{\tmp These words fit on the line}
> \stoptext
> So in principle what is needed is something which spans each "half 
> verse" or mesra' on a certain width. Here is my naive attempt to solve 
> the problem:
> 
> %% spanning.tex
> %% this is a ConTeXt file
> \def\Masnavi#1#2{\NormalizeFontWidth\tmp{#1}{.475\hsize}{cmr10}
> {\tmp #1}\hfill\NormalizeFontWidth\tmp{#2}{.475\hsize}{cmr10}{\tmp #2}\par}
> \starttext
> \Masnavi{I see but know not why}{Thorns live, roses die}
> \Masnavi{This poem fits on the first half line}{and this fits on the 
> second half line}
> \Masnavi{gar man az baaghe to yek mive bechinam che shavad}{pishe paa'i 
> be cheraaghe to bebinam che shavad}
> \stoptext
> %%
> 
> As you may see, this is far from being satisfactory since the size of 
> the font on each "verse" adapts to the length of the words, instead of 
> the amount of "kashida" of some characters or the "glue" between words.
> 
> I hope the discussions you began will give us some clues.
> 
> Best regards: OK
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex



More information about the XeTeX mailing list