Documentation examples
Section Title goes here This Section covers something of interest to a limited number of people and shows a 1st level section
Example Itemized List Here is an example of an itemized list A list title is completely optional Item you don't care about Perhaps you'd like a sub-list Oooh, 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 title First item Second item first indented item second indented item Third item
Example variable list One of my favorite list types for formating items with definitions is called a variablelist. Here is an example with an embedded variablelist. KirkCaptain CrewMembers ScottyEngineering McCoyDoctor SpockScience Officer
Example figure with embedded graphic Here is how you embed a graphic.
Example figure
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 table Of course all good documents need tables. Here's how you build a basic table. Example Table Title 1st Column Heading 2nd Column Heading 3rd Column Heading 4th Column Heading Yes Red Green Blue Custom (Amber) MAIN_Junk More_Junk merged cells horizontal cell_stuff Merge cells vertical filler merge cells both ways filler 2 How about we put a list in the table cell item 1 item 2 item 2 Another Cell Yet Another Cell Finally the last cell This Row Has background color Eenie Meenie Meinie Entry with background color
Example of crossreferences and footnotes To 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 input When 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 text Sometimes in text you need special characters. These can be provided using their UNICODE values such as ≠ (&#8800), Ω (&#x2126), 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 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: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 breaks Line 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 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:A page break Between two paragraphs]]> 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. 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 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: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 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 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.