: The HTML Stencil
This document describes how to use the HTML stencil provided with the MathSpad
distribution. Use of this stencil allows you to create HTML files for inclusion in a
worldwide web database without the need to learn all the low-level coding
information needed to specify an HTML element (for example that a title element
must be parenthesised by <TITLE> and </TITLE>).
This document is both an HTML document and a MathSpad document. The
HTML version can be read using Worldwide Web, and the MathSpad version can
be read from the MathSpad system by consulting the help information on the
HTML stencil. The HTML version was of course generated from the MathSpad
version.
If you want to find out more about MathSpad see here.
Warning: This stencil is incomplete. Some templates only provide the most
common options for that HTML element, and some elements, for example fill-out
forms and input fields, have not been included. Moreover, HTML is still under
development and new constructions are likely to be added in the future. If you
need a missing option, you can either change the template or enter the HTML
code directly. The layout of the templates may differ from the layout produced by
the HTML browser.
This document has been written using parts of HTML specification papers. If you
want to know more about HTML, hypertext, World Wide Web and related items
you might want to connect to the WWW Consortium.
The following HTML constructions are available.
Title
The title of a document is specified with this template. This template should occur
at the beginning of the document and there may only be one title in any document.
It should identify the content of the document in a fairly wide context. So, a title
like "Introduction" does not give much information to the reader.
The title is not part of the text of the document, but is a property of the whole
document. It may not contain any other templates. The title may be used to
identify the node in a history list, to label the window displaying the node, etc. It is
not normally displayed in the text of a document itself. Contrast titles with
headings. The title should ideally be less than 64 characters in length. That is,
many applications will display document titles in window titles, menus, etc where
there is only limited room. Whilst there is no limit on the length of a title (as it may
be automatically generated from other data), information providers are warned
that it may be truncated if long.
The corresponding HTML construction is <TITLE>...</TITLE>
Anchors
An anchor marks the beginning or end of a hypertext link. In the WorldWideWeb
browser, the hypertext link is used to move to a given position in another
document or to another position in the same document. You can not used these
links in MathSpad but you can specify them. An anchor has lots of optional
arguments but usually only two of them are used: one to mark the destination of
link with a label and one to mark the start of a link. For those kind of anchors a
template is made.
Hyperlink
The hyperlink template is used to add a link to a different file or to a different
position in the same file. The template has two versions: one to specify the name of
the file and one to hide that name. The hyperlink consists of two text fields, the
sensitive text and the filename. The sensitive text is underlined and the filename is
specified between < and > (in the first version). For example:
This link will give the reader the opportunity to read the file
anchor.html. The next link will do exactly the same, but the filename is hidden.
The sensitive text is shown to the reader of the document and it should give some
information about the contents of the file. The text should not be too large because
a browser like xmosaic will underline it.
To be able to make a link to a document on a different host on the network, the
name of the file has to be in a special format called URL. For local files, the normal
filename, relative to the position of the document containing the link will be
correct. For files on different hosts, you have to specify the protocol to retrieve the
file, the host to connect to and pathname on that host. The following protocols are
usually supported:
- http
- Hypertext Transfer Protocol.
- ftp
- File Transfer Protocol
- gopher
- Gopher protocol
- mailto
- Electronic mail address
- news
- Usenet news
- telnet,rlogin
- Reference to interactive sessions
- wais
- Wide Area Information Servers
- file
- Local file access
Some examples of filename specifications:
- http://www.w3.org/hypertext/WWW/Technical.html
- The file hypertext/WWW/Technical.html on host www.w3.org
- http://www.win.tue.nl/
- The default file (index.html) on host www.win.tue.nl
- http://some.host.name/users/list.html#root
- The file users/list.html on host some.host.name, shown at the
position where the label root occurs.
- ftp://ftp.win.tue.nl/pub/linux/SURFnet931027.gif;type=I
- The binary file pub/linux/SURFnet931027.gif on host
ftp.win.tue.nl
- ftp://ftp.x.org/contrib/
- The directory contrib from host ftp.x.org.
- ftp://ruby:RuBy@nasa.gov/users/ruby/picture.ps
- The file /users/ruby/picture.ps from host nasa.gov. The
username and password are specified to be able to read the file
in the Ruby's directory. Note that you should not specify your
password in any (world readable) file.
- gopher://gopher.win.tue.nl/11/internet/archives/usenet
- The directory 1/internet/archives/usenet on host
gopher.win.tue.nl. The filetype (directory in this case) is
specified after the hostname (1). The bookmarks of your
.gopherrc file can be used to make a correct URL.
- gopher://gopherhost.cca.vu.nl:4320/1tthyp%20nos-tt%20102
- The directory tthyp/nos-tt/102 on host gopherhost.cca.vu.nl.
The gopher server uses port 4320 and it uses spaces (20
hexadecimal) instead of backslashes.
- mailto:mathpad@win.tue.nl
- The opportunity for the user to send a message to
mathpad@win.tue.nl.
- news:comp.infosystems.www
- The newsgroup comp.infosystems.www
- telnet://vb2.libr.tue.nl
- Start a telnet session on host vb2.libr.tue.nl. This is the vubis
library server, so a username is not necessary. You can specify
a username with name:password@, where :password is
optional.
- file:/etc/profile
- The local file /etc/profile.
If you want to know more about the URL specification, you should look at the file
URI_Overview.html
The HTML generated by this template is <A HREF="filename">text<A>.
Label
The label template can be used to mark the destination of a link with a label. After
you placed a label `example' in a HTML document, you can make a link to that
label with the hyperlink template. The filename should be `#example' if the link
occurs in the same document as the label or `filename#example' if the link occurs
in a different document.
The template has two versions: one to show the name of the label and one to hide it.
To make sure you remember where you have placed your labels, two stacked
stars are used in both versions.
The HTML generated by this template is <A NAME="name"></A>.
Address
This template is used for address information, signatures or authorship, which is
usually added at the top or bottom of a document. The text is displayed italic and a
paragraph break is added automatically. To separate lines in the address template,
you have to use the linebreak template.
The HTML code for the template is <ADDRESS> text </ADDRESS> .
Quote
The quote template allows text quoted from another source to be rendered
specially. The browser will indent it a little and possibly use a different font. Some
browsers might use > characters in the left margin to indicate quotation in the
Internet mail style.
The HTML code will be <BLOCKQUOTE> text </BLOCKQUOTE>
Headings
The heading template supports the six levels of heading that are possible in HTML.
The headings are used to give the document some structure, but you should not
use all the different levels in one document. You can better make small document
and use links to indicate the structure.
Different browsers will display headings differently, so you can't say what your
document will look like to the reader. A heading will usually be shown bold, but
xmosiac will use different sizes while lynx will use different indentations.
The template will show the heading in a way related to xmosiac. The line breaks
are added, a bold font is used and the size is changed.
The first version, named Chapter, is the highest level and is recommended for the
start of a HTML document. The other versions can be used to make sections,
subsections, subsubsections, etc. . It is not normal practice to skip some levels, for
example a subsection following a chapter. Although it is legal, it is discouraged, as
it may produce strange results.
The HTML code will be <H1> text </H1> , <H2> text </H2>, etc.
Image
The image template is used to insert other documents inline. These documents are
usually icons or small graphics and have to be in a correct image format (xbm or
gif).
Browsers which are not able to display inline images will ignore these images.
Some browsers will be able to display (or print) linked graphics but not inline
graphics. So, if the graphic is essential, it may be wiser to make a link to it rather
than to put it inline. If the graphic is essentially decorative, then a inline image is
appropriate. If the graphic is very large, you might consider a small version as an
inline image with a link to the large version. The browser will load your document
quicker and the reader can decide if he wants to see the large version. (Note that
an image is allowed inside a link.)
The template consists of six versions. Each version will show the filename in a box
and the picture will be aligned (top, middle or bottom) with the surrounding text.
For each type of alignment, two versions are available: one without an alternative
text and one with an alternative text. This text could be used as an alternative in
an text-only environment.
The HTML code for this template is <IMG SRC="filename" ALIGN=...
ALT="text">.
Glossary
This template can be used to make a glossary. A glossary (or definition list) is a list
of paragraphs each of which has a short title alongside it. Apart from glossaries,
this template is useful for presenting a set of named elements to the reader. The
template has four versions. Two versions are available to set the correct
environment and two versions are available to add a new item. The item versions
must be used inside the environment version.
The Glossary and Compact version are the environment versions. In the Compact
version the different items will be closer together and the left column will be
smaller, although it will depend on the contents of the items.
The two item versions will add a new item to a Glossary or Compact. The Item (G)
version will put the description on a different different line, while the Item (C)
version will put it on the same line. The description will be indented and the
environment will determine how large this indentation will be.
The Glossary version will produce <DL>...</DL> as HTML code. The Compact
version will produce <DL COMPACT>...</DL> and the two item versions will
produce <DT>item<DD>description .
Lists and items
The templates List and Items are used to enter the list of items. The List template
is used to determine how the list should look like. There are four different
versions, one for each list that HTML supports:
- Unordered
- Each item is marked with a bullet (or other symbol if the list is used
nested).
- Ordered
- Each item is marked with a number to indicate that the order is
important.
- Menu
- The items are not as large as in a normal list, typically one line per item.
- Dir
- The items are short, typically less then 20 characters. The browser may
arrange them in columns across the page.
The items for these lists are all entered with the same HTML code. In MathSpad
there are different versions of an item to indicate which one will be used by the
browser. MathSpad will not check if you use the correct item inside a list template,
so you have to check that yourself. The three versions will show a bullet, a i (to
indicate a number) or nothing.
Line and paragraph breaks
The LineBreak template consists of three versions, which can be used to insert a
line break, a paragraph break or a horizontal rule. Every browser will reformat
the document at the moment it is loaded. Normal text will be formated as one
paragraph so you have to place some markers to indicate where a new paragraph
or a new line begins.
The "New Line" version will force the browser to start on a new line. The version
will display a ¶ symbol to indicate that a template is used (only a newline would
not be visible).
The "New Paragraph" version will force the browser to start on a new line and
usually will leave one line blank. This version will insert a § symbol on a separate
line.
The "Horizontal Rule" will insert a horizontal rule on a separate line.
The HTML code of these versions is <BR>, <P> and <HR>
Preformatted text
The preformatted text is entered with the Preformat template. The text will be
displayed in a fixed width font. In MathSpad you can still used all the templates in
the preformatted text but the browser will not always be able to format
everything.
The paragraph break and line break are not necessary in preformatted text. The
hypertext links and different fonts may be used although you can't expect that
the font changes will be visible. All other templates should not be used.
Different fonts
The font template makes it possible to highlight sections of text by using different
fonts. At the moment there are five versions: bold, italic, typewriter, emphasis and
strong emphasis.
Some browsers will not be able to show highlighting, so you can't rely on the fonts
changes to highlight text.
Special Characters
In HTML, there are a number of special characters: <, >, & and ". These symbols
have special macros called entity names. Usually, you don't want to know or see
the macros, so you can enter them with the Char template.
The template also contains the non-breaking space. In some situations you want
to be sure that the browser will not put a line break between two words, as in: On
page 27 Mr. Bond is in trouble. This non-breaking space is displayed with a
underlined space.
The HTML code for these five items is < , > , & , " and  . The
code for the non-breaking space should be or   , but a browser will
not display those correctly. If you find any HTML code that can be used as a
non-breaking space, please let us know.
The ISO Latin 1 characters are available via the symbol windows. This window
contains the accented characters, which are often used in foreign languages, and
a number of special characters like ¥ £ © ª ¾ and µ.