4.8.22 literal

Used for a variety of purposes, like character set names (<literal>latin1</literal>) or SQL statements and SQL functions (<literal>SELECT * FROM tbl_name</literal>).

Here is a list of types of terms that should be wrapped in the <literal> element. This list is by Pearson. The way Pearson describes these terms is that they are monospaced or mono. In some cases, we use elements other than <literal> (this is noted in parens). When producing output for Pearson, we map all these terms onto mono. For other types of output, we may display some of them differently. For example, the DocBook PDF stylesheets display <command> in bold and <filename> in italic.

  • arguments

  • arrays

  • class names

  • code commands (in some cases it is more appropriate to use programlisting)

  • constructors

  • data types

  • directives

  • DOS programs used as commands (we use command, and option for program options)

  • email addresses (we use email)

  • events

  • fields

  • flags

  • functions

  • HTML tags (remember to properly encode instances of < and &)

  • Internet addresses (we use ulink)

  • keywords

  • logical operators

  • loops

  • methods

  • newsgroup names (we use ulink)

  • objects

  • onscreen messages

  • parameters

  • pointers

  • procedures

  • properties

  • shell scripts

  • statements

  • structures

  • symbolic constants

  • system prompts

  • switches (and options)

  • units

  • URLs (we use ulink)

  • values

  • variables