home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 September / Chip_2004-09_cd1.bin / software / abi / setup.exe / AbiWord / howtobidi.abw < prev    next >
Extensible Markup Language  |  2004-07-11  |  32KB  |  112 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE abiword PUBLIC "-//ABISOURCE//DTD AWML 1.0 Strict//EN" "http://www.abisource.com/awml.dtd">
  3. <abiword template="false" revisions-mark="0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:dc="http://purl.org/dc/elements/1.1/" fileformat="1.1" revisions-show="1" xmlns:svg="http://www.w3.org/2000/svg" xmlns:awml="http://www.abisource.com/awml.dtd" xmlns="http://www.abisource.com/awml.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" props="dom-dir:ltr; document-endnote-initial:1; document-endnote-type:numeric; document-endnote-place-enddoc:1; document-footnote-restart-section:1; lang:en-GB; document-endnote-restart-section:1; document-footnote-restart-page:1; document-footnote-type:numeric; document-footnote-initial:1; document-endnote-place-endsection:1">
  4. <!-- ======================================================================== -->
  5. <!-- This file is an AbiWord document.                                        -->
  6. <!-- AbiWord is a free, Open Source word processor.                           -->
  7. <!-- More information about AbiWord is available at http://www.abisource.com/ -->
  8. <!-- You should not edit this file by hand.                                   -->
  9. <!-- ======================================================================== -->
  10.  
  11. <metadata>
  12. <m key="dc.format">application/x-abiword</m>
  13. <m key="abiword.generator">AbiWord</m>
  14. <m key="abiword.date_last_changed">Sat Dec 06 08:47:22 2003</m>
  15. </metadata>
  16. <styles>
  17. <s followedby="Normal" name="Heading 1" basedon="Normal" type="P" props="margin-top:0.3056in; font-size:17pt; margin-bottom:0.0417in; line-height:1.000000; font-weight:bold; keep-with-next:1; font-family:Arial"/>
  18. <s type="P" name="Normal" followedby="Current Settings" props="font-family:Times New Roman; dom-dir:ltr; font-style:normal; margin-left:0pt; text-indent:0in; widows:2; text-position:normal; font-weight:normal; text-align:left; margin-top:0pt; bgcolor:transparent; margin-right:0pt; text-decoration:none; margin-bottom:0.0813in; font-variant:normal; line-height:1.000000; font-size:12pt; font-stretch:normal; color:000000"/>
  19. <s followedby="Normal" name="Heading 2" basedon="Normal" type="P" props="margin-top:0.3056in; font-size:14pt; margin-bottom:0.0417in; line-height:1.000000; font-weight:bold; keep-with-next:1; font-family:Arial"/>
  20. <s followedby="Normal" name="Heading 3" basedon="Normal" type="P" props="margin-top:0.3056in; font-size:12pt; margin-bottom:0.0417in; line-height:1.000000; font-weight:bold; keep-with-next:1; font-family:Arial"/>
  21. <s followedby="Normal" name="Heading 4" basedon="Normal" type="P" props="font-weight:normal; font-family:Arial; margin-top:0.0813in; font-style:normal; margin-left:0pt; text-align:left; text-indent:0in; text-decoration:none; font-variant:normal; bgcolor:transparent; margin-right:0pt; margin-bottom:0.0417in; color:000000; line-height:1.000000; font-size:12pt; font-stretch:normal"/>
  22. <s type="P" name="Block Text" basedon="Normal" followedby="Current Settings" props="line-height:1.000000; margin-bottom:0.0813in; margin-right:1.0000in; margin-left:1.0000in"/>
  23. <s type="P" name="Box List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Box List; text-indent:-0.300000in"/>
  24. <s type="P" name="Bullet List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Symbol; line-height:1.000000; list-style:Bullet List; text-indent:-0.300000in"/>
  25. <s followedby="Normal" name="Chapter Heading" basedon="Numbered Heading 1" type="P" props="list-delim:Chapter %L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Arial; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:1.100000in/L0"/>
  26. <s type="P" name="Dashed List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Dashed List; text-indent:-0.300000in"/>
  27. <s type="P" name="Diamond List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Diamond List; text-indent:-0.300000in"/>
  28. <s type="C" name="Endnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
  29. <s type="C" name="Endnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000"/>
  30. <s type="C" name="Footnote Reference" basedon="None" followedby="Current Settings" props="text-position:superscript; line-height:1.000000; font-size:10pt"/>
  31. <s type="C" name="Footnote Text" basedon="Normal" followedby="Current Settings" props="text-position:normal; line-height:1.000000; font-size:10pt"/>
  32. <s type="P" name="Hand List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Hand List; text-indent:-0.300000in"/>
  33. <s type="P" name="Heart List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Heart List; text-indent:-0.300000in"/>
  34. <s type="P" name="Implies List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Symbol; line-height:1.000000; list-style:Implies List; text-indent:-0.300000in"/>
  35. <s type="P" name="Lower Case List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L); list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Lower Case List; text-indent:-0.300000in"/>
  36. <s type="P" name="Lower Roman List" basedon="Normal" followedby="Current Settings" props="list-delim:%L; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Lower Roman List; text-indent:-0.300000in"/>
  37. <s followedby="Normal" name="Numbered Heading 1" basedon="Heading 1" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Arial; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
  38. <s followedby="Normal" name="Numbered Heading 2" basedon="Heading 2" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Arial; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
  39. <s followedby="Normal" name="Numbered Heading 3" basedon="Heading 3" type="P" props="list-delim:%L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Arial; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:0.299306in/L0"/>
  40. <s type="P" name="Numbered List" followedby="Current Settings" props="list-delim:%L.; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Numbered List; text-indent:-0.300000in"/>
  41. <s type="P" name="Plain Text" basedon="Normal" followedby="Current Settings" props="font-family:Courier New; line-height:1.000000"/>
  42. <s followedby="Normal" name="Section Heading" basedon="Numbered Heading 1" type="P" props="list-delim:Section %L.; field-color:transparent; start-value:1; margin-left:0.0in; field-font:Arial; text-indent:0.0in; line-height:1.000000; list-style:Numbered List; tabstops:1.100000in/L0"/>
  43. <s type="P" name="Square List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Square List; text-indent:-0.300000in"/>
  44. <s type="P" name="Star List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Star List; text-indent:-0.300000in"/>
  45. <s type="P" name="Tick List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Tick List; text-indent:-0.300000in"/>
  46. <s type="P" name="Triangle List" followedby="Current Settings" props="list-delim:%L; list-decimal:NULL; field-color:transparent; start-value:0; margin-left:0.5000in; field-font:Dingbats; line-height:1.000000; list-style:Triangle List; text-indent:-0.300000in"/>
  47. <s type="P" name="Upper Case List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L); list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Upper Case List; text-indent:-0.300000in"/>
  48. <s type="P" name="Upper Roman List" basedon="Numbered List" followedby="Current Settings" props="list-delim:%L; list-decimal:.; field-color:transparent; start-value:1; margin-left:0.5000in; field-font:NULL; line-height:1.000000; list-style:Upper Roman List; text-indent:-0.300000in"/>
  49. </styles>
  50. <pagesize pagetype="Letter" orientation="portrait" width="8.500000" height="11.000000" units="in" page-scale="1.000000"/>
  51. <section>
  52. <p style="Heading 1"><c props="lang:en-GB">Bidirectional Wordprocessing With AbiWord</c><c props="lang:en-GB"></c></p>
  53. <p style="Normal">Dec <c props="lang:en-GB">6</c>, 2003</p>
  54. <p style="Normal"><c props="lang:en-GB">Tomas Frydrych <</c><c props="lang:en-GB"></c><a xlink:href="mailto:tomas@frydrych.uklinux.net"><c props="lang:en-GB">tomas@frydrych.uklinux.net</c></a><c props="lang:en-GB">></c></p>
  55. <p style="Heading 2">Contents</p>
  56. <p style="Normal"><a xlink:href="#intro"><c props="font-weight:bold">Introduction</c><c props="font-weight:bold"></c></a></p>
  57. <p style="Normal" props="margin-bottom:0pt"><a xlink:href="#bidi_control"><c props="font-weight:bold">Controlling Bidirectional Ordering</c><c props="font-weight:bold"></c></a></p>
  58. <p style="Normal" props="text-indent:0.0000in; margin-bottom:0pt; margin-left:0.5000in"><a xlink:href="#dom-dir">Dominant Direction of Text</a></p>
  59. <p style="Normal" props="text-indent:0.0000in; margin-bottom:0pt; margin-left:0.5000in"><a xlink:href="#overrides">Explicit Direction Overrides</a></p>
  60. <p style="Normal" props="text-indent:0.0000in; margin-bottom:0pt; margin-left:0.5000in"><a xlink:href="#markers">Direction Markers</a></p>
  61. <p style="Normal" props="lang:en-GB; text-indent:0.0000in; font-size:11pt; margin-bottom:0pt; margin-left:1.98cm"><a xlink:href="#markers_examples"><c props="lang:en-GB; font-size:11pt">Examples</c></a></p>
  62. <p style="Normal" props="lang:en-GB; text-indent:0.0000in; font-size:11pt; margin-left:1.98cm"><a xlink:href="#markers_auto"><c props="lang:en-GB; font-size:11pt">Automatic Insertion</c></a></p>
  63. <p style="Normal" props="font-weight:bold; lang:en-GB"><a xlink:href="#mirroring"><c props="font-weight:bold; lang:en-GB">Mirroring Characters</c></a></p>
  64. <p style="Normal"><a xlink:href="#shaping"><c props="font-weight:bold">Glyph Shaping</c><c props="font-weight:bold"></c></a></p>
  65. <p style="Heading 2"><bookmark type="start" name="intro"/><bookmark type="end" name="intro"/><c props="lang:en-GB">Introduction</c><c props="lang:en-GB"></c></p>
  66. <p style="Normal"><c props="lang:en-GB">Some languages, such as English, are written from left to right, while other languages, such as Arabic, from right to left. AbiWord can handle both directions of text, as well as their combinations -- AbiWord is a bidirectional word processor. </c><c props="lang:en-GB"></c></p>
  67. <p style="Heading 2"><bookmark type="start" name="bidi_control"/><bookmark type="end" name="bidi_control"/><c props="lang:en-GB">Controlling Bidirectional Ordering</c><c props="lang:en-GB"></c></p>
  68. <p style="Normal"><c props="lang:en-GB">The bidirectional ordering of text in AbiWord is done automatically, closely following the Unicode Bidirectional Algorithm (UBA; see the </c><a xlink:href="http://www.unicode.org"><c props="lang:en-GB">Unicode Consortium website</c></a><c props="lang:en-GB">). T</c><c props="font-family:Times New Roman; font-size:12pt; lang:en-GB; text-position:normal; font-weight:normal; font-style:normal; text-decoration:none">he Unicode character set assigns each character certain directional properties which are then used by the UBA to order text. Thus, Hebrew or Arabic characters will automatically be treated as right-to-left, and English characters as left-to-right. There are some characters that are directionally ambiguous, and how they are treated by the UBA depends on what characters are found in their vicinity (this includes all white space and punctuation characters).</c></p>
  69. <p style="Normal"><c props="lang:en-GB">Sometimes it is desirable to have the characters ordered differently than the following the UBA. In AbiWord the user has at his or her disposal three basic mechanisms that allow him or her to fine-tune the results. These are </c><c props="lang:en-GB"></c><c props="font-style:italic; lang:en-GB">specifying dominant direction of text</c>, <c props="font-style:italic">overriding implicit directional properties of characters</c>, and <c props="font-style:italic">inserting direction markers</c>.</p>
  70. <p style="Heading 3"><bookmark type="start" name="dom-dir"/><bookmark type="end" name="dom-dir"/>Dominant Direction of Text</p>
  71. <p style="Normal">The same sequence of characters with different directional properties will look differently if it is assumed to be a left-to-right text with right-to-left text embedded in it, or if it is understood to be a right-to-left text with left-to-right text embedded. In AbiWord we refer to the basic direction of text as the <c props="font-style:italic">dominant direction</c><c props="font-style:italic"></c> (in the the Unicode documentation it is known as the base embedding level)<c props="font-style:italic">. </c>The dominant direction in AbiWord operates on four hierarchical levels<c props="lang:en-GB">:</c> paragraph, section, document, and the program.</p>
  72. <p style="Heading 4">Paragraph-Level Dominant Direction</p>
  73. <p style="Normal">The paragraph-level dominant direction can be set either by the <c props="font-style:italic">Right-to-left</c><c props="font-style:italic"></c><c props="font-style:normal"> dominant check box in the Format->Paragraph dialogue, or from Format->Direction, or by using the equivalent button on the Extra toolbar. If the dominant direction is not set explicitly by the user, AbiWord will work it out from  the rest of the dominant direction hierarchy, i.e., it will check if dominant direction is set explicitly for the section in which the  paragraph is located, and if not, it will check the document level settings, finally resorting to program-level defaults.</c></p>
  74. <p style="Heading 4">Section-Level Dominant Direction</p>
  75. <p style="Normal">The section-level dominant direction is controlled by the <c props="font-style:italic">Use RTL order</c><c props="font-style:italic"></c> check box of the Format->Columns dialogue. Apart from providing <c props="lang:en-GB">the</c> default for any of the section paragraphs that do not have their dominant direction set explicitly, the section dominant direction controls how columns in multicolumn sections are ordered, it determines the dominant direction of text of footnotes inserted into the section, and the order of columns in tables. If section-level dominant direction is not set, AbiWord will derive it from the rest of the dominant direction hierarchy as described earlier.</p>
  76. <p style="Heading 4">Document-Level Dominant Direction</p>
  77. <p style="Normal">The document-level dominant direction is derived from the program-level dominant direction at <c props="lang:en-GB">the time </c>when the document is created. So, if your program-level dominant direction is set to RTL, every new document will have its default direction set to RTL. At present there is no way to change document-level dominant direction in an existing document (this is going to change in future versions).</p>
  78. <p style="Heading 4">Program-Level Dominant Direction</p>
  79. <p style="Normal">This is the value to which AbiWord recourses if everything else fails. <c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">The program-level dominant direction is set in the preferences (Tools->Preferences->Language->Bidirectional options). The default preference value is set to LTR (if you build AbiWord yourself from the AbiWord sources, you can change the default preference value to RTL).</c></p>
  80. <p style="Heading 3"><bookmark type="start" name="overrides"/><bookmark type="end" name="overrides"/>Explicit Direction Overrides</p>
  81. <p style="Normal"><c props="lang:en-GB">T</c>he <c props="lang:en-GB">visual </c>order <c props="lang:en-GB">of characters </c>that is automatically produced by the UBA<c props="lang:en-GB"> </c>might not always be what the user needs<c props="lang:en-GB">.</c> AbiWord allows the user to specify <c props="lang:en-GB">explicitly </c>that certain characters should be treated as left-to-right or right-to-left<c props="lang:en-GB"> irrespective of their Unicode properties.</c> This is done by selecting the characters in question and then applying the <c props="lang:en-GB">direction </c>override <c props="lang:en-GB">from the</c> Format->Direction menu or <c props="lang:en-GB">using </c>the<c props="lang:en-GB"> corresponding </c>buttons on the Extra toolbar.</p>
  82. <p style="Normal"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">It is important to understand that the direction override is in fact a formatting property applied to the text. The consequence of this is that when you place the insertion point into or just after text with the override set, any new characters input will also have the override set. For example if you set the insertion point just pass text which has override set explicitly to LTR and then type a Hebrew or Arabic character, it too will have the override set and will be treated as if it was LTR. To remove the override, you proceed in a manner analogous to setting it.</c></p>
  83. <p style="Heading 3"><bookmark type="start" name="markers"/><bookmark type="end" name="markers"/>Direction Markers</p>
  84. <p style="Normal"><c props="lang:en-GB">Setting explicit direction override might sometimes not be the best way of changing the order of characters, particularly if the ordering is to be changed for one of the directionally ambiguous characters. The</c> Unicode character<c props="lang:en-GB"> set</c> <c props="lang:en-GB">contains</c> two special characters called direction markers<c props="lang:en-GB">:</c> LRM (left to right direction marker) and RLM (right to left direction marker). <c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">The sole purpose of these characters is to allow small adjustments of the bidirectional order by affecting properties of ambiguous characters in their vicinity: when</c> <c props="lang:en-GB">the</c> text is reordered these <c props="lang:en-GB">markers</c> behave as normal left-to-right and right-to-left characters, but when the text is displayed they are not shown<c props="lang:en-GB"> (that is, unless you have Show Formatting Marks turned on)</c>.<c props="lang:en-GB"> </c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">The LRM and RLM markers can be inserted using the Insert->Direction Markers menu, or by using keyboard shortcuts Alt+Ctrl+> and Alt+Ctrl+< respectively.</c></p>
  85. <p style="Heading 4"><bookmark type="start" name="markers_examples"/><bookmark type="end" name="markers_examples"/><c props="lang:en-GB">Examples of Using Direction Markers</c></p>
  86. <p style="Normal"><c props="lang:en-GB"></c><c props="lang:en-GB">The use of the markers is best shown on a couple of examples such as writing formulas and phone numbers.</c></p>
  87. <p style="Normal"><c props="lang:en-GB">As a first example, we will take</c> <c props="lang:en-GB">the</c> formula <c props="font-style:italic">log(x)</c><c props="lang:en-GB">. If it </c>is <c props="lang:en-GB">embedded</c> into right<c props="lang:en-GB">-</c>to<c props="lang:en-GB">-</c>left text (represented here by capital letters<c props="lang:en-GB"> ABCEFG</c>), it will look like this:</p>
  88. <p style="Normal" props="text-align:right">    GFE (log(x CBA</p>
  89. <p style="Normal"><c props="lang:en-GB">This is because the UBA will disambiguate</c> the closing parenthesis of the formula <c props="lang:en-GB">to RTL (the algorithm does not know, and does not care, which is the opening parenthesis it matches; it takes an approach that will more often than not produce desired result, i.e., it assumes that a closing parenthesis on a direction boundary will have the properties of the characters that follow it). However, in our case the </c>order <c props="lang:en-GB">we </c>want is:</p>
  90. <p style="Normal" props="text-align:right">GFE log(x) CBA</p>
  91. <p style="Normal"><c props="lang:en-GB">This </c>can be achieved by following the closing parenthesis with the LRM marker<c props="lang:en-GB">. The inclusion of the marker will make the parenthesis completely surrounded by LTR characters, and so it will behave as an LTR character.</c></p>
  92. <p style="Normal"><c props="lang:en-GB"></c>The same result could, of course, be achieved by selecting the closing parenthesis and applying to it an explicit left-to-right override as described in the previous section. <c props="lang:en-GB">The main disadvantage of using an override in case like this has to do with the persistence of the explicit override described in the previous section. In contrast, the marker only affects the characters in its immediate vicinity, and only those that are directionally ambiguous. So if you insert RTL character just after the LRM marker, the new character will still behave as RTL, not LTR.</c></p>
  93. <p style="Normal"><c props="lang:en-GB">Another situation in which these markers come handy is with phone numbers. For instance, if the phone number 123 456 789 is embedded into a right-to-left text, it will look like this:</c><c props="lang:en-GB"></c></p>
  94. <p style="Normal" props="text-align:right; dom-dir:ltr"><c props="lang:en-GB"> FED 789 456 123 CBA</c><c props="lang:en-GB"></c></p>
  95. <p style="Normal"><c props="lang:en-GB">This is because English digits are considered weak LTR characters: they will be ordered from left to right themselves, but any ambiguous characters embedded among them will derive their direction from directionally strong characters that surround the whole number segment. In our case those are the ABC, DEF characters and so the spaces between the three groups of numbers behave as right-to-left characters. If, however, what the user wants is a phone number that looks like this:</c></p>
  96. <p style="Normal" props="text-align:right"><c props="lang:en-GB">FED 123 456 789 CBA</c><c props="lang:en-GB"></c></p>
  97. <p style="Normal"><c props="lang:en-GB">all that is requires is that the LRM character is inserted just before typing in the first digit; this will make the following numbers behave as strong LTR characters, and consequently the spaces too will behave as LTR characters.</c></p>
  98. <p style="Heading 4"><bookmark type="start" name="markers_auto"/><bookmark type="end" name="markers_auto"/><c props="lang:en-GB">Automatic Insertion of LRM and RLM Markers</c></p>
  99. <p style="Normal"><c></c>In certain circumstances AbiWord is capable of inserting these direction markers automatically<c props="lang:en-GB">,</c> based on the keyboard layout used (this is currently only supported under Windows). In order <c props="lang:en-GB">to use this feature you need</c> to first of all make sure that the option to change language when changing keyboard layout is turned on (Tools->Preferences->Language), and that also the bidirectional option <c props="font-style:italic">auto-insert direction markers</c> is turned on (Tools->Preferences->Language). AbiWord will then follow all <c props="lang:en-GB">closing parenthesis (Unicode characters '</c>)<c props="lang:en-GB">'</c>, <c props="lang:en-GB">'</c>]<c props="lang:en-GB">'</c>, and <c props="lang:en-GB">'</c>}<c props="lang:en-GB">')</c> with a direction marker derived from the language applied to that character. For instance, if a <c props="lang:en-GB">'</c>)<c props="lang:en-GB">'</c> character is set as being <c props="lang:en-GB">written </c>in Hebrew, it will be followed by a RLM marker but if it is set as being in English, it will be followed by a LRM marker. Similarly, it will precede all <c props="lang:en-GB">opening parenthesis ('</c>(<c props="lang:en-GB">'</c>, <c props="lang:en-GB">'</c>[<c props="lang:en-GB">'</c>, and <c props="lang:en-GB">'</c>{<c props="lang:en-GB">'</c> characters<c props="lang:en-GB">)</c> with a<c props="lang:en-GB">n appropriate</c> direction marker<c props="lang:en-GB">.</c></p>
  100. <p style="Normal"><c props="lang:en-GB"></c><c props="lang:en-GB">This feature could easily be extended to other characters; if you would find it useful, file a request in our </c><a xlink:href="http://bugzilla.abiword.com/"><c props="lang:en-GB">Bugzilla</c></a><c props="lang:en-GB">.</c></p>
  101. <p style="Heading 2"><bookmark type="start" name="mirroring"/><bookmark type="end" name="mirroring"/><c props="lang:en-GB">Mirroring Characters</c></p>
  102. <p style="Normal"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">Mirroring characters are characters the glyphs of which need to be mirrored when displayed in RTL context. An example of a mirroring character is the opening parenthesis, which looks ( in LTR context but ) in RTL context. When it comes to these characters the Unicode definition is strictly semantic, i.e., opening parenthesis has always the same numerical code, but when found in RTL context the application is expected to display in its place the mirror glyph of LTR opening parenthesis, which happens to be the glyph associated with LTR closing parenthesis. The effect of this is that if you display RTL text with parentheses that follow the Unicode rules in a plain text editor that is not Unicode-compliant, you will see '(' where you would expect ')' and vice versa.</c></p>
  103. <p style="Normal"><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">AbiWord, as a Unicode-based application, complies with the Unicode rules for handling mirroring characters. The consequence of the above is that your keyboard has to generate semantically correct values for the mirroring characters. </c><c props="font-family:Times New Roman; text-decoration:none; color:000000; font-size:12pt; text-position:normal; font-weight:bold; font-style:normal; lang:en-GB">On some Unix system this is not the case</c><c props="font-family:Times New Roman; font-size:12pt; color:000000; text-decoration:none; text-position:normal; font-weight:normal; font-style:normal; lang:en-GB">, and the keyboard for languages such as Hebrew generates the code for closing parenthesis in place of the code for opening parenthesis and vice verse. If you are seeing ')' when you are expecting '(' and vice versa, you need to fix the keyboard definition file (how to do that is beyond scope of this document).</c></p>
  104. <p style="Heading 2"><bookmark type="start" name="shaping"/><bookmark type="end" name="shaping"/>Glyph Shaping</p>
  105. <p style="Normal">Closely related to AbiWord's bidirectional capabilities is its ability to change visual appearance of certain glyphs depending on their context. This is essential for <c props="lang:en-GB">correct handling of the so-called mirroring characters described above, as well as for </c>languages that use scripted alphabets, such as Arabic, in which each letter has different shapes depending whether it stands alone, or at the beginning, in the middle or at the end of a word. Alongside this type of glyph shaping, AbiWord can also replace a sequence of two glyphs with a special ligature glyph where needed<c props="lang:en-GB">.</c></p>
  106. <p style="Normal">At present AbiWord uses a proprietary shaping engine of fairly limited capabilities<c props="lang:en-GB">. We are currently working on getting adequate support for Arabic, and support for other languages that require shaping can be added on request. However, the built-in shaping engine can </c>only <c props="lang:en-GB">handle</c> languages for which the alternative glyph shapes have <c props="lang:en-GB">separate </c>code points assigned<c props="lang:en-GB"> to them</c> in the Unicode character set (such as Arabic)<c props="lang:en-GB">; some languages that were added to the Unicode character set relatively recently </c>rely solely on advanced font technologies for shaping<c props="lang:en-GB"> and these will not be supported in near future</c> (<c props="lang:en-GB">e.g., </c>Syriac)<c props="lang:en-GB">.</c></p>
  107. <p style="Normal"><c props="lang:en-GB">When shaping and replacing ligatures, </c>AbiWord always checks for the presence of the <c props="lang:en-GB">replacement </c>glyph in the currently selected font<c props="lang:en-GB">. If</c> the glyph is not available it will <c props="lang:en-GB">use</c> the original character<c props="lang:en-GB">(</c>s<c props="lang:en-GB">), providing they are available. If even the original characters are absent, AbiWord will first try to remap them to sensible values, but if event that fails, it will use the absent glyph character.</c></p>
  108. <p style="Normal">An important thing to understand about the glyph shaping is that the changes only take place in the visual plain<c props="lang:en-GB"> (on screen or paper print out)</c>, <c props="lang:en-GB">but </c>the characters that are contained in the document do not change in the process.</p>
  109. <p style="Normal">Glyph shaping is controlled from the Language tab of the Tools->Preference dialogue. There are two check boxes there: <c props="font-style:italic">Determine glyph shapes from context</c><c props="font-style:italic"></c> and <c props="font-style:italic">Use glyph shaping for Hebrew</c>. The former of these is the master-switch that turns the glyph shaping engine on and off. When the second check box is checked, the shaping engine will shape also the five Hebrew letters that have a final form. <c props="font-weight:bold">Please note that this is not intended to be used for writing modern Hebrew and Yiddish documents</c>, since in modern Hebrew and Yiddish the final forms are considered different characters (and because as I have explained above the shaping does not change the characters in a document, if nothing else, your spell-check will not work<c props="lang:en-GB">, and your files will not look right on other people's computers</c>).</p>
  110. </section>
  111. </abiword>
  112.