home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
635.lha
/
ht_v3.2
/
HyperText.htx
< prev
next >
Wrap
Text File
|
1992-03-29
|
18KB
|
473 lines
\s "CONFIG"
PSHTS"HypertextGfx/SHTS.pic"
PSignature"HypertextGfx/Signature.pic"
\e
\s "START"
\p"SHTS"
\u\c3"The Simple HyperText System"\c1\n
v3.1
by
\p"Signature"\l"Signature" \l
\l"Signature" \l
The \uSimple HyperText System\n (SHTS) is an easy way to create \b\l"Text"text\l\n files
containing \b\l"HyperText"hypertext\l\n links. I'm lousy at writing docs, so rather than
explaining this, I'll demonstrate it. Click on any boldface word on this
page. Then click on \b\l"Prev"'Previous page'\l\n at the bottom of the screen.
Easy, huh?
Some pages (like this one) are larger than the screen size. Look in the
row at the bottom of the screen. You should see the words 'Up' and 'Down'.
If one of these is in boldface, there is more text visible. Click on 'Up'
or 'Down' to scroll the page. Alternatively, just click when the pointer
appears as an arrow to scroll in the direction of the arrow.
OK, here's the \ureal\n manual:
\b\l"Setup"Setting up the SHTS program\l\n
\b\l"Operation"How to use the SHTS program\l\n
\b\l"Creation"Creating HyperText files\l\n
\b\l"Bugs"Bugs\l\n
\b\l"History"Revision History\l\n
\b\l"Future"Things to Come\l\n
\b\l"Credits"Where to send praise, flames, etc...\l\n
\b\l"Index"Index\l\n
\e
\s "Signature"
If you're wondering if my signature \ureally\n looks like that, it does. Of
course, the fact that I can't draw didn't help me when I tried to draw the
computer image.
\p"Signature"
\e
\s "HyperText"
\uHypertext\n
Hypertext looks like standard text. However, when you select a word or
phrase in it, it cross-references to another section of text and displays
that. This makes hypertext especially useful for reference works. However,
almost anything can benefit from hypertext.
\e
\s "Text"
\uText\n
By text, I mean plain, vanilla, ASCII text.
\e
\s "Prev"
\uPrevious Page\n
Selecting 'Previous Page' moves you to the last page you were looking
at. Selecting it again goes one past that, and so on. SHTS stores a list
of the last 20 pages you were at.
\e
\s "Setup"
\uSetting up the SHTS program\n
The introduction of graphics into the SHTS has regrettable made it
somewhat more complicated. (But still not \utoo\n complicated! :-) I am now
using \b\l"iff.library"iff.library\l\n to display pictures. I would rather use the standard
system calls, but I can't get them to work, and \b\l"iff.library"iff.library\l\n is simpler
anyway.
Therefore, you need to copy iff.library to your libs: directory. (Of
course, since the program won't run without it there, you must already have
done this.)
In addition, a SHTS file that uses graphics in it will need to have the
graphics files where it can find them. This file expects them to be in a
directory names "HypertextGfx". For neatness, you may wish to place all
graphics files in a directory with "HypertextGfx:" assigned to it. In fact,
I hereby recommend that anyone who makes a SHTS file with graphics have the
file look for pictures in "HypertextGfx:".
\e
\s "Operation"
\uHow to use the SHTS program\n
By this point, you already know the basics of SHTS. Since there isn't
much to SHTS but the basics, that makes you an expert already! :-) However,
I'll go over even the simple stuff here.
To start SHTS, just type 'hypertext' from a CLI. The command line format
is:
Hypertext [i] <filename>
If you do not specify a filename, SHTS will use a file requester to ask
you for one.
The i option causes SHTS to load in interlace mode.
By clicking on a word on the screen that has a link attached to it, you
move to a different page. The convention is that words in boldface have links
attached to them. However, authors of SHTS files may not follow this rule.
(Although I hope that everyone does.) Whenever you move the mouse over a word
with an attached link, the pointer will change to a crosshairs.
If a page is larger than the screen size, clicking on the words 'Up' and
'Down' at the bottom of the screen will scroll the page. If either word is in
boldface, there is more text to be seen in that direction. If the mouse is
over the text and not over a link, it will appear as an arrow. Clicking the
mouse when the arrow is showing will scroll the text in the direction of the
arrow.
A note on the arrows: the hotspot on them is located in the center of the
pointer, not at the tip of the arrow. I have found that this placement offers
the best 'feel' to the interface.
Clicking on 'Previous Page' at the bottom of the screen will move you
back to the last page you viewed. Pressing it again will move you one page
before that, and so on. A list of the last 20 pages you viewed is stored.
Clicking on 'Restart' at the bottom of the screen will jump you to the
first page in the file.
Clicking on 'Load' at the bottom of the screen will bring up a file
requester. Select a file from there to load it. WARNING: my implementation
here is less than perfect. If you select 'Cancel', you will not return to the
file you were viewing; instead, the program will quit.
\e
\s "Bugs"
\uBugs\n
I know of only one bug in SHTS right now, and I'm not certain if the
problem lies in the program or my system.
When using CSH, starting SHTS with the CSH run or rback commands will
crash the system. I have been unable to find any reason for this. If anyone
out there can tell me what is going wrong, I'll try to fix it.
One bug that you may experience that is \unot\n in SHTS involves using the
Magic File Requester by Stefan Stuntz. Whenever the MFR is invoked, the
system loses a kilobyte or two of memory. I am documenting this here so that
people with the MFR don't think that it's \umy\n program that's buggy! :-)
\e
\s "iff.library"
\uiff.library\n
Iff.library is a library (what else?) by Christian A. Weber. It makes the
task of using IFF format files simple for the programmer. The library is very
small, making it a painless addition to the system. I am using iff.library
because I cannot figure out the 2.0 iffparse.library.
\uWARNING!\n The version of iff.library included with this archive is \unot\n
the latest version. I don't have the latest version. The archive which I got
this out of was on an AmigaWorld Tech Journal disk. Everything in the archive
was for the latest version, except the library itself. Go figure.
\e
\s "Creation"
\uCreating HyperText files part I -- Pages\n
My hypertext files are organized into "pages". You can view one page
at a time. Selecting a link opens another page. Selecting \b\l"Prev"'Previous Page'\l\n
bounces you back to the last page you were at.
Each SHTS page has a name. The reader does not look at this name. This
is used to specify where a link is going. The first page displayed is named
"START". There \imust\n be a page named START in the file. Case counts!
To specify the start of a page in the file, create a line like this:
\\s "START"
Whatever is inside the quotes is the name of your page.
To end a page, create a line like this:
\\e
A page may have any number of lines.
\b\l"Creation2"Continue...\l\n
\e
\s "Creation2"
\uCreating HyperText files part II -- Type styles\n
Text in the page may be set in different type styles. The control
commands for changing type style are:
\\n -- normal
\\u -- \uunderlined\n
\\b -- \bbold\n
\\i -- \iitalic\n
Just embed any of those sequences in your text to change the style.
You may also change the color of your text. The command for changing the
text color is: \\c#. '#' may be 0, 1, 2, or 3. These numbers correspond to
the following numbers:
0 - grey
1 - black
2 - white
3 - blue
To print a '\\', use two backslashes one after the other, like this: \\\\.
\b\l"Creation3"Continue...\l\n
\e
\s "Creation3"
\uCreating HyperText files part III -- Links\n
A hypertext link is created in much the same way as type styles are set.
You start and end links with: \\l
After the first \\l, you must specify a page to link to. Put the name
of the page in quotes.
Example of a hypertext link:
\\l"Page 1"This will link to page 1.\\l
This will display the text "This will link to page 1.", and when clicked
on will jump to the page named "Page 1".
You should put links in boldface to show the reader that they are links.
Beware! It is possible to create a link that encompasses several lines.
This seems to interfere with screen display. I hope to fix this at some
point, to allow links with height as well as length. For now, however, \udo not
create multiline links\n!
\b\l"Creation4"Continue...\l\n
\e
\s "Creation4"
\uCreating HyperText files part IV -- Graphics\n
You may include \b\l"ILBM"ILBM\l\n format files in the text. This is a two-step
process: first you must declare the files to use. Second, you place the
pictures in the text.
Currently, only four-color pictures are allowed. This will change. The
colors are restricted to the standard Workbench colors. I realize that this
limits the usefulness of this feature. As I said: this will change.
Pictures \ualways\n appear on top of text.
Brushes are fine.
\uSTEP 1: Declaring the files\n
I have added a section to SHTS files specifically for this purpose. This
section is a page names "CONFIG". If there is no CONFIG page, SHTS will
assume that there are no pictures. Eventually, I will expand the config page
to include other options.
To load a picture, begin a line in the CONFIG page with 'P'. The P \umust\n
be capitalized. \uImmediately\n after the P, type the name by which the picture
will be known. After the name, place the name of the picture to be loaded,
surrounded by quotes.
Here is an example from this file:
PSignature"HypertextGfx/Signature.pic"
This declares a picture names "Signature" (case counts) from the file
Signature.pic in the HypertextGfx directory.
\uSTEP 2: Placing the picture\n
Placing the picture is very easy. Place a \\p in the text. Follow it
with the name of the picture, in quotes.
An example:
Here is my signature: \\p "Signature"
This will produce the following:
Here is my signature: \p "Signature"
Course completed. Click here \b\l"START"[ ]\l\n to go to the start of the file.
\e
\s "CATS"
\uCATS\n
Commodore Amiga Technical Services
\e
\s "ILBM"
\uILBM files\n
ILBM stands for \uI\nnter\ul\neaved \uB\nit\um\nap.
ILBM files are a varient of the IFF format. They are used to store
graphics. The files that DeluxePaint saves are in ILBM format.
For more information, send $20 to \b\l"CATS"CATS\l\n, and you will learn everything
you ever wanted to know about IFF and ILBM, and more.
\e
\s "Credits"
\uCredits\n
This program was entirely made by me, Damien Neil.
Please send me a message telling me if you like it, and what you think
I should add to it. This is the first program I have made and distributed.
I really want to know what people think of it.
This is public domain. You may do anything with it that you want to,
including selling it for large sums of money. (Of course, if anyone asks
\ume\n for it, I'll send it to them for $1, that being about the cost of a disk
and postage.)
I take \uno\n responsability for anything this program does to you. If it
reformats your hard drive, too bad. (It won't though :-)
I reserve the right to release yet another version every few days. :-)
If you want the source code, ask for it and I'll send it to you. However,
if you are a beginning programmer, you \udon't\n want it. Trust me. It'll give
you bad habits you'll be trying to get rid of for the rest of your life. :-)
(Assuming, of course that you can understand >1000 lines of code with \uno\n
comments...)
My address: Damien Neil A.NEIL2 (on GEnie)
320 Wells Hill Rd.
Lakeville, CT
06039
\e
\s "History"
\uHistory\n
3.2 Fixed a nasty bug that cropped up -- I wasn't freeing any of the
memory I allocated to store the file! (I managed to delete the
line that called my CloseFile() routine.)
Made a few changes in the algorithm I use to change mouse coords
to character coords. The previous one was offset upwards a bit.
Changed around the way I close a file a bit. I now free the file
immediately after reading the data. Before, the file was only
closed when the user stopped reading it.
As promised, SHTS now has colored text. Quite easy to implement.
SHTS can now be run in interlace. This was \ureally\n easy. To give
you an idea as to how simple this was: I added 9 lines of code,
4 of which have only one character on them. Of those 9 lines,
only 2 are directly involved with changing the resolution. (Now
why didn't I put this in earlier?)
The mouse pointer now changes depending on its location. When
loading, it becomes the standard clock image. When over a link,
it becomes a crosshairs. When over the text, but not on a link,
it becomes an up or down arrow.
Added the 'Restart' option.
3.1 (U) Assorted bug fixes.
The program now stores a list of all blocks. This speeds up
linking tremendously. (I had a file with > 1000 lines. It was
taking almost a second to jump to blocks at the bottom of the
file!)
If you hold down the button on 'Up' or 'Down', the text will
scroll continuously.
3.0 Yes, it's here! GRAPHICS! This was \umuch\n easier than I thought
it would be. I managed it by ignoring iffparse.library and using
iff.library.
Bug fix: A \umajor\n problem here. If you got v2, you know about
it. The scrolling routines were \itotally\n messed up. Any
attempt at scrolling a page upwards would throw all the link
zones off kilter. <sigh> I have no idea how I missed this.
Anyway, its fixed now.
2.0 Added text scrolling. This should have been in here from the
start.
The screen now uses the default font. I'm still forcing topaz
80 for the page text. I may change this is the future, but
don't count on it. For me to do so, I would need to add a word
wrap function. (Yes, yes, I know I should do that too. However,
I would have to rewrite my scroll routines to accomodate it.)
I now load the entire file into memory to view it. This should
speed access significantly.
Bug fix: When you tried to use the 'Load' option, the file
requester would appear on the Workbench screen, not the
program screen. This problem came from using FR_Bypass -- if
that program was running, the requester appeared in the right
place. Now I just close the screen when loading a file. (OK,
so I'm lazy.)
1.2 (U) I just decided that I was kidding myself with the 1.1 fix. Until
I can support scrolling text, I'm going to force the screen to
use topaz 80. Sorry about this. I hope to get scrolling text in
here soon.
Bug fix: when you loaded a file over an old one, the screen was
not cleared.
Bug fix: the close routines were 'foo'.
1.1 (U) Bug fix: SHTS now does not gag on system fonts with a point
size greater than 8. However, a large font can force text off
the bottom of the screen. In other words, this still needs work,
since large fonts will render files unreadable.
1.0 Initial release
\e
\s "Future"
\uThings to Come\n
I have many ideas that I want to implement.
o Sound? If I can figure out how to do it (and I havn't even \uthought\n
about it yet) I'll stick in a way to play 8SVX samples.
o A scripting language. I want to throw in commands that can be
embedded in a file to give the author more control over the path
the reader takes through the text.
o True support for all screen resolutions.
o Pictures with more than 4 default colors.
What else should I put in? Tell me! Send me a letter or E-MAIL if there's
something you want. For my address, click here: \b\l"Credits"[ ]\l
\e
\s "Index"
\uIndex\n
\b
\l"CATS"CATS\l
\l"Credits"Credits\l
\l"Creation4"Graphics\l
\l"History"History\l
\l"HyperText"HyperText\l
\l"iff.library"iff.library\l
\l"ILBM"ILBM\l
\l"Creation3"Links\l
\l"Creation"Pages\l
\l"Prev"Previous Page\l
\l"Setup"Setup\l
\l"START"Start\l
\l"Text"Text\l
\l"Future"Things to Come\l
\l"Creation2"Type styles\l
\n
\e