Heading auto-numbers WITHOUT using stylesheets

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

Heading auto-numbers WITHOUT using stylesheets

Postby jajathon on Mon Jan 23, 2023 7:45 am

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!
jajathon
Jr. Propeller Head
 
Posts: 1
Joined: Mon Jan 23, 2023 7:41 am

Re: Heading auto-numbers WITHOUT using stylesheets

Postby Nita Beck on Mon Jan 23, 2023 1:47 pm

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:

Code: Select all
h1.Chpt
{
   mc-auto-number-format: 'CH:Chapter {chapnum}. ';
}


But in your French stylesheet, you'll have:
Code: Select all
@import url('primary-language.css') ;

h1.Chpt
{
   mc-auto-number-format: 'CH:Chapitre {chapnum}. ';
}


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.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3597
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Heading auto-numbers WITHOUT using stylesheets

Postby doloremipsum on Tue Jan 24, 2023 4:56 pm

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 :)
in hoc foro dolorem ipsum amamus, consectimur, adipisci volumus.
doloremipsum
Sr. Propeller Head
 
Posts: 277
Joined: Mon Aug 26, 2019 2:11 pm


Return to Printed Documentation Targets

Who is online

Users browsing this forum: sparklyfirefly and 5 guests