next up previous

4.5 Making Your Own Documents with HTML     continued...

Just defining the text as an anchor is only half of what you want, however. What you need to do is tell Mosaic where to go when the user clicks on the word ``alphabet.'' The following line says ``fetch the document grammars.html from an HTTP server at and position the entry for alphabet at the top of the window'':

... from an
<A HREF=''">
alphabet</A> of ...
This <A> command has an ``href'' (hypertext reference) field, which identifies the anchor as the front part of a link. It will be printed in blue and underlined when the document is displayed. The argument of href is a URL for the document that should be opened when the user selects the link. There are also ways to specify link targets in local documents or in other sections of the current document.

Short and simple documents like a home page can be written directly in HTML. Just use your favorite text editor to write the HTML ``program'' and then open the program with the Open Local... command in the File menu.

For more complex projects you should look into one of the automatic translation program that are currently being developed. A group the University of Leeds in England is working on a program that will generate an HTML file from LaTeX input. This should be very useful for people who already have a large body of text in LaTeX and want to convert these documents to hypertext. We leave it as an exercise to use Mosaic to track down information on this and related projects.

(See exercises 6, 6, 6, 6, and 6.)