<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">In a separate thread ("<a href="http://article.gmane.org/gmane.comp.tex.context/92201" class="">r2l alignment and linenumbering conflict?</a><span style="font-family: 'Helvetica Neue';" class="">"</span>), we've gotten numerals in an Arabic RTL document to (a) display as Arabic numerals, and (b) to order their digits in the right order (e.g. 2015 instead of 5102). By defining the headstyle of linenotes, we can even get linenotes to display the digits within individual numbers in the correct order (see below).<br class=""><div class=""><br class=""></div><div class="">However, when there is a line range in the linenote head, it is flipping the order of the page ranges. In the example PDF attached below, where it should read ١٥-١٦ (16-15, with the fifteen on the right and the sixteen on the left, for R2L word ordering), instead the output is ١٦-١٥.</div><div class=""><br class=""></div><div class="">This seems to be a further example of the problems arising from not being able to apply bidi to the linenote stream, due to the bug or conflict between footnotes/linenotes and R2L. In the minimal example below, I have commented out the \startsetups[note:linenote]. The lines may be toggled to see the effect it has. </div><div class=""><br class=""></div><div class="">=====</div><div class=""><div class="">\mainlanguage[arabic]<span class="Apple-tab-span" style="white-space: pre;">      </span></div><div class="">\definefontfamily [mainface] [rm] [ALM Fixed] [range=arabic,features=arabic]  </div><div class="">\setupbodyfont[mainface,12pt]</div><div class="">\setupdirections[bidi=global,method=two]</div><div class="">\setupalign[r2l]</div><div class=""><br class=""></div><div class="">%% CONVERSION INTO ARABIC-HINDI NUMERALS</div><div class="">\defineconversion[myconversion][١,٢,٣,٤,٥,٦,٧,٨,٩,١٠,١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠,]</div><div class=""><br class=""></div><div class="">%% HEADINGS</div><div class="">\setuppagenumber[numberconversion=myconversion]</div><div class=""><br class=""></div><div class="">%%%<span class="Apple-tab-span" style="white-space:pre">        </span>LINENUMBERING</div><div class="">\setuplinenumbering[%</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>style=\tfxx,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>referencing=on,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>step=1,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>location=outer,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>method=page,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>align=left,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>distance=1em,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>width=0.4em,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>conversion=myconversion,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>]</div><div class="">\definelinenote[linenote][%</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>setups=note:linenote,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>before={\blank[3.2em]},</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>align=righttoleft,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>rule={on,right},</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>paragraph=yes,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>frame=on,framecolor=red,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">  </span>]</div><div class="">\setupnotations[linenote][%</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>align=righttoleft,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>alternative=serried,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>width=broad,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">      </span>distance=.5em,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>display=no,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span>numberconversion=arabic-hindi,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">    </span>headstyle=\lefttoright,</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>]</div><div class=""><br class=""></div><div class="">\unexpanded\def\doVariant#1#2#3%</div><div class="">{\startlinenote[#1]{#2[ #3}#2\stoplinenote[#1]}</div><div class="">\newcounter\countvariants</div><div class="">\unexpanded\def\variant</div><div class="">{\doglobal\increment\countvariants</div><div class=""> \normalexpanded{\doVariant{Varia:\countvariants}}}</div><div class=""><br class=""></div><div class="">%%% DOCUMENT</div><div class=""><br class=""></div><div class="">%\startsetups[note:linenote] </div><div class="">%<span class="Apple-tab-span" style="white-space:pre">    </span>\setupdirections[bidi=on,method=default,fences=no] </div><div class="">%\stopsetups</div><div class=""><br class=""></div><div class="">\starttext \showframe </div><div class=""><br class=""></div><div class=""><div class="">\startlinenumbering</div><div class="">\input ward\linenote{هذه تعليقة أولى.}</div><div class="">\input ward\linenote{هذه تعليقة ثانية.}</div><div class="">\input ward\linenote{هذه تعليقة ثالثة.}</div><div class="">مرحباً بالعالم مرحباً بالعالم مرحباً بالعالم . هذا مثال على استعمال كونتكست لأجل تحقيق المخطوطات في اللغة العربية . وقد قربنا من </div><div class="">\variant{الوصول إلى الحلول}{الحصول على الحلول}</div><div class=""> التي نحتاجها لتصميم الخطوط التي تكتب من اليمين إلى الشمال .</div><div class="">\linenote{هذه تعليقة خامسة.}</div><div class="">\stoplinenumbering</div></div><div class="">\stoptext</div></div><div class="">=====</div><div class=""></div></body></html>