Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to get numbered subsections

New Here ,
Jun 22, 2011 Jun 22, 2011

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

TOPICS
Structured
849
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 30, 2011 Jun 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2011 Aug 16, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 17, 2011 Aug 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 17, 2011 Aug 17, 2011

Thanks Scott.

The ditafmx-bookbuild.ini file that I am using correctly points to the

folder where the component templates are stored.

I need to make this change to a bookmap "chapter" element, and therefore I

modified the tpl~chapter.fm file. Now I applied the same change to the core

Book template (book_1.1.template.fm), but it still doesn't work.

I wonder if there is anything else I should do with the book_1.1.edd.mif.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 18, 2011 Aug 18, 2011
LATEST

The first thing to do is to check the console window to see if the tpl~chapter.fm template was actually applied to the component you're expecting. I'll assume it was since you're not seeing the results you want even when you modified the book template.

Next .. it may be that the templates are being applied properly, but your template modifications aren't having the effect you expect. After building the book, open the chapter component file, and check the para designer to see if your modifications are there or not. I'll suspect that they are. Assuming that they are it's just a matter of figuring out what formatting changes needed to be made to have the desired affect.

What you should do is tweak the styles in the generated FM file to see what you need to do to get the formatting to do what you want. Then you'll need to make those changes to the template.

Based on your description of what you want, I don't think that you'd need to modify the EDD, but that's possible. If you're just trying to get autonumbering on your "title.1" headings, that won't require EDD tweaks .. if you were applying formatting based on some attribute values or other context-based rules, then you would.

What you're trying to do is fairly standard unstructured FM paragraph styling. Get it to work in the FM binary files, then reverse those steps into the template.

...scott

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines