Print and language style variations can be added to a parent style so that you can assign substitute attributes, such as a different font, for publishing a print output or for content localized in another language.

 

Each print and language variation is added with its own header under the parent style. For each parent style, you can create one print style and multiple language style variations, and one print style for each language variation. Print and language variations are automatically given names that cannot be changed. The print style is named "print" and each language variation uses the language name from the Add Language list.

 

Print Styles

Authors use print styles to create a different look in the printed document output than the onscreen output. Most typically, authors select another font and font size for print output and remove or change color attributes if they are printing the contents in black and white or grayscale. For example, you have a text style that formats white text on a dark blue background. For print output, you create a print style that retains the white text color from the current style but uses a gray background.

 

The document body style in the Standard style sheet includes a pre-defined print style that uses a different font. Since many other styles in the Standard style sheet inherit the font attributes of the document body style, the print output for all other styles (paragraphs, tables, lists, and so on) uses the font from the document body print style.

 

Note: In the Web Page Editor, you can switch between Player and Print views to view the style attributes for both deployments.

 

In addition to adding a print style to a parent style, you can add one print style to each language variation for a style. Each print style for a language is added with its own header.

 

Language Variations

All new styles are created as language neutral. This means that the same style is used for all languages. If you are localizing content for other languages, you may need to use another font to display the text correctly in the localized language. You can add one or more languages to each style and then apply separate formatting for each language variation. If you change the language property for a web page, the corresponding language variation for the style is detected and automatically applied. For example, you have a paragraph style that uses the Courier New, Courier, monospace font family with a red text color and 12 pixels of above and below spacing applied. You create a Japanese variation and apply a font more suited to Japanese; however, the language style still inherits the red text color and paragraph spacing as you did not change those attributes for the language variation.

 

The document body and heading styles in the Standard style sheet include pre-defined language variations for languages that need specific fonts. Each language variation uses a font family to correctly display the text.

 

Style Inheritance

When you create a print or language variation for a style, the Style Editor creates a copy of the parent style, applying the same attributes specifically set in the parent style and inheriting the same attributes from a default element style, the document body style, and the browser. Print and language variations for default element and document body styles pass their attributes to the variations in dependent styles. For example, you create print styles for the document body style and the default paragraph style. You specify a font for the document body print style and change the paragraph spacing for the default paragraph style. You then create a print style for a non-default paragraph style that applies italics only. The print style includes the directly applied italics, and inherits the font from the document body print style and the paragraph spacing from the default paragraph style.

 

Note: Use the Style Inspector to trace the source of the formatting for a print or language variation.

 

You do not need to specify a print or language style variation for every style. Styles with no separate print or language styles can inherit those settings from another style. If there is no print or language variation for a style, the browser applies formatting by first searching the document body style for a print or corresponding language variation, and then searching for a default style of the same element for a print or corresponding language variation, which overwrites the document body settings. Finally, attributes not specified in any print and language variations are inherited from the parent style itself or from the browser; for example, if there are no print styles set, or the print styles do not specify a separate font, the browser uses the font from the onscreen style.

 

If you add print and language variations to styles other than the document body style, an order of inheritance is followed.

If you only want to specify a different font for print and language variations, then you only need to create those variations for the document body style. Consider the following example: a style sheet contains a document body style with a Verdana 11 point font and a print style set to a Courier 12 point font. The style sheet also contains a non-default paragraph style formatted to use a 10 point font with one inch left and right indents. In the print output, text using the non-default paragraph style appears in the Courier font specified in the document body print style, but with the 10 point font size and one inch indents directly specified in the style.

 

ProcedureTo add a print style:

  1. Select the style or language variation of a style to which you want to add a print style.
     
  2. From the Style Editor - Styles toolbar, click Add Print Style Add Print Style.

ProcedureTo add a language variation:

  1. Select the style to which you want to add one or more languages.
     
  2. From the Style Editor - Styles toolbar, click Add Language Add Language.
     
  3. Select the language(s) you want to add.
     
  4. Click OK.

ProcedureTo format a print style or language variation:

  1. Select the print style or language variation that you want to format.
     
  2. Use the Style Editor toolbars to apply the desired formatting.

Table of Contents  Back

Add_Print_and_Language_Variantions