On Tue, 20 Sep 2011 01:48:45 +0200 Philippe Verdy <[email protected]> wrote:
> 2011/9/20 Richard Wordingham <[email protected]>: > Because it also has practical applications (for example look at the > currenct Wikimedia bug when it wants to display lists of category > names, and insert a separator between them: there's no reliable > solution for now to make it work for now using spans with CSS > bidi-control properties, when the category names can alternate between > Arabic and Latin. And there are also undesirable consequences on > mirroring. Your embedding idea plus the protective marks fixes that. Leading European numbers are the biggest problem, and they're vulnerable in plain text. Remember, an Arabic word should display correctly whether it's in a left-to-right embedding or a right-to-left embedding. > > You also need extra marks to avoid the structure sucking in adjacent > > elements - you need either > > > > <RLM LRE embedded_1 PDF RLM N LRE embedded_2 PDF RLM> > > > > or > > > > <DLM LRE embedded_1 PDF DLM N LRE embedded_2 PDF DLM> > > Which is really overkill. LRE and RLE are supposed to completely > embed... (I apologise for writing 'DLM' for 'LDM'.) They do. The interactions the outer marks above protect against move embedded_1 or embedded_2 as a unit. > ....and mask the effective direction of their content, so that > the initial weak context is fully restored by PDF and applies to the > content after it (whatever its Bidi class). LRE...PDF acts like a character with BiDi class L, and likewise for RLE...PDF. I suppose the principle is that in a right-to-left context a word composed of letters of BiDi class L should be treated like an embedding. Richard.

