Autonumbering (yet again)

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
enricosavazzi
Propeller Head
Posts: 58
Joined: Wed Apr 09, 2008 2:10 am

Autonumbering (yet again)

Post by enricosavazzi »

I searched the forums and tried several of the solutions proposed there (as well as the Flare documentation), to no avail.
What I want to do is autonumber the heading of different topics to get the following:

Chapter 1. H1 style of first topic
1.1. H2 of following topic
1.2. H2 of following topic
1.2.1. H3 of following topic
Chapter 2. H1 of following topic
2.1 H2 of following topic

The following is from my stylesheet:

H1{mc-auto-number-format: 'GH:Chapter {n+}.{ =0}{ =0}{ =0}{ =0} ';}
H2{mc-auto-number-format: 'GH:{n}.{n+}.{ =0}{ =0}{ =0} '}
H3{mc-auto-number-format: 'GH:{n}.{n}.{n+}.{ =0}{ =0} ';}

All is well if the headings are all in the same topic, autonumbering works just fine. However, this is not what I want. Each heading is in a different topic. What I get in this case is:

Chapter 1.
0.1.
0.1.
0.0.1.
Chapter 1.
0.1.

Incidentally, taking away the G or putting it back seems to have no effect. Flare still does not continue autonumbering across topics.
It seems something substantial is missing from the documentation (well, we all do seem to agree that the program documentation is far from adequate), and that something must be done before autonumbering works across topics. Could it be the way of arranging the topics in a TOC? If so, how? Could it be something else?
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Autonumbering (yet again)

Post by forfear »

see attached. if its clear.
6-13-2008 11-20-08 PM.png

how about using H1 with the following autonumber setting (see attached)

Chapter {chapnum}.
6-13-2008 11-28-52 PM.png
You do not have the required permissions to view the files attached to this post.
Last edited by forfear on Fri Jun 13, 2008 8:33 am, edited 1 time in total.
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Autonumbering (yet again)

Post by KevinDAmery »

Hey, Enrico,

There are two things I would check to start off. First, where are you seeing the wrong numbering? In Flare, or in your built output? The numbering in Flare's XML editor doesn't take other topics into account, and neither does the Preview--this is because until you build the output, it doesn't know what order the topics are going to go in. I would recommend only checking the numbering in built output.

Second, I notice you have the word Chapter in your sequence. Are you adding these as chapters or sections using the check boxes in the TOC properties for a topic? If you are, I wouldn't use the GH numbering sequence: instead, I would use Chapnum or Secnum. Those variables will pick up on the chapters / sections and use those numbers accordingly.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
enricosavazzi
Propeller Head
Posts: 58
Joined: Wed Apr 09, 2008 2:10 am

Re: Autonumbering (yet again)

Post by enricosavazzi »

forfear:
Thanks, I can see that autonumbering now works correctly in the generated HTLM output. In the Flare editor, instead, autonumbering still is displayed incorrectly. Is this normal? (thanks to Kevin for answering this)

On a related note, I would like to autonumber figures and their xref's from 1 onward in the whole project. This seems to work in the autonumbering of figure captions, but the cross-references to the caption in the text instead count from 1 in each topic. So I get in the generated output, for instance, a "Figure 8" caption (which is correct) and a cross-reference to it in the same topic that says "See Figure 2" (which is the same way it is displayed in the Flare editor). I defined the following:

p.caption {mc-auto-number-format: 'GF:Figure {n+}: ';}
xref {mc-format: '{paranum}';}
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

I have the same issue. Would like to figure out why all my cross refs to figures still say figure 1 and Table 1 when I output to MyHTML.

any one else?
Flare 4.2
Certified Mad for Flare
Windows XP
forfear
Propellus Maximus
Posts: 766
Joined: Sat Feb 16, 2008 3:37 am
Location: Jungle Jingles

Re: Autonumbering (yet again)

Post by forfear »

McCarthy wrote:I have the same issue. Would like to figure out why all my cross refs to figures still say figure 1 and Table 1 when I output to MyHTML.

any one else?
You gotta delete the autonumbering field for those 'online' mediums.
Figure {n}
change to
Figure: XYZ
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

forfear wrote: You gotta delete the autonumbering field for those 'online' mediums.
Figure {n}
change to
Figure: XYZ
I don't understand though. What I have right now is F:Figure: {Gn+}. Deleting {Gn+} in the mc-autonumber-format deletes the autonumbering altogether. I don't see how that fixes it. Am I missing something?

Thanks,
Flare 4.2
Certified Mad for Flare
Windows XP
helen
Sr. Propeller Head
Posts: 276
Joined: Thu Oct 25, 2007 5:57 am
Location: Manchester, UK

Re: Autonumbering (yet again)

Post by helen »

There are two mediums, "print" and "non-print" - it sounds like you have autonumbering set in both, whereas you probably just want it in your print medium. If you open the style sheet in notepad or the internal text editor you can see them both by searching for "@media print" and "@media non-print" (without the quotes).

Try this - Go into the stylesheet in the Flare editor and select "Medium: non-print" from the drop down menu. Find your Cross Reference style and see what is in the autonumbering styles. If you don't want any autonumbering to be displayed for your MyHTML target, remove any autonumbering in the "Non-Print" medium. That should fix your problem without impacting on the autonumbering you have set up in the print medium. :)
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

helen wrote:There are two mediums, "print" and "non-print" - it sounds like you have autonumbering set in both, whereas you probably just want it in your print medium. If you open the style sheet in notepad or the internal text editor you can see them both by searching for "@media print" and "@media non-print" (without the quotes).

Try this - Go into the stylesheet in the Flare editor and select "Medium: non-print" from the drop down menu. Find your Cross Reference style and see what is in the autonumbering styles. If you don't want any autonumbering to be displayed for your MyHTML target, remove any autonumbering in the "Non-Print" medium. That should fix your problem without impacting on the autonumbering you have set up in the print medium. :)
Thanks for the reply. Unfortunately it is set in both because we want autonumbering of cross references to be displayed in online and print outputs. Clickable Figure and table number links make the most sense in online outputs anyway, since in print output there are page numbers to direct the user to those figures and tables in far away sections.

I tried what you said though. What is set in my cross-reference non-print medium is {paranumonly}. If I delete that, the cross reference to the caption is blank.

Not sure what to do.
Flare 4.2
Certified Mad for Flare
Windows XP
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Autonumbering (yet again)

Post by KevinDAmery »

In HTML output there isn't really a sequence for figures between topics, since readers don't have to go through the system in a linear fashion. (Yes, you have a table of contents that provides a sequence, but very few readers will actually follow it in that order.) As a result, when you use autonumbering in HTML it restarts at 1 in each new topic.

The normal convention in online output formats is not to number figures at all - instead, you just put a clickable link to the image and leave it at that. Numbered figures are essential in print, of course, since readers have to page through the document in order to find the figure in question, but online formats can be more dynamic than that.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

KevinDAmery wrote:In HTML output there isn't really a sequence for figures between topics, since readers don't have to go through the system in a linear fashion. (Yes, you have a table of contents that provides a sequence, but very few readers will actually follow it in that order.) As a result, when you use autonumbering in HTML it restarts at 1 in each new topic.
thanks kevin.

I understand what you're saying, but is there any reason why the autonumbering restarts in each new topic? is that an html thing or a flare thing? if it's a flare thing, it doesn't make any sense why it would restart like that. how would that be useful to anybody?
KevinDAmery wrote:The normal convention in online output formats is not to number figures at all - instead, you just put a clickable link to the image and leave it at that. Numbered figures are essential in print, of course, since readers have to page through the document in order to find the figure in question, but online formats can be more dynamic than that.
I understand what you're saying about figures in online formats not needing numbers, but then it's a question of the captions being in there for print. Would you normally condition those figure captions out? That seems like a lot of work.

Also, you said you 'put a clickable link to the image,' but I'm curious what your link says. Do you link to the file name, caption or something else?

Thanks for the answers and suggestions.
Flare 4.2
Certified Mad for Flare
Windows XP
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Autonumbering (yet again)

Post by KevinDAmery »

McCarthy wrote:
KevinDAmery wrote:In HTML output there isn't really a sequence for figures between topics, since readers don't have to go through the system in a linear fashion. (Yes, you have a table of contents that provides a sequence, but very few readers will actually follow it in that order.) As a result, when you use autonumbering in HTML it restarts at 1 in each new topic.
thanks kevin.

I understand what you're saying, but is there any reason why the autonumbering restarts in each new topic? is that an html thing or a flare thing? if it's a flare thing, it doesn't make any sense why it would restart like that. how would that be useful to anybody?
To the best of my knowledge it's an HTML thing. You could add code in to set the numbering to a specific number, but that would defeat the purpose of numbering things automatically.
KevinDAmery wrote:The normal convention in online output formats is not to number figures at all - instead, you just put a clickable link to the image and leave it at that. Numbered figures are essential in print, of course, since readers have to page through the document in order to find the figure in question, but online formats can be more dynamic than that.
I understand what you're saying about figures in online formats not needing numbers, but then it's a question of the captions being in there for print. Would you normally condition those figure captions out? That seems like a lot of work.

Also, you said you 'put a clickable link to the image,' but I'm curious what your link says. Do you link to the file name, caption or something else?

Thanks for the answers and suggestions.
To be honest, I don't reference images outside of the topic at all - instead, I include the image in any topic where it is relevant, the idea being that I don't want my readers to have to go somewhere else to answer their questions. There are, however, many cases where I don't want the image to be visible by default. What I do in those cases is add a toggler to show / hide the image. The text I use for the toggler is along the lines of "Click to view image" and I condition the toggler text to screen only. Having said that, my primary deliverable is online help, not print, so this approach may not be appropriate if you need a traditional manual or reference book.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Autonumbering (yet again)

Post by LTinker68 »

McCarthy wrote:I understand what you're saying about figures in online formats not needing numbers, but then it's a question of the captions being in there for print. Would you normally condition those figure captions out? That seems like a lot of work.
Here's a portion of my stylesheet. The first set of styles sets up how figure captions display in online output -- notice there is no auto-numbering involved. The second set of styles are inside the print media portion of the stylesheet, so they're the styles used for print output.

Code: Select all

p.captionFig
{
	font-size: 0.7em;
	font-weight: bold;
	margin-top: .4em;
	margin-bottom: 2.0em;
	text-align: center;
	color: #808080;
}
Example output -- The Main Configuration Screen

Code: Select all

@media print
{
	p.captionFig
	{
		font-weight: bold;
		margin-top: 4pt;
		margin-bottom: 18pt;
		text-align: center;
		color: #808080;
		page-break-before: avoid;
		mc-auto-number-format: 'GF:Figure {n+}: ';
		font-size: 12pt;
	}
}
Example output -- Figure 10: The Main Configuration Screen

Table caption numbering is set up the same way but with a different style name (p.captionTbl) with a slightly different auto-number format so that my figures and tables are numbered sequentially independent of each other.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

KevinDAmery wrote:To the best of my knowledge it's an HTML thing. You could add code in to set the numbering to a specific number, but that would defeat the purpose of numbering things automatically.

To be honest, I don't reference images outside of the topic at all - instead, I include the image in any topic where it is relevant, the idea being that I don't want my readers to have to go somewhere else to answer their questions. There are, however, many cases where I don't want the image to be visible by default. What I do in those cases is add a toggler to show / hide the image. The text I use for the toggler is along the lines of "Click to view image" and I condition the toggler text to screen only. Having said that, my primary deliverable is online help, not print, so this approach may not be appropriate if you need a traditional manual or reference book.
Re: the first part: Ugh :) but I'll try to confirm that it is an HTML thing with Support

what you're saying makes sense for online targets. I guess that answers the question I posted before regarding cross references to autonumbers in online output, so I'll leave it at that. Thanks.

I would like to say though that, keeping print in mind (multiple targets after all is what Flare's all about), we wouldn't want to include the same image with the same caption multiple times. especially not for a bunch of images multiple times in multiple sections. These are small things, but useful things to think about as far as usability is concerned. I think so anyway. Might be useful to start up a usability discussion.
Flare 4.2
Certified Mad for Flare
Windows XP
McCarthy
Propeller Head
Posts: 41
Joined: Fri Jul 11, 2008 3:41 am
Location: Prague, Czech Republic

Re: Autonumbering (yet again)

Post by McCarthy »

LTinker68 wrote: Here's a portion of my stylesheet. The first set of styles sets up how figure captions display in online output -- notice there is no auto-numbering involved. The second set of styles are inside the print media portion of the stylesheet, so they're the styles used for print output.

Code: Select all

p.captionFig
{
	font-size: 0.7em;
	font-weight: bold;
	margin-top: .4em;
	margin-bottom: 2.0em;
	text-align: center;
	color: #808080;
}
Example output -- The Main Configuration Screen

Code: Select all

@media print
{
	p.captionFig
	{
		font-weight: bold;
		margin-top: 4pt;
		margin-bottom: 18pt;
		text-align: center;
		color: #808080;
		page-break-before: avoid;
		mc-auto-number-format: 'GF:Figure {n+}: ';
		font-size: 12pt;
	}
}
Example output -- Figure 10: The Main Configuration Screen

Table caption numbering is set up the same way but with a different style name (p.captionTbl) with a slightly different auto-number format so that my figures and tables are numbered sequentially independent of each other.
Thanks lisa. that makes sense. I'll work with that for now.
Flare 4.2
Certified Mad for Flare
Windows XP
netwrk219
Propeller Head
Posts: 26
Joined: Mon Nov 28, 2016 8:58 am
Location: Fort Mill, SC

Re: Autonumbering (yet again)

Post by netwrk219 »

forfear wrote:see attached. if its clear.
6-13-2008 11-20-08 PM.png

how about using H1 with the following autonumber setting (see attached)

Chapter {chapnum}.
6-13-2008 11-28-52 PM.png
Hi,

I am having the same problem as the original poster, but in Flare 12. I tried to follow your example, but 12 looks quite a bit different now. Would you know how to get incremented autonumbering across topics in Flare 12? Or if there is already an answer out there I have not found, maybe provide a link?

Cheers!
Keith S.

“Most of us find our own voices only after we’ve sounded like a lot of other people.” –Neil Gaiman
Post Reply