- From: Vincent Quint <Vincent.Quint@inrialpes.fr>
- Date: Tue, 27 Dec 2005 14:37:48 +0100
- To: tomcloyd@bestmindhealth.com
- Cc: Vincent.Quint@inrialpes.fr, www-amaya@w3.org
On Tue, 27 Dec 2005 02:48:28 -0800 "Tom Cloyd" <tomcloyd@bestmindhealth.com> wrote: > > I'm struggling to understand how to easily create a list in Amaya. It's > behavior is beyond comprehension, for me, OK, let me try to explain how it works. > and there appears to be no > useful documentation, which is baffling. Have you tried the Help menu? It provides an entry "Creating elements" that could help you. See sections "The Enter Key" and "Creating Nested Structures". > Here's what I'm doing: > > * I type a word in Amaya - "one" > * I press F2 to select the line > * I press Ctrl+h+l to create list element Right. Ctrl+h+l creates a list (<ul>) element. As a <ul> can only contain list item (<li>) elements, it also creates a <li> child element and it puts the character string "one" in that <li>. Finally the new <ul> element is selected. The status line (bottom of the window) tells you that a <ul> element is selected. You can also ask Amaya to show the Structure of your document to check how it works (use the Views menu). > * I press Enter, to get a new, empty list element, but I get a paragraph > instead! > There seems to be no way out of this. That's correct. When an element is selected, the Enter key always creates a sibling element after the selected element. The type of the new element depends on the context, but its position is always the same: a sibling after the selected element. In that case, it creates a paragraph after the <ul> element. In the body of an XHTML document you can create many types of element. By default, Amaya creates a paragraph. If you want something else, just choose another type in the XHTML menu: the new paragraph will be replaced by the type of your choice. If you want to create a second list item (<li>) within the list (<ul>) you have just created, select the first list item (<li>), for instance by clicking its bullet. But you can also click on any character in the list item and press F2. When the <li> is selected (check the status line or the Structure view), press Enter. No surprise, you will get a sibling element after the selected <li>. As only <li> elements are permitted as children of a <ul>, this new element is a <li>. Another way to create a second <li> once the <ul> is created is to click at the end of the first <li> (after "one") and to press Enter twice. The first Enter allows you to create a new paragraph <p> within the <li>, the second Enter creates a sibling <li> instead of that <p>. More details on list editing are provided in section "Creating Nested Structures". > Entering another word - "two" - > selecting and trying to convert this to a list element creates a > hierarchical list, which is plain wrong. > > So, this -- > > <ul> > <li>one > <p>two</p> > </li> > </ul> > > gets converted to -- > > <ul> > <li><p>one</p> > <ul> > <li>two</li> > </ul> > </li> > </ul> > > This is wrong, AND a mess. This is the way to create nested lists. When you want to create a plain list, you may consider this as a mess, but sometimes you really need to create nested lists. This process is the same as above: you select an element (the paragraph containing "two") and you turn it into a <ul>. > Can someone please explain this to me, and tell me if there's a simple way > to create lists in Amaya that doesn't involved hand editing the source? There are at least two other ways to create a simple list. You can provide the contents first and set the structure afterwards. Just type "one", Enter, "two", Enter, "three", etc. You get a sequence of paragraphs. Then select all the text you have typed and press Ctrl+h+l. The sequence of paragraphs is transformed into a <ul> and each paragraph is turned into a <li>. The other way is to create the structure first and then to enter some content into the structure. Start by pressing Ctrl+h+l (this creates a <ul> with an initial <li> child), then type "one" (content of the <li>), Enter, Enter (twice, for the reason explained above, this creates a new <li>), "two" (content of the <li>), Enter, Enter, "three", etc. > Whatever it's doing, it's simply not usable when there's no documatation > that easily locatable. > > Thanks in advance. > > -- Tom > > ================================================ > Tom Cloyd > Bellingham, Washington, U.S.A. > << TC.BestMindHealth.com / BestMindHealth.com >> > << tomcloyd@bestmindhealth.com >> > ================================================ -------------- Vincent Quint INRIA Rhône-Alpes INRIA ZIRST e-mail: Vincent.Quint@inria.fr 655 avenue de l'Europe Tel.: +33 4 76 61 53 62 Montbonnot Fax: +33 4 76 61 52 07 38334 Saint Ismier Cedex France
Received on Tuesday, 27 December 2005 13:38:26 UTC