ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* error: Attempt to node.insert_before() a non-existing node
@ 2008-06-21 20:16 Khaled Hosny
  2008-06-23  7:47 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Khaled Hosny @ 2008-06-21 20:16 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 198 bytes --]

I get this error when I attempt to generate this file with
\setcharactermirroring[1], and text directionality gets broken.

-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team

[-- Attachment #1.1.2: myfile.tex --]
[-- Type: text/x-tex, Size: 7907 bytes --]

% engine=luatex 

\mainlanguage[ar]

% Font
\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabic]
 \definefontsynonym [Arabic-Light]       [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold]        [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Italic]      [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold-Italic] [name:arabtype] [features=arabic]
 \stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]           [Arabic-Light]       [features=arabic]
 \definefontsynonym [SerifItalic]     [Arabic-Italic]      [features=arabic]
 \definefontsynonym [SerifBold]       [Arabic-Bold]        [features=arabic]
 \definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic] [features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 

\usetypescript[Arabic]
\setupbodyfont[Arabic,20pt]

% direction
\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT

% links
\setupinteraction
  [state=start,
   color=green,
   style=bold]

\setcharactermirroring[1]

\starttext
\startstandardmakeup
  \midaligned{كيف تكتب عربي في كنتكست}
  \midaligned{كتبه}
  \midaligned{خالد حسني}
\stopstandardmakeup
\completecontent
\chapter{مقدمة}
... كلام\index{مدخلة فهرس} ...
\chapter{أول فصل}
\section[firstsection]{أول باب}
... كلام ...
\section{ثاني باب}
... كلام\index{فهرس آخر} ...
\subsection{ثاني مسألة}
... كلام ...
\section{ثالث باب}
... كلام ...
\chapter{فصل آخر}
... كلام ...
\chapter[lastchapter]{آخر فصل}
... كلام ...

\startcolumns[n=2,tolerance=verytolerant]
طَرَحَتْنِي النَّوَى مَطَارِحَهَا حَتّى إذَا وَطِئْتُ جُرْجَان الأَقْصى. فاسْتَظْهَرْتُ عَلَى الأَيامِ بِضِياعٍ أَجَلْتُ فِيهاَ يَدَ الْعِمَارةِ، وَأَمْوَالٍ وَقَفْتُهَا عَلى التِّجَارَةِ، وَحَانُوتٍ جَعَلْتُهُ مَثَابَةٍ، وَرُفْقَةٍ اتَّخَذْتُهَا صَحَابَةً، وَجَعَلْتُ لِلْدَّارِ، حَاشِيَتَيِ النَّهَار، وللحَانُوتِ بَيْنَهُمَا، فَجَلَسْنَا يَوْمًا نَتَذَاكَرُ القرِيضَ وَأَهْلَهُ، وَتِلْقَاءَنا شَابّ قَدْ جَلَسَ غَيْرَ بَعِيدٍ يُنْصِتُ وَكَأَنّهُ يَفْهَمُ، وَيَسْكتُ وَكَأَنّهُ لاَ يَعْلَمُ حَتّى إِذَا مَالَ الكَلاَمُ بِنَا مَيْلَهُ، وَجَرّ الْجِدَالُ فِينَا ذَيْلَهُ، قَالَ: قَدْ أَصَبْتُمْ عُذَيَقَهُ، وَوَافَيتُمْ جُذَيْلَهُ، وَلَوْ شِئْتُ لَلَفْظْتُ وَأَفَضْتُ، وَلَوْ قُلْتُ لأَصْدَرْتُ وَأَوْرَدْتُ، وَلَجَلَوْتُ الْحقّ في مَعْرَضِ بَيَانٍ يُسْمِعُ الصُّمَّ، وَيُنزلُ الْعُصْمَ، فَقُلْتُ: يَا فَاضِلُ أدْنُ فَقَدْ مَنَّيْتَ، وَهَاتِ فَقَدْ أَثْنَيتَ، فَدَنَا وَقَالَ: سَلُونِي أُجِبْكُمْ، وَاسْمَعُوا أُعْجِبْكُمْ.

فَقُلْنَا: مَا تَقُولُ فِي امْرِىءِ الْقَيسِ؟ قَالَ: هُوَ أَوَّلُ مَنْ وَقَفَ بِالدِّيارِ وَعَرَصَاتِهَا، وَاغْتَدَى وَالطَّيرُ فِي وَكَنَاتِهَا، وَوَصَفَ الْخيلَ بِصِفَاِتهَا، وَلَمْ يَقُلِ الشِّعْرَ كَاسِيًا. وَلَمْ يُجِدِ القَوْلَ رَاغِبًا، فَفَضَلَ مَنْ تَفَتَّقَ للْحِيلةِ لِسَانُهُ، وَانْتَجَعَ لِلرَّغْبَة بَنَانُهُ، قُلْنَا: فَما تَقُولُ فِي الْنَّابِغَةِ؟ قالَ: يَثلِبُ إِذَا حَنِقَ، وَيَمْدَحُ إِذَا رَغِبَ، وَيَعْتَذِرُ إِذَا رَهِبَ، فَلاَ يَرْمي إِلاَّ صَائِبًا، قُلْنَا:فَمَا تَقُولُ فِي زُهَيرٍ؟ قَالَ يُذِيبُ الشِّعرَ، والشعْرُ يُذيبَهُ، وَيَدعُو القَولَ وَالسِّحْرَ يُجِيبُهُ، قُلْنَا: فَمَا تَقُولُ فِي طَرَفَةَ: قَالَ: هُوَ ماَءُ الأشْعَارِ وَطينَتُها، وَكَنْزُ الْقَوَافِي وَمَديِنَتُهَا، مَاتَ وَلَمْ تَظْهَرْ أَسْرَارُ دَفَائِنِهِ وَلَمْ تُفْتَحْ أَغْلاَقُ خَزَائِنِهِ، قُلْنَا: فَمَا تَقُولُ فِي جَرِيرٍ وَالْفَرَزْدَقِ؟ أَيُّهُمَا أَسْبَقُ؟ فَقَالَ: جَرِيرٌ أَرَقُّ شِعْرًا، وَأَغْزَرُ غَزْرًا وَالْفَرَزْدَقُ أَمْتَنُ صَخْرًا، وَأَكْثَرُ فَخْرًا وَجَرِيرٌ أَوْجَعُ هَجْوًا، وَأَشْرَفُ يَوْمًا وَالْفَرَزْدَقُ أَكَثَرُ رَوْمًا، وَأَكْرَمُ قَوْمًا، وَجَرِيرٌ إِذَا نَسَبَ أَشْجَى، وَإِذَا ثَلَبَ أَرْدَى، وَإِذَا مَدَحَ أَسْنَى، وَالْفَرزدقُ إِذَا افْتَخَرَ أَجْزَى، وَإِذَا احْتَقرَ أَزرَى، وَإِذا وصَفَ أَوفَى، قُلنَا: فَمَا تَقُولُ فِي المُحْدَثِينَ منْ الشُّعَراءِ والمُتَقَدِّمينَ مِنهُمْ؟ قالَ: المُتَقَدِّمونَ أَشْرفُ لَفْظًا، وَأَكثرُ منْ المَعَاني حَظًا، وَالمُتَأَخِّرونَ أَلْطَفُ صُنْعًا، وَأَرَقُّ نَسْجًا.

قُلْنا: فَلَو أَرَيْتَ مِنْ أَشْعارِكَ، وَرَوَيْتَ لَنا مِنْ أَخْبارِكَ، قالَ: خُذْهَما في مَعْرِضٍ واحِدٍ، وَقالَ: قَالَ عِيسَى بْنُ هِشَامٍ، فَانَلْتُهُ مَا تَاحَ. وَأَعْرَضَ عَنَّا فَرَاحَ. فَجَعَلْتُ أَنْفيهِ وَأُثْبتُهُ، وَأَنْكِرُهُ وَكَأَنِّي أَعْرِفُهُ، ثُمَّ دَلَّتْنِي عَلَيهِ ثَنَاياهُ، فَقُلْتُ: الإِسْكَنْدَريُّ وَاللَّهِ، فَقَدْ كَانَ فَارَقَنَا خِشْفًا، وَوَافانا جِلْفًا، وَنَهَضْتُ عَلى إِثرِهِ، ثَمَّ قَبَضْتُ عَلَى خَصْرِهِ، وَقُلْتُ: أَلَسْتَ أَبَا الفَتْحِ؟ أَلَمْ نُرَبِّكَ فِينا وَلِيدًا وَلَبِثْتَ فِينا مِنْ عُمُرِكَ سِنِينَ؟
فَأَيُّ عَجُوزِ لَكَ بِسُرَّ مَنْ رَا فَضَحِكَ إِليَّ وَقَالَ:
وَيْحَكَ هذَا الزَّمَان زُورُ  ***  فَلَا يَغُرَّنَّكَ الـغُـرُورُ
لاَ تَلْتَزِمْ حَالَةً، وَلكِـنْ  ***  دُرْ بِالَّليَالِي كَمَا تَدُورُ.
\stopcolumns

\completeindex
\stoptext

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error: Attempt to node.insert_before() a non-existing node
  2008-06-21 20:16 error: Attempt to node.insert_before() a non-existing node Khaled Hosny
@ 2008-06-23  7:47 ` Taco Hoekwater
  2008-06-23 13:21   ` Khaled Hosny
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2008-06-23  7:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Khaled Hosny wrote:
> I get this error when I attempt to generate this file with
> \setcharactermirroring[1], and text directionality gets broken.
> 

IIRC, this is a bug in luatex 0.25.3 that is fixed in SVN.
There'll be a new snapshot luatex release later in the week
that should fix it. (or you could fetch SVN trunk right now)

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error: Attempt to node.insert_before() a non-existing node
  2008-06-23  7:47 ` Taco Hoekwater
@ 2008-06-23 13:21   ` Khaled Hosny
  2008-06-23 14:46     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Khaled Hosny @ 2008-06-23 13:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1.1: Type: text/plain, Size: 715 bytes --]

On Mon, Jun 23, 2008 at 09:47:45AM +0200, Taco Hoekwater wrote:
> 
> 
> Khaled Hosny wrote:
> > I get this error when I attempt to generate this file with
> > \setcharactermirroring[1], and text directionality gets broken.
> > 
> 
> IIRC, this is a bug in luatex 0.25.3 that is fixed in SVN.
> There'll be a new snapshot luatex release later in the week
> that should fix it. (or you could fetch SVN trunk right now)

I fetched SVN trunk sources and built it, the error has gone, but the
Arabic text stil broken; letters run from left to right, but English is
mirrored as expected. See the attached PDF.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team

[-- Attachment #1.1.2: myfile.tex --]
[-- Type: text/x-tex, Size: 1675 bytes --]

% engine=luatex 

\mainlanguage[arabic]

% Font
\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabic]
 \definefontsynonym [Arabic-Light]       [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold]        [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Italic]      [name:arabtype] [features=arabic]
 \definefontsynonym [Arabic-Bold-Italic] [name:arabtype] [features=arabic]
 \stoptypescript

\starttypescript [serif] [arabic] [name]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]           [Arabic-Light]       [features=arabic]
 \definefontsynonym [SerifItalic]     [Arabic-Italic]      [features=arabic]
 \definefontsynonym [SerifBold]       [Arabic-Bold]        [features=arabic]
 \definefontsynonym [SerifBoldItalic] [Arabic-Bold-Italic] [features=arabic]
\stoptypescript

\starttypescript [Arabic]
  \definetypeface [Arabic] [rm] [serif] [arabic] [default] 
\stoptypescript 

\usetypescript[Arabic]
\setupbodyfont[Arabic,20pt]

% direction
\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT

% links
\setupinteraction
  [state=start,
   color=green,
   style=bold]

\setcharactermirroring[1]

\starttext
\startstandardmakeup
  \midaligned{كيف تكتب عربي في كنتكست}
  \midaligned{كتبه}
  \midaligned{خالد حسني}
\stopstandardmakeup
%\completecontent
\chapter{مقدمة}
الكتابة العربية من اليمين لليسار

English text is mirrored

\stoptext

[-- Attachment #1.1.3: myfile.pdf --]
[-- Type: application/pdf, Size: 21237 bytes --]

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error: Attempt to node.insert_before() a non-existing node
  2008-06-23 13:21   ` Khaled Hosny
@ 2008-06-23 14:46     ` Hans Hagen
  2008-06-23 15:12       ` Khaled Hosny
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2008-06-23 14:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> On Mon, Jun 23, 2008 at 09:47:45AM +0200, Taco Hoekwater wrote:
>>
>> Khaled Hosny wrote:
>>> I get this error when I attempt to generate this file with
>>> \setcharactermirroring[1], and text directionality gets broken.
>>>
>> IIRC, this is a bug in luatex 0.25.3 that is fixed in SVN.
>> There'll be a new snapshot luatex release later in the week
>> that should fix it. (or you could fetch SVN trunk right now)
> 
> I fetched SVN trunk sources and built it, the error has gone, but the
> Arabic text stil broken; letters run from left to right, but English is
> mirrored as expected. See the attached PDF.

we're still not sure how to deal with implicit directionality (idris is 
investigating this); we need to make sure that things don't clash with 
a tagged approach

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error: Attempt to node.insert_before() a non-existing node
  2008-06-23 14:46     ` Hans Hagen
@ 2008-06-23 15:12       ` Khaled Hosny
  2008-06-23 16:34         ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Khaled Hosny @ 2008-06-23 15:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Mon, Jun 23, 2008 at 04:46:09PM +0200, Hans Hagen wrote:
> Khaled Hosny wrote:
> > On Mon, Jun 23, 2008 at 09:47:45AM +0200, Taco Hoekwater wrote:
> >>
> >> Khaled Hosny wrote:
> >>> I get this error when I attempt to generate this file with
> >>> \setcharactermirroring[1], and text directionality gets broken.
> >>>
> >> IIRC, this is a bug in luatex 0.25.3 that is fixed in SVN.
> >> There'll be a new snapshot luatex release later in the week
> >> that should fix it. (or you could fetch SVN trunk right now)
> > 
> > I fetched SVN trunk sources and built it, the error has gone, but the
> > Arabic text stil broken; letters run from left to right, but English is
> > mirrored as expected. See the attached PDF.
> 
> we're still not sure how to deal with implicit directionality (idris is 
> investigating this); we need to make sure that things don't clash with 
> a tagged approach
 
But I'm explicitly setting the direction, and this problem occurs only
when \setcharactermirroring[1] is set.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error: Attempt to node.insert_before() a non-existing node
  2008-06-23 15:12       ` Khaled Hosny
@ 2008-06-23 16:34         ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2008-06-23 16:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> On Mon, Jun 23, 2008 at 04:46:09PM +0200, Hans Hagen wrote:
>> Khaled Hosny wrote:
>>> On Mon, Jun 23, 2008 at 09:47:45AM +0200, Taco Hoekwater wrote:
>>>> Khaled Hosny wrote:
>>>>> I get this error when I attempt to generate this file with
>>>>> \setcharactermirroring[1], and text directionality gets broken.
>>>>>
>>>> IIRC, this is a bug in luatex 0.25.3 that is fixed in SVN.
>>>> There'll be a new snapshot luatex release later in the week
>>>> that should fix it. (or you could fetch SVN trunk right now)
>>> I fetched SVN trunk sources and built it, the error has gone, but the
>>> Arabic text stil broken; letters run from left to right, but English is
>>> mirrored as expected. See the attached PDF.
>> we're still not sure how to deal with implicit directionality (idris is 
>> investigating this); we need to make sure that things don't clash with 
>> a tagged approach
>  
> But I'm explicitly setting the direction, and this problem occurs only
> when \setcharactermirroring[1] is set.

ok, i also need to look at whatsit(6) for the initial state

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-23 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-21 20:16 error: Attempt to node.insert_before() a non-existing node Khaled Hosny
2008-06-23  7:47 ` Taco Hoekwater
2008-06-23 13:21   ` Khaled Hosny
2008-06-23 14:46     ` Hans Hagen
2008-06-23 15:12       ` Khaled Hosny
2008-06-23 16:34         ` Hans Hagen

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).