Creating Custom List Formats

For PDF output, you can create and edit lists with custom formats up to 10 levels deep. Custom formats allow you to quickly create lists (especially multi-level lists) that already have a certain look applied as you indent in the list to create new levels. For each level in a custom list format, you can specify whether to use an ordered (numbered) or unordered (bulleted) style, select a custom bullet image, insert characters or symbols, and choose formatting (e.g., bold, color, size). The formats that you create are written to your stylesheet.

Important At this time, custom list formats are supported only in PDF output. After browsers begin to support the CSS3 marker element that makes custom list formats possible, this feature will automatically be supported in browser-based outputs as well. Until then, if you want to generate a browser-based output, you should use the standard method for creating lists instead.

How to Create a Custom List Format

  1. Place your cursor in the document where you want to create a list.
  2. Select Home > (down arrow) and choose Custom List Format > Create Custom Format.

  3. Use the Create New List Format dialog to specify the type of counter (e.g., decimals, upper-roman, lower-alpha), custom characters and images, and the look for each level of the list format. (You can use only one counter per level in the format.)

    • Name Give your custom list format a name.
    • Comment You can add an internal comment, such as the purpose of the list format.
    • Stylesheet This displays the stylesheet associated with your primary target. Styles created as a result of your custom list format are added to this stylesheet.
    • Level Select the level of the list that you want to work on. When a level is selected, any settings you choose are applied only to that level.
    • Content This field becomes populated based on settings you choose using the buttons next to this field. It is a good idea to begin by clicking the first button to the right (i.e., ) and selecting a list type or image first (see below). Then use the other options as necessary.

      You can also type directly into this field.

      Note Any text typed directly in this field is supported only in PDF output. If you enter any text, the default list markers (e.g., bullets, numbers) are instead displayed in non-PDF outputs.

    • Select the type of list. If you click the down arrow, you can select any of the following:

       

      Type of List

      What is Added to the Content Field?

      Bullet list

      Nothing

      Numbered list

      {n}.

      Lower-alpha numbered list

      {a}.

      Upper-alpha numbered list

      {A}.

      Lower-Roman numbered list

      {r}.

      Upper-Roman numbered list

      {R}.

      Select custom bullet image

      The path to the image file

    • You can click this button to insert a special character or symbol. See Inserting Characters and Symbols.

      Note Custom list characters are supported only in PDF output. If you add characters or symbols to the Content field, the default list markers (e.g., bullets, numbers) are instead displayed in non-PDF outputs. However, custom bullet images are supported in all output formats.

    • You can click this button to open the Font Properties dialog. This lets you change the look of the list marker, such as the font size or type, color, and effects.
  4. Click OK. The dialog closes and a list is started with the first level shown. Whenever you press Tab or click the indent button , the next level is created in the list. You can click the outdent button in the Home ribbon to move back out to higher levels in the list.
  5. Click Save the active file. to save your work.

Custom List Formats and Styles

When you create a custom list format, a complex selector (a special type of style) is added to your stylesheet. In the Stylesheet Editor, you can see your custom list formats under (Complex Selectors), as well as under (Custom Lists). See Stylesheet Editor.

A custom list format might look something like the following when looking at the stylesheet in the Internal Text Editor. See Internal Text Editor.

You can edit these styles whenever you like. See Editing Custom List Formats.

Applying Custom List Formats

After you create a custom list format, you can open a topic or snippet in the XML Editor and select that format when creating a new list. See Creating Numbered and Bulleted Lists.

You can also change an existing list to another custom format by right-clicking the ol (ordered list) or ul (unordered) structure bar and choosing the format from the context menu. See Applying Styles to Content.

Example

Example You want many of your lists to have a format where the first level of the list uses blue numbers in bold font with a size of 1.5 em (which is similar to 150%). The second level needs to be lower-alpha numbers in red italic font with a size of 1.0 em (which is similar to 100%). And the third level should be unordered format with a green image representing each bullet.

For the first level, you might do this:

For the second level, you might do this:

For the third level, you might do this:

As soon as the format is created, the beginning of the list is seen in the XML Editor with the first level shown.

Type content and press ENTER, just like you would for any other list. When you want to enter content for a second level in the list, press Tab on your keyboard. The formatting automatically changes to the red lower-alpha format.

Type content for the second-level list items, pressing ENTER after each line. When you want to enter content for a third level in the list, press Tab on your keyboard. Because you are moving from an ordered list to an unordered list at this point, the structure bar changes to a <ul> tag and the formatting for the third level changes to the green image.

Type content for the third-level list items, pressing ENTER after each line. When you want to return to the second-level list, click the Outdent button in the Home ribbon.

Now you're back at the second level. Type content for any second-level list items. When you want to return to the first-level list, click the Outdent button in the Home ribbon.

You should now be back at the first level, where you can continue the list content.