home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 April / PCWorld_2001-04_cd.bin / Komunik / Amaya / WinNT2000 / amaya-WindowsNT-4.3.exe / _SETUP.1 / Links.html < prev    next >
Encoding:
Extensible Markup Language  |  2001-02-22  |  7.4 KB  |  175 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6.   <title>Links and Anchors</title>
  7.   <meta name="GENERATOR" content="amaya V4.2.2" />
  8.   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  9. </head>
  10.  
  11. <body xml:lang="en" lang="en">
  12.  
  13. <table border="0" width="100%" summary="toc">
  14.   <tbody>
  15.     <tr>
  16.       <td><p><img border="0" alt="W3C" src="../../Icons/WWW/w3c_home" /> <img
  17.         border="0" alt="Amaya" src="../Icons/amaya.gif" /></p>
  18.       </td>
  19.       <td><p align="right"><a href="Creating.html" accesskey="p"><img
  20.         alt="previous" border="0" src="../Icons/left.gif" /></a> <a
  21.         href="Manual.html" accesskey="t"><img alt="top" border="0"
  22.         src="../Icons/up.gif" /></a> <a href="Changing.html"
  23.         accesskey="n"><img alt="next" border="0" src="../Icons/right.gif"
  24.         /></a></p>
  25.       </td>
  26.     </tr>
  27.   </tbody>
  28. </table>
  29.  
  30. <div id="Creating">
  31. <h2>Creating and changing links and anchors</h2>
  32.  
  33. <h3><a name="L557">Creating a target anchor</a></h3>
  34.  
  35. <p>A target anchor is a piece of text that is referred to by a link (a source
  36. anchor). Before creating a link to such a piece of text, you must first turn
  37. it into a target anchor.</p>
  38.  
  39. <p>Just select a character string with the mouse and choose <strong>Create
  40. Target</strong> from the <strong>Links</strong> menu. The selected text is now
  41. a target. If you have set the status "Show targets" to your current Formatted
  42. view, the text will be preceded by an a <a href="Browsing.html#target">target
  43. icon <img src="../Icons/target.gif" alt=" target " /></a>. In the Links view,
  44. target icons which identify target anchors are always displayed (there is no
  45. option to show or hide target icons). When a target anchor is created, Amaya
  46. automatically generates the NAME attribute value:</p>
  47. <ul>
  48.   <li><p>By extracting a word longer than 3 characters from the anchor
  49.     content</p>
  50.     <p>á</p>
  51.     <p>OR</p>
  52.     <p>á</p>
  53.   </li>
  54.   <li><p>By generating a number.</p>
  55.   </li>
  56. </ul>
  57.  
  58. <p>In both cases, Amaya guarantees that the generated value is unique within
  59. the document.</p>
  60.  
  61. <h3><a name="target1">Creating a target element</a></h3>
  62.  
  63. <p>In HTML 4.0, an element can be used as a target of links. A target element
  64. is a typed element that has an ID attribute which is referred to by a link (a
  65. source anchor). Before creating a link to such an element, you must first turn
  66. it into a target element.</p>
  67.  
  68. <p>You can create a target element in the same way you create a target anchor.
  69. Just select a character string within the element, use the Esc (F2 on Windows)
  70. key to select the element itself and choose <strong>Create Target</strong>
  71. from the <strong>Links</strong> menu. The selected element has now an ID
  72. attribute, which identifies it as a target element. Amaya automatically
  73. generated this unique ID value.</p>
  74.  
  75. <p>If you have set the status "Show targets" to your current Formatted view ,
  76. the text is preceded by an a target icon <img src="../Icons/target.gif"
  77. alt=" target " />.</p>
  78.  
  79. <p>It's also possible to directly create the ID attribute by using the
  80. <strong><a href="Attributes.html#Attributes">Attributes</a></strong> menu when
  81. the element is selected, or in the Links view or Structure view. When the
  82. value has been entered, Amaya checks this value and changes it if it is
  83. already used by another NAME or ID attribute in the same document.</p>
  84.  
  85. <p>Finally, you an also use the <strong>Special/Add/Remove ID</strong>s menu
  86. to automatically add an attribute to all elements of a given name, in the
  87. whole document, or within a selection. You just need to type in the element's
  88. name and use the <strong>Add</strong> or <strong>Remove</strong> buttons to do
  89. the operation.. The following figure shows how we use this menu to add an ID
  90. attribute to all the P elements in a document. All P elements that already
  91. have an ID attribute will be skipped.</p>
  92.  
  93. <p style="text-align: center"><img src="../Icons/IDMenu.png"
  94. alt="The Add/Remove ID menu" /></p>
  95.  
  96. <h3><a name="L245">Creating a link</a></h3>
  97.  
  98. <h4>External links</h4>
  99.  
  100. <p>To create an anchor that is a link to another document:</p>
  101. <ol>
  102.   <li><a href="Selecting.html#Selecting">Select</a> the extent of the anchor
  103.     to be created</li>
  104.   <li>Click the <img alt="Link " src="../Icons/Link.gif" align="middle" />
  105.     button, or choose <strong>Create Link</strong> from the
  106.     <strong>Links</strong> menu, or enter the shortcut (by default Ctrl Shift
  107.     L).</li>
  108.   <li>There are several solutions: 
  109.     <ul>
  110.       <li>If the target document is displayed by <strong>Amaya</strong> 
  111.         <ul>
  112.           <li>just click anywhere on it. The link is created.</li>
  113.         </ul>
  114.       </li>
  115.       <li>If you are not confortable with the mouse: 
  116.         <ul>
  117.           <li>hitting any key will pop up a dialogue box: enter the URI of the
  118.             target document and the key <strong>Enter or Return</strong> to
  119.             confirm. The link is created.</li>
  120.         </ul>
  121.       </li>
  122.       <li>If the target document is not displayed: 
  123.         <ul>
  124.           <li>click anywhere in the current document, except on a local target
  125.             icon.</li>
  126.           <li>a dialog box pops up: enter the URI of the target document and
  127.             click on the <strong>Confirm</strong> button. The link is
  128.           created.</li>
  129.         </ul>
  130.       </li>
  131.     </ul>
  132.   </li>
  133. </ol>
  134.  
  135. <h4>Internal links</h4>
  136.  
  137. <p>To create a link to a particular target anchor or a particular target
  138. element in the same document or in another, replace step 3 above by:</p>
  139. <ol>
  140.   <li value="3">In that case, you can click in any view on the <a
  141.     href="Browsing.html#target">target icon</a>, which should be displayed in
  142.     the Formatted view or in the Links view. The link is created.</li>
  143. </ol>
  144.  
  145. <h3><a name="Removing">Removing a link or a target anchor</a></h3>
  146.  
  147. <p>The <strong>Links</strong> menu contains a command that reverses the two
  148. commands above: <strong>Delete Anchor</strong>. Put the selection or the
  149. insertion point anywhere within the anchor to be removed (you do not need to
  150. select the whole anchor, but you can) and activate the <strong>Delete
  151. Anchor</strong> command. The anchor is removed, but its content remains.</p>
  152.  
  153. <h3><a name="Changing">Changing a link</a></h3>
  154.  
  155. <p>If you want to keep an anchor but to change the target of the corresponding
  156. link, select any part of that anchor or just put the insertion point within
  157. the anchor, and click the <img alt="Link " src="../Icons/Link.gif"
  158. align="middle" /> button or choose <strong>Change Link</strong> from the
  159. <strong>Links</strong> menu. Then designate the new target of the anchor as
  160. above (step 3 in the <a href="#L245">creation of a link</a>).</p>
  161.  
  162. <p>To change the target of a link, you can also edit the <code>href</code>
  163. attribute, either directly in the Structure view or in the Links view or using
  164. the <a href="Attributes.html#Attributes"><strong>Attributes</strong></a>
  165. menu.</p>
  166. </div>
  167.  
  168. <p align="right"><a href="Creating.html"><img alt="previous" border="0"
  169. src="../Icons/left.gif" /></a> <a href="Manual.html"><img alt="top" border="0"
  170. src="../Icons/up.gif" /></a> <a href="Changing.html"><img alt="next"
  171. border="0" src="../Icons/right.gif" /></a></p>
  172. <hr />
  173. </body>
  174. </html>
  175.