3.1.�� Emphasising Text

A How-To Recipe

Jeff Elpern


You have inline text that you want to highly or call attention to.


There are three common text faces that are used to highlight text: italic, bold, and combination of bold and italic. All three of these font styles are achieved with the <emphasis> markup tag.

Table��1.��<emphasis> markup

<emphasis> this text italic </emphasis> this text italic Italics is the default font style for the emphasis tag.
<emphasis role="bold"> this text bold </emphasis> this text bold Setting the role attribute to bold evokes a font style of bold[a].
<emphasis role="bolditalic"> this text both </emphasis> this text both Setting the role attribute to bolditalics evokes a font style of bold and italics[b].

[a] This is standard in XSL DocBook rules 1.??? and greater.

[b] This is an SQI enhancement to the CSS style for HTML and the XSL FO styles for printed. The same styling can be created with double emphasis tags where one calls for bold and one calls for italics


Emphasizing or highlighting text is a useful and common operation in word processing. For example, italics is often used to when introducing a new term.

Emphasis is also used to signify special types of content such as a book title, an authors name, or a computer command. This where DocBook and general word processing differ. In DocBook there are many tag to denote types of content. For example, there is a complete set of tags for identifying a book, its author, published date, publisher, etc.


When a content specific tag exists always use it over the emphasis tag.

Content specific tags add value to a document because they enable the style sheets to control how that element is display for each publishing channel. Also, if you want to change presentation styles a simple modification to the style sheets will control all future presentation of that element across all documents and styles.

Listed Below are classes of content tags that shopuld be used instead of directly marking the text with an emphasis tag.

Table��2.��Specific Content Tags

Class of textReference for Tags
Book and article elements including author, title, publisher, etc. See ???
Code and program listings See ???
User interface - command line See ???

Also See


Univ/CIE/KA/StrucDoc/HowToBookProto/ChapText/highlight (last edited 2015-03-06 18:11:26 by localhost)