home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 May / Gamestar_73_2005-05_dvd.iso / Programy / amaya / amaya-WinXP-9.1.exe / doc / WX / Creating.html < prev    next >
Encoding:
Extensible Markup Language  |  2005-02-23  |  9.8 KB  |  233 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.   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  7.   <meta name="GENERATOR" content="amaya 9.1, see http://www.w3.org/Amaya/" />
  8.   <title>Creating Elements in Amaya</title>
  9.   <style type="text/css">
  10.  
  11.   </style>
  12.   <link href="style.css" rel="stylesheet" type="text/css" />
  13. </head>
  14.  
  15. <body xml:lang="en" lang="en">
  16.  
  17. <div>
  18. <img alt="Amaya" src="../../resources/icons/22x22/logo.png" class="logo" />
  19.  
  20. <p class="nav"><a href="Document.html" accesskey="p"><img alt="previous"
  21. src="../../resources/icons/misc/left.png" /></a> <a href="Manual.html"
  22. accesskey="t"><img alt="top" src="../../resources/icons/misc/up.png" /></a>
  23. <a href="Attributes.html" accesskey="n"><img alt="next"
  24. src="../../resources/icons/misc/right.png" /></a></p>
  25. </div>
  26.  
  27. <div class="toc">
  28. <ul>
  29.   <li><a href="#Creating">Creating Elements</a>
  30.     <ul>
  31.       <li><a href="#Buttons">Buttons and Menus</a></li>
  32.       <li><a href="#Insertion">Insertion points</a></li>
  33.       <li><a href="#Element">Element Locations</a></li>
  34.       <li><a href="#Structure">Structure submenu</a></li>
  35.       <li><a href="#Generated">Generated elements</a></li>
  36.       <li><a href="#Enter">The Enter (or Return) Key</a></li>
  37.       <li><a href="#Exiting">Exiting Anchors, Styled Character Strings,
  38.         etc.</a></li>
  39.       <li><a href="#Creating1">Creating Nested Structures</a></li>
  40.       <li><a href="#Changing">Changing the Document Title</a></li>
  41.     </ul>
  42.   </li>
  43. </ul>
  44. </div>
  45.  
  46. <div id="page_body">
  47. <h2 id="Creating">Creating Elements</h2>
  48.  
  49. <h3 id="Buttons">Buttons and Menus</h3>
  50.  
  51. <p>The commands on the <strong>XHTML</strong> and <strong>XML</strong> menus,
  52. and the corresponding buttons in the XHTML palette, let you create new
  53. elements at the insertion point within the document. To use the commands from
  54. the <strong>XHTML</strong> and <strong>XML</strong> menus, place the cursor
  55. at the desired position and choose the element type.</p>
  56.  
  57. <h3 id="Insertion">Insertion points</h3>
  58.  
  59. <p>When creating new elements, it is important to select an <em>insertion
  60. point</em>, not some text nor a single character: if the current selection is
  61. not empty, Amaya tries to <a href="Changing.html">transform</a> the selected
  62. part into the element type chosen.</p>
  63.  
  64. <h3 id="Element">Element Locations</h3>
  65.  
  66. <p>Sometimes elements cannot be created at the chosen location because of the
  67. constraints imposed by the HTML language. Amaya then tries to create the
  68. element at the closest valid position. For example, if the insertion point is
  69. at the end of the last line of a paragraph when you click on the Heading 2
  70. button <img src="../../resources/icons/22x22/XHTML_H2.png" alt="H2 Button"
  71. />, Amaya creates the new heading after the paragraph.</p>
  72.  
  73. <p>In some other cases, Amaya changes the existing structure for creating the
  74. desired element at a valid position. If the insertion point is somewhere
  75. within a list item (<kbd>li</kbd>) when you create a heading, the item and
  76. its enclosing list are automatically split, in order to create the requested
  77. heading at the chosen position and to comply with the HTML DTD.</p>
  78.  
  79. <h3 id="Structure">Structure submenu</h3>
  80.  
  81. <p>To create elements in the document <code>head</code>, use the
  82. <strong>XHTML/Structure</strong> submenu. This menu is enabled only when the
  83. selection is in the <code>head</code> of the document. The <code>head</code>
  84. is displayed only in the <a href="Views.html">Structure view</a>. This view
  85. should then be open. Put the cursor at the desired position and choose the
  86. element type from the <strong>Structure</strong> submenu.</p>
  87.  
  88. <p>The <strong>Structure</strong> submenu also enables you to create
  89. comments. Comments are shown only in the Structure view, but they can be
  90. inserted at any position in the document.</p>
  91.  
  92. <h3 id="Generated">Generated elements</h3>
  93.  
  94. <p>Some HTML elements are constituted by several other elements of different
  95. types. For instance, a table usually contains a caption
  96. (<code>caption</code>), several rows (<code>tr</code>), and several cells
  97. (<code>td</code> or <code>th</code>) in each row.</p>
  98.  
  99. <p>When Amaya creates such elements, it also creates their components. A
  100. table is created with a caption and a few rows containing several cells. The
  101. insertion point is placed automatically in the first of these components. You
  102. can enter the content of that component immediately or later. You can move to
  103. the next (empty) component with the mouse or with the arrow keys.</p>
  104.  
  105. <h3 id="Enter">The Enter (or Return) Key</h3>
  106.  
  107. <p>When you are writing a new document or a new part in a document, you can
  108. create elements sequentially by pressing the <strong>Enter</strong> (or
  109. <strong>Return</strong>) key. The current element is terminated and a new one
  110. is created immediately after.</p>
  111.  
  112. <p>Most often, the new element created is simply a paragraph, whatever the
  113. type of the previous element. You can change the element type by selecting
  114. the desired type from the <strong>XHTML</strong> menu or by clicking the
  115. corresponding button in the XHTML palette. You can also keep typing and <a
  116. href="Changing.html#Changing">change the element type</a> later on.</p>
  117.  
  118. <p>When the cursor is at the end of a <code>pre</code>formatted element,
  119. hitting the Enter key creates a new line in the <code>pre</code>. To create
  120. another element, say a paragraph, after the <code>pre</code>, you have to
  121. select the whole <code>pre</code> element with the <kbd>F2</kbd> key and to
  122. press Enter.</p>
  123.  
  124. <p>In the same way, you can create a new paragraph after a table by selecting
  125. the whole table and pressing Enter.</p>
  126.  
  127. <p>When a whole element like <code>h2</code> or <code>li</code> is selected
  128. the Enter key creates a new <code>h2</code> or <code>li</code> after.</p>
  129.  
  130. <h3 id="Exiting">Exiting Anchors, Styled Character Strings, etc.</h3>
  131.  
  132. <p>When a paragraph or another block of text is styled terminated by an
  133. anchor or a character string in bold, italic or other such style moving the
  134. insertion point to the end and typing new text appends characters to the
  135. anchor or the styled string.</p>
  136.  
  137. <p>To exit an anchor or styled element and enter plain text:</p>
  138. <ol>
  139.   <li>Move the cursor to the end of the anchor or style element, and then
  140.     press <b>Enter</b> and continue typing after the element.</li>
  141.   <li>The same method can be used to enter plain text at the beginning of a
  142.     block starting with an anchor or styled characters. Move the cursor to
  143.     the beginning of the anchor or style element, and then press <b>Enter</b>
  144.     and continue typing before the element.</li>
  145. </ol>
  146.  
  147. <h3 id="Creating1">Creating Nested Structures</h3>
  148.  
  149. <p>When the insertion point is in an empty element, pressing the Enter key
  150. replaces that element by another empty element at the next higher level in
  151. the document structure. This feature allows you to create complex, nested
  152. structures very quickly.</p>
  153.  
  154. <p>As an example, consider the following structure:</p>
  155. <ol>
  156.   <li>The first item in the list
  157.     <p>A paragraph in the first item</p>
  158.   </li>
  159.   <li>The second item in the list.
  160.     <ol type="a">
  161.       <li>First item in the nested list.</li>
  162.       <li>Second item in the nested list.</li>
  163.     </ol>
  164.   </li>
  165.   <li>Last item in the list</li>
  166. </ol>
  167.  
  168. <p class="ProcedureCaption">To create the above structure:</p>
  169. <ol>
  170.   <li>Click the <strong>Nubered List</strong> button <img
  171.     alt="Numbered List " src="../../resources/icons/22x22/XHTML_Num.png"
  172.     align="middle" /> to create the first item in the list.
  173.     <p></p>
  174.   </li>
  175.   <li>Type in the list item text, and press the <strong>Enter</strong> key
  176.     once. Amaya creates a new paragraph within the list item.
  177.     <p></p>
  178.   </li>
  179.   <li>Type the paragraph text, and press the <strong>Enter</strong> key
  180.     twice. The first <strong>Enter</strong> creates another paragraph
  181.     element, but the second <strong>Enter</strong> removes that paragraph and
  182.     creates a second bullet list item in the original list.
  183.     <p></p>
  184.   </li>
  185.   <li>Type the second list item.
  186.     <p></p>
  187.   </li>
  188.   <li>Click the <strong>Numbered List</strong> button <img
  189.     alt="Numbered List " src="../../resources/icons/22x22/XHTML_Num.png"
  190.     align="middle" /> to create a new list. The new list is automatically
  191.     nested within the first list.
  192.     <p></p>
  193.   </li>
  194.   <li>Type the text for the first item in the new list, and press the
  195.     <strong>Enter</strong> key twice to create a new item in the nested list.
  196.     <p></p>
  197.   </li>
  198.   <li>Type the text for the second list item, and press the
  199.     <strong>Enter</strong> key four times to create a new list item in the
  200.     original list.
  201.     <p></p>
  202.   </li>
  203.   <li>Type the final list item, and then press the <strong>Enter</strong> key
  204.     three times to close the original list and start a new paragraph.
  205.     <p></p>
  206.   </li>
  207. </ol>
  208.  
  209. <p>The <strong>Enter</strong> key works in the same way when the insertion
  210. point is at the beginning of an element, but it creates new elements before
  211. the current element. For example, to add a list item between the first two
  212. items in the above structure, place the cursor at the beginning of the second
  213. list item, and press the <strong>Enter</strong> key twice.</p>
  214.  
  215. <p class="Note"><b>Note</b>:á This use of the <strong>Enter</strong> key does
  216. not apply only to lists and paragraphs, but to all elements.</p>
  217.  
  218. <h3 id="Changing">Changing the Document Title</h3>
  219.  
  220. <p class="ProcedureCaption">To edit the document title:</p>
  221. <ul>
  222.   <li>Open the <strong>XHTML</strong>ámenu and choose <strong>Change
  223.     Title</strong>.</li>
  224. </ul>
  225.  
  226. <p class="Note" style="text-indent: 15pt"><b>Note:</b>ááá <br />
  227. You can also edit the document title from the Structure view.</p>
  228.  
  229. <p></p>
  230. </div>
  231. </body>
  232. </html>
  233.