home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="iso-8859-1"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta name="GENERATOR" content="amaya 9.1, see http://www.w3.org/Amaya/" />
- <title>Creating Elements in Amaya</title>
- <style type="text/css">
-
- </style>
- <link href="style.css" rel="stylesheet" type="text/css" />
- </head>
-
- <body xml:lang="en" lang="en">
-
- <div>
- <img alt="Amaya" src="../../resources/icons/22x22/logo.png" class="logo" />
-
- <p class="nav"><a href="Document.html" accesskey="p"><img alt="previous"
- src="../../resources/icons/misc/left.png" /></a> <a href="Manual.html"
- accesskey="t"><img alt="top" src="../../resources/icons/misc/up.png" /></a>
- <a href="Attributes.html" accesskey="n"><img alt="next"
- src="../../resources/icons/misc/right.png" /></a></p>
- </div>
-
- <div class="toc">
- <ul>
- <li><a href="#Creating">Creating Elements</a>
- <ul>
- <li><a href="#Buttons">Buttons and Menus</a></li>
- <li><a href="#Insertion">Insertion points</a></li>
- <li><a href="#Element">Element Locations</a></li>
- <li><a href="#Structure">Structure submenu</a></li>
- <li><a href="#Generated">Generated elements</a></li>
- <li><a href="#Enter">The Enter (or Return) Key</a></li>
- <li><a href="#Exiting">Exiting Anchors, Styled Character Strings,
- etc.</a></li>
- <li><a href="#Creating1">Creating Nested Structures</a></li>
- <li><a href="#Changing">Changing the Document Title</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div id="page_body">
- <h2 id="Creating">Creating Elements</h2>
-
- <h3 id="Buttons">Buttons and Menus</h3>
-
- <p>The commands on the <strong>XHTML</strong> and <strong>XML</strong> menus,
- and the corresponding buttons in the XHTML palette, let you create new
- elements at the insertion point within the document. To use the commands from
- the <strong>XHTML</strong> and <strong>XML</strong> menus, place the cursor
- at the desired position and choose the element type.</p>
-
- <h3 id="Insertion">Insertion points</h3>
-
- <p>When creating new elements, it is important to select an <em>insertion
- point</em>, not some text nor a single character: if the current selection is
- not empty, Amaya tries to <a href="Changing.html">transform</a> the selected
- part into the element type chosen.</p>
-
- <h3 id="Element">Element Locations</h3>
-
- <p>Sometimes elements cannot be created at the chosen location because of the
- constraints imposed by the HTML language. Amaya then tries to create the
- element at the closest valid position. For example, if the insertion point is
- at the end of the last line of a paragraph when you click on the Heading 2
- button <img src="../../resources/icons/22x22/XHTML_H2.png" alt="H2 Button"
- />, Amaya creates the new heading after the paragraph.</p>
-
- <p>In some other cases, Amaya changes the existing structure for creating the
- desired element at a valid position. If the insertion point is somewhere
- within a list item (<kbd>li</kbd>) when you create a heading, the item and
- its enclosing list are automatically split, in order to create the requested
- heading at the chosen position and to comply with the HTML DTD.</p>
-
- <h3 id="Structure">Structure submenu</h3>
-
- <p>To create elements in the document <code>head</code>, use the
- <strong>XHTML/Structure</strong> submenu. This menu is enabled only when the
- selection is in the <code>head</code> of the document. The <code>head</code>
- is displayed only in the <a href="Views.html">Structure view</a>. This view
- should then be open. Put the cursor at the desired position and choose the
- element type from the <strong>Structure</strong> submenu.</p>
-
- <p>The <strong>Structure</strong> submenu also enables you to create
- comments. Comments are shown only in the Structure view, but they can be
- inserted at any position in the document.</p>
-
- <h3 id="Generated">Generated elements</h3>
-
- <p>Some HTML elements are constituted by several other elements of different
- types. For instance, a table usually contains a caption
- (<code>caption</code>), several rows (<code>tr</code>), and several cells
- (<code>td</code> or <code>th</code>) in each row.</p>
-
- <p>When Amaya creates such elements, it also creates their components. A
- table is created with a caption and a few rows containing several cells. The
- insertion point is placed automatically in the first of these components. You
- can enter the content of that component immediately or later. You can move to
- the next (empty) component with the mouse or with the arrow keys.</p>
-
- <h3 id="Enter">The Enter (or Return) Key</h3>
-
- <p>When you are writing a new document or a new part in a document, you can
- create elements sequentially by pressing the <strong>Enter</strong> (or
- <strong>Return</strong>) key. The current element is terminated and a new one
- is created immediately after.</p>
-
- <p>Most often, the new element created is simply a paragraph, whatever the
- type of the previous element. You can change the element type by selecting
- the desired type from the <strong>XHTML</strong> menu or by clicking the
- corresponding button in the XHTML palette. You can also keep typing and <a
- href="Changing.html#Changing">change the element type</a> later on.</p>
-
- <p>When the cursor is at the end of a <code>pre</code>formatted element,
- hitting the Enter key creates a new line in the <code>pre</code>. To create
- another element, say a paragraph, after the <code>pre</code>, you have to
- select the whole <code>pre</code> element with the <kbd>F2</kbd> key and to
- press Enter.</p>
-
- <p>In the same way, you can create a new paragraph after a table by selecting
- the whole table and pressing Enter.</p>
-
- <p>When a whole element like <code>h2</code> or <code>li</code> is selected
- the Enter key creates a new <code>h2</code> or <code>li</code> after.</p>
-
- <h3 id="Exiting">Exiting Anchors, Styled Character Strings, etc.</h3>
-
- <p>When a paragraph or another block of text is styled terminated by an
- anchor or a character string in bold, italic or other such style moving the
- insertion point to the end and typing new text appends characters to the
- anchor or the styled string.</p>
-
- <p>To exit an anchor or styled element and enter plain text:</p>
- <ol>
- <li>Move the cursor to the end of the anchor or style element, and then
- press <b>Enter</b> and continue typing after the element.</li>
- <li>The same method can be used to enter plain text at the beginning of a
- block starting with an anchor or styled characters. Move the cursor to
- the beginning of the anchor or style element, and then press <b>Enter</b>
- and continue typing before the element.</li>
- </ol>
-
- <h3 id="Creating1">Creating Nested Structures</h3>
-
- <p>When the insertion point is in an empty element, pressing the Enter key
- replaces that element by another empty element at the next higher level in
- the document structure. This feature allows you to create complex, nested
- structures very quickly.</p>
-
- <p>As an example, consider the following structure:</p>
- <ol>
- <li>The first item in the list
- <p>A paragraph in the first item</p>
- </li>
- <li>The second item in the list.
- <ol type="a">
- <li>First item in the nested list.</li>
- <li>Second item in the nested list.</li>
- </ol>
- </li>
- <li>Last item in the list</li>
- </ol>
-
- <p class="ProcedureCaption">To create the above structure:</p>
- <ol>
- <li>Click the <strong>Nubered List</strong> button <img
- alt="Numbered List " src="../../resources/icons/22x22/XHTML_Num.png"
- align="middle" /> to create the first item in the list.
- <p></p>
- </li>
- <li>Type in the list item text, and press the <strong>Enter</strong> key
- once. Amaya creates a new paragraph within the list item.
- <p></p>
- </li>
- <li>Type the paragraph text, and press the <strong>Enter</strong> key
- twice. The first <strong>Enter</strong> creates another paragraph
- element, but the second <strong>Enter</strong> removes that paragraph and
- creates a second bullet list item in the original list.
- <p></p>
- </li>
- <li>Type the second list item.
- <p></p>
- </li>
- <li>Click the <strong>Numbered List</strong> button <img
- alt="Numbered List " src="../../resources/icons/22x22/XHTML_Num.png"
- align="middle" /> to create a new list. The new list is automatically
- nested within the first list.
- <p></p>
- </li>
- <li>Type the text for the first item in the new list, and press the
- <strong>Enter</strong> key twice to create a new item in the nested list.
- <p></p>
- </li>
- <li>Type the text for the second list item, and press the
- <strong>Enter</strong> key four times to create a new list item in the
- original list.
- <p></p>
- </li>
- <li>Type the final list item, and then press the <strong>Enter</strong> key
- three times to close the original list and start a new paragraph.
- <p></p>
- </li>
- </ol>
-
- <p>The <strong>Enter</strong> key works in the same way when the insertion
- point is at the beginning of an element, but it creates new elements before
- the current element. For example, to add a list item between the first two
- items in the above structure, place the cursor at the beginning of the second
- list item, and press the <strong>Enter</strong> key twice.</p>
-
- <p class="Note"><b>Note</b>:á This use of the <strong>Enter</strong> key does
- not apply only to lists and paragraphs, but to all elements.</p>
-
- <h3 id="Changing">Changing the Document Title</h3>
-
- <p class="ProcedureCaption">To edit the document title:</p>
- <ul>
- <li>Open the <strong>XHTML</strong>ámenu and choose <strong>Change
- Title</strong>.</li>
- </ul>
-
- <p class="Note" style="text-indent: 15pt"><b>Note:</b>ááá <br />
- You can also edit the document title from the Structure view.</p>
-
- <p></p>
- </div>
- </body>
- </html>
-