Skip to main content
Known Participant
June 22, 2011
Question

how to get numbered subsections

  • June 22, 2011
  • 1 reply
  • 807 views

Hi,

I am using DITA-FMx to generate (successfully) PDFs from DITA sources.

The highest level of chapters is already numbered, but now the request is to have the subsection also numbered, something like this:

1.

1.1

1.2

1.3

2

2.1

2.2

3

3.1

3.2

Thanks for your help

This topic has been closed for replies.

1 reply

ScottPrentice
Inspiring
June 30, 2011

This can be done easily by modifying the paragraph format of the H2 headings in the template. Just add the necessary auto-numbering just like you would in unstructured FM. Just remember to make these changes to the Book application template not the Topic application template. Alternatively, you could make these changes to the component templates if you're using them.

...scott

AL24Author
Known Participant
August 17, 2011

Thanks Scott.

In the directory

C:\Program Files (x86)\Adobe\Adobe Technical Communication Suite 2.5\Adobe FrameMaker 9\Structure\xml\DITA-FMx_1.1\Book\component-templates

I modified the tpl-chapter.fm to get the subsections numbered.

I modified the paragraph format of Title1 as follows:

- checked the option Autonumber Format

- edited the relevant field with: <$chapnum>.<n+>

These changes are not taken into account when I generate my bookmap.

Is there anything else I should modify?

Thanks.

A.L.

ScottPrentice
Inspiring
August 17, 2011

Hi A.L. ...

I can't really tell you which file to modify since it all depends on how your system (in particular the ditafmx-bookbuild.ini) is set up.

You need to keep in mind the order in which the templates are applied in t he DITA-FMx book-build process. First the core Book template is applied to all generated FM files. This is the template associated with the structure application selected as the "Book" application in the Options dialog. You could make this para style modification in that template (and by default the style to modify is "title.1").

Next, if you've set up a book-build INI file to apply component templates, you could make this modification to the appropriate component template(s), but that'll depend on the map element that defines the component template applied. If you're wanting this change made to a bookmap "chapter" element, you'd make the change to the tpl~chapter.fm file. If it's an appendix, you'd need to make this change to the tpl~appendix.fm file.

The book-build INI file that's used for the book build processing will depend on you having set things up. Typically, you'd create this INI file in the same folder that the book is being built in, but if that doesn't exist, it will use the book-build INI file in the main DITA-FMx folder. The best way to see what's going on is to look at the console window after the book-build processing is complete. You'll see a line that tells you which book-build INI file is being used, and lines that say which (or if) a component template was applied to each file.

...scott