This document describes the following BODY tags:
indicates a hyperlink Anchor. Several attributes are possible; for now, we just document (and implement) NAME and HREF. You can combine NAME and HREF in the same A expression.
Attributes: REL, REV, TITLE (not implemented); NAME, HREF
names a destination ("head anchor") for a hyperlink.
This has no visible effect. We typically add these to headings.
For example, a later section's heading is defined as:
<H3><A NAME="HR">HR</A></H3>
Notes: the first HR is the value (name) for this anchor (it can be different from the visible heading itself; case sensitive?). the second HR is the string which appears in this heading. You can apply A to text elements and to graphics (IMG). This now works with nested phrase markup.
Newt's Cape currently ignores empty strings, so to name a place in the document, you should include some non-spaces in the named range. Also, if you see strange results (especially with HREF), be sure to check that you aren't missing " or </A>. Note: Newt's Cape currently associates only a single name with an object, so if multiple names are specified, only the last will be used (and later found).
sets a destination for a hyperlink. When user taps the phrase (typically underlined), browser follows (or executes) the link. Usually, a destination consists of a document and possible named object within the document. For a relative file reference or absolute http: URL, Newt's Cape checks the "book cache" (i.e., saved book package in Extras) for a book that matches the filename (isbn) and full URL (book's BASE) -- if so, the book is opened. For NIE, Newt's Cape next checks the HTML source cache. Finally, Newt's Cape requests the URL via NIE or WebMail.
<A HREF="#HR">see HR</A>
<A HREF="othtools.htm#NCGC">NCGC</A>
<A HREF="introtoc.htm">Intro</A>
<A HREF="subdir/introtoc.htm">Intro</A>
<A HREF="mailto:weyer@kagi.com?subject=hello">weyer@kagi.com</A>
<A HREF ="http://www.w3.org">www.w3.org</A>
<A HREF="stylePalette">Styles</A>
<A HREF="beep">play "fun sound"</A>
Notes: ' also recognized as URL delimiter. HREF="javascript:..." recognized but ignored.
For NOS 2.x (with NIE), Newt's Cape requests the URL from a server via TCP -- this file may be another HTML document, or a .gif or .pkg file (or another MIME type if the appropriate helper app is installed).
For 1.x (or no NIE or using a mailto: Proxy), Newt's Cape posts an email message to the Outbox addressed to a WebMail server. After you send this message using your email client, e.g., Aloha, you will receive an HTML source document in your Inbox that you can access directly from Newt's Cape. It is possible that large documents may be truncated or split. This is not real-time -- the delay depends on your email system and its internet gateway.
adds a horizontal divider line.
Example: <HR>
Result:
ALIGN (not yet supported)
specifies the height (in pixels) of the divider (default: 2)
specifies the width of the bar in pixels or as percentage (default: current container)
a unary attribute. If present, divider is black; otherwise, it is dark gray (default).
adds an image or icon. Currently, Newt's Cape does not do any fancy layout, e.g., in-line graphics (use a table for horizontal layout). Should work within P, A, TD (table); other uses are less predictable. Large pictures automatically display a 2D scroll compass at lower left. If you would prefer to scale pictures to fit screen or table cells, use Scale to Fit option -- it does not scale 1.x PICT or any animated PICTs.
specifies the URI of the image resource. For NIE, this would the internet address of a .gif file. On the Newton, this could be a bitmap or PICT-format data object from ROM or a resource soup; if you use a single level of directory, this maps to the soupname, and the filename to a graphic object with that name or title slot in the soup, e.g., "bitmaps/nwscpicn.gif". See general description of graphic conversion/transfer and URL interpretation/shadowing. Graphics can be converted via NCGC and transferred via Sloup, or created locally with editors such as HexPaint. You can also include animated GIFs and other pictures (examples).
text to use in place of image if not available or skipped by user preference. Not required, but highly recommended.
Possible values: LEFT, RIGHT, CENTER (supported, except for image maps); TOP, MIDDLE, BOTTOM (unsupported).
indicates an image map. Normally used to indicate a server-side image map; Newt's Cape adds ?x,y to URL request (so that coordinates will work properly, ALIGN is ignored; and scaling may occur). For client-side image maps, use MAP and AREA.
Example: <IMG SRC="bitmaps/nwscpicn.gif" ALT="Newt's Cape Icon">
Result:
Example:<IMG SRC="Icons:BenG/someicon" ALT="Icon Editor icon">
Result:
You can use documented built-in, i.e., ROM icons. For further information, see advanced NewtonScript info.
Example:<IMG SRC="inboxIcon"ALT="Inbox">
Result:
You can include animated graphics (GIFs or built-in).
Example:<IMG SRC="arrows"ALT="rotating arrows">
Result:
reference to a MAP object
width of image in pixels (defaults to width of current container -- screen or table cell)
height of image in pixels (defaults to height of image itself). If image does not fit on current book page, it appears at top of next page.
Other attributes: BORDER, HSPACE, VSPACE (unsupported).
MAP supports client-side image maps via a series of AREA tags: each associates a region with an HREF. Starting with version 1.4, you can define several IMG objects, before or after the corresponding MAP and AREA tags.
The name attribute provides a local reference for an earlier USEMAP in an IMG. For example,
<IMG...USEMAP="#foo1"><MAP NAME="foo1">
AREA occurs inside MAP and defines a rectangle, circle or polygon region of a graphic image. Attributes:
Several examples (using ROM graphics/sound):
Contains table entries. Examples in intro and later. If a table has a large fixed width greater than screen size, Newt's Cape attempts to scale each column (rather than just clip rightmost columns as in earlier versions). For best results in your own documents, use percentages or smaller (or no) widths.
Typically used for a table title. (like Hx, should this be included in the book's TOC?)
Attributes: ALIGN(top,bottom) -- not implemented; BORDER (=0 to omit borders; =1 for a border (larger values default to 1), though for multiple items or certain objects there may be gaps; best to turn off if you have INPUT objects).
Current limitations: nested tables do not format properly (they are flattened into one table), rows with mixed height graphics (or radio buttons?) may not split properly, borders may not line up.
delimits a Table Row. </TR> optional? Newt's Cape uses the first row to define the number of columns and column width. Other rows with less than that number of columns will be padded. Newt's Cape generally uses equal column widths (unless cells specify a WIDTH attribute) and does not split rows across page boundaries.
A Table Heading, typically occurs in cells in first row and/or first column. </TH> optional? Attributes:
Table Data can contain text, phrase markup, IMG, and some FORM objects (INPUT, SELECT). Attributes: COLSPAN (default=1), ALIGN (default=LEFT), ROWSPAN (see TH note), WIDTH (see TH note). Newt's Cape should support empty cells, multiple items in a cell and headings (though gaps may occur if there are borders). </TD> optional?
<TABLE BORDER><CAPTION>Example: A test table</CAPTION><TR><TH>Head1 <TH COLSPAN=2>Head2 and Head3</TH><TH>Head4</TH><TH>Head5</TR><TR><TD>first <TD>long text, next cols missing <TR><TD><I>some italic</I><TD><B>some bold</B><TD><A HREF="#TABLE">a link</A><TD><I>some</I> <B>mixed</B><TD>E=mc<SUP>2</SUP><TR><TD COLSPAN=2>a straddle <TD>a picture (next) <TD><IMG SRC="inboxIcon" ALT="Inbox"><TD>the end</TABLE>
Result:
Head1 | Head2 and Head3 | Head4 | Head5 | |
---|---|---|---|---|
first | long text, next cols missing | |||
some italic | some bold | a link | some mixed | E=mc2 |
a straddle. example with many features: table with animated graphics using "NewtonScript URLs" to play a sound or stop/start animations | a picture (next) |
While Java support may not be available on the Newton until 1998(?), you can embed NewtonScript packages now directly in your page. We call these "newtlets". You could, of course, already run an application by tapping on its URL, i.e., appSymbol. But a newtlet appears in a reserved space on the page; you can also download the newtlet directly from the net if you don't have it installed. It automatically opens (with initialization PARAMeters) and closes, as you open/close the book or scroll the page. (Of course, such pages will not work properly on the desktop). http://members.bellatlantic.net/~sweyer/newton/newtscape/exs/newtlets.htm example shows use of built-in apps (e.g., stylePalette and alarm), and a user app (e.g., Lee Moon's Doggie). Attributes:
For example:
<H1>Doggie page</H1><P>here is a newtlet -- Lee Moon's Doggie. <APPLET CODEBASE="http://members.aol.com/PALMEDIA/" CODE="Doggie.pkg" WIDTH=55 HEIGHT=53 HSPACE=1 VSPACE=1 NAME="Doggie:LeeMoon" ALT="tap on this to run or download Doggie"><PARAM NAME="delay" VALUE="100"> <!-- speedup animation --></APPLET>
Further info/assumptions about Newtlets:
PARAM tag occurs inside APPLET to provide initialization parameters for a newtlet. Note: these are copied to the application object before opening, but they can also be provided via the :openNewtlet API.
PARAM attributes (kinda like META):
Newt's Cape does not yet support FRAME. However, it substitutes the SRC attribute as a text link, so that you can browse to pages in the frame set.
This document (in all its formats) is © 1995-98. Steve Weyer, Greg Simon. All Rights Reserved Worldwide
Version 1.5. Last updated: Jan 1998