This section required and it is the key to your DOCX template. It defines the layout of your topic pages, the formatting of the topic headings, using Word styles defined in the template, and contains the "placeholder" variable that inserts the content from your project's topics when the DOCX file is generated with the template.
If you open one of the DOCX templates included with Help+Manual in Word you will find the Topics section page directly after the Table of Contents / Contents page. It will look something like this:
This section begins with up to nine heading paragraphs, formatted successively with Word's standard Heading 1 ... Heading 9 styles (Word allows a maximum of 9 heading levels). This is followed by a single special paragraph with a variable that inserts the content of your Help+Manual project topics in the template when you publish.
When you publish to DOCX with the template, Help+Manual locates the page in the template with the heading and topic content definitions. It then generates the topics in the DOCX document as follows:
1.Get the topic heading text without formatting from the current topic.
2.Find the matching topic heading level in the Topics section in the template.
3.Replace the variable in the heading with the topic heading text from the topic and update the heading numbering if necessary.
4.Insert the pre-formatted topic content from the project directly below the heading.
5.Proceed to the next topic.
Format heading paragraphs with Heading 1, Heading 2 etc.
The heading paragraphs are formatted in order with Word's Heading 1, Heading 2, Heading 3 etc. styles. The formatting of each heading is defined in the Word style definition in the template document. The topic headings are formatted entirely by the template. Only the plain text of the headings comes from the project. Any heading formatting used in the project is not used here.
Don't format the heading items manually. Always change the definitions of the standard Word Heading 1 ... Heading 9 styles to format these items.
Format the headings as list items if you want numbered topic headings
To provide heading numbering, each heading paragraph must be formatted as a list item. Each item must be set to the list level corresponding to its topic heading level. So the top item is Heading 1 and list level 1, the third item is Heading 3 and list level 3, and so on. The numbering formatting is defined in the Word list definition.
Variables for inserting the topic heading text in the headings
The body of each template heading paragraph contains the Help+Manual <%CHAPTER_HEADINGx%> variable matching the corresponding level and inserted in a Word comment field. So you enter <%CHAPTER_HEADING1%> on level 1, <%CHAPTER_HEADING4%> on level 4 and so on.
The topic text variable inserts the topic content
The content from your project's topics is inserted in the template by the <%TOPIC_TEXT%> variable, which must be inserted in a Word comment field. This item must be in a single paragraph following directly after the last heading variable. It only needs to be entered once. Help+Manual will then use it to insert your topic content under the appropriate heading.
Formatting of the topic text paragraph
Any left and right indents applied to the topic text paragraph will define the left and right margins for all the content inserted from your project. This allows you to indent the entire topic content on the page.
All other formatting of this paragraph is ignored – the formatting of your topic content is defined in your project.
All these items are normal Word components. Set them up as you would in a normal Word document. Enter Help+Manual variables anywhere you like, using Word comment fields to contain the variables.
Use Word's page number variables, not Help+Manual's!