OpenPOWER Library

 2.1.10. Examples of OpenPOWER Foundation Docbook extensions

The OpenPOWER Foundation Maven Plugin supports a number of extensions that are not pure Docbook. These are:

 Setting text color explicitly

Text color can be controlled using <phrase role="color:color_name"> tag where color_name contains the color setting. For example, this text:

<para role="color:red">A red sentence contains a <phrase role="color:blue">blue</phrase> word.</para>

produces this sentence:

A red sentence contains a blue word.

Valid colors include either a keyword color name or a numerical RGB specification. Keyword names are common with the HTML 4 specificiation: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. Additionally, RGB values can be #nnnnnn where nnnnnn is a hexidecimal color value or rgb(n1, n2, n3) where n1, n2, and n3 are integers 0-255.

This tag has also been implemented on the following tags: <thead>, <tbody>, and <tfoot>.

[Warning]Warning

This parameter should only be used for tags listed above.

 Inserting line breaks

Line breaks can be introduced using <?linebreak?> tags. For example, this text:

<para>A line break <?linebreak?> in the middle of text</para>

produces this sentence:

A line break
in the middle of text

This tag becomes useful in table text spacing.

 Inserting page breaks

Page breaks can be introduced using <?hard-pagebreak?> tags. For example, this text:

<para>A page break</para> <?hard-pagebreak?> <para>Between two paragraphs</para>

produces this output:

A page break

Between two paragraphs

This tag becomes useful in placing tables on page. Placing this statement before a large table may prevent it from spanning a page.

[Warning]Warning

Because the XSL template behind the Processing Instruction generates a

<fo:block break-after='page'/>

in the book FO output, this instruction should be used in the outer most blocks of a section to work effectively. Use inside lists and other structural components may result in the text after the break being dropped. User beware!.

 Varying the font size

Font sizes can also be set using the <phrase role="font-size:size"> tag where size contains a size value such as "6pt" or "50%" or "1.5em".

For example, a paragraph can be made to be 6 point as follows:

<para>A sentence that contains some <phrase role="font-size:6pt">6pt font</phrase>, 
<phrase role="font-size:50%">50% font</phrase>, and 
<phrase role="font-size:1.5em">1.5em font</phrase> in it.</para>

produces this output:

A sentence that contains some 6pt font, 50% font, and 1.5em font in it.

This tag has also been implemented on the following tags: <para>, <thead>, <tbody>, and <tfoot>.

[Warning]Warning

This parameter should only be used for tags listed above.

 Using additional symbols

If you find that the Arimo and Cousine fonts do not contain the special symbol you need for your document, you may use the additional symbol font provided for document (STIX Two Math). Due to an unimplemented feature in the Apach FO Processor, selection of this font needs to be explicitly performed using the <symbol role="symbolfont"> wrapper around your symbol value.

For example, the symbol coding of

&#x2A01;

should produce a circle with a cross in here "⨁", but instead creates a "Glyph...not available in font 'Arimo'" error on document build and the PDF renders as a "#".

Re-coding this to use

<symbol role="symbolfont">&#x2A01;</symbol>

produces the correct symbole here "".

If this still does not provide the symbol you expected, double check the code and the font maps found at http://www.stixfonts.org/charactertable.html.


loading table of contents...