%FEDORA-ENTITIES-EN; ]> DocBook XML Tags XML tags XML tags Please read this chapter carefully. This chapter describes the tags used by the Docs Project. Some of the rules described are specific to the project. If these tags are used appropriately, document searches will provide meaningful results. These tags help search engines identify the information relevant to the search request. Another benefit is that all &PROJECT; documents will have a similar look and feel (however, they will have some differences depending upon the output format). XML general tag information Most tags in XML must have an opening and closing tag. A few tags, such as xref, have no content and close themselves. Additionally, proper XML conventions say that there must be a unique identifier for sections, chapters, figures, tables, and so on, so that they may be correctly identified, and cross referenced if needed. Although XML is capable of handling many document types, the format discussed here is the article format. This chapter only discusses tags used for documentation for the &PROJECT;, not all available DocBook XML tags. For the complete list, refer to .
Tags and Entities Caveats xml tags caveats It is very important that you remember the caveats in this section. Even though they are more strict than valid DocBook XML, these rules exist so that both the HTML and PDF outputs look proper. Do Not Use Trademark Entities Do not use the trademark entities trade, copy, or reg because they do not produce HTML output that works for all charsets. The HTML output produces by these entities are declared in the DTD and cannot be changed via the stylesheet. Instead, use the trademark tag and its associates classes as follows: trademarktrademark symbol after metrademark trademark class="registered"registered trademark symbol after metrademark trademark class="copyright"copyright symbol after metrademark Content inside para tags Do not use para tags around anything other than a simple paragraph. Doing so will create additional white space within the text itself in the PDF version. Specifically, do not use para tags around the following (or, to put this another way, do not embed the following within para tags): screen itemizedlist orderedlist variablelist table Content inside para tags within listitem tags Content inside para tags within listitem tags must start immediately after the beginning para tag to avoid extra white space in the PDF version. Content inside screen tags The content inside screen tags (screen and screen) must be flush left in the XML file; otherwise, the extraneous whitespace will appear in the HTML version.
<sgmltag>application</sgmltag> XML tags application An application is the name of a GUI software program. A command is the name of an executable (text) program or a software command. The application and application tags allow you to refer to an application or program. For example, the following XML: To view the Web in Linux, you can use applicationMozillaapplication or applicationlynxapplication if you only want a text-based browser. produces the following output: To view the Web in Linux, you can use Mozilla or lynx if you only want a text-based browser.
<sgmltag>chapter</sgmltag> XML tags chapter A DocBook book can be divided into chapters such as: <!--$Id: xml-tags.xml,v 1.5 2007/02/04 14:55:28 pfrields Exp $ --> <chapter id="ch-sample"> <title>Sample Chapter</title> <para>This is a sample chapter, showing you the XML tags used to create a chapter, sections, and subsections.</para> </chapter> The chapter can also be further divided into sections (section, section, sect3, etc.). Refer to for details.
<sgmltag>citetitle</sgmltag> XML tags citetitle The citetitle tag provides formatting for a specific references (title can be manually typed out or if already defined within your document set, given as an entityAn entity is a short hand way of referring to some predefined content, such as a title or name. It can be defined within the parent document or within a set of files that your DTD references for your specific documentation set. ). For example: citetitleIGcitetitle. The output looks like &IG; because IG is an entity.
<sgmltag>command</sgmltag> XML tags command An application is the name of a GUI software program. A command is the name of an executable (text) program or a software command. Any program that is a command line or text-based only tool is marked with command tags. If you have text that is a command, use the command and command tags such as: To change your keyboard after installation, become root and use the <command>redhat-config-keyboard</command> command, or you can type <command>setup</command> at the root prompt. The output: To change your keyboard after installation, become root and use the redhat-config-keyboard command, or you can type setup at the root prompt. Another example would be: <command>MAILNOVIOLATIONS</command> — If set to <command>true</command> this option tells Tripwire to email a report at a regular interval regardless of whether or not any violations have occured. The default value is <command>true</command>. with the output: MAILNOVIOLATIONS — If set to true this variable tells Tripwire to email a report at a regular interval regardless of whether or not any violations have occured. The default value is true. Note In this example, the option value (true) is defined with a <command> tag set. Because a option is a configuration file option (command line options which would use the <option> tag set), and because there is no configuration file option tag available to use, we are extending the <command> tag set to define options in a configuration file. Terms marked with command tags because there aren't exact tags for them: Options in configuration files such as Apache directives daemon names
<command>computeroutput</command> XML tags computeroutput To show computer output use the following tags: <computeroutput>Do you want to delete this file? y n</computeroutput> The output: Do you really want to delete this file? y n
<command>emphasis</command> XML tags emphasis To emphasis content, use the <emphasis> and </emphasis> tags. For example: This installation <emphasis>will remove all</emphasis> existing Linux partitions on <emphasis>all</emphasis> hard drives in your system; non-Linux partitions will not be removed. The output: This installation will remove all existing Linux partitions on all hard drives in your system; non-Linux partitions will not be removed.
<command>example</command> XML tags example The <example> and </example> tags are used to format text within a document and is great for adding emphasis to show examples of code, exercises, and more. The <example> tag set should be given an ID and title: <example id="static-ip"> <title>Static IP Address using DHCP</title> <screen width=60> <computeroutput> host apex { option host-name "apex.example.com"; hardware ethernet 00:A0:78:8E:9E:AA; fixed-address 192.168.1.4; } <computeroutput> </screen> </example> The output: Static IP Address using DHCP host apex { option host-name "apex.example.com"; hardware ethernet 00:A0:78:8E:9E:AA; fixed-address 192.168.1.4; }
<command>filename</command> XML tags filename The <filename> and </filename> tags define a filename or path to a file. Since directories are just special files, they are marked with the filename tags as well. For example: Edit the <filename>/home/smoore/sam.xml</filename> file to make changes or add comments. The output: Edit the /home/smoore/sam.xml file to make changes or add comments. They are also used to markup an RPM package name. For example: To use the <application>Keyboard Configuration Tool</application>, the <filename>system-config-keyboard</filename> RPM package must be installed. The output: To use the Keyboard Configuration Tool, the redhat-config-keyboard RPM package must be installed. Note Directory names must end with a forward slash (/) to distinguish them from file names.
<command>firstterm</command> XML tags firstterm The <firstterm> and </firstterm> tags helps to define a word that may be unfamiliar to the user, but that will be seen commonly throughout the text. For example: Nearly every modern-day operating system uses <firstterm>disk partitions</firstterm>, and &FC; is no exception. The output: Nearly every modern-day operating system uses disk partitions, and &FC; is no exception.
<command>footnote</command> XML tags footnote If you need to make a footnote, use the following example: For those of you who need to perform a server-class <footnote> <para> A server-class installation sets up a typical server environment. Note, no graphical environment is installed during a server-class installation. </para> </footnote> installation, refer to the <citetitle>Installation Guide</citetitle>. The output: For those of you who need to perform a server-class A server-class installation sets up a typical server environment. Please note, no graphical environment is installed during a server-class installation. installation, refer to the Installation Guide.
<command>figure</command> XML tags figure Important Order matters! The EPS file must be declared first. An example figure declaration: <figure id="fig-ksconfig-basic"> <title>Basic Configuration</title> <mediaobject> <imageobject> <imagedata fileref="./figs/ksconfig/ksconfig-basic.eps" format="EPS"/> </imageobject> <imageobject> <imagedata fileref="./figs/ksconfig/ksconfig-basic.png" format="PNG"/> </imageobject> <textobject> <phrase> Some text description of this image </phrase> </textobject> </mediaobject> </figure> The following describes what needs to be edited: <figure id="fig-ksconfig-basic"> ==> id="" would be edited <title>Basic Configuration</title> ==> title would be edited fileref="./figs/ksconfig/ksconfig-basics.eps"> ==> .eps location would be edited fileref="./figs/ksconfig/ksconfig-basics.png"> ==> .png location would be edited <phrase>Some text description of this image</phrase> ==> "Some text..." would be edited For more information on taking screenshots, refer to .
GUI Tags XML tags GUI tags
<command>guilabel</command> XML tags GUI tags guilabel XML tags guilabel Use the <guilabel> and </guilabel> tags as a default for GUI descriptions, like a screen name or screen title. For example: The <guilabel>Authentication Configuration</guilabel> screen shows you how to make your system more secure. The output: The Authentication Configuration screen shows you how to make your system more secure.
<command>guibutton</command> XML tags GUI tags guibutton XML tags guibutton Use the <guibutton> and </guibutton> tags to denote a button on a screen or menu. For example: Check the <guibutton>Activate on boot</guibutton> button to have the X Window System start automatically. The output: Check the Activate on boot button to have the X Window System start automatically.
<command>guiicon</command> XML tags GUI tags guiicon XML tags guiicon The <guiicon> and </guiicon> tags are used to denote a panel or desktop icon. For example: Double-click the <guiicon>Start Here</guiicon> icon on the desktop. The output: Double-click the Start Here icon on the desktop.
<command>guimenu</command> and <command>guimenuitem</command> XML tags GUI tags guimenu XML tags guimenu XML tags GUI tags guimenuitem XML tags guimenuitem To note a menu (like in the installation program or within the control panel), use the <guimenu> and </guimenu> tags. To note submenu items, use the <guimenuitem> and </guimenuitem> tags. (Please note that there should not be any breaks between these commands, but for printing purposes breaks have been inserted). For example: Select <guimenu>Main Menu</guimenu> => <guimenuitem>Programming</guimenuitem> => <guimenuitem>Emacs</guimenuitem> to start the <application>Emacs</application> text editor. The output: From the control panel, click on Main Menu => Programming => Emacs to start the Emacs text editor.
<command>keycap</command> XML tags keycap To denote a specific key, you will need to use the <keycap> and </keycap> tags. Brackets are automatically added around the keycap, so do not add them in your XML code. For example: To make your selection, press the <keycap>Enter</keycap> key. The output: To make your selection, press the Enter key.
<command>menuchoice</command> XML tags menuchoice Often using a mouse is tedious for common tasks. Therefore, programmers often build in keyboard-shortcuts to simplify their program. These should be described using the shortcut tag as a wrapper for the keyboard tags. The shortcut tag must be wrapped inside the menuchoice tag. For example: Go to the menu bar and choose: <menuchoice> <shortcut> <keycombo><keycap>Ctrl</keycap><keycap>s</keycap></keycombo> </shortcut> <guimenu><accel>F</accel>ile</guimenu> <guimenuitem><accel>S</accel>ave</guimenuitem> </menuchoice>. The output: Go to the menu bar and choose: Ctrls File Save .
<command>keycombo</command> XML tags keycombo To illustrate a key combination, you need to use the <keycombo> and </keycombo>, <keycap> and </keycap> tags. For example: To reboot your system, press <keycombo> <keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap> </keycombo>. The output: To reboot your system, press CtrlAltDel .
Lists lists creating There are several types of lists you can create using XML. You can have a itemized (bulleted) list, a ordered (numbered) list, or a variable list (presents a term and then a separate paragraph). There is also a list format for tables and for for creating a list of glossary terms and their definitions. The sections below will discuss the proper uses for the various list and how to create them.
<command>itemizedlist</command> XML tags itemizedlist XML tags lists itemizedlist lists itemizedlist An ItemizedList is best used to present information that is important for the reader to know, but that does not need to be in a specific order. It is shorter than a VariableList and presents the information in a very simple way. To create an ItemizedList (otherwise known as bulleted list), use the following command sequence: Note Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs. <itemizedlist> <listitem> <para>Getting familiar with the installation program's user interface</para> </listitem> <listitem> <para>Starting the installation program</para> </listitem> <listitem> <para>Selecting an installation method</para> </listitem> </itemizedlist> The output looks like: Getting familiar with the installation program's user interface Starting the installation program Selecting an installation method
<command>OrderedList</command> XML tags orderedlist lists orderedlist XML tags lists orderedlist An orderedlist is best used to present information that is important for the reader to know in a specific order. orderedlists are a good way to convey step-by-step senarios to the audience you are writing for. To create an orderedlist (numbered list), use the following XML code sequence: Note Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs. <orderedlist> <listitem> <para>Online &mdash; http://www.redhat.com/support/errata; supplies errata you can read online, and you can download diskette images easily.</para> </listitem> <listitem> <para>Email &mdash; By sending an empty mail message to errata@redhat.com, you will receive an email containing a text listing of the complete errata of the installation program and related software (if errata exist at that time). Also included are URLs to each updated package and diskette image in the errata. Using these URLs, you can download any necessary diskette images. Please note: use binary mode when transferring a diskette image.</para> </listitem> </orderedlist> The output looks like: Online — http://www.redhat.com/support/errata; supplies errata you can read online, and you can download diskette images easily. Email — By sending an empty mail message to errata@redhat.com, you will receive an email containing a text listing of the complete errata of the installation program and related software (if errata exist at that time). Also included are URLs to each updated package and diskette image in the errata. Using these URLs, you can download any necessary diskette images. Please note: use binary mode when transferring a diskette image.
<command>Variablelist</command> XML tags variablelist XML tags lists variablelist lists variablelist A variablelist best represents a list of terms and definitions or descriptions for those terms. To create a variablelist, use the following command sequence: Note Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs. <variablelist> <varlistentry> <term> New Multi-CD Install </term> <listitem> <para>As the installation program continues to grow, Red Hat has developed an installation program capable of installing from multiple CD-ROMs.</para> </listitem> </varlistentry> <varlistentry> <term>XFree 4.0 </term> <listitem> <para>Configuration of your X Window System during the installation has never been more thorough. From choosing your monitor and its correct settings, to video card probing, to testing your desired X setup, Xconfigurator will help you set everything just right.</para> </listitem> </varlistentry> </variablelist> The output looks like: New Multi-CD Install As the installation program continues to grow, Red Hat has developed an installation program capable of installing from multiple CD-ROMs. XFree 4.0 Configuration of your X Window System during the installation has never been more thorough. From choosing your monitor and its correct settings, to video card probing, to testing your desired X setup, Xconfigurator will help you set everything just right. Warning Do not specify the frame attribute to the table. Doing so breaks PDF production.
Creating a List Within a Table Using <command>Simplelist</command> XML tags simplelist XML tags lists simplelist lists simplelist tables creating a list within a table simplelist A simplelist is an unadorned list of items. simplelists can be inline or arranged in columns. We use simplelist to add separate paragraphs of text within a table element. A regular list, such as itemizedlist, cannot be embedded within a table. The XML commands for a table look like: <table id="tb-hwinfo-hostbus"> <title>Host Bus Adapter Features and Configuration Requirements</title> <tgroup cols="3"> <colspec colnum="1" colname="HostBus" colwidth="33"/> <colspec colnum="2" colname="Features" colwidth="34"/> <colspec colnum="3" colname="Single" colwidth="33"/> <thead> <row> <entry>Host Bus Adapter</entry> <entry>Features</entry> <entry>Single-Initiator Configuration</entry> </row> </thead> <tbody> <row> <entry>Adaptec 2940U2W</entry> <entry><simplelist> <member>Ultra2, wide, LVD.</member> <member>HD68 external connector.</member> <member>One channel, with two bus segments.</member> <member>Set the onboard termination by using the BIOS utility.</member> <member>Onboard termination is disabled when the power is off.</member> </simplelist></entry> <entry><simplelist> <member>Set the onboard termination to automatic (the default).</member> <member>Use the internal SCSI connector for private (non-cluster) storage.</member> </simplelist></entry> </row> <row> <entry>Qlogic QLA1080</entry> <entry><simplelist> <member>Ultra2, wide, LVD</member> <member>VHDCI external connector</member> <member>One channel</member> <member>Set the onboard termination by using the BIOS utility.</member> <member>Onboard termination is disabled when the power is off, unless jumpers are used to enforce termination.</member> </simplelist></entry> <entry><simplelist> <member>Set the onboard termination to automatic (the default).</member> <member>Use the internal SCSI connector for private (non-cluster) storage.</member> </simplelist></entry> </row> </tbody> </tgroup> </table> The output looks like: Host Bus Adapter Features and Configuration Requirements Host Bus Adapter Features Single-Initiator Configuration Adaptec 2940U2W Ultra2, wide, LVD. HD68 external connector. One channel, with two bus segments. Set the onboard termination by using the BIOS utility. Onboard termination is disabled when the power is off. Set the onboard termination to automatic (the default). Use the internal SCSI connector for private (non-cluster) storage. Qlogic QLA1080 Ultra2, wide, LVD VHDCI external connector One channel Set the onboard termination by using the BIOS utility. Onboard termination is disabled when the power is off, unless jumpers are used to enforce termination. Set the onboard termination to automatic (the default). Use the internal SCSI connector for private (non-cluster) storage.
Note Notice how the SimpleList tags are used. The <entry> and <simplelist> tags must be aligned beside one another, otherwise you will receive a parsing error. For each paragraph or list item to be added within a SimpleList, the <member> tag set must be added around that particular text item.
<command>glosslist</command> XML tags glosslist XML tags lists glosslist lists glosslist Use the glosslist command set to create a list of glossary terms and their definitions. In XML, an example looks like the following: <glosslist> <glossentry> <glossterm>applet</glossterm> <glossdef> <para>A small application, usually a utility or other simple program.</para> </glossdef> </glossentry> <glossentry> <glossterm>architecture</glossterm> <glossdef> <para>The design for organization and integration of components within a computer or computer system.</para> </glossdef> </glossentry> <glossentry> <glossterm>archive</glossterm> <glossdef> <para>To transfer files into storage for the purpose of saving space and/or organization.</para> </glossdef> </glossentry> </glosslist> The output looks like: applet A small application, usually a utility or other simple program. architecture The design for organization and integration of components within a computer or computer system. archive To transfer files into storage for the purpose of saving space and/or organization.
<command>option</command> XML tags option If you have a command that offers an option or a flag, use the <option> and </option> tags. Note The <option> tag set is only meant to be used for command line options, not options in configuration files. In XML, specifying an option would look like the following: For example, with the command <command>ls</command> you can specify an option such as <option>-la</option>. The output: For example, with the command ls you can specify an option such as .
Index Entries indexing XML tags indexing The following command sequence shows you the code inserted into the body of the text to add an index entry to your document: <indexterm> <-- indicates a term to be placed in the index <primary>foo</primary> <-- indicates that "foo" is the first term <secondary>bar</secondary> <-- "bar" will be listed under "foo" </indexterm> <-- closes this index entry foo bar The <seealso> tag allows you to reference another index entry or refer to another manual. Make sure the <seealso> reference you are pointing to has its own entry. For example: indexing seealso tag <indexterm> <primary>SWAK</primary> <seealso>salutations</seealso> </indexterm> <indexterm> <primary>salutations</primary> </indexterm> SWAK Salutations Salutations The <see> tag allows you to reference to another index entry entirely. For example: indexing see tag <indexterm> <primary>Guinness</primary> <see>beer</see> <-- beer will be listed under the Guinness entry, but you must make sure beer also has its own entry to refer to. </indexterm> <indexterm> <primary>beer</primary> </indexterm> Guinness Beer Beer To view the HTML output of the index entries shown here, refer to the generated-index.html file at the end of this document. How does the index get generated? If indexterms exist in the document and the beginning and ending index tags exist before the end tag for the book or article, an index is created because of the generate.index stylesheet parameter, which is set to true by default.
<command>para</command> XML tags para For any paragraph, the <para> and </para> tags must open and close that particular paragraph. Do not use para tags around anything other than a simple paragraph. Doing so will create additional white space within the text itself. Do not use <para> tags around the following (or, to put this another way, do not embed the following within <para> tags): <screen> <itemizedlist> <orderedlist> <variablelist> <table>
<command>part</command> parts XML tags part In the parent file, you can separate the chapters into parts to divide them into logical groups. For example, in the parent file, the part tags surround the chapter entities: <part id="pt-foo"> <partintro> <para>Some text for the part intro</para> &CHAPTER; &ANOTHER-CHAPTER; </part> If you create a part, include a part introduction describing the contents of the part. For example: <part id="pt-setup"> <title>Getting Setup</title> <partintro> <para>This section contains information you will need when you first join the Docs group. You might need to refer to this part again for information such as installing &FC;.</para> </partintro> In the HTML output, a separate HTML page is generated with the part number, title, introduction, and TOC. In the PDF output, the same information about the part is on a separate page.
<command>prompt</command> XML tags prompt To show a prompt, such as a root or DOS prompt, use the <prompt> and </prompt> commands. For example: At the <prompt>LILO:</prompt> boot prompt, type linux to boot into your Linux partition. At the <prompt>C:\></prompt> prompt, type .... The output: At the LILO: boot prompt, type linux to boot into your Linux partition. At the C:\> prompt, type .... Note When showing example computer output (usually in screen tags), do not include the prompt or command (unless the command or prompt is the actually computer output you want to show).
<command>replaceable</command> XML tags replaceable To create replaceable text, use the tags <replaceable> and </replaceable> around the text you want to use as a variable. This example demonstrates how to use the replaceable tags when referencing the name of an RPM file: foo-<replaceable>version-number</replaceable>.<replaceable>arch</replaceable>.rpm The output: foo-version-number.arch.rpm
<command>screen</command> XML tags screen The <screen> command is used to format text within a document and is great for adding emphasis to show examples of code, computer output, and more. In HTML with the Fedora CSS file, this appears in box with a grey background. To use this command you only need the opening <screen> and closing </screen> tags around the text you are emphasizing. Important When using the <screen> tag, set everything within that screen to flush left. The contents of the screen element are rendered exactly as is, including any indentation. Using flush left prevents extra blank space in front of the text inside the gray background when the content is converted to HTML. The <screen> tag set may contain other inline tags, such as <computeroutput>, <userinput>, or <replaceable>. Additional inline tags are not required by definition. The <screen> tags by themselves may provide sufficient context, especially for simple examples or file listings. Consider the context of the example, and use inline tags if they are helpful to the reader. If you use inline tags, remember that line breaks inside <screen> tags create line breaks in any rendered output. Place any inline tags on the same line as their content. Do not overuse tagging within a <screen> tag set. An example of <screen> is the following: <screen> This is an example of a screen. You do not need &lt;para&gt; tags within this command. </screen> The output: This is an example of a screen. You do not need <para> tags within this command.
Using Inline Tags with <command>screen</command> If you choose to use inline tags inside a <screen> section, follow these guidelines for consistency. If the content in the screen is a listing of a configuration file or the output of a program, use the <computeroutput> tag set around the entire output. If the user should type the example on the command line or in a configuration file, use the <userinput> tag set. Separate input and output with a short sentence of narrative, as below: <para> Type the following command: </para> <screen> <userinput>command -sw file1</userinput> </screen> <para> You should see the following output: </para> <screen> <computeroutput>Completed, time = 0.12 sec</computeroutput> </screen> The output looks like: Type the following command: command -sw file1 You should see the following output: Completed, time = 0.12 sec Note When showing a command or series of commands inside screen tags, do not show the prompt. If the <screen> shows the reader how to change only part of a line, mark the change with an inline <userinput> tag set. You may use the <userinput> tag set inside a larger area that is already marked inline with <computeroutput>. Do not include any extra lines of context in this case, unless excluding them would confuse the reader. The following example illustrates these guidelines: <para> Edit the <filename>/etc/sysconfig/init</filename> file as follows: </para> <screen> GRAPHICAL=<userinput>yes</userinput> </screen> The output looks like: Edit the /etc/sysconfig/init file as follows: GRAPHICAL=yes For an explanation of how to use the replaceable tags within a set of screen tags, refer to .
Sections XML tags sections sections Within an article (or chapter if it is a DocBook XML book like the &IG;), you can have sections and subsections. <section> is always the highest section and you cannot have two sections of the same level within one another (a section 2 can be created within a section 1, but section 1 has to be closed before another section 1 can be created). The general layout follows: <section id="sn-uniquename"> <title>Insert Title Here</title> <para> Body text goes here. </para> <section id="sn-uniquename"> <title>Insert Title Here</title> <para> Body text goes here. </para> <sect3 id="s3-uniquename"> <title>Insert Title Here</title> <para> Body text goes here. </para> </sect3> </section> </section> If you only need one level of sections in a DocBook article, you can use the section tag. For example: <section id="sn-uniquename"> <title>Insert Title Here</title> <para> Body text goes here. </para> </section> <section id="sn-anothername"> <title>Insert Title Here</title> <para> More body text goes here. </para> </section>
<command>table</command> XML tags table The following is an example of creating a table. <table id="tb-mockup-before-begin"> This tells XML that you will be creating a table and the ID name is "tb-mockup-before-begin." <title>Available Features of GNOME and KDE</title> <tgroup cols="3"> This tells XML that you are creating a table with three columns. <colspec colnum="1" colname="Features" colwidth="3"/> colspec says that you are giving information about the column to XML colnum="1" says that you are giving specifications for the first column. colname="Features" says that the title for this column will be "Features." colwidth="3" specifies the width of the column. This can be more tricky: such as two columns with widths of 1 and 2,the 1 is one-half the width of the 2, in respect to the page size. But, what if you need the 1 to be a little more than half of the 2, using a larger number ratio, such as 10 to 20 would accomplish this. You could then change the 10 to an 11 or a 12 to make it a little more than half of the second column of 20. In no value is given, a value of 1 is assumed. <colspec colnum="2" colname="GNOME" colwidth="2"/> <colspec colnum="3" colname="KDE" colwidth="2"/> <thead> Contains one or more table row elements. <row> Contains one or more table cell (entry) elements. <entry>Features</entry> Table cell element, one of several in a row element, defining columns within the row. <entry>GNOME</entry> <entry>KDE</entry> </row> </thead> <tbody> Contains one or more row elements, for the main text of the table. <row> <entry>highly configurable</entry> <entry>yes</entry> <entry>yes</entry> </row> <row> <entry>multiple window managers </entry> <entry>yes</entry> <entry>yes</entry> </row> <row> <entry>Internet applications</entry> <entry>yes </entry> <entry>yes </entry> </row> </tbody> </tgroup> </table> Available Features of GNOME and KDE Features GNOME KDE highly configurable yes yes multiple window managers yes yes Internet applications yes yes
Creating a List Within a Table XML tags table list within a table Creating a list within a table can be a difficult task. It requires strict formatting and a set of commands that are not available for command completion in Emacs. The tags you will need to use are <simplelist> and <member>. The following example will show you the proper formatting for creating a list within a table. <table id="tb-hardware-powerswitch"> <title>Power Switch Hardware Table</title> <tgroup cols="4"> <colspec colnum="1" colname="Hardware" colwidth="2"/> <colspec colnum="2" colname="Quantity" colwidth="2"/> <colspec colnum="3" colname="Description" colwidth="6"/> <colspec colnum="4" colname="Required" colwidth="2"/> <thead> <row> <entry>Hardware</entry> <entry>Quantity</entry> <entry>Description</entry> <entry>Required</entry> </row> </thead> <tbody> <row> <entry>Serial power switches</entry> <entry>Two</entry> <entry><simplelist> <member>Power switches enable each cluster system to power-cycle the other cluster system. Note that clusters are configured with either serial or network attached power switches and not both.</member> <member>The following serial attached power switch has been fully tested:</member> <member>RPS-10 (model M/HD in the US, and model M/EC in Europe) </member> <member>Latent support is provided for the following serial attached power switch. This switch has not yet been fully tested:</member> <member>APC Serial On/Off Switch (partAP9211), <ulink url="http://www.apc.com/">http://www.apc.com/</ulink></member> </simplelist></entry> <entry>Strongly recommended for data integrity under all failure conditions</entry> </row> </tbody> </tgroup> </table> Notice how the <simplelist> tag must be beside the <entry> tag? If you do not format this properly, it will not parse cleanly. The above example will look like the following: Power Switch Hardware Table Hardware Quantity Description Required Serial power switches Two Power switches enable each cluster system to power-cycle the other cluster system. Note that clusters are configured with either serial or network attached power switches and not both. The following serial attached power switch has been fully tested: RPS-10 (model M/HD in the US, and model M/EC in Europe) Latent support is provided for the following serial attached power switch. This switch has not yet been fully tested: APC Serial On/Off Switch (partAP9211), http://www.apc.com/ Strongly recommended for data integrity under all failure conditions
<command>trademark</command> XML tags trademark Do not use the trademark entities &trade;, &copy;, or &reg; because the do not produce HTML output that works for all charsets. The HTML output produces by these entities are declared in the DTD and cannot be changed via the stylesheet. Instead, use the trademark tag and its associates classes as follows: <trademark>trademark symbol after me</trademark> <trademark class="registered">registered trademark symbol after me</trademark> <trademark class="copyright">copyright symbol after me</trademark>
<command>userinput</command> XML tags userinput To show what a user would type, use the userinput tag. For example: At the prompt, type: <userinput>dd if=boot.img of=/dev/fd0 bs=1440k</userinput> The output: At the prompt, type: dd if=boot.img of=/dev/fd0 bs=1440k
<command>wordasword</command> XML tags wordasword The <wordasword> tag set is used to define a word meant specifically as a word and not representing anything else. A lot of technical documentation contains words that have overloaded meanings. Sometimes it is useful to be able to use a word without invoking its technical meaning. The <wordasword> element identifies a word or phrase that might otherwise be interpreted in some specific way, and asserts that it should be interpreted simply as a word. It is unlikely that the presentation of this element will be able to help readers understand the variation in meaning; good writing will have to achieve that goal. The real value of <wordasword> lies in the fact that full-text searching and indexing tools can use it to avoid false-positives. For example: To use <command>grep</command> to search for the word <wordasword>linux</wordasword>, use the command <command>grep linux</command>. The output: To use grep to search for the word linux, use the command grep linux. In the example, the word "linux" is just a word. It is not meant to convey anything about Linux as a subject, or to add relevance or meaning to the content. It can be replaced with any other word without losing any of the context.
<command>xref</command> XML tags xref To refer to other sections or chapters within a manual, use the <xref> tag. The output of this displays the title of the section or chapter you are pointing the user to. For example: For more information about the parent file, refer to <xref linkend="ch-tutorial"></xref> and <xref linkend="sn-tutorial-parent"></xref> The output: For more information about the parent file, refer to and .