[XeTeX] xetex and the unicode bidirectional algorithm.

Khaled Hosny khaledhosny at eglug.org
Thu Dec 5 07:32:51 CET 2013


On Wed, Dec 04, 2013 at 12:31:58AM -0500, C. Scott Ananian wrote:
> On Tue, Dec 3, 2013 at 5:33 PM, Khaled Hosny <khaledhosny at eglug.org> wrote:
> > On Tue, Dec 03, 2013 at 01:42:21PM -0500, C. Scott Ananian wrote:
> >> Does XeLaTeX implement the Unicode BiDi algorithm?
> >
> > Short answer: no.
> >
> > I think sample documents (minimal working example) are needed for any
> > useful suggestion.
> 
> 
> Attached are the first 23 references from
> https://ar.wikipedia.org/wiki/%D8%A5%D8%B3%D8%B7%D9%86%D8%A8%D9%88%D9%84#.D9.85.D8.B5.D8.A7.D8.AF.D8.B1
> (the Arabic wikipedia article on Istanbul), as generated by my XeLaTeX
> formatter.
> 
> Things to notice:
> 1) Unicode BiDi algorithm at work in web version in places like
> citation [1], "Statistics of the 2010 Turkey census".  XeLaTeX renders
> this backwards.

You need to explicitly markup LTR and RTL text, e.g. using polyglossia
or bidi. You need this to enable hyphenation as well, citations 12 and
13 have very bad spacing because no hyphenation was enabled, for
example. I guess the tool that generates the TeX file will have to do
that.

> 2) Broken italic for arabic in GNU freefont in citation [2].
> (straightforward to fix)

Please, please, please, never ever use GNU free font for Arabic; it is
the most hideous, crappy and useless un-Arabic font ever created, my
blood boils every time I see it in use.

> 3) Arabic comma instead of English comma in citation [23]. (in both
> web and XeLaTeX output)

Bad input, the input has an Arabic comma, no tricks are done here.

Regards,
Khaled


More information about the XeTeX mailing list