p style vs li style

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Greg
Sr. Propeller Head
Posts: 130
Joined: Thu Mar 29, 2012 12:01 am

p style vs li style

Post by Greg »

What is the practical difference between using li styles for bullets and lists versus creating p styles with automatic numbering or bullets?

TIA.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: p style vs li style

Post by RamonS »

The li style already exists and you do not need to create it. I also wonder how automatic numbering words with nested p styles versus li styles. There may be other things, but my mind always goes back to the question why you want to create something that is already there?
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: p style vs li style

Post by Nita Beck »

I agree with Ramon that list styles are easier to use than paragraph styles with auto-numbers that emulate list styles. They are already part of the stylesheet, so there's no need to invent paragraph styles that do the same thing.

One reason that list styles are preferable, IMHO, is that it's quite easy to nest other types of blocks (e.g., note & caution paragraphs, tables, images, divs, and sub-lists within a list) within list items, with everything aligning nicely. I would think that, were one to use auto-numbering paragraph styles, one would also need to create special paragraph, div, and table styles to address alignment of content appearing between the auto-numbered paragraphs. (For those interested, there is a recent Madblog article by our forum friend Jessica Nealon about aligning graphics within lists that you might find useful: http://www.madcapsoftware.com/blog/2017 ... cap-flare/. The techniques she describes apply to other types of content such as tables within lists.)

Another advantage of using list styles, again in IMHO, is that it's easy to use keyboard shortcuts to craft lists, without ever having one's hands leave the keyboard. Most of the keyboard shortcuts are built into Flare, such as Tab, Ctrl+; (for creating paragraphs within a list item), and Shift+Tab. But there are no built-in shortcuts for *starting* lists, so I've also created custom keyboard shortcuts to start an ordered list (Ctrl+1 ... think "step 1") and an unordered list (Ctrl+Shift+8 aka Ctrl+* .... think of the asterisk as a bullet).

Yet *another* example I can think of is how easy it is to do things at the list level (<ol> and <ul>. One can apply a condition to the ol or ul block; merge two ol or ul blocks quickly; move, copy, cut, paste an entire list; and so forth. With a "list" consisting of auto-numbered paragraphs, one would have to first nest all the paragraphs within a div to then do things like apply a condition. Or one would need to manipulate each individual paragraph. Not a time-saver, for sure!

I don't mean to suggest that there are no use cases for auto-numbered paragraphs serving as lists. But you asked about practical differences...

HTH
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Wendy_Pod
Propeller Head
Posts: 21
Joined: Thu Jun 15, 2017 2:50 pm

Re: p style vs li style

Post by Wendy_Pod »

A good case for using p styles for lists is to have xrefs to list items display the target step number in their output.

viewtopic.php?f=7&t=8705

viewtopic.php?f=12&t=5968
Post Reply