Pages: 1
Print
Author Topic: Nested lists  (Read 4687 times)
AlChuck
Member

Posts: 2


« on: March 16, 2010, 01:14:30 PM »

Hi,

I was attempting to create a nested unordered list in a DITA document. I found that when I put the cursor in the usual place at the end of an element and try to add another unordered list in a list item, I get an error message that tells me "you're already in a list, dummy." (I paraphrase...)

In the Help I discovered that pressing TAB is supposed to start me a new nested list. SO I did that, and sure enough it worked.

At least, it did in the first list item in my outer list. However, when I tried to do it again -- for example, my third list item in the outer list - TAB instead takes this third list item and makes it the first item in a nested list beneath the second list item in the outer list.

Can't seem to get it to behave like it should. Any tips? I'm OK with editing the XML by hand with a text editor but man, what a pain in the neck. If that's my only recourse, I'm glad I don't nest lists like this very often...

Thanks.

Alan Oehler
Citrix Systems, Inc.


Version#: 5.1.1.017
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: March 16, 2010, 03:50:47 PM »

Unless you are inserting elements using the Element List and building up the structure "manually" that way, you can't nest to the next level (using tab or other means) until your current level contains at least one <li>.

1. New DITA Topic or open an existing one that allows <ul>.
2. Find a <p> and click the list button on the Formatting toolbar to turn it into a list or select elsewhere and insert a new list, or find a list.
3. Make sure the list item <li> you are in contains some text.
4. Move to the end of this item and press ENTER. New item is inserted.
5. Type some text for the new item.
6. Press TAB. This item is nested further and contains one item (ie: wrapped inside <ul>).
7. Move to the end of this item and press ENTER. New item is inserted.
8. Type some text for the new item.
9. Press TAB. This item is nested further and contains one item (ie: wrapped inside <ul>).
Repeat 7-9 until you have enough nesting...

Or instead of steps 7-9 locate a <ul> that already contains at least one <li> and work from there:
1. Change a <p> into a <ul> using the list button on the Formatting toolbar.
2. Do the following: type "item1" ENTER "item2" ENTER "item3" ENTER "item4" ENTER "item5".
3. Place your cursor inside "item2", press TAB, "item2" is nested inside "item1".
4. Place your cursor inside "item3", press TAB, "item3" is nested to the same level as "item2" (sibling inside "item1"). Press TAB again, "item3" is now nested inside "item2" and becomes a new <ul> inside that <li>.
Logged
AlChuck
Member

Posts: 2


« Reply #2 on: March 16, 2010, 04:19:41 PM »

Thanks, Derek... I figured out that I was missing the step of inserting the next element before hitting TAB. Operator error once again.

Alan
Logged
Pages: 1
Print
Jump to: