home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / khtepm14.zip / kenHTepm.doc next >
Text File  |  1996-10-20  |  11KB  |  191 lines

  1.     
  2. (Note:  this file has been enhanced for EPM.  For best results, use Info-Zip to 
  3. unpack the zipfile, which will save the extended attributes, and use black type on a 
  4. light grey background in EPM.)
  5.  
  6.                                       kenHTepm 
  7.  
  8.      Thanks for trying this EPM macro!
  9.  
  10. Overview:
  11.     First of all, I want to acknowledge the work done by Larry Margolis and Eduardo
  12. Areitio.  Their HTML macros (HTMLTAGS.E and HTMEPM98, respectively) contained
  13. stunning code which I could never have written in a million years.  I used Larry's
  14. URL-management code as a library routine in many areas (and also his drag&drop
  15. routines); and Eduardo's code for generating tables, checkboxes, and radio buttons.
  16. Thanks to both for their kind permission to use their source code!
  17.     My goal with kenHTepm was to take the best features of each of those macros and
  18. combine them; adding more functionality, a more logical menu layout, updating the
  19. HTML tags to support the HTML3.2 (Wilbur) "standard", as well as providing
  20. accommodations for the proposed "Cougar" enhancements.
  21.  
  22. New in this release (version 1.4):
  23.      1. Changes to the "Table" function:
  24.           a.  Now uses the vertical bar (|) instead of a comma for the initial 
  25.           separation of data items.  This means that data containing commas can now 
  26.           be entered (!).
  27.           b.  New context-sensitive prompt for the location of header cells.  Can be: 
  28.           top row only, left column only, both, or none.
  29.           c.  Added warnings if the data has not been line-marked.
  30.      2. Inoperative menu items are now greyed out.
  31.      3. Re-wrote "Connections" prompt messages as more general descriptions.
  32.  
  33. Features:
  34.      1.  Easy table creation -- enter the data in a simple, straightforward manner 
  35. and let the macro do all the tedious work.  Header cells can be specified as:  top 
  36. row only, left column only, both, or none.
  37.      2.  Quick & easy insertion of paragraph tags and list tags around imported text.
  38.      3.  Full frames support.
  39.      4.  Complete forms support, including all input methods.
  40.      5.  Support for new NetScape3.0 tags:  multi-column, spacers, and 
  41. embedded LiveAudio, LiveVideo, Live3D, and Quicktime.
  42.      6. Support for other NetScape tags:  "big", "small", "blinking", font colour,
  43. font face, and basefont.
  44.      7.  Context-sensitive prompts, including maintaining lists of frequently used 
  45. URL's, target names and customized user tags.
  46.      8.  Java applet tags.
  47.      9.  Full complement of HTML special characters, including accented characters, 
  48. math symbols, currency, etc.
  49.      10.  "One-click" Internet connectivity for your FTP, Telnet, browser and comm 
  50. programs.
  51.      11.  Menu access for external HTML utilities such as syntax-checking,
  52. references, and removing HTML tags from a document.
  53.      12.  Quick preview of the document in your favourite browser.
  54.  
  55. Features that aren't obvious:
  56.     1. You can drag&drop an image file, a HTML document, or a WebEx URL item and the
  57. appropriate location info will be inserted at the cursor, using relative links when
  58. appropriate.
  59.     2. The "Paragraph" menu item has an "auto-tags" feature.  If you've imported some
  60. straight ASCII text into your HTML document, mark all the appropriate lines (using
  61. line-marking) and select the "Paragraph" menu item.  Opening & closing paragraph tags
  62. will automatically be inserted around each paragraph.  Paragraphs will be found if 
  63. they are separated by an empty line, and/or if they start with a blank space or a tab
  64. character.
  65.     3. The five "List" items (ordered, unordered, directory, menu, and definition)
  66. also have "auto-tags" capabilities.  After line-marking the appropriate lines,
  67. selecting one of the "List" menu items will bracket the group of lines with opening &
  68. closing tags and insert either a list item tag or a definition list term tag at the
  69. beginning of each line.
  70.      4.  Pressing <Ctrl>+<Alt> and single-clicking mouse button 2 will bring up a 
  71. selection list for commonly used HTML tags.  This is especially handy for generating 
  72. tables, or paragraphs and lists from imported text, since the initial data must first 
  73. be line-marked, usually by dragging MB2 over the lines.
  74.      
  75. What doesn't work yet:
  76.     1. "Divisions" on the "Separators" menu currently adds only the alignment option.
  77. As/if more options are agreed to by the W3C standards committee, they will be added
  78. here.  (Not all browsers support the ALIGN=CENTER tag.)
  79.     2. "Object" under the "Links, objects" menu is inoperative, again pending more
  80. definitive info from the W3C and more general implementation by browsers.  The same 
  81. is true for the "Button" input type in the "Forms" menu, and the "Fieldset" and 
  82. "Label" items in the "Form"s menu. 
  83.     3. Several entities under the "Special Characters" menu and its sub-menus
  84. ("trademark" and various spaces & dashes) are also inoperative because their
  85. respective codes are proposals only and are subject to further review and could
  86. change.  Not many (if any) browsers currently support 'em, anyway.
  87.     (N.B.:  the symbols used for displaying the special characters in the menus vary
  88. according to the codepage your system is using.  <sigh>  Codepage 850 displays most 
  89. of 'em, but misses a couple.  Codepage 437 (USA) gets those, but misses most of the
  90. rest.)
  91.     4. The "Span" and "Style" items (under the "Documents" menu) currently insert the
  92. basic opening & closing tags.  As these elements become better defined (and
  93. implemented by browsers), I'll add more functionality.
  94.  
  95. Getting Started
  96.      Requirements:  You'll need the matching ETPM.EXE compiler for your version of 
  97. EPM, and the "base" *.E macros must be available to it at compile time.  I'm using 
  98. EPM6.03b, but I don't see why earlier versions shouldn't work.  
  99.     EPM6.03b is available on the Hobbes site (ftp://ftp-os2.nmsu.edu/os2/editors)
  100. as several files named EPM*.ZIP.  The file EPMBBS.TXT is a packing list, and
  101. describes the contents of the zip files.  The base *.E macros are in EPMMAC.ZIP.
  102.     Configuration:  This is a three-step process:  adding your customizations to the
  103. KENHTEPM.E file; compiling that file into a KENHTEPM.EX file; and linking KENHTEPM.EX
  104. into your running copy of EPM.
  105.  
  106.      Customizing your copy
  107.     If you're unfamiliar with the E macro language, there's plenty of info available
  108. in the EPMUSERS.INF and EPMTECH.INF references.  For our purposes here, you need to
  109. know: 
  110.     1. Putting a semi-colon in the first column of a line makes that line a comment
  111. and it's ignored.  (This is a good way to customize parameters by adding your own
  112. lines without losing the original lines.)
  113.     2. Any literal string you want passed to the application (or to OS/2) must be
  114. enclosed in quotes.
  115.  
  116.      There are some settings you will need to make to customize kenHTepm for your
  117. system -- these are the "MY_*" constants near the beginning of the file:
  118.     1. If you define a MY_HTML_ADDRESS constant, that info will be automatically
  119. added at the end of new documents.  (See examples at the beginning of KENHTEPM.E.)
  120.      2.  MY_TIMEZONE is used to append your time zone at the end of the "Last 
  121. updated" line, if you use that line in your HTML file.
  122.      3.  WANT_HTML_MONOFONT if set to '1' will automatically use your default 
  123. monospaced font for HTML documents.
  124.     4. MY_HTML_MARGINS allows you to set the default first column, margins, and new
  125. paragraph firstline indentations.  (For consistent formatting, it's best to keep the
  126. first column and firstline indent the same.)
  127.     5. MY_HTML_TABS lets you set the default tab space.  Since kenHTepm uses 3 spaces
  128. for its multi-line formatting, it's recommended you leave this set for '3'.
  129.      6.  MY_HTML_STRIP defines the program and parameters (if any) to use to strip 
  130. out the HTML tags.  (kenHTepm contains code for using Don Hawkinson's excellent
  131. UNH.EXE, and will automatically specify the target file & URL file names that that
  132. program can generate.)
  133.      7.  MY_HTML_CHECK does likewise for the WebLint syntax-checking program.  If 
  134. you don't have WebLint on your system, using something like:
  135.           MY_HTML_CHECK='linkup.exe explore.exe -t 8 -q http://<location for validator>' 
  136. should work for accessing a validation service on the 'Net.
  137.      8.  MY_COM_PROG takes the name (and parameters) of your favourite com program.
  138.      9.  MY_TELNET does likewise for telnet.
  139.     10.  MY_FTP ditto for your FTP program.  If you use FTPPM.EXE (recommended),
  140. you don't need to add any additional parameters after the program name -- once you've
  141. connected to the FTP site, your local directory will be automatically set to the
  142. directory containing your HTML file and the transfer mode will be set to "binary".
  143. Then you can simply drag&drop files from one window to the other (in FTPPM) to do the
  144. transfer.
  145.      11.  MY_BROWSER takes the name and parameters for your browser.
  146.      12.  MY_COLOR_REF is the program you use for testing colour combinations, and 
  147. MY_HTML_REF is your reference app for HTML tags.  You can see how I've configured 
  148. mine for a couple of Windows apps.
  149.      That's it!
  150.  
  151.      Compiling kenHTepm
  152.      Re-compile kenHTepm.e (as "htmltags.ex" if you're already autoloading 
  153. a file by that name into EPM, or as "kenHTepm.ex" if you're going to link it in 
  154. manually.)  The syntax is
  155.           ETPM <source drive\path\>kenHTepm.e <target drive\path\>kenHTepm.ex
  156. Use the same directory the other EPM *.ex files are in as your target directory.
  157.  
  158.      Linking kenHTepm
  159.      There are a few different ways to do it:
  160.      1.  Bring up an EPM command line and enter:
  161.           link kenHTepm
  162. This will add the "kHTML" item to the main menu bar.
  163.                                          or
  164.      2.  If you're using a PROFILE.ERX, and want kenHTepm loaded when you start 
  165. EPM, add the following line to PROFILE.ERX (the quotes are necessary):
  166.           'link kenHTepm.ex'
  167.                                          or
  168.      3.  If you've been re-compiling the main EPM macros to add your customizations, 
  169. add the following line to your MYSTUFF.E file (the quotes are necessary):
  170.           'link kenHTepm.ex'
  171.  
  172.     If you want to remove the macro, at an EPM command line enter:
  173.           unlink kenHTepm
  174. That will remove the functionality of the macro and, in most cases, also remove the 
  175. "kHTML" item from the menu bar.
  176.  
  177.                              That's all there is to it -- 
  178.                                        Enjoy! 
  179.                    Send any comments or suggestions to: 
  180.                                    Ken Arway 
  181.                                arway@wwa.com 
  182.  
  183.                       DISCLAIMER:  I make  no claims, expressed  
  184.                       or implied,  as to  the fitness   of this  
  185.                       code or  its suitability  for any purpose  
  186.                       whatsoever.  I will not be liable for any   
  187.                       damages  of any  kind resulting  from the   
  188.                       use of this code by anybody  at all.  Use   
  189.                       of this  code is   entirely at   your own risk.   
  190.  
  191.