Chapter 1. DIG DocBook reference

Table of Contents

Elements
Attributes

Elements

Below is a non-exhaustive list of DocBook elements used in Evergreen documentation. Authors may use other elements but are encouraged to draw from this list first. Each term links to the authoritative DocBook 5 reference pages at http://www.docbook.org/tdg5/en/html/part2.html.

alt

Metadata describing an element, usually for accessibility. For example, each mediaobject may contain an alt element with a generic description of the image content.

application

The name of a software program or application such as Evergreen. Currently not formatted, but consistent use would allow for future batch formatting (e.g. italicize content of all application tags).

book

The top level element for Evergreen documentation, appears only in the file root.xml

chapter

A subdivision of a part, further divided into sections. In Evergreen documentation each chapter is a separate xml file referenced by root.xml. Each chapter should have an xml:id. The xml:id is required for cross-referencing and stable links to published html files. If there is no xml:id the generated html files names may change as content is added or re-located.

code

An inline code fragment.

command

The name of an executable program or other software command. Use this instead of emphasis where applicable.

computeroutput

Computer generated output. Used with screen to differentiate output from input.

date

Wrapper for date info in any context. Format is YYYY-MM-DD

emphasis

Use to italicize regular text. Use with the ROLE attribute for bold text

 
<para>For <emphasis>italic</emphasis> and <emphasis role="bold">bold</emphasis> output.</para>
                       

                    

displays as

For italic and bold output.

errortext

An error message.

example

An example with a title.

figure

Wrapper for a mediaobject that has a title and appears in list of figures (in the book's front matter). Content in figure and informalfigure is not split across PDF page breaks.

filename

Specify a name of a file or directory. See docbook entrey for class options.

formalpara

A titled paragraph. The following

 
<formalpara>
    <title>Paragraph title</title>
    <para>Paragraph body...</para>  
</formalpara>                       
                        
                    

displays as

Paragraph title.  Paragraph body...

function

The name of a function or subroutine, as in a programming language.

glossary

Wrapper for a glossary. Must contain title element (to hide the title in published output use an empty <title/> tag).

glossentry

Wrapper for each glossary entry. Should always have an xml:id for cross referencing. Entries are sorted alphabetically in published output, regardless of order in xml source document (this is optional and is set with stylesheet parameters). Full glossentry markup including child elements is shown below:

  
<glossentry xml:id="guisubmenu">
    <glossterm>guisubmenu</glossterm>
    <glossdef>
        <para>A staff client submenu. Used primarily when a submenu is part
        of a <markup>menuchoice</markup> sequence.  Not italicized.</para> 
        <glossseealso otherterm="guimenu"/>
    </glossdef>
</glossentry>                        
                        
                    
glosssee

A "see" link that points from one glossentry to another. Always has an otherterm attribute that corresponds to the xml:id of the referenced term.

glossseealso

A "see also" link that points from one glossentry to another. Always has an otherterm attribute corresponds to the xml:id of the referenced term.

glossterm

Wrapper for the term in a glossentry.

guibutton

A button in the staff client. Currently formatted with italics, though this can be changed in the stylesheets.

 
<para>Click <guibutton>Modify Copies</guibutton> to save your changes</para>                       

                        

displays as

Click Modify Copies to save your changes

guilabel

Use for labels and titles in the staff client. Where applicable guimenu, guimenuitem, and guibutton are preferred. HTML is formatted in italics, PDF is not formatted.

guimenu

Use for the names of staff client menus; formatted in italics.

guimenuitem

An option in a staff client menu or submenu; formatted in italics.

guisubmenu

A staff client submenu. Used when a submenu is part of a menuchoice sequence. Not italicized.

imagedata

Contained by imageobject, its attributes determine sizing, scaling, alignment, and source file. See Chapter 2, Image Formatting for more on Sitka image formatting.

imageobject

Contained by mediaobject and a wrapper for imagedata. See Chapter 2, Image Formatting for more on image formatting in The Book of Evergreen.

info

A wrapper for metadata about an element, including title.

informalexample

An example with no title.

informalfigure

A wrapper for a mediaobject and optional associated text. Stylesheet customizations ensure the contents of an informfigure are kept together during PDF pagination. The step in the following example will not split across a page break:

     
<step>
    <informalfigure>
        <para>STEP TEXT GOES HERE</para>  
        <mediaobject>
            <alt>OPTIONAL DESCRIPTION OF IMAGE</alt>
            <imageobject>
                <imagedata  scalefit="0" fileref="media/FILENAME_HERE.png"/>
            </imageobject>
        </mediaobject>
    </informalfigure>
</step>
        
                        
itemizedlist

A bulleted list with an optional title.

keycap

The label on a keyboard button; formatted in bold (eg Press F5).

keycap

For a combination of two or more keystrokes, wrap keycap elements in a keycombo. Format is bold with a + between keystrokes.

 
<para>Open a new tab with
    <keycombo>
        <keycap>Ctrl</keycap>
        <keycap>T</keycap>
    </keycombo>
</para>                        

                        

displays as

Open a new tab with Ctrl+T

link

For external links. Must have an xlink:href attribute with the destination URL. In PDF output the full URL is printed in brackts after the link text.

listitem

Wrapper for individual entries on an itemizedlist or orderedlist.

mediaobject

A wrapper for imageobjects. May be wrapped in an informalfigure to keep image and text together across page breaks. See Chapter 2, Image Formatting for more on image formatting.

menuchoice

Use to describe a menu selection. Usually contains guimenu and guimenitiem elements (may also contain guisubmenu). Output displays an arrow between each child element.

 
    <para>To clear the staff client cache go to
       <menuchoice>
           <guimenu>Admin</guimenu>  
           <guisubmenu>For developers</guisubmenu>
           <guisubmenuitem>Clear Cache</guisubmenuitem>
       </menuchoice>
    </para>
    
                            

displays as

To clear the staff client cache go to AdminFor developersClear Cache

option

Specify an option for a software command. Use this instead of emphasis where applicable.

orderedlist

A numbered list with an optional title.

para

A paragraph; a required wrapper for text in most contexts.

part

A subdivision of a book. Used only in root.xml; each part should have a title and xml:id.

procedure

A multi-step process consisting of two or more steps. Applies to most converted Sitka docs.

See Also step.

programlisting

When used with CDATA, text in a programlisting is published exactly as it appears in the xml file (including line breaks and white space). Formatted as a block with a shaded background, used only for coding examples (see /style/style_glossary.xml for syntax example).

prompt

A character or string indicating the start of an input field in a computer display. Used with screen to indicate a prompt for user input.

screen

Text that a user sees or might see on a computer screen

section

A titled subdivision of a chapter, only required if a chapter has two or more sections. Sections appear in TOC and have their own pages in HTML output (use simplesect to exclude from TOC). The xml:id attribute is optional and can be applied ad hoc when linking to a section.

The section element can be nested to create subsections. Here are some examples used in The Book of Evergreen:

  • section -> section (for a section and subsection, both appearing in TOC)

  • section -> simplesect (for a section and subsection, w/ only the top level in the TOC)

  • section -> section -> simplesect (for a section, subsection, and sub-subsection, with the top 2 in the TOC))

simplesect

A subdivision of a section that does not appear in the TOC. A simplesect is terminal, i.e. cannot be further subdivided with section or simplesect elements.

step

Component part of a procedure. Steps are auto-numbered and may contain text, figures, examples, etc. The xml:id attribute is optional and only required if linking to a particular step. To keep step content together during pagination (eg text w/ associated image), use informalfigure.

systemitem

Indicates various system related resources and items. See the Docbook entry for classification possibilities. Use this in place of emphasis where applicable.

tip

Enclose tip text and images in this element for consistent formatting. Display options are set with CSS and XSL stylesheets and include custom tip text, icons, formatting, etc.

 
<tip>
    <para>Tip text goes here</para>
</tip>                        

                    

displays as

Tip

Tip text goes here

title

Sets the title for the element which contains it. Required in chapters and sections.

userinput

Data entered by the user. Used with screen to differentiate input from output.

varname

The name of a variable. Use this instead of emphasis where applicable.

xref

A cross reference to another part of the document (use link for external links). The destination is set with the linkend attribute, which matches the xml:id of the destination element. Link text is auto-generated.

oXygen returns a validation error if the link destination is in another xml file; this is resolved when the files are assembled for publication and can be ignored.

Documentation for Evergreen version 1.6
Copyright © 2010, Evergreen Community