cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Section Numbering in Styler

JohnLaidlaw
10-Marble

Section Numbering in Styler

Hello,

 

I am creating a stylesheet for a customer whose style guidelines require a footer/graphic/table numbering system that looks like this:

 

3.05-5

 

The first digit is the chapter number, the second two the sect1 number, and the last the page/graphic/table number.

 

I can get the chapter and page/graphic/table numbers easily, using the defaults available in generated text. My problem is with the sect1 numbering - again, I can get the simple 1, 2, 3, etc., with no problem, but the requirement is for two digits, starting at 00, then incrementing by five for each new sect1 in a given chapter. This would give a series 00, 05, 10, 15 and so on.

 

The logic I've worked out is:

 

 

if sect1 < 3("0"+(((sect1)*5)-5)), else (((sect1)*5)-5)

 

 

My problem is that I don't know how to do this in generated text. Would it be in ACL, XPath or would Javascript be appropriate? Would it be something else entirely?

 

Any help greatly appreciated! Thank you.

 

John Laidlaw

1 ACCEPTED SOLUTION

Accepted Solutions

Sorry I missed the part about increments of five. You would need to edit the source and to be honest it would probably need experts to do it. Similar for table/figure numbering adjustments. The numbering stuff is buried deep in the code, if you edit the APP source for one of the contexts you will see what I'm talking about.

We do this sort of work here at GPSL, if you're interested, www.gpsl.co.

View solution in original post

4 REPLIES 4

The "Styler way" is to style up your divisions as appropriate, ...

GarethOakes_0-1658958490694.png

Resulting in ...

GarethOakes_1-1658958500352.png

 

Once the numbering is configured for the main body display, you then call that numbering into your footer using Generated Text. Insert -> Division Reference. Select the division to call in (first or last on page) and it will then display with correct number format (leading zeros).

Hi Gareth,

 

Many thanks for this. Is it possible to create a custom numbering system, though? The requirement is for increments of 5, so it would be 00, 05, 10, 15, etc. It also needs to be addressable for table and figure numbering, which I couldn't see how to do.

 

Cheers!

 

John Laidlaw

Sorry I missed the part about increments of five. You would need to edit the source and to be honest it would probably need experts to do it. Similar for table/figure numbering adjustments. The numbering stuff is buried deep in the code, if you edit the APP source for one of the contexts you will see what I'm talking about.

We do this sort of work here at GPSL, if you're interested, www.gpsl.co.

Not a worry at all, Gareth - I appreciate you taking the time. I'll have to go back to the customer to see what they want to do. If they're insistent about the increments of five, I will contact you.

 

Many thanks again!

Top Tags