Textual Markup

Additionally to the text object tags there are some tags to be used within the written text. However there is no direct way to set display options like boldface, italic etc. (Author note: At least I haven't found out yet.) Remember in DocBook-XML you only define parts of the text to be of a certain type, not to have a certain display.

Text Markup

Following are some markup tags that (usually) change the printing of the enclosed text. For displaying purposes they all are embedded in a normal text flow within a paragraph.

Example 3-16. Text Markup


   <?xml version="1.0" encoding='ISO-8859-1'?>
   ...
   <para>Embedding...<emphasis>emphasis</emphasis>...embedding.</para>
   <para>Embedding...<citation>citation</citation>...embedding.</para>
   <para>Embedding...<command>command</command>...embedding.</para>
   <para>Embedding...<computeroutput>computeroutput</computeroutput>...embedding.</para>
   <para>Embedding...<keycap>keycap</keycap>...embedding.</para>
   <para>Embedding...<literal>literal</literal>...embedding.</para>
   <para>Embedding...<literallayout>literallayout</literallayout>...embedding.</para>
   <para>Embedding...<option>option</option>...embedding.</para>
   <para>Embedding...<optional>optional</optional>...embedding.</para>
   <para>Embedding...<parameter>parameter</parameter>...embedding.</para>
   <para>Embedding...<prompt>prompt</prompt>...embedding.</para>
   <para>Embedding...<userinput>userinput</userinput>...embedding.</para>
   <para>Embedding...<varname>varname</varname>...embedding.</para>
   <para>Embedding...<wordasword>wordasword</wordasword>...embedding.</para>
   ...
	    
	    

These examples look like this:

Embedding...emphasis...embedding.

Embedding...[citation]...embedding.

Embedding...command...embedding.

Embedding...computeroutput...embedding.

Embedding...keycap...embedding.

Embedding...literal...embedding.

Embedding...

literallayout

...embedding.

Embedding...option...embedding.

Embedding...[optional]...embedding.

Embedding...parameter...embedding.

Embedding...prompt...embedding.

Embedding...userinput...embedding.

Embedding...varname...embedding.

Embedding...wordasword...embedding.

Quoting

Quotes ("") should not be used directly in the text. Use the quote-tag instead.

Example 3-17. Quoting


	      <?xml version="1.0" encoding='ISO-8859-1'?>
	      ...
	      <para>
	        <quote>This text is quoted.</quote>
	      </para>
	      ...
	    
	    

This example looks like this:

"This text is quoted."

Ampersand "&"

Because the ampersand "&" is defined to be the first character of an entity reference it should not be used literally as such. Despite the fact that this often does no harm in the normal text flow it might lead to problems when used within text that is "processed", e.g. in a title that will be in the table of contents.

Warning

Do not use the the ampersand "&" literally! Use the predifined entity &amp; instead.