Hi all,
I'm trying to implement a heading style with chapter numbers but without using stylesheets. We translate our docs into 10 languages so can't have the string 'Chapter [var]:' in our stylesheet ('Chapter' will have to be translated to eg FR 'Chapitre', etc, etc).
I figured this should be possible using the variable System.ChapterNumber, so have added this to main h1 titles throughout. However the number doesn't increment- every chapter is chapter 1. I've tried adding chapter breaks in the TOC, telling the TOC to increment auto-numbers, and even setting chapter numbers manually in the TOC, but this isn't working.
All the online help about this advises using an auto-numbering system through stylesheets, but we can't do that because of our localisation process. Any tips would be much appreciated!
Heading auto-numbers WITHOUT using stylesheets
-
- Senior Propellus Maximus
- Posts: 3612
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: Heading auto-numbers WITHOUT using stylesheets
Welcome to the forums! 
IMHO, you should still use stylesheets. I think setting up variables is too complex for this situation. And, as you say, variables aren't going to increment. MadCap designed its auto-numbers to serve that purpose.
A common practice in your situation is to have there be a primary-language stylesheet that uses English (or whatever your primary language is) and then have separate stylesheets, one for each language. Each of those stylesheets needs to link to and import from the primary-language stylesheet, and then you can switch out the auto-number labels in the language specific stylesheets.
For example, you might see this in your primary-language stylesheet:
But in your French stylesheet, you'll have:
Then, for your French output, have its target point to the French stylesheet rather than the primary-language stylesheet. All of the original CSS from the primary-language stylesheet will be read in and then the few settings overridden with the French bits.

IMHO, you should still use stylesheets. I think setting up variables is too complex for this situation. And, as you say, variables aren't going to increment. MadCap designed its auto-numbers to serve that purpose.
A common practice in your situation is to have there be a primary-language stylesheet that uses English (or whatever your primary language is) and then have separate stylesheets, one for each language. Each of those stylesheets needs to link to and import from the primary-language stylesheet, and then you can switch out the auto-number labels in the language specific stylesheets.
For example, you might see this in your primary-language stylesheet:
Code: Select all
h1.Chpt
{
mc-auto-number-format: 'CH:Chapter {chapnum}. ';
}
Code: Select all
@import url('primary-language.css') ;
h1.Chpt
{
mc-auto-number-format: 'CH:Chapitre {chapnum}. ';
}
Nita

Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
-
- Sr. Propeller Head
- Posts: 281
- Joined: Mon Aug 26, 2019 2:11 pm
Re: Heading auto-numbers WITHOUT using stylesheets
As a note, if you're using Lingo to do your translations it *will* present the strings in the stylesheet that need translation. I can confirm that this includes autonumbers.
But if you're not using Lingo, the easiest way to do it is probably Nita's suggestion
But if you're not using Lingo, the easiest way to do it is probably Nita's suggestion

in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.