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

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