home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 498b.lha / HyperText / Creating < prev    next >
Text File  |  1991-04-08  |  13KB  |  282 lines

  1. \help Ht.help
  2. \center
  3. \bold Creating Your Very Own HyperText Documents
  4. It's easier than you think! \bold
  5.  
  6. \format
  7.      O.k., so you want to know more about creating your own multi-media
  8. documents.  It's fairly simple as you will soon see.  All you need is a
  9. text editor, something to write about, and a little creativity. (It
  10. wouldn't hurt to read this file though ;-).
  11.  
  12. \underline What will HT allow me to do? \underline
  13.  
  14.     HT is based on a simple markup language.  This means that you embed
  15. special commands in your text and these commands let you change text styles
  16. (bold, italics, or underline), create links, and do simple text formatting.
  17. Obviously there needs to be some way to distinguish an HT command from
  18. regular text.  In HT, all commands begin with a '\\' character.  Whenever
  19. HT sees a '\\' character in your text, it assumes there is some sort of
  20. command following.  You can override a single '\\' by putting two '\\'
  21. characters in a row (just like was done above to get a single '\\'
  22. character).
  23.  
  24. \underline How do I put links and style changes in a document?\underline
  25.  
  26.     The commands you embed in your text are just a '\\' character followed
  27. directly by a keyword and a space.  For example, to turn bolded text on,
  28. you would use the \\Bold command.  That is to say, you would put a \\Bold
  29. keyword at the place where you would like bolding to start, and another
  30. \\Bold command to turn off bolding.  All HT commands take the form of a \\
  31. character followed by a single English word and a space.
  32.  
  33.     In the HT markup language, '\\' keywords can begin anywhere on a line,
  34. but must be ended with a space.  This means that after every keyword, there
  35. should be a space.  This is important to remember as otherwise, if you
  36. don't follow the \\ command with a space, some of the text you want
  37. displayed would look as if it was the \\ keyword and not be displayed.
  38.  
  39. \freeformat
  40. \bold Here are the commands HT offers: \bold
  41.  
  42. \italic
  43.       \\Link     \\Bold       \\Title
  44.       \\Show     \\Italic     \\Location
  45.       \\Anim     \\Underline     \\TextColor
  46.       \\Sound     \\Center     \\Fgcolor
  47.       \\Play     \\Format     \\Bgcolor
  48.       \\ARexx     \\Freeformat     \\Help
  49.       \\Rexx     \\Indent     \\Font
  50.       \\Run      \\Location
  51. \italic
  52.  
  53.     If you happen to use a text editor that supports ARexx, you are in
  54. luck.  Provided with HT, are sets of ARexx macro programs that work with
  55. TxEd+ and DME. The macros take away the tedium of typing in '\\' commands.
  56. They allow you to enter most HT commands with the mouse, via hotkeys, or
  57. from a menu.  To find out more about these Arexx macros, \Link {
  58. Editors.txt } click here.\endlink
  59.  
  60.  
  61. \center
  62. Let's get to the meat right away.
  63. There are three catagories of '\\' commands. They are:
  64.  
  65. \freeformat
  66. \indent 20
  67. \link { SetupInfo } Setup Commands \endlink
  68. \link { TextInfo } Text Style and Formatting Commands \endlink
  69. \link { LinkInfo } Link Commands \endlink
  70.  
  71.  
  72. \format
  73. \underline How write HT documents \underline
  74.  
  75.      The format which you type things in for HT is no different than
  76. normal typing. HT accepts plain textfiles and will simply display them.
  77. You can add many bells and whistles to this however to make the document a
  78. more effective display/learning tool.
  79.  
  80.      You can use different \link { TextCommands } text styles \endlink for
  81. emphasis.  You can use bold, italics, and underlining as needed.  Each
  82. window can also have it's own \link { SetUpCommands FONT } font.\endlink
  83. And it is possible to set the color of the text for each window.  These
  84. facilities are for helping get your point across, so it's a good idea to
  85. know about them.  The file \link { Textcommands } TextCommands \endlink has
  86. more information on text styles and such.
  87.  
  88.      To create your first hypertext document, you need to use a standard
  89. text editor to create a file.  \Run { /c/ed } Click here to run the
  90. included text editor (DME).\endlink    When you have started up your
  91. editor, arrange the windows so you will be able to work with this one and
  92. the text editor. (You may want to just take notes on this section, and then
  93. edit them directly).
  94.  
  95.      Now all you have to do is type in some text.  You can write about
  96. anything, but for now we'll write about the Amiga.
  97.  
  98.      Suppose the following lines were typed into your editor:
  99.  
  100. \indent 10
  101. The \\bold Amiga \\bold is a very interesting personal computer.  It has
  102. many features which make it distinctive against the bland world of IBM
  103. clones and black and white Macs.  The \\bold Amiga \\bold is \\italic The
  104. Computer for The Creative Mind.\\italic
  105.  
  106.     That text would be displayed by HT like this:
  107.  
  108. \indent 10
  109. The \bold Amiga \bold is a very interesting personal computer. It has many
  110. features which make it distinctive against the bland world of IBM clones
  111. and black and white Macs.  The \bold Amiga \bold is \italic The Computer
  112. for The Creative Mind.\italic
  113.  
  114.     You have just begun the creation of a "hypertext" document.  We started
  115. simple however, and only put in style changes.    As you can see, one command
  116. turns the effect on and another turns it off.  For example, the \\Bold
  117. keyword before the word "Amiga" tell HT to turn bolding ON, the \\Bold
  118. command that follows "Amiga" tells HT to turn bolding off.
  119.  
  120.     Real hypertext however, requires links to be defined between words in
  121. the current document and words that exist elsewhere.
  122.  
  123.      With HT this is easy to do.  Lets look at exactly what is needed to
  124. add a \ITALIC real\ITALIC  hypertext link.  We'll add a sentence that
  125. mentions the creator of the Amiga, Jay Miner, and we will link his name to
  126. a section heading in another file (non-existant at the moment) called
  127. Miner.txt.
  128.  
  129. \indent 10
  130. The \\bold Amiga \\bold is a very interesting personal computer.  It has
  131. many features which make it distinctive against the bland world of IBM
  132. clones and black and white Macs.  The \\bold Amiga \\bold is \\italic The
  133. Computer for The Creative Mind.\\italic   The Amiga computer was the
  134. brainchild of \\Link { Miner.txt Section 3 } Jay Miner.\\Endlink
  135.  
  136.     That text would be displayed by HT like this:
  137.  
  138. \indent 10
  139. The \bold Amiga \bold is a very interesting personal computer. It has many
  140. features which make it distinctive against the bland world of IBM clones
  141. and black and white Macs.  The \bold Amiga \bold is \italic The Computer
  142. for The Creative Mind.\italic  The Amiga computer was the brainchild of
  143. \link { miner.txt Section 3 } Jay Miner.\endlink
  144.  
  145.     Let's look at what was added.  The sentence we added starts out as
  146. normal text.  Then we see a \\Link keyword.  This tells HT we are starting
  147. to define a Text link.    An open brace ({) comes next.  The curly brace ({})
  148. part is common to \ital ALL \ital links.  The information between the
  149. opening '{' and closing '}' tells HT what it needs to know about the link.
  150. Since this is a text link, we are saying to link the phrase "Section 3" in
  151. the file "miner.txt" to the text after the closing '}'.  We need some
  152. way to tell HT to stop linking text, and we do this with the \\Endlink
  153. command.  All link commands use the \\Endlink command to end a link.
  154.  
  155.     Now if you were to continue elaborating on the Jay Miner topic, you
  156. would probably put a bunch of information about him in a seperate file.
  157. Then whenever his name comes up in your writing, you simply create a link
  158. to the file you have written on him.
  159.  
  160.     There you have it.    You have created your first hypertext link!  Now
  161. you can double click on the words "Jay Miner" and bring up the reference.
  162. That's all there was to it.  Again, if you happen to use an \link {
  163. Editors.txt } ARexx compatible editor,\endlink    you would be able to point
  164. and click your way through defining a link instead of having to type the
  165. '\\' commands.
  166.  
  167.  
  168.     Lets do another example.  This time, suppose we are writing about
  169. the first American Space missions.  We'll just say we are in the middle of
  170. discussing when the first spaceship landed on the moon.  There is a famous
  171. little snippet of digitized voice where the astronauts say "Roger Houston,
  172. the Eagle has landed".  It would be nice to link this piece of sound
  173. (assuming you had it on disk) into a sentence discussing landing on the
  174. moon. Suppose you had typed :
  175.  
  176. \freeformat
  177. \indent 10
  178.     Finally after many tense moments, the astronauts
  179. actually landed on the moon.  Even though their
  180. \\Sound { eagle.sound } voices were calm,\\Endlink
  181. you can't imagine the excitement they felt.
  182.  
  183. Which of course gets displayed by HT like this :
  184.  
  185. \freeformat
  186. \indent 10
  187.     Finally after many tense moments, the astronauts
  188. actually landed on the moon.  Even though their
  189. \Sound { eagle.sound } voices were calm, \Endlink you can't imagine the excitement
  190. they felt.
  191.  
  192.  
  193. \format
  194.     This example links the phrase "voices were calm," to the sound
  195. "eagle.sound".  Double clicking anywhere on "voices were calm," causes the
  196. sound "eagle.sound" to be played.  Similar to before, we have the \\Sound
  197. keyword which tells HT we are starting to define a link.  This time the
  198. link is to sound, so the text in the {}'s is relevant to playing a
  199. digitized sound.  However, the format is exactly the same as a text link.
  200. The information between the {}'s is the object being linked \bold TO.\bold
  201. Since this is a sound link, we put the name of a sound sample there.  The
  202. text after the closing '}' up until the \\Endlink keyword is the linked
  203. text (where you would click to trigger the link).
  204.  
  205.     Although that was a somewhat long-winded explanation, it does cover
  206. exactly what is going on.  The link keywords are relatively simple, but
  207. important to understand as they are the critical to creating effective
  208. hypertext documents.
  209.  
  210.     Those two examples basically cover all you need to know to create true
  211. hypertext/media links.    For example, suppose you instead wanted to link the
  212. sentence about the astronauts to a digitized picture of the astronauts in
  213. their space capsule.  All you would have needed to do is used the \\Show
  214. keyword instead and the name of the picture you wanted displayed.  As you
  215. can see, creating links is very straightforward, and all the link types are
  216. created in exactly the same way.  This makes things easy, as once you learn
  217. one type of link, you have learned them all.
  218.  
  219.  
  220. \underline Summing up so far\underline
  221.  
  222.     So far, we have covered the beginnings of creating a hypertext
  223. document.  You should have a general idea of what it takes to make a real
  224. hypertext document and some of the things you can do.  We've also covered a
  225. few of the commands and how to put them to use.
  226.  
  227.     There are more complete descriptions of the individual commands in the
  228. files \link { Linkinfo } LinkInfo, \endlink \link { setupinfo }
  229. SetUpInfo, \endlink \link { TextInfo } TextInfo.\endlink
  230.  
  231.     After going over the commands, you can start on your way to mastering
  232. this new form of media.  For now, we'll cover some background on designing
  233. hypertext documents.
  234.  
  235.  
  236.  
  237. \underline Hints and tips on designing Hypertext documents \underline
  238.  
  239.     When you begin creating a set of Hypertext documents, you can't just
  240. start typing away.  Well you can, but you will probably find that after
  241. about 20-30K of typing, that you have a large conglomeration of text that
  242. is too linear in fashion.  Granted different people work differently, but a
  243. little planning will save you a \ital LOT \ital of frustration.  Designing
  244. a coherent structure to your documents will help \bold you \bold decide
  245. where to put links and help your reader understand the content better.
  246.  
  247.     Regardless of the method you choose, one thing you should keep in mind
  248. is that the files you create should be small.  There are several reasons
  249. for this.  Firstly, it breaks things down nicely into individual sections
  250. which are easy to reference and link in other documents.  Secondly it
  251. keeps things manageable.  Third, it reduces memory requirements and disk
  252. loading time for someone who just wants to see a small section of your
  253. file.  This part is very important.  People are much more reluctant
  254. to use your information if they know it takes 30 seconds to load a 300k
  255. file from floppies.  Keeping individual sections in reasonably small files
  256. will again, save you and your reader lots of hassle.
  257.  
  258.     A quick outline of your ideas on paper or with a paint program will
  259. help you visualize what you are planning.  Then you can fill in the parts
  260. as you go along.  With HT it is easy to do a part at a time and fill in
  261. links as you go.  You can create links to files that don't yet exist, and
  262. then when you do create the file, all your links will work as expected.
  263.  
  264.     Another method is to first create all the individual files with only
  265. minimal HT specific information in them.  Then when you have finished a set
  266. of documents, you can go back and fill in the link information as
  267. appropriate.  If you work best from paper, it can sometimes be useful to
  268. print up each of the individual files and then go back with a red marker
  269. and indicate the links as needed.  Generally if you like to see the whole
  270. picture at once, this is a good way to do it.
  271.  
  272.  
  273.      As with anything, there are certainly lots of ways to go about
  274. creating a set of hypertext documents. I've just tryed to share a few tips
  275. and hints that I have come across while writing this documentation.
  276.  
  277.      At this point, you should find your way to the other documents on the
  278. disk.  From here, probably the best thing would be to look at the file
  279. \link { LinkInfo } LinkInfo.\endlink   You migh also want to go to view the
  280. file \link { TextInfo } TextInfo.\endlink
  281.  
  282.