Styling the chapter header

The next step is to adapt the style of the chapter title. The style of the chapter title is defined by the pre-defined block-style header2.
However, as we want this design only to be used for print-output, we have to create a variant of the header2 style:
  1. Select the header2 style from the block-styles list and click the "Create Variant" button.
  2. Enter a variant name, e.g. "print_variant" and click "Okay":

Figure 1.13.5. Creating a header2 variant

This creates a new style with the same style-ID as the selected style (header2), but with the variant name print_variant. The variant is not used until we set it in a given output configuration. Therefore, open the dialog of the "pdf" output configuration (see Section 1.8.2, “Output configurations”) and select "print_variant" from the "Style variant" list:

Figure 1.13.6. Selecting the preferred style variant

Click "Okay" to save the changed output configuration.
Initially, the created variant-style is a copy of the style it was created from. However, we can now adapt the variant style without affecting the original style. Therefore, open the CSS editor for the header2 block-style with variant name print_variant and set the font color #FFFFFF (white) and the background-color #0065B0 (blue), as shown in the following screenshot:

Figure 1.13.7. header2 colors

To have a blue border around the chapter title, we also set a top-, bottom- and right-padding of 16pt. Furthermore, left to the chapter title we want the background-color to start at the edge of the page. Assuming that the chapter title is always printed on an odd page, this means the blue background-color has to start 3cm left from the chapter title (as we have defined a inner page-margin of 3cm). This can be achieved by setting a left-padding of 3cm. and a left-margin of 0cm.

Figure 1.13.8. header2 padding and margin

Now, when you create a print-preview of a publication, the chapter header should be similar to following:

Figure 1.13.9. Chapter title preview

If the header is not rendered with the header2 style-variant, assure that you have selected the correct output configuration where the variant print_variant has been set as style-variant. Furthermore the publication where the section to be previewed is on the chapter-level needs to be selected in the preview bar:

Figure 1.13.10. Selecting the publication to be previewed