Curl Global Community
Getting Started5:Creating Lists - Printable Version

+- Curl Global Community (https://communities.curl.com)
+-- Forum: Tutorials (https://communities.curl.com/forumdisplay.php?fid=3)
+--- Forum: Public Training (https://communities.curl.com/forumdisplay.php?fid=4)
+---- Forum: Curl Clues (https://communities.curl.com/forumdisplay.php?fid=5)
+---- Thread: Getting Started5:Creating Lists (/showthread.php?tid=6)



Getting Started5:Creating Lists - kino - 06-15-2011

It is common in textual content to have lists of subelements. Curl provides several text formats for that purpose. The Curl methods described are similar to HTML lists.

Bulleted Lists An unordered list is useful when you want to display items that are in no particular order, such as a list of products or Web sites.

•Create an unordered list using itemize
•Specify items contained within the list


Numbered Lists An ordered list is useful when you want to display content that are in a specific order, such as product installation steps.

•Create an ordered list using enumerate
•Specify items contained within the list
Code:
{curl 6.0, 7.0 applet}
{curl-file-attributes character-encoding = "utf8"}

{applet  {compiler-directives careful? = true}}

Vacation Destinations:
{itemize
   {item Japan}
   {item China}
   {item Malaysia}
   {item Australia}
}

Vacation Activities
{enumerate
   {item Skiing}
   {item Snorkeling}
   {item Kayaking}
   {item Biking}
}
We can also specify lists within lists. In these cases the item indentation depends on nesting level.

Code:
{curl 6.0, 7.0 applet}
{curl-file-attributes character-encoding = "utf8"}

{applet  {compiler-directives careful? = true}}

{bold Vacation Destinations:}
{itemize
   color = "blue",
   {item Japan
       {enumerate
           color = "teal",
           font-size = 10pt,
           font-family = "Times",
           {item Skiing}
           {item Snorkeling}
           {item Kayaking}
           {item Biking}
       }
   }
   {item China}
   {item Malaysia}
   {item Australia}
}
Tip: Both enumerate and itemize are special paragraph formats. Therefore, you can set character and paragraph options on them. Keep in mind that character options are nonlocal, and paragraph options are local. You can refer to the Curl Cue http://developers.curl.com/docs/DOC-1114 for more information on character and paragraph options.