BODY: Lists and Phrases

This document describes the tags used for specifying text and graphic objects that can occur inside a BODY tag. These include:

List Elements

You create a list element by using (note: the following list is an example of UL):

Attributes

TYPE

Supported only for OL.

START

Supported only for OL.

COMPACT

Suggests that a compact rendering be used (short items/long list). Not yet implemented.

LH

Within a list element, you can add a list heading (typically at beginning). non-standard?

LI

Within a list element, you add an individual list item using LI, which indents and formats in context of the current element. Newt's Cape should preserve indenting when it splits an item across book pages (and you can specify a different tag to use (default: P) via Split Appearance option.

Examples: see UL, OL, DIR, MENU

Attributes: VALUE (within OL).

UL

Specifies an unordered (typically bulleted) list of items.

Attributes: TYPE -- not implemented (due to lack of Newton circle and square characters); COMPACT -- not implemented.

Example:

<UL>
<LH>heading
<LI>one
<LI>two
<UL>
<LI>three (nested)
</UL>
<LI>four
</UL>

Result:

OL

Specifies an ordered (typically numbered) list of items.

Attributes: START (default: 1); TYPE (1,a,A,i,I) (default: 1); COMPACT -- not implemented

Example:

<OL>
<LI>one
<LI>two
<OL TYPE="A" START=5>
<LI>E? (nested) (with Uppercase alphabetic label)
	<OL TYPE="i">
	<LI>i? (nested) (with lowercase Roman numerals)
	</OL>
</OL>
<LI VALUE="25">twenty five (skipping ahead)
</OL>

Result:

  1. one
  2. two
    1. E? (nested) (with Uppercase alphabetic label)
      1. i? (nested) (with lowercase Roman numerals)
  3. twenty five (skipping ahead)

DIR

DIR is similar to UL, and assumes that list items are short, typically less than 20 char each. Nested block elements are not allowed. Newt's Cape prefixes each item with ">".

Attributes: COMPACT -- not implemented

MENU

MENU is similar to UL. List items are typically a single line, and may be rendered more compactly than UL. Nested block elements are not allowed. Newt's Cape prefixes each item with "-".

Attributes: COMPACT -- not implemented

DL

Specifies pairs of terms (DT), definitions (DD).

DT

Indicates a Definition Term inside DL

DD

Indicates a Definition Definition inside DL

Example:

<DL>
<DT>Newt's Cape
<DD>an environment for developing Newton books and
form applications via HTML

<DT>HTML
<DD>HyperText Markup Language
</DL>

Result:

Newt's Cape
an environment for developing Newton books and form applications via HTML
HTML
HyperText Markup Language

Idiomatic Phrase Markup

Idiomatic markup is based on intent rather than on explicit appearance. Prior to version 1.4, it was not possible to nest phrase markup.

However, this now works in Newt's Cape.

CITE

indicates title of a book or citation (typically rendered in italics).

Example: <CITE>The Empire Strikes Back</CITE>

Result: The Empire Strikes Back

CODE

indicates a short example of code (typically rendered in a mono-spaced font). Use PRE for multiple-line listings.

Example: <CODE>if x < y then :show() else :hide()</CODE>

Result: if x < y then :show() else :hide()

EM

indicates an emphasized phrase (typically rendered in italics).

Example: Are you <EM>always</EM> so sleepy?

Result: Are you always so sleepy?

KBD

indicates text typed by a user (typically rendered in a mono-spaced font).

Example: Type <KBD>rm</KBD> followed by the filename

Result: Type rm followed by the filename

SAMP

indicates a sequence of literal characters (typically rendered in a mono-spaced font).

Example: The chars <SAMP>abc</SAMP> are valid in HTML

Result: The chars abc are valid in HTML.

STRONG

indicates strong emphasis (typically rendered in bold).

Example: I said "<STRONG>STOP</STRONG>"

Result: I said "STOP"

VAR

indicates a placeholder variable (typically rendered as italic).

Example: VAR is a <VAR>tag</VAR>

Result: VAR is a tag

DFN

indicates a defined term (typically rendered as italic). [3.0]

Example: this is a <DFN>definition</DFN>

Result: this is a definition

ABBR

indicates an abbreviation. currently rendered as bold

ACRONYM

indicates an acronym. currently rendered as bold

Typographic Phrase Markup

Typographic markup relates to explicit format. Where possible, Idiomatic phrases should be used instead. Eventually Cascading Style Sheets might provide a more general mechanism for doing formatting.

B

indicates bold text (if possible).

Example: Some <B>bold</B> text

Result: Some bold text

I

indicates italic text (if possible).

Example: Some <I>italic</I> text

Result: Some italic text

TT

indicates teletype (monospaced) text (if possible). (Note: this uses the same font family as PRE, e.g., Monaco)

Example: Some <TT>teletype</TT> text

Result: Some teletype text

U

indicates underlined text (if possible). Standard? Confusing to user if browser uses underline to represent A (anchors).

Example: Some <U>underlined</U> text

Result: Some underlined text

S

indicates over-strike text (if possible). HTML 3.0? STRIKE tag now standard? (since Newton does not support over-strike, it uses outline instead).

Example: Some <STRIKE>over-strike</STRIKE> text

Result: Some strike text

SUP

indicates superscript; also may use SMALL to reduce font size slightly. HTML 3.0?

Example: E=mc<SUP>2</SUP>

Result: E=mc2

SUB

indicates subscript; also may use SMALL to reduce font size slightly. HTML 3.0?

Example: H<SUB>2</SUB>O

Result: H2O

BIG

increases current font size by 1. Same as FONT SIZE=+1 except relative to current tag (H1-H6), otherwise BASEFONT. HTML 3.0?

Example: <BIG>bigger</BIG> text

Result: bigger text

SMALL

decreases current font size by 1. Same as FONT SIZE=-1 except relative to current tag (H1-H6), otherwise BASEFONT. HTML 3.0?

Example: <SMALL>smaller</SMALL> text

Result: smaller text

FONT

change font appearance

FACE

POINT-SIZE

Size in points, currently limited to 8-24.

COLOR

#FFFFFF only, and applies to entire paragraph.

Example: <FONT COLOR="#FFFFFF">inverted: white paragraph on dark background</FONT>

inverted: white paragraph on dark background

SIZE

A size index (between 1-7) or a +/- index increment from the BASEFONT size. This index maps to i:Appearance:Size preference for H6(1), H5(2), H4(3), H3(4), H2(5), H1(6), or 24pt(7).

Example: <FONT SIZE="+2">bigger</FONT> and <FONT SIZE="-2">smaller</FONT>

bigger and smaller

Note: If </FONT> is missing, sizes can accumulate: minimum 8, maximum 24.

BLINK, MARQUEE

These are obsolete and annoying tags, so Newt's Cape does not include built-in (though it would not be too difficult to simulate -- see changetxt.htm example).

BR

specifies an explicit line break. If you want to include many line breaks, also see PRE.

Example: line1<BR>line2

Result:
line1
line2

Attributes: CLEAR (left,all,right,none) -- not implemented

Paragraph Sizing

On 1.x Newtons (or in 1.x compatible books), you may notice problems with multi-styled text -- paragraphs that contain mixed fonts, faces, sizes may exhibit

Since the 1.x Newton text measurement functions support only a single font, Newt's Cape estimates line width and paragraph height using the "biggest font". You can sometimes avoid problems by using smaller paragraphs, fewer font changes, and putting links earlier before "problem" tags.

BASEFONT

SIZE attribute (default: 3) sets the base for FONT SIZE increments.

CENTER

This creates a "temporary container", and all items within it should be centered. Alternatively, you can use ALIGN attribute for individual P, IMG, TD, TH.

DIV

Like CENTER, DIV creates a "temporary container", and all items within it use its ALIGN attribute.

NOBR

Recognized but currently ignored.

For More Info

This document (in all its formats) is © 1995-2007. Steve Weyer, Greg Simon. All Rights Reserved Worldwide

Version 2.1. Last updated: Dec 2000