I really don't know why everything that should be so simple becomes a battle that really is starting to get on my nerves.
I looked up autonumbering and it seemed straightforward - you just plug in the variables and it works. For example, using "Figure {chapnum}-{n+}:" should show figure 1-1, 1-2, 1-3, 2-1, 2-2, 3-1, etc. But no, it has to screw up and keep {chapnum} at 1 throughout my outgoing PDF, even though the "autonumbers" tab Chapter Number section says "continue from previous" and I have checked "Start a new chapter document" set to "continue from previous" also.
So I threw that idea overboard and though "hey let's just use Figure X instead of Figure X-Y, using a global variable", and I tried using both {n+} and {Gn+}. Both start at 1, and are reset to 1 at each chapter start!
I mean... Whiskey, Tango, Foxtrot, over? Anyone have a clue why Flare is p*ssing me off so much?
In the meantime, I removed all the "start a new chapter" checkmarks and the numbering using {Gn+} works - thank the gods I'm not actually using any other chapter numbering at the moment!
Auto-Numbering for figures using {Gn+} or {n+} fails.
-
Eric Lachance
- Sr. Propeller Head
- Posts: 127
- Joined: Thu May 13, 2010 11:51 am
- Location: Montreal, Quebec, Canada
- Contact:
Re: Auto-Numbering for figures using {Gn+} or {n+} fails.
Did you also give the variable an ID? For instance, the auto-number format for my figures is:Eric Lachance wrote:So I threw that idea overboard and though "hey let's just use Figure X instead of Figure X-Y, using a global variable", and I tried using both {n+} and {Gn+}. Both start at 1, and are reset to 1 at each chapter start!
Code: Select all
p.captionFig
{
margin-bottom: 12pt;
page-break-before: avoid;
mc-auto-number-format: 'GF:Figure {n+}: ';
font-size: 9pt;
margin-top: 3pt;
}If you don't use the "G" then it'll reset to 1 every time you use the sequence, and if you don't give it an ID, then it doesn't realize that it's the same sequence. The class name (p.captionFig) isn't what tells it that it's part of the same sequence -- the ID (in this case, F) is what identifies it as the same sequence. The reason why it does that is that you might want to have a p.captionFigCntr that centers the caption and a p.captionFigRight that aligns the caption to the right. So you have two different classes but they both have the same mc-auto-number-format, so the numbers will be sequential, regardless of which paragraph class you use.
Long story short, I think you were leaving off the ID character in your format (and the G for global counter). Just make sure your ID isn't a G or a C, since those are the characters reserved for indicating a global counter and a chapter counter, respectively. (Although that's an assumption on my part that you shouldn't use those characters for the ID, but it seems logical.) So you could have 24 different formatting sequences in your project (26 minus 2 reserved characters).
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Eric Lachance
- Sr. Propeller Head
- Posts: 127
- Joined: Thu May 13, 2010 11:51 am
- Location: Montreal, Quebec, Canada
- Contact:
Re: Auto-Numbering for figures using {Gn+} or {n+} fails.
Hmn .
That didn't seem to work. I just added GF: at the beginning:
And it didn't work after putting back the new chapter checkmark.
Here's the HTML (perhaps putting this inside a <span> which is inside a <p> causes this? I hope not!)
That didn't seem to work. I just added GF: at the beginning:
Code: Select all
p.screenshot span
{
mc-auto-number-format: 'GF:Figure {n+} : ';
}Here's the HTML (perhaps putting this inside a <span> which is inside a <p> causes this? I hope not!)
Code: Select all
<p class="screenshot">
<img src="Resources/Images/Screenshots/Screen_Part_Printing_ChooseProject.png" />
<br /><span>Choose a project file from your existing projects.</span>
</p>Re: Auto-Numbering for figures using {Gn+} or {n+} fails.
Apparently it doesn't like anything between the parent tag and the start of the auto-number tag. If you remove the image and the soft line break then it'll work. Try putting the auto-number style into its own paragraph. I have a p.screenshots and a p.captionFig in my stylesheet. My normal paragraph tag has a margin-bottom of 12pt but the p.screenshots class has a margin-bottom of 0, so the p.screenshots is the container tag for the image and it's followed by p.captionFig, which is the container tag for the auto-number format. The page-break-before:avoid on the p.captionFig keeps it from being separated from the screenshot in the preceding paragraph, but you could put the two paragraphs in a div class with page-break-inside set to avoid, if you prefer.
So my topic code may look something like:
Note that the Figure 1 shown above is a temporary placeholder in the authoring environment -- when the output is built, the appropriate figure number is inserted.
So my topic code may look something like:
Code: Select all
<p class="screenshots">
<img src="../../Resources/Images/cables.png" title="Bottom (left) and Top (right) View of Connector" />
</p>
<p class="captionFig" MadCap:autonum="Figure 1: ">Bottom (left) and Top (right) View of Connector</p>Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Eric Lachance
- Sr. Propeller Head
- Posts: 127
- Joined: Thu May 13, 2010 11:51 am
- Location: Montreal, Quebec, Canada
- Contact:
Re: Auto-Numbering for figures using {Gn+} or {n+} fails.
Thanks Lisa,
I'll report this as a bug I guess. In the meantime your code works, so I'll use that.

I'll report this as a bug I guess. In the meantime your code works, so I'll use that.
Re: Auto-Numbering for figures using {Gn+} or {n+} fails.
I'll have to play with this a bit today. I suspect this may be what's causing my autonumber format not to work correctly. MadCap has some samples I gave them a few days ago, but I haven't heard back yet.
Wayne
Wayne