Setting up autonumbering...and getting compile error

This forum is for all Flare issues related to styles, stylesheets and XML.

Setting up autonumbering...and getting compile error

Postby amatsumoto on Wed May 28, 2008 9:52 am

I'm trying to set up two styles that use autonumbering. The first style is li.Numbered1, which starts numbering as 1, and the second is li.Numbered which increments from the previous number.

First, is it correct that I set this up as a li subclass? Or should I set up up as a p subclass? I've tried it both ways, and have not had success with either.

Today I finally got the li.Numbered and li.Numbered1 styles to seem like they are working in the xml editor, but when I try to generate my WebHelp, I get the "Internal error: Object reference not set to an instance of an object" error. I am able to generate output to Word, though. The problem is related to something in my autonumber styles, because when I tag those paragraphs as something else I can generate WebHelp. When I created the autonumber styles I modified stylesheet settings for Block, List, and Autonumbering for these styles, but it seems as though you could have settings in those groups that might clash with each other. What are the parameters that need to be set..and with what values? I know how to set the autonumber {n=1} and {n+} part, but what about the rest?

Yesterday when I tried setting up the autonumbered styles as p subclasses, I couldn't get my p.Numbered style to increment (it numbered everything 0, even though it followed a p.Numbered1 tag) and I had an impossible time trying to get the auto-number-offset and autonumber-position params to work. It either wouldn't put an indent between the number and the text, or the number was so far to the left it was out of view, etc. I was able to generate WebHelp, though.

Abby
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby LTinker68 on Wed May 28, 2008 10:11 am

Are you doing a complex numbering scheme or just doing 1, 2, 3, etc.? If it's a simple numbering scheme, then just use the normal numbered list option. (Click the arrow next to the list icon in the toolbar then select Numbered or however it's worded -- don't have Flare running at the moment.) You really only need to use the auto-numbering feature if you're doing complex numbering schemes, like 1.1, 1.2, 1.2.1, etc.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Wed May 28, 2008 10:40 am

I had hoped I could get away with the simple numbering scheme, but it doesn't appear that I can. We have numbered steps that are sometimes separated by a tidbit of unnumbered, indented text (or sometimes a few indented bulleted sentences). A generic example is:

1. Select File > Save. The Save dialog appears.
2. Enter a filename.
3. Select the output type. The choices are:
* Option 1 saves to...
* Option 2 saves to...
* Option 3 saves to...
4. Click OK.

If I use the simple numbering scheme on the above text, #4 is really renumbered to 1 because the numbering scheme was interrupted by the bulleted paragraphs. I didn't find a way I could "continue" the numbering on paragraph #4 (as you can with Word), so I assumed numbering has to be set up more like how FrameMaker handles it. Also, this stylesheet will eventually be used on output to Frame.

Is there a way to tell the simple numbering scheme to continue? Otherwise. does anyone have tips on how to get my autonumber styles to work?

Thanks,
Abby
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby LTinker68 on Wed May 28, 2008 11:37 am

amatsumoto wrote:Is there a way to tell the simple numbering scheme to continue?

There are two methods.

First option is to click the arrow next to the list actions icon (it's to the right of the outdent icon -- don't ask me why it isn't right next to the main list icon). In the list actions popup menu, you can either click Continue Sequence or specify the start number of the second list (e.g., if the first list ends at 3, then set the start number for the second list to 4).

The second option is to not break the list at all. In your example, when you're on the third list item, click the list actions icon and select "Make Paragraph Item(s)". You'll see a <p> tag inserted inside the <li> tag. Enter the text for the third bullet item, then click the Enter key to insert another <p> tag inside that <li> tag. When you're ready to insert another list item, press the Enter key to get a blank <p> tag inside the <li> tag, then click the outdent icon to the left in the toolbar. The <p> tag will disappear and you'll get back to the main list with the numbering automatically picking up where the last list item left off.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Wed May 28, 2008 12:11 pm

Thanks Lisa! That's certainly easier than having to set up extra styles.

Abby
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Mon Jun 09, 2008 10:51 am

After trying to use simple lists and push the output to FrameMaker, I now see that we really do need to have a couple of styles for autonumbering. Simple lists get to Frame great; number 1's are still number 1's and numbers that follow behave as they should. Unfortunately, there are other (non-numbering) style issues that require us to apply a FrameMaker template to the book after it's generated, which then renumbers all but the first number 1 step that comes from Flare. The first numbered step in the document is 1, and every other number 1 step is a continued number from a previous section (so I have numbered steps in the book that start at 1 and go all the way through 100, for example).

I suppose I can do a cheesy fix for Frame by creating li_Numbered1 and li_Numbered style and not set any autonumbering for them. We would format the first step with the li_Numbered1 style and the steps that follow with li_Numbered. In Flare we would still have to apply the "Continue Sequence" when there are blocks of unnumbered (or bulleted) text between numbered steps (I never could get "Make Paragraph Items" to work for me). Once we get the output to Frame, we would have a Frame template li_Numbered1 style that restarts numbering. But this workaround of sorts seems inefficient to me. What I really want is to have autonumbering work in both Frame and Flare, so we don't have to force "continued sequence" numbers into our lists.

Is there anyone who has successfully set up a simple 1, 2, 3, autonumbered list that works in Flare and in Frame output? Just when I think I've got it looking/working great in Flare, when I generate output to WebHelp I get the error I reported when I first posted this message. This doesn't happen when I generate to Frame.

If there is anyone who has had success, what are your settings for Block, List, and AutoNumber? Did you modify anything for your ul style? Any other things to modify?

Thanks!
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Mon Jun 09, 2008 1:20 pm

To add a little more detail, the following is what the li.Numbered1 style looks like:
Code: Select all
li.Numbered1
{
   mc-auto-number-format: 'H:{n=1}.';
   mc-auto-number-offset: 20px;
   display: list-item;
   mc-auto-number-position: outside-head;
}


With this style, I get double numbers - both the simple list number and the autonumber, for example:

1. 1.Step blah, blah, blah.

The error I get when I generate WebHelp is caused by the mc-auto-number-position setting. So, how do I get rid of the simple list number display, and how to I get the autonumber style to properly align/indent without getting an error for WebHelp output?

Thanks
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby KevinDAmery on Mon Jun 09, 2008 2:16 pm

The reason you're getting a second number is HTML automatically applies a number whenever you define an ordered list. So just the fact that you have an LI tag will give you a number as long as its inside an OL tag. When you add the mc-auto-number-format, it adds that to the existing numbering rather than taking control over it.

I think you'll get better results if you either a) add your mc-auto-number-format code to a P style class and not bother with an OL tag or b) apply the mc-auto-number-format code to the OL tag instead of the LI tag.

HTH.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
KevinDAmery
Propellus Maximus
 
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Setting up autonumbering...and getting compile error

Postby LTinker68 on Mon Jun 09, 2008 2:37 pm

KevinDAmery wrote:b) apply the mc-auto-number-format code to the OL tag instead of the LI tag.

You might need to use a <ul> tag instead, or set the <ol> tag to being a block instead of a list. Otherwise you might still get the double numbers. But you'll have to play with that to see which works best (I don't have Flare running at the moment so I can't test it). And the XML Editor may not display it correctly, but the Preview window should show it correctly.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Tue Jun 10, 2008 11:37 am

Thanks for your help! I created p.Numbered1 and p.Numbered styles and I can generate WebHelp without an error. As was mentioned, it looks different in the xml editor (the numbers are almost out of view in the left margin of the editor panel).

I had tried creating p subclasses for the numbered list a couple of weeks ago, but abandoned them because I could never get the text to properly align under the first line of the numbered text. I'm still running into that problem, and also the paragraphs tend to indent however they want to. I've spent a lot time today fiddling with settings in hopes to get it to work. Here is what my style settings are:
Code: Select all
p.Numbered1
{
   display: block;
   text-indent: 10px;
   mc-auto-number-format: 'H:{n=1}.';
   mc-auto-number-position: outside-head;
   mc-auto-number-offset: 20px;
}

p.Numbered
{
   display: block;
   text-indent: 10px;
   mc-auto-number-format: 'H:{n+}.';
   mc-auto-number-position: outside-head;
   mc-auto-number-offset: 20px;
}

Here is what the WebHelp output looks like:

indent.gif

Surely there is something I can do to get everything to indent and line up correctly? What am I missing?

Thanks!
You do not have the required permissions to view the files attached to this post.
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby KevinDAmery on Tue Jun 10, 2008 11:54 am

Is that the entire CSS code for those styles, or are there others you left out of the picture? Specifically, are there any Margin or Padding values applied?

Also, if you look at the topic in a text editor, is there any style code inline?
Until next time....
Image
Kevin Amery
Certified MAD for Flare
KevinDAmery
Propellus Maximus
 
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Tue Jun 10, 2008 12:43 pm

There are margin settings from the p class, other than that, I've tried to keep the settings as simple as possible.
Code: Select all
p
{
   font-family: sans-serif;
   margin-right: 0px;
   margin-left: 0px;
   margin-top: 6pt;
   margin-bottom: 6pt;
   font-size: 10pt;
   display: block;
}

I looked at the file in Notepad, but it looks pretty clean. Aside from bold, I don't see any other styles within the paragraphs. Here is what the formatting looks like for the little clip I included in the previous post:

<p MadCap:conditions="" class="Numbered1" MadCap:autonum="1.">Expand the Select Additional Files category of the Select Input Files dialog.</p>
<p MadCap:conditions="" class="Numbered" MadCap:autonum="2.">Click the xxxxx button to make the Data field active.
</p>
<p MadCap:conditions="" class="Numbered" MadCap:autonum="3.">Select one or more ancillary files that you already opened from the Select Input Files dialog, or click the <b>Open File</b> button and select new files. The Data field lists the ancillary data files you added.
</p>
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO

Re: Setting up autonumbering...and getting compile error

Postby LTinker68 on Tue Jun 10, 2008 2:18 pm

amatsumoto wrote:... I could never get the text to properly align under the first line of the numbered text. I'm still running into that problem, and also the paragraphs tend to indent however they want to.

See this post --> http://forums.madcapsoftware.com/viewtopic.php?f=6&t=6167&p=33407#p33407. I think you need to adjust your margin-left and offset values.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
LTinker68
Master Propellus Maximus
 
Posts: 7245
Joined: Thu Feb 16, 2006 9:38 pm

Re: Setting up autonumbering...and getting compile error

Postby amatsumoto on Wed Jun 11, 2008 10:00 am

Yay, it's working! After reading the older post I realized my mistake was trying to set the Block text-indent instead of the Box margin-left. I had tried margin-left previously, but my px value was too low and it didn't indent at all, so then I gave up on it. 60 px was a good margin-left, and I adjusted the mc-autonumber-offset accordingly.

Thanks so much for your help!
Abby
amatsumoto
Sr. Propeller Head
 
Posts: 121
Joined: Tue Apr 29, 2008 9:20 am
Location: Boulder, CO


Return to Styles, Stylesheets and XML

Who is online

Users browsing this forum: No registered users and 8 guests