home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / text / latex / mac / alpha60.hqx / Help / HTML Help < prev    next >
Encoding:
Text File  |  1995-07-04  |  15.4 KB  |  426 lines

  1. ================================================================================
  2. = What's Going On Here?
  3. ================================================================================
  4.  
  5. HTML Mode is for editing HyperText Markup Language documents (suffix 
  6. ".html").  It is not a previewer, nor is it a verifier.  If you don't 
  7. know about HTML or the WorldWideWeb, FTP to ftp.netscape.com and pick 
  8. up their "Netscape" client to start with.  Run it and click on the 
  9. interesting buttons.
  10.  
  11. One of the fundamental concepts behind this HTML environment is to 
  12. avoid use of the mouse unless it's really advantageous.  Too many 
  13. environments slow down your work, and hurt your hands, by forcing you 
  14. to go back and forth between mouse and keyboard.
  15.  
  16. When you use this package, by default you will see bullet characters 
  17. (Ñ, option-8) being dribbled near where you insert elements.  These 
  18. are supposed to be a feature.  The tab key takes you to the next one.  
  19. For example, if you insert a header, the cursor will be inside the 
  20. header element, with a bullet after it.  Type in the header text and 
  21. hit tab to go to the bullet (and automatically delete the bullet).  If 
  22. you like, you may ignore the bullets and at any time either press 
  23. cmd-tab or select "Remove Marks" from the HTML menu to eliminate all 
  24. of them.  If you never want these at all, turn off the flag 
  25. htmlUseTabMarks (see the section on User-Settable Variables).
  26.     
  27. Without Pete Keleher's ongoing development of Alpha this wouldn't have 
  28. been possible in the first place.  I am also indebted to the authors 
  29. of the original html.el for GNU Emacs and latex.tcl for Alpha, from 
  30. whom I originally took ideas and some tcl code.
  31.     
  32. I want feedback.  I'm Scott Brim <swb@nr-atp.cit.cornell.edu>.  This 
  33. is "opinionware" -- if you use it regularly, you should tell me your 
  34. opinion.  If you want to hear about beta releases, send me mail and 
  35. I'll put you on the list.
  36.  
  37.  
  38.  
  39. ===============================================================================
  40. = The HTML Menu
  41. ===============================================================================
  42.  
  43. Headers    -        Insert section headers, from H1 to H6.
  44.  
  45. Text Blocks    -    These are various text-blocks.  Not all are here, 
  46.                 since some have enough importance to merit their own sections.
  47.                 However paragraph (<p>) is one to note under here.
  48.  
  49. Styles    -        Emphasis, etc.
  50.  
  51. Links    -        Hypertext links TO and FROM other points, plus images.
  52.  
  53. Lists    -        All kinds.
  54.  
  55. Forms    -        The elements for building forms.
  56.  
  57. Tables    -        The elements for building tables.
  58.  
  59. Character Entities    -    The entities for characters, for example ƒ is 
  60.                         ü.  The "short" list at the top can be added to
  61.                         with the "Add" item.  All possible entities are
  62.                         on the "all" menu.
  63.  
  64. Other Elements        -    Things which don't fit elsewhere.
  65.  
  66. Select Container    -    Selects matching tags which include the current 
  67.                         selection.  Repeated, it expands the selection.
  68.                         Like the "Balance" item under the Edit menu.
  69.  
  70. Untag                -    Removes a tag pair surrounding the current position
  71.                         or selection.
  72.  
  73. Remove Marks        -    Removes the Ñ's throughout the document.
  74.  
  75. New doc template    -    Produces <HTML>, <HEAD> and <BODY> elements.
  76.  
  77. URLs    -            Everything for managing the URL cache.
  78.  
  79.                     HTML mode accumulates a list of the URLs you use in 
  80.                     your HREFs, and saves the list across invocations of Alpha 
  81.                     (so it can help you to put in new URLs rapidly).  After 
  82.                     a while this list can get large.  When you select "Clean
  83.                     up" you will be presented with a list.  Use the 
  84.                     mouse to shift-click and select the URLs you want to keep.  
  85.                     The rest will be expunged.  If you select text, or copy
  86.                     text from another application into the Mac clipboard, you
  87.                     can insert this into the URL cache as a new URL.
  88.  
  89. Use Attributes    -    You don't have to be asked about all possible 
  90.                     attributes for every element.  You can select
  91.                     which ones you want to be asked about.  HTML Mode
  92.                     comes configured to ask about the most popular ones.
  93.                     
  94. HTML Helpers    -    You can launch various applications to view/check your
  95.                     HTML.  
  96.  
  97.  
  98.  
  99.  
  100. ================================================================================
  101. = Key Bindings
  102. ================================================================================
  103.  
  104. If you are using the default options, almost all key bindings are on 
  105. control-option, except for a few conflicts which I put on 
  106. shift-control-option and a few miscellaneous ones.
  107.     
  108. Here are the bindings, with comments, straight from html.tcl.
  109.  
  110.     #
  111.     # new file template and headers
  112.     #
  113.     ctl-opt-0        NewTemplate    # 0 before any headers
  114.     ctl-opt-1        Header1    
  115.     ctl-opt-2        Header2    
  116.     ctl-opt-3        Header3    
  117.     ctl-opt-4        Header4    
  118.     ctl-opt-5        Header5    
  119.     ctl-opt-6        Header6    
  120.  
  121.     #
  122.     # Blocks
  123.     #
  124.     ctl-opt-Return    Paragraph
  125.     Enter            Paragraph    # for powerbooks
  126.     ctrl-M            Paragraph
  127.     ctl-opt-;        Comment
  128.     ctl-opt-a        Address            
  129.     ctl-opt-q        Blockquote    # q for quote
  130.     ctl-opt-p        Preformatted    
  131.     # CENTER doesn't have a binding, since it will most likely go away
  132.     
  133.     #
  134.     # Styles
  135.     #
  136.     ctl-opt-e        Emphasized    
  137.     ctl-opt-s        Strong        
  138.     ctl-opt-b        Bold        
  139.     ctl-opt-c        Code        
  140.     ctl-opt-v        Varname        
  141.     shift-ctl-opt-c    Cite
  142.     ctl-opt-k        Keyboard    
  143.     ctl-opt-i        Italic        
  144.     ctl-opt-f        TT            
  145.     
  146.     #
  147.     # Links
  148.     #
  149.     ctl-opt-,        Anchor    # "<" is something pointed at
  150.     ctl-opt-.        Href    # ">" points to it
  151.     ctl-opt-/        Image    # "/" is right next to ">"
  152.     
  153.     #
  154.     # Lists
  155.     #
  156.     ctl-opt-u        Bulleted (UL)
  157.     ctl-opt-o        Numbered (OL)
  158.     ctl-opt-d        Directory
  159.     ctl-opt-m        Menu            
  160.     ctl-opt-n        ListEntry         # n is for 'eNtry'
  161.     ctl-opt-g        BuildDiscList    # g is for 'Glossary'
  162.     shift-ctl-opt-n    DiscEntry        # N, eNtry with shift key
  163.     
  164.     #
  165.     # Forms
  166.     #
  167.     shift-ctl-opt-f    Form
  168.     shift-ctl-opt-s    Select
  169.     shift-ctl-opt-o    Option
  170.     shift-ctl-opt-i    Input
  171.     shift-ctl-opt-t    Textarea
  172.  
  173.     #
  174.     # Character entities
  175.     #
  176.     # Only <, > and & are bound, to shift-cmd-opt-<char>
  177.     # The other entities can only be accessed from the menu.
  178.     shift-ctl-opt-,    LessThan
  179.     shift-ctl-opt-.    GreaterThan
  180.     shift-ctl-opt-7    Ampersand
  181.     
  182.     #
  183.     # Other
  184.     #
  185.     ctl-opt-!        linebreak    # shift-ctl-opt-1 for <BR>
  186.     ctrl-C L        commentline    # for internal aesthetics
  187.  
  188.     #
  189.     # Miscellaneous
  190.     #
  191.     cmd-B            select container
  192.     shift-ctl-opt-u    untag around the selection
  193.     cmd-shift-s        launch a browser
  194.     Tab                TabNext
  195.     Shift-Tab        TabPrevious
  196.     
  197.  
  198.  
  199.  
  200. ================================================================================
  201. = Other Possible Key Bindings
  202. ================================================================================
  203.  
  204. It is possible to change the keybindings in two ways.  First, by changing 
  205. the variables htmlPrefixString and htmlSPrefixString (see below, and 
  206. remember to change the Menu-related strings as well).  Second, by using 
  207. the Alpha 'bind' command.  
  208.  
  209. Here are some simple bindings, included as samples of what is possible.  
  210. For example, if you are using an international keyboard to produce German 
  211. HTML, you might put these lines in your prefs.html (under the Edit 
  212. menu).  For more complicated examples see the html.tcl source.
  213.  
  214.     bind 0x27 <s>         {insertText "Ä\;"} "HTML"
  215.     bind 0x27             {insertText "ä\;"} "HTML"
  216.     bind 0x29 <s>         {insertText "Ö\;"} "HTML"
  217.     bind 0x29             {insertText "ö\;"} "HTML"
  218.     bind 0x21 <s>         {insertText "Ü\;"} "HTML"
  219.     bind 0x21             {insertText "ü\;"} "HTML"
  220.     bind 0x1b             {insertText "ß\;"} "HTML"
  221.  
  222.  
  223.  
  224. ================================================================================
  225. = User-Settable Flags and Variables
  226. ================================================================================
  227.  
  228. HTML mode is highly customizable.  You can modify its behavior in one 
  229. of three ways.
  230.  
  231. If you don't know what any of the following means, ignore it for now.  
  232. You will eventually.
  233.     
  234. (1) Most HTML variables are simple things, for example the number of 
  235. entries you want in a new discursive list.  Almost all are set by 
  236. using the Flags menu (click on the little flag on the side of the 
  237. window the HTML file is in -- if you don't see the mode's flags and 
  238. variables, select "Mode Info" near the bottom of the menu and try 
  239. again).
  240.  
  241. FLAGS
  242. -----
  243.     
  244.     wordWrap        -    Newlines are automatically inserted as you type.  The 
  245.                         default is 1, lines will be wrapped.
  246.  
  247.     prefixString    -    The string to begin an HTML comment, and the one to 
  248.     suffixString    -    end a comment.  Generally a bad idea to change these.
  249.     
  250.     useStatusBar    -    If an element has attributes, and this is set, the 
  251.                         attributes will be asked about in the status bar.
  252.                         Otherwise they will be asked about in popup prompt 
  253.                         windows.  The default is 0, do not use the status bar.
  254.                         
  255.                         When using popups, an attribute can be skipped by
  256.                         clicking "cancel" or pressing cmd-..
  257.                         
  258.                         When using the status bar, at any point pressing cmd-v 
  259.                         will paste the contents of the clipboard.  Also, at 
  260.                         any point the tab key will match what you have typed 
  261.                         against your options, and complete what you have typed 
  262.                         as much as possible.  For example, when prompted with 
  263.                         "align=", you can type "m" and tab, and Alpha will fill 
  264.                         in "iddle".  When you are entering a URL, if you hit
  265.                         tab twice in a row, you will be presented with a menu
  266.                         of URLs you have used before.  To approve the selection 
  267.                         press return.  You can also back up over what has been 
  268.                         filled in and change it.  Try the tab key even when 
  269.                         nothing is showing.  Understanding how best to use it 
  270.                         takes some use.
  271.  
  272.     promptNoisily    -    If useStatusBar is set, Alpha will beep when 
  273.                         asking for element attribute information there.  The
  274.                         default is 1, do beep.
  275.  
  276.     useLowerCase    -    If 0, elements will be like <P>; if 1, like <p>.  
  277.                         The default is 0, upper case.
  278.     
  279.     useTabMarks        -    If 0, will not insert the Ñ characters.  The
  280.                         default is 1, to insert them.
  281.  
  282.     allContainers    -    If set, <P>, <LI>, and <DD> have 
  283.                         corresponding closing tags.  If not set the optional 
  284.                         closing tags are skipped.  The default is 1, make them 
  285.                         containers.
  286.                         
  287.     browseInForeground    -    if set, when you send a file to the browser, the
  288.                             browser will be brought to the foreground.  If you
  289.                             have lots of screen space and are just validating,
  290.                             uncheck this flag to leave the browser in the
  291.                             background and Alpha in the foreground.  The 
  292.                             default is 1, bring browser to foreground.
  293.                             
  294.                             Most browsers will *only* launch in the foreground
  295.                             when they are first brought up, regardless of your
  296.                             flag setting.  This is not an Alpha bug.
  297.                             
  298.                             
  299. VARIABLES
  300. ---------
  301.  
  302.     DLEntries        -    The default number of DD/DT entries for a new discursive 
  303.                         list.  The default is 3.
  304.                         
  305.     URLAttrs        -    Element attributes which are URLs and will involve
  306.                         the URL cache.  If you modify it, don't forget the
  307.                         "="s.  Most easily modified as in (3) below.
  308.                         
  309.     quotedAttrs        -    Element attributes which must usually be in 
  310.                         quotation marks.  If you modify it, don't forget
  311.                         the "="s.  Most easily modified as in (3) below.
  312.                         
  313.     htmlBindPrefix    -    The control keys for most keybindings.  Default is
  314.                         control-option.
  315.                         
  316.     htmlSBindPrefix    -    The control keys for most other keybindings.
  317.                         Default is shift-control-option.
  318.                         
  319.     htmlMenuPrefix    -    This is the string
  320.                         which controls the icons to show in the HTML menu
  321.                         for commands bound with htmlBindPrefix.  The
  322.                         default is "<B<I".
  323.     htmlSMenuPrefix    -    The same for htmlSBindPrefix.  The default is
  324.                         "<U<B<I".
  325.  
  326.  
  327. (2) One set of variables is more complex and is set another way.  This 
  328. is the list element attributes you usually usually want to be asked 
  329. about when creating new elements -- for example, whether you want to 
  330. be asked about COMPACT when creating a UL list.  These are set using 
  331. the "Use Attributes" menu item on the main HTML menu.  If you think 
  332. the defaults should be different in the distribution, tell me.
  333.  
  334. (3) Finally, to extend HTML mode into new territory, for example to add a 
  335. new element, you will need to do some TCL "set" commands in your 
  336. prefs.html (Edit -> Edit prefs.html).  You need to add to some list and 
  337. array variables.  Some are available through the flag menu to the right of 
  338. the edit window, but it's difficult to edit these there.  Do everything in 
  339. upper case!  When you're done, send your additions to me!
  340.  
  341.     HTMLmodeVars(quotedAttrs)    -    attributes which require quotation marks
  342.                                     around them.  A list.
  343.                                 
  344.     HTMLmodeVars(URLAttrs)        -    attributes which take URLs as values.  A
  345.                                     list.
  346.     
  347.     HTMLmodeVars(elemAttrsForAll)    -    All elements are allowed to 
  348.                                         have these attributes.  They will not 
  349.                                         be prompted for unless they are in 
  350.                                         HTMLElemAttrChoices for an element
  351.                                         being built.  A list.  
  352.  
  353.     HTMLwords                    -    keywords which should be highlighted when 
  354.                                     editing HTML in Alpha.  A list.
  355.     
  356.     htmlElemAttrAll                -    An array of all known HTML Elements.  Each
  357.                                     entry is a list of attributes for that
  358.                                     element.  For example htmlElemAttrAll(FORM)
  359.                                     is {ACTION= METHOD= ENCTYPE=}.  Be sure to
  360.                                     include the trailing = if an attribute 
  361.                                     takes values.
  362.                                     
  363.     htmlElemAttrChoices            -    An array.  Each entry is an element name,
  364.                                     and the content is all of the choices for
  365.                                     those attributes which have limited ones.
  366.                                     If a value can be anything, e.g.
  367.                                     NAME="frob", it won't be here.  However,
  368.                                     htmlElemAttrChoices(IMG) is {ALIGN=TOP
  369.                                     ALIGN=MIDDLE ALIGN=BOTTOM}.  Include
  370.                                     all attributes for which there are choices.
  371.                                     The entry for INPUT has all possibilities
  372.                                     for TYPE and ALIGN.
  373.                                     
  374.     htmlElemAttrUsed            -    This is the array of attributes you
  375.                                     want to be prompted for each time.  Usually
  376.                                     you don't change it explicitly.  Use the
  377.                                     menu selection "Use Attributes".
  378.  
  379.  
  380.  
  381. ===============================================================================
  382. = Custom Menu Entries
  383. ===============================================================================
  384.  
  385. There is a top-level entry in the HTML menu, "Custom", under which 
  386. you may add new elements -- or any other procedures -- by adding 
  387. some simple TCL code to your userStartup.tcl (under the Utils menu, 
  388. userStartup -> Edit).
  389.  
  390. First, define the list of elements to be listed in the menu.  Do this 
  391. by setting the variable htmlCustomMenuList.  For example:
  392.  
  393.     set htmlCustomMenuList {"Blink" "Style" "Frob"}
  394.  
  395. Then define the procedures to execute when these items are selected.  
  396. HTML Mode offers 4 utility procedures which you can use: 
  397. htmlBuildElem, htmlBuildCRElem, htmlBuildCR2Elem, and htmlOpenElem.  
  398. The first three create opening and closing tags, while htmlOpenElem 
  399. just creates a single tag.  htmlBuildElem surrounds the element with 
  400. no whitespace; htmlBuildCRElem puts it on its own line, and 
  401. htmlCR2Elem surrounds it with blank lines.  They all insert the 
  402. resulting element in the document EXCEPT htmlOpenElem, where you 
  403. must use insertText yourself.  
  404.  
  405. The procedure name HTML mode will look for will be "htmlElem" 
  406. followed by the exact name in your menu entry.
  407.  
  408. So here are some sample procedures:
  409.  
  410.     proc htmlElemBlink {} { htmlBuildElem BLINK }
  411.     proc htlmElemStyle {} { htmlBuildCRElem STYLE }
  412.     proc htmlElemFrob  {} { insertText [htmlOpenElem FROB] }
  413.     
  414. Of course you can make your procedures as complex as you like.
  415.  
  416. The customization will use any attribute lists you might build, so 
  417. for example you could have (as described under User-Settable Flags 
  418. and Variables):
  419.  
  420.     set htmlElemAttrAll(FROB) {ALIGN= SELECTOR POINTED}
  421.     set htmlElemAttrChoices   {ALIGN=BOTTOM ALIGN=MIDDLE ALIGN=TOP}
  422.     set htmlElemAttrUsed      {ALIGN= POINTED}
  423.     
  424.  
  425.  
  426.