Documentation examplesSection Title goes hereThis Section covers something of interest to a limited number of people and shows a 1st level sectionExample Itemized List
Here is an example of an itemized listA list title is completely optional
Item you don't care aboutPerhaps you'd like a sub-listOooh, here's about another
Item you might care about
Item you do care about Example ordered list
All good documents need ordered lists.Another purely optional titleFirst itemSecond itemfirst indented item second indented itemThird itemExample figure with embedded graphic
Here is how you embed a graphic.Raw images such as the bitmap (bmp) file above may become blurry as they are scaled.
Scalable graphic formats like SVG (Scalable Vector Graphics) embed and scale the best.Example tableOf course all good documents need tables. Here's how you build a basic table.
Example Table Title1st Column Heading2nd Column Heading3rd Column Heading4th Column HeadingYesRedGreenBlueCustom (Amber)MAIN_JunkMore_Junkmerged cells horizontalcell_stuffMerge cells verticalfillermerge cells both waysfiller 2How about we put a list in the table cellitem 1item 2item 2Another CellYet Another CellFinally the last cell
Example of crossreferences and footnotesTo reference another section or table is pretty easy. For example: see for how tables look.Lists are shown in and if you need to make a footnote
The footnote text goes here and can reference something like for additional explanation.
For clarification that is easy. Of course you might want an additional reference to the footnote which can also be done easily.Lastly you probably want to mark text by making it italic text example or Bold Text Example.Example of code citations and user inputWhen showing user input, you want a nice sceen-looking layout, a prompt, monospace text, and a way to differentiate input from output. Here's an example:
$ echo "Hello world"
Hello world
$ Docbook also allows for formatting and display of common languages, allowing for whitespace
and line returns just as they are written. Here's a sample snippet of C code with line numbering enabled:
main()
{
printf("Hello world\n");
}]]>If code formatting is not quite what you need, simply displaying text "literally" may suffice as follows: This is my literal
text. It ignores whitespace.Example of special characters in textSometimes in text you need special characters. These can be provided using their UNICODE values such as ≠ (≠),
Ω (Ω), and ∆ (∆).
These can be "coded" using the form &#ddddd; where ddddd is
the up to five digit decimal representation of the character. The form &#xhhhh; where
hhhh is the up to 4 digit hexidecimal representation of the character.This formatting works well as long as the symbol to which you are referring is contained in the font set
used for the document -- Arimo for standard text and Cousine for monospace. If when building a document, you see a message like
"WARNING, Glyph...not available in font 'Arimo',"
see in for details on using the provided symbol fonts explicitly.Examples of OpenPOWER Foundation Docbook extensionsThe OpenPOWER Foundation Maven Plugin supports a number of extensions that are not pure Docbook. These are:Setting text color explicitlyText color can be controlled using <phrase role="color:color_name">
tag where color_name contains the color setting. For example, this
text:A red sentence contains a blue word.]]> 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>.This parameter should only be used for tags listed above.Inserting line breaksLine breaks can be introduced using <?linebreak?> tags. For example, this
text:A line break in the middle of text]]> produces this sentence:
A line break in the middle of textThis tag becomes useful in table text spacing.Inserting page breaksPage breaks can be introduced using <?hard-pagebreak?> tags. For example, this
text:A page breakBetween two paragraphs]]> produces this output:
A page breakBetween two paragraphsThis tag becomes useful in placing tables on page. Placing this statement before a large table may prevent it from spanning a page.Because the XSL template behind the Processing Instruction generates
a ]]> 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 sizeFont 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:A sentence that contains some 6pt font,
50% font, and
1.5em font in it.]]> 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>.This parameter should only be used for tags listed above.Using additional symbolsIf 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 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 ⨁]]> 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.