Problem setting OL start number using List Actions button

This forum is for all Flare issues not related to any of the other categories.
Post Reply
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

Problem setting OL start number using List Actions button

Post by bwofficer »

I can't manage to set the start number for my ordered list using the List Actions button on the Flare ribbon.

I've tried selecting the OL element in the xml structure bar on the left of the document editor, then doing List Actions > List Start Number. This brings up the Set List Item Value Dialog. I set the start number to 6 in there and click OK, but nothing changes in the editor. I refreshed the editor (F5), and still nothing changes there. The list still starts at 1. On the off chance that the change is only visible in the built output I built the target (a PDF) and opened it. Even there, the list still starts at 1.

I also tried selecting the first LI element of the list in the xml structure bar then applying the List Actions > List Start Number > 6. That doesn't work either.

What am I doing wrong?

The OL uses the default style in the stylesheet for that document type (a log book document). In the stylesheet, the default OL is set up as:

Code: Select all

/* DEFAULT NUMBERED LIST */
/* Numbered 1), 2), 3), etc., numbers right-aligned,  text LHS 1 cm in from page margin */
/* In order to right align the nos., need them in a defined-width element, which means floating them */
/* Can then set li text position independently with p margin-left */
ol {
    margin-left: 0cm; /* Zero ol margin as will set margins on p elements within the ol */
    margin-bottom: 18pt; /* Bottom margin for list as a whole (somehow only applies to the parent list of a nested list) */ }
ol li {
    list-style-type: none;
    mc-auto-number-format: 'O:{n+})';
    mc-auto-number-position: float-left;
    mc-auto-number-class: olNumClass; }
ol p { margin-left: 1cm; } /* Left margin for li text, from page body left (or other container if applicable), ignoring the li nos. as they are floating */
span.olNumClass {
    width: 0.8cm; /* Sets RHS position of li number; must be less than p margin-left val or will bump 1st line of li text to right */
    text-align: right; }
ol > li:first-child { mc-auto-number-format: 'O:{n=1})'; } /* Resets numbering at start of each list */
ol li p ~ p { margin-top: 6pt; } /* Smaller top margin for additional paras within (under) a main list item */
Hoping someone can help.

Regards,
Bruce
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Problem setting OL start number using List Actions button

Post by NorthEast »

It doesn't work because you're not using the standard list numbering. You've set up your list item to hide the standard list number (list-style-type: none;) and use and use an auto-number instead.

You've set up your auto-number to reset the numbering on the first item on each list:

Code: Select all

ol > li:first-child { mc-auto-number-format: 'O:{n=1})'; } /* Resets numbering at start of each list */
So if you have a separate list and want to continue the numbering, then you need to have a new style that will override that. For example, you might have a li.continue style that uses the format 'O:{n+})'
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

Re: Problem setting OL start number using List Actions button

Post by bwofficer »

Thanks.

I don't want to continue the numbering from a previous list, though. I want to set the list to start at an arbitrary number, defined on a list by list basis. Is there a way to do that, without having to lose the custom formatting of the list item numbers?
bwofficer
Propeller Head
Posts: 60
Joined: Tue May 12, 2020 2:16 am

Re: Problem setting OL start number using List Actions button

Post by bwofficer »

I think I've sussed how to override the OL list start number mc-auto-number on a list by list basis.

Using the XML structure bar, I selected the first LI in the OL for which I want to override the start number.

Then switched to the Local Style Properties tab of the Formatting panel, set it to Show All Properties, scrolled down to mc-auto-number-format and typed O:{n=6)} to the right of it.

After hitting enter, I clicked back into the editor and refreshed the topic. Lo and behold, that particular list now begins at 6) without affecting any other lists that use the same OL style.
Post Reply