Creating a snippet

You can create a snippet, which is a template that contains only the elements you want to reuse in other templates. You might create a header snippet or a footer snippet, for example. This task outlines creating a header snippet.

About this task

The product provides snippets in Publishing Document Builder and in the PUB_install_dir\snippets directory.

You can create a snippet for any sections of a document. This task provides an example header for you to use as one type of snippet.

Other snippets you might create:

Procedure

  1. From the Outline view, drag the master page into an element in the template editor.
  2. In the Master Page tab of the editor, add the Paragraph icon Paragraph element to the Header.
  3. In the paragraph, insert two Text icon Text elements.
  4. Double-click the first text element and enter Document Title: . Include a space after the text.
  5. Double-click the second text element and enter Section Title.
  6. Select the paragraph element to add formatting in the Properties view:
    1. Select the Border tab.
    2. Select the bottom border icon to apply formatting to a border that displays under the element.
    3. For the Margin, enter 10. This entry places the border line 10 pixels away from the text.
    4. For the Style, select single. This selection creates a single line below the paragraph element.
    5. For the Width, enter 1. This entry makes the border 1 pixel wide.
  7. Select the first text element to add formatting in the Properties view:
    1. Select the Font tab.
    2. Click the bold icon.
      The Set bold value window opens.
    3. Select true and click OK.
  8. Save the changes.

Example

View an example of a template and its output:
Template example:
Template example
Output example:
Output example