Underlined text

From DM

Revision as of 14:52, 19 February 2012 by DominiqueS (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Underlined is not a structural category. Most markup languages (including strict XHTML 1.0/HTML 4.0, and TEI), therefore, do not have an underline element.[[note-1|1]

Contents

Source documents

Print documents

In print documents, underlined type in print sources is commonly used to represent one of the following structural categories:

  • italics (especially in typescript)
  • emphasis (especially in typescript)
  • book/journal/serial titles (especially in typescript)
  • hypertext links
  • low level headings (e.g. level four or five).

Manuscripts

In manuscripts, underlining is commonly used to indicate

  • deletions

See Punctum_delens.

Structural encoding

(X)HTML

In Strict (X)HTML, underlined text in print sources is commonly encoded using the following structural elements:

<h4>: Fourth level headings
<h5>: Fifth level headings
<em>: Emphasis headings
<cite>: Citation headings
<a href="URL">: Hyperlinks

Underlining in manuscript contexts (when used to indicate deletion) is encoded using

<del>: deletion

See Punctum_delens.

Commercial browsers do not display most of these elements as underlined by default (the exception is <a href>. If your electronic document must display text as underlined, this must be controlled by external (e.g. CSS) stylesheets.

TEI

In TEI XML (P4), underlined text from print sources is commonly encoded using the following structural elements:

<head>: Headings (particularly fifth- and
       sixth-level headings (i.e. <div5><head>/<div6><head>
       or <div><div><div><div><div><head> or
       <div><div><div><div><div><div><head>).
<emph>: Emphasis
<title level="m">: Monographic titles.
<title level="j">: Journal titles.
<title level="s">: Serial titles.
<xref>: eXternal Links.
<xptr>: eXternal Pointers.
<ref>: Links.
<ptr>: Pointers.

In manuscript sources, underlining (when used to indicate deletion) is encoded:

<del>: Deletion

Most commercial browsers do not have a default stylesheet for these (or any other) TEI elements. Text-decoration (and other display characteristics) of the elements must be controlled by stylesheets, either directly (i.e. using a formatting stylelanguage such as CSS or XSL-FO), or indirectly, after conversion to XHTML for display.

Stylesheets

CSS

Text-decoration (including underline) is contolled in CSS using the text-decoration property. All textual elements can be assigned a value for this property. Relevant values for underlined text are

underline: Suitable for most occurrences in print sources
line-through: Strikethrough (commonly used to indicate deletions).

Other allowable values include

overline: text is displayed with a line above each letter
blink: text flashes on and off
"string": text is aligned to the supplied string[[#note-2|2]

Examples

em {
text-decoration: underline;
}
del {
text-decoration: line-through;
}

XSLT

There is no relevant category in [/dmorgwiki/index.php/XSLT XSLT].

XSL-FO

(Unknown)

LaTeX

To underline text in LaTeX, simply use the \underline command.

For more information on \underline, http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-336.html.

For more on LaTeX, see Hypertext Help with LaTeX at http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/index.html.

Examples

\underline{This is underlined.} This is not.

Notes

1 Early versions of HTML used the element <u> to encode underlined text. This usage is now deprecated in transitional versions of XHTML 1.0/HTML 4.0 and forbidden by the strict DTD.

Personal tools