I am successfully using a similar method to the original poster
ghillerson, utilizing the CSS
counter,
counter-reset, and
counter-increment properties, together with the
::before pseudo-selector.
What was needed:
• the first column in each row of a table contains a sequential row number.
• The numbering system should be 1.0, 1.1, 1.2, 2.0, 2.1 etc.
• The row number must be generated automatically.
• Some of the rows are conditional, so the automatic numbering must take into account that any given row might be missing in a specific output document.
The present solution, is to add to the CSS stylesheet:
Added to body{} (to initialized the numbering):
Code: Select all
body {
…
counter-reset: section;
counter-reset: subsection;
}
Added the following CSS selectors:
Code: Select all
p.TableRowSectionNum::before {
counter-reset: subsection;
counter-increment: section;
content: counter(section) " ";
}
p.TableRowSubSectionNum::before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) " ";
}
To use this method in Flare:
- 1. Place an empty paragraph in the cell where you want the number (i.e., with the cursor in the empty table cell, press <Enter>).
2. Select the <p> in the side bar.
3. Style the <p> using the Ribbon > Home tab > Styles area > Style drop-down; select either:
This method works well, with the following caveats:
- A. I originally tried using content: counter(section) "." counter(subsection) " "; in p.TableRowSectionNum to display the section as 1.0, 2.0, etc. For some reason, when the section number incremented, I couldn’t get the p.TableRowSectionNum to display the section as 1.0, 2.0, etc.; it displayed 1.1 instead of 1.0. I don't have the time right now to figure that out, so currently the display when the section number is incremented does not have the trailing zero: 1, 1.1, 1.2, 2, 2.1, etc.
B. To properly increment conditional rows according to this system, no table row containing p.TableRowSectionNum can be excluded from the table by a condition. That would cause the section digit not to be incremented and the subsection digit not to be zeroed. Therefore, cannot have a condition that might be excluded from the output on a row containing p.TableRowSectionNum.
I hope that this helps someone,
Moshe
You do not have the required permissions to view the files attached to this post.