I believe if you look at the rendered output in HTML, you will
find that the emphasis element produces the <em> element in HTML
and that emphasis with a role of strong produces a <strong>
element in HTML. While other roles do work, the idea in DocBook
was to say "This needs emphasis" or "This needs strong emphasis"
and have the stylesheets handle doing the right thing with the
render.
Once the HTML standard evolved to the point that semantic rather
than typographic styles were available, the DocBook stylesheets
move to using them, too. In general, it is preferable to use
emphasis and emphasis with a role of strong to stay in the semantic
arena and let the stylesheets determine what is appropriate in the
output being rendered (for example, our Japanese localizers do not
like bold for strong emphasis -- it distorts the symbols too much,
so we have modified the stylesheets).
While there are situations where it is desirable to directly control
the text enhancements used on a set of characters (such as when you
are describing the way text is displayed in a GUI) I have found them
few and far between and stick with the emphasis and emphasis with a
role of strong in almost everything I do using DocBook. It also made
my HTML better, since the accessibility folks say to use the semantic
tags instead of the typographic ones, too.
Regards,
Larry Rowland
-----Original Message-----
From: Cavicchio_Rob@emc.com [mailto:Cavicchio_Rob@emc.com]
Sent: Monday, February 08, 2010 8:55 AM
To: docbook@lists.oasis-open.org
Subject: [docbook] italics (was RE: WELCOME to docbook@lists.oasis-open.org)
Thomas Anderson [mailto:zelnaga@gmail.com] wrote:
>
quoting
<http://www.ibiblio.org/godoy/sgml/docbook/howto/writing-docbook.html>:
"a. The text can be enphasized in a few ways. The most common ways are
italics and bold. DocBook, however, supports only italics. The use of
bold requires additional settings on the stylesheet used."
If DocBook supports italics, how do I do it? Certainly I can do
<phrase role="italic">...</phrase>, but the above seems to be implying
that that's not necessary?
<
Interesting statement, that DocBook "supports" only italics. DocBook
itself does not directly define or handle any inline formatting, so this
must be referring to what the DocBook stylesheets support. I was under
the impression that all of the following worked in the standard
transforms:
<emphasis role="bold"></emphasis>
<emphasis role="italic"></emphasis>
<emphasis role="underline"></emphasis>
Of course, that said, you should consider whether it is appropriate to
explicitly specify formatting in your source document. (It rarely is,
IMO.)
*************************
Rob Cavicchio
Principal Technical Writer
EMC Captiva
EMC Corporation
10145 Pacific Heights Boulevard, 6th Floor
San Diego, CA 92121-4234
P: (858) 320-1208
F: (858) 320-1010
E: Cavicchio_Rob@emc.com
The opinions expressed here are my personal opinions. Content published
here is not read or approved in advance by EMC and does not necessarily
reflect the views and opinions of EMC.
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org