ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "talazem@fastmail.fm" <talazem@fastmail.fm>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: footnotes when using RtL (Arabic)
Date: Mon, 3 Aug 2015 20:14:11 +0100	[thread overview]
Message-ID: <AFAD3765-3EF4-466E-B581-E35825F6BACD@fastmail.fm> (raw)
In-Reply-To: <55BDFAC7.4040305@gmx.es>


[-- Attachment #1.1: Type: text/plain, Size: 4046 bytes --]

In a separate thread ("r2l alignment and linenumbering conflict? <http://article.gmane.org/gmane.comp.tex.context/92201>"), 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).

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 ١٦-١٥.

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. 

=====
\mainlanguage[arabic]	
\definefontfamily [mainface] [rm] [ALM Fixed] [range=arabic,features=arabic]  
\setupbodyfont[mainface,12pt]
\setupdirections[bidi=global,method=two]
\setupalign[r2l]

%% CONVERSION INTO ARABIC-HINDI NUMERALS
\defineconversion[myconversion][١,٢,٣,٤,٥,٦,٧,٨,٩,١٠,١١,١٢,١٣,١٤,١٥,١٦,١٧,١٨,١٩,٢٠,]

%% HEADINGS
\setuppagenumber[numberconversion=myconversion]

%%%	LINENUMBERING
\setuplinenumbering[%
	style=\tfxx,
	referencing=on,
	step=1,
	location=outer,
	method=page,
	align=left,
	distance=1em,
	width=0.4em,
	conversion=myconversion,
	]
\definelinenote[linenote][%
	setups=note:linenote,
	before={\blank[3.2em]},
	align=righttoleft,
	rule={on,right},
	paragraph=yes,
	frame=on,framecolor=red,
	]
\setupnotations[linenote][%
	align=righttoleft,
	alternative=serried,
	width=broad,
	distance=.5em,
	display=no,
	numberconversion=arabic-hindi,
	headstyle=\lefttoright,
	]

\unexpanded\def\doVariant#1#2#3%
{\startlinenote[#1]{#2[ #3}#2\stoplinenote[#1]}
\newcounter\countvariants
\unexpanded\def\variant
{\doglobal\increment\countvariants
 \normalexpanded{\doVariant{Varia:\countvariants}}}

%%% DOCUMENT

%\startsetups[note:linenote] 
%	\setupdirections[bidi=on,method=default,fences=no] 
%\stopsetups

\starttext \showframe 

\startlinenumbering
\input ward\linenote{هذه تعليقة أولى.}
\input ward\linenote{هذه تعليقة ثانية.}
\input ward\linenote{هذه تعليقة ثالثة.}
مرحباً بالعالم مرحباً بالعالم مرحباً بالعالم . هذا مثال على استعمال كونتكست لأجل تحقيق المخطوطات في اللغة العربية . وقد قربنا من 
\variant{الوصول إلى الحلول}{الحصول على الحلول}
 التي نحتاجها لتصميم الخطوط التي تكتب من اليمين إلى الشمال .
\linenote{هذه تعليقة خامسة.}
\stoplinenumbering
\stoptext
=====

Best,
Talal

> On 2 Aug 2015, at 12:11, Pablo Rodriguez <oinos@gmx.es> wrote:
> 
> On 08/02/2015 12:47 PM, Pablo Rodriguez wrote:
>> [...]
>> Hi Talal,
>> 
>> replace you bidi settings with these ones:
>> [...]
>> At least, they work for me.
> 
> Talal,
> 
> sorry for the noise, the first linenote has the problem you described.
> 
> I thought it belonged to the second linenote.
> 
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2.1: Type: text/html, Size: 6651 bytes --]

[-- Attachment #1.2.2: num-ar.pdf --]
[-- Type: application/pdf, Size: 27904 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 1819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-08-03 19:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 19:56 talazem
2015-07-30 13:00 ` talazem
2015-07-30 14:26   ` Pablo Rodriguez
2015-07-30 14:43     ` talazem
2015-07-30 15:08       ` Pablo Rodriguez
2015-07-30 17:54     ` Wolfgang Schuster
2015-07-30 18:15       ` Idris Samawi Hamid ادريس سماوي حامد
2015-07-30 18:17       ` talazem
2015-07-30 18:18       ` Pablo Rodriguez
2015-07-30 18:37       ` talazem
2015-07-30 19:04         ` Wolfgang Schuster
2015-07-30 23:51           ` talazem
2015-07-31  8:39             ` Hans Hagen
2015-07-31 11:07               ` talazem
2015-07-31 12:05                 ` Idris Samawi Hamid ادريس سماوي حامد
2015-07-31 14:47                 ` Hans Hagen
2015-08-01 22:36                 ` talazem
2015-08-02  7:52                   ` Pablo Rodriguez
2015-08-02  9:20                     ` talazem
2015-08-02 10:02                       ` talazem
2015-08-02 10:47                         ` Pablo Rodriguez
2015-08-02 11:09                           ` talazem
2015-08-02 11:11                           ` Pablo Rodriguez
2015-08-03 19:14                             ` talazem [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-10-05 12:48 Talal Al-Azem
2010-10-05 13:28 ` Wolfgang Schuster
2010-10-05 14:18   ` Talal Al-Azem
2010-10-05 14:53     ` Khaled Hosny
2010-10-05 15:07     ` Wolfgang Schuster
2010-10-05 15:18       ` Talal Al-Azem
2010-10-05 15:25       ` Hans Hagen
2010-10-05 15:55         ` Talal Al-Azem
2010-10-05 16:20           ` Hans Hagen
2010-10-05 21:19   ` Hans Hagen
2010-10-05 21:50     ` Talal Al-Azem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AFAD3765-3EF4-466E-B581-E35825F6BACD@fastmail.fm \
    --to=talazem@fastmail.fm \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).