X-refs: Sensible numbering of tables and figures?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
TechOnTheBrain
Propeller Head
Posts: 17
Joined: Fri Dec 04, 2015 3:16 pm
Location: Bristol, UK
Contact:

X-refs: Sensible numbering of tables and figures?

Post by TechOnTheBrain »

Hi folks

This seems like a pretty standard thing, but I haven't found an answer by searching -- I hope you can help.

I want to use auto-numbered table/figure captions, and have them number sensibly in both print and web output (mainly HTML5). This is so that I can cross-reference in the text to say things like "as shown in Table 3-5" rather than saying "the table below" or "the table shown under such and such a heading/topic". As I say, standard stuff.

In print, I can number table and figures in simple sequence like "Table 1: Blah blah" or by chapter like 'Table 1-1: Blah blah". No problem, works fine.

In web outputs it doesn't make sense to include the chapter, so the plain form make most sense "Table 1: Blah blah". Seems easy, but...

I can't get numbering (and cross-references) to work sensibly throughout the HTML5 output. Every topic resets the numbering to start at 1. So if I have a topic with two tables in it (Table 1 and Table 2) and I want to reference a table in another topic, I have the daft situation where the text says "see Table 1" and links to the table in the other topic, but there is a different Table 1 on the page the user is currently reading. Guaranteed to cause confusion.

How do people manage this? I want to refer to specific table clearly and unambiguously, but Flare doesn't help much out of the box and I can't figure out how to customise it to work.
Eric Weston
Daniel Ferguson
Propeller Head
Posts: 77
Joined: Wed Jul 10, 2013 12:34 pm
Location: Salt Lake City
Contact:

Re: X-refs: Sensible numbering of tables and figures?

Post by Daniel Ferguson »

It sounds like you're missing the "Global" series label in the mc-auto-number-format for your HTML output. By default, Flare restarts autonumbering at every topic unless you specify otherwise in the stylesheet. Using a series label, you can instruct flare to restart autonumbering at the chapter level, or to not restart it at all. If I wanted the table caption numbers to restart at every chapter for PDF and not restart at all in my HTML output, I would put something like this in the stylesheet:

Default medium (for HTML)

Code: Select all

p.TableCaption
{
  mc-auto-number-format: 'GT: Table {n+}: ';
}
The key is the "G" to start the autonumber format. This G means Global, and instructs Flare to never restart the autonumbering for this style. Using this, all the tables in your entire target will be numbered sequentially. The numbering will not restart with every topic.

Print medium

Code: Select all

@media print
{
  p.TableCaption
  {
    mc-auto-number-format: 'CT: Table {chapnum}-{n+}: ';
  }
}
For print, this autonumber format resets at every Chapter break (that's what the "C" does). So you'll get Table 1-1, Table 1-2 in Chapter 1, and Table 2-1, Table 2-2 in Chapter 2, for example.

Does this help?
Daniel Ferguson
Certified Flare Trainer & Consultant
smartoutput.com
TechOnTheBrain
Propeller Head
Posts: 17
Joined: Fri Dec 04, 2015 3:16 pm
Location: Bristol, UK
Contact:

Re: X-refs: Sensible numbering of tables and figures?

Post by TechOnTheBrain »

Brilliant, thank you so much Daniel. Easy when you know how!

I probably should've found that myself, but sometimes one can't see the wood for the trees! I'm very grateful, thanks for taking the time to explain so clearly..
Eric Weston
limon_writer
Jr. Propeller Head
Posts: 1
Joined: Thu Sep 14, 2017 1:37 am

Re: X-refs: Sensible numbering of tables and figures?

Post by limon_writer »

Hello guys,

im new in this forum and the reason I signed up is exactly this topic.

I am trying to generate a global numbering for my styles p.TableCaption and p.FigureCaption (created this one by myself). I am struggling with the same issue as TechOnTheBrain though.

The numbering for the styles restarts in every Topic of my TOC. I set all the right chapter breaks throughout the topics in my books and set them to correct chapter numbers etc. (I know this only affects my Print Output, but I was desperate...)

I tried ↓↓↓this↓↓↓ already for both of the styles, but they still restart with every new topic. :?
Daniel Ferguson wrote:If I wanted the table caption numbers to restart at every chapter for PDF and not restart at all in my HTML output, I would put something like this in the stylesheet:

Default medium (for HTML)

Code: Select all

p.TableCaption
{
  mc-auto-number-format: 'GT: Table {n+}: ';
}
Anyone out here who can help me with this issue?

P.S: I attached some Screenshots
You do not have the required permissions to view the files attached to this post.
Post Reply