home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR9 / HLPDK80.ZIP / HELPC.DOC < prev    next >
Text File  |  1993-08-01  |  23KB  |  547 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. * HELPC Help Engine Technical specification and compiler user guide           *
  13. * LAST UPDATE - Aug. 01, 1993. (c) 1992,93 - Loewy Ron.                       *
  14. *******************************************************************************
  15.  
  16. *******************************************************************************
  17. *                              General Overview                               *
  18. *******************************************************************************
  19.  
  20.   The Help Engine database is a combination of text that is read by the user,
  21.  and a Topic and Links database that allows the user to view the topics
  22.  he is interested in, using hyper-text methods.
  23.  
  24.  
  25.   Each help database is built of 5 components : 
  26.  
  27.  1. Help Data File    - this file contains the raw text data.
  28.  2. Topic Index       - a database table that contains the topic names, and
  29.                         the references to the topics in the Data File.
  30.  3. Links Index       - a database table that contains the list of links 
  31.                         defined for each topic, and positional data.
  32.  4. Keywords Index    - a database table that contains the list of keywords,
  33.                         and the topics that have these keywords.
  34.  5. Set Data File     - a database configuration file that contains the
  35.                         names of the 3 components defined above, and some 
  36.                         additional information.
  37.  
  38.   Version 1.x is the bare-bones version that includes only the basic
  39.  operations needed from a hyper-text database, this version is implemented
  40.  using the Paradox Engine V3.0 to manage the Topic and Link index tables.
  41.  
  42.   Version 2.x has a new field in the topic table - the title field, help
  43.  databases that were compiled with V1.x will not be executed by version
  44.  2.x, they will have to be re-compiled!.
  45.  
  46.   Version 3.x fields have different length - the databases have to be 
  47.  re-compiled.
  48.  
  49.   Version 5.0+ has a new entry in the help set file, database have to be
  50.  re-compiled, ot the value 128 should be added in the last line of the help
  51.  set file, and the version number should be changed to 5.0.
  52.  
  53.   Version 6.0+ has added the keyword support - a new database table is added,
  54.  and a new set format is defined. Help databases will have to be re-compiled
  55.  for Natice targets.
  56.  
  57.   In Version 7.0 the title field has been expanded once more - to 70 
  58.  characters. Help databases will have to be re-compiled.
  59.  
  60.   In Version 8.0 the tType field was added to the Topics database. Old databases
  61.  will have to be re-compiled.
  62.  
  63.   The format of the help database is released to the public domain, if
  64.  you implement a database viewer on this database structure, I would be
  65.  happy to receive a copy ..
  66.  
  67. *******************************************************************************
  68. *                               Compiler Usage                                *
  69. *******************************************************************************
  70.  
  71.   The HELPC help compiler is a dos command line program that receives a 
  72.  help definition file (.HDF) and produce a help database. 
  73.  
  74.   The helpC command line is :
  75.  
  76.  HELPC source.fil [/Htopic-table-name] [/Llink-table-name] [/Ddata-file-name] 
  77.                   [/Kkeywords-table-name] [/R-]  [/ST-] [/CS+] [/EP+] [/WD-]
  78.                   [/RM-]
  79.                   [/W+]  [/W30] [/W31] [TH+] [/QH+] [/TV+] [/PH+] [/XD+]
  80.                   [/PX+] [/MT+] [/OS2] [/TXT] [/RTF]
  81.  
  82.   The output of the compiler is a set data file called source.SET, that
  83.  includes the names of the other help database components. 
  84.  
  85.   Please Notice - if the /W+ /W30 or /W31 switch is defined, the compiler 
  86.  will generate a .HPJ and .RTF files that can be used with the Microsoft 
  87.  HC (v3.00b) or HC31 help compiler, and output a .HLP windows help file!. 
  88.  
  89.   By default the help compiler produces a help cross reference report on the 
  90.  topics/links used in the database, if the /R- switch is set, no cross-ref
  91.  report will be generated, and no database integrity indicators will be
  92.  given.
  93.  
  94.  
  95.   IMPORTANT - Scan the output cross reference report for links defined, that
  96.  are not defined as topics!
  97.  
  98.   Notice - An additional switch is available that instructs the help compiler
  99.  to indicate it's parse and code generation progress. Use the /EP+ switch to
  100.  see that the helpC compiler is active. Please understand that the compile
  101.  process can take a long time, on complex help databases. This switch does
  102.  nothing more that ensure to you that the help compiler is alive. 
  103.  
  104.   The /ST switch defines if the topic name defined in the .TOPIC command
  105.  can include embeded spaces. By default this switch is set to /ST- (No
  106.  embedded spaces).
  107.  
  108.   The /CS switch turns Topics and Links case sensativity to ON. Use this
  109.  switch with care - Only if you must have a lower/mixed case index in THELP
  110.  or POPHELP use this switch. Notice that help databases that compile fine
  111.  with case sensativity set to off, might fail to do so in case sensativity
  112.  on. By deafult this switch is set to off (-).
  113.  
  114.   The /XD switch generates code to the MDVXHELP help compiler, available
  115.  free in the file DVXHLP10.ZIP on the internet. When this switch is given,
  116.  a set of cover and section files is generated, as well as a response
  117.  file that should be used to compile the help database.
  118.  
  119.   The /OS2 switch generates IPF source code. You must compile the generated code 
  120.  with IPFC, from within an OS/2 session (window or full screen).
  121.  
  122.   The /WD switch controls Warning Display. By default Warning Display is On, if
  123.  you do not want to see the Warnings issued by the compiler when a topic name 
  124.  or link are found to be incomatible with the target source, and helpC 
  125.  translate them to be syntax compatible with the target.
  126.  
  127.   Use the /TXT switch to create a text file document from your .HDF source.
  128.  With this feature you can create on-line help and printed documentation
  129.  from the same source!.
  130.  
  131.   Use the /RTF switch to create a word-processor ready RTF file, import this
  132.  file (and update the fields e.g.- F9 in WinWord) to create a professional
  133.  formatted documentation from the same source code!.
  134.  
  135.   The /RM- switch uses disk cross-reference report tables. Usage of this 
  136.  option will allow the creation of cross-reference report for huge databases.
  137.  This options will slow the creation of reports, use it only for databases
  138.  so big that the report can not be generated using memory tables.
  139.  
  140. *******************************************************************************
  141. *                                Command Line                                 *
  142. *******************************************************************************
  143.  
  144.   The compiler switches are defined on the command line. These switches can
  145.  be placed before and after the source file name. The compiler will look for
  146.  a file named HELPC.CFG in the current directory, and process it before any
  147.  command line switches are processed. 
  148.  
  149.   Switches on the command line will over-ride switches set before them, on the
  150.  command line or in one of the response options file.
  151.  
  152.   Response option files can be specified by prefixing their name with a @ sign.
  153.  
  154.  Examples :
  155.  
  156.  If our HELPC.CFG file, in the current directory is :
  157.  
  158. /W31
  159. /R-
  160.  
  161.  And we compile using HELPC HELPDEMO
  162.  
  163.  The helpdemo.hdf file will be compiled, with the target set to winhelp 3.1
  164.  and no cross-reference report.
  165.  
  166.  Compile using HELPC HELPDEMO /r+
  167.  
  168.  Will create winhelp 3.1 sources, but a report will be generated.
  169.  
  170.  Compile using HELPC /w- HELPDEMO
  171.  
  172.  Will generate native format help database, no report is generated.
  173.  
  174.  If we have a file called MYSWITCH.CFG with the following lines :
  175.  
  176. /TH+
  177. /ST-
  178. /CS+
  179.  
  180.  And we compile using HELPC @MYSWITCH.CFG HELPDEMO
  181.  
  182.  A THELP source, using Long Topic Names, with case sensativity will be 
  183.  generated, no cross reference report is generated. (HELPC.CFG contains /r-)
  184.  
  185. *******************************************************************************
  186. *                           Help Definition Format                            *
  187. *******************************************************************************
  188.  
  189.   The help definition file format is as follows :
  190.  
  191. remarks ...
  192. remarks ...
  193.  
  194. .ENTRY topic-name
  195. [.TITLE optional title for topic]
  196. [.KEYWORDS optional keywords for topic]
  197. topic text and link reference .. 
  198. topic text and link reference .. 
  199. topic text and link reference .. 
  200. topic text and link reference .. 
  201. .END-ENTRY 
  202.  
  203. remarks ...
  204.  
  205.  
  206. .ENTRY topic2-name
  207. [.KEYWORDS keyword1 keyword2 ..]
  208. [.PARAGRAPH]
  209. topic 2 text and link reference .. 
  210. topic 2 text and link reference .. 
  211. topic 2 text and link reference .. 
  212. [.END-PARAGRAPH]
  213. additional topic2 text ...
  214. .END-ENTRY 
  215.  
  216. .POPUP popup-name
  217. [.TITLE optional title for popup]
  218.   definition for some reference
  219.   ...
  220. .END-POPUP
  221.  
  222.  
  223.   As can be seen - lines between the .ENTRY and .END-ENTRY keywords are
  224.  the lines processed by the help compiler, to create the help database, 
  225.  every other line is considered a remark, and is not parsed or evaluated by
  226.  the help compiler.
  227.  
  228.   The topic text and link reference lines are simple text lines, with
  229.  special link marks.
  230.  
  231.   A sample will provide the details :
  232.  
  233. This is a text help line that includes one ~link~link-topic-name~ in it.
  234.  
  235.   This line will be displayed in the help engine program as :
  236.  
  237. This is a text help line that includes one link in it.
  238.  
  239.   The word "link" will be in a different color then the rest of the line, 
  240.  to indicate that this is a link. If the user hi-lights the link, and
  241.  presses Enter (or points the mouse cursor and clicks), the help engine will
  242.  look for a topic called "link-topic-name", and display it.
  243.  
  244.   Browse the HELPDEMO.HDF file for a demo of a help database definition file.
  245.  
  246.  Notes :
  247.  
  248.  1. The keywords .TOPIC and .END-TOPIC can be used instead of .ENTRY and
  249.     .END-ENTRY respectivly.
  250.  
  251.     An equivelent pair of keywords are .TOP and .ENDTOP .
  252.  
  253.  2. Keywords are NOT case sensitive. (.topic = .TOPIC = .eNTry)
  254.  
  255.  3. The .TITLE keyword is optional. If no title is defined, the topic name
  256.     is used as a title. (just like in v1.x). 
  257.  
  258.  4. If you want the ~ sign to appear in your help database, use ~~ in your
  259.     help source file. (e.g. "This is a ~~" will be "This is a ~" in the final
  260.     help database.).
  261.  
  262.  5. The Optional .PARAGRAPH and .END-PARAGRAPH commands in the help topic text,
  263.     specify the start and the end of a paragraph. This feature is currently 
  264.     supported only for winhelp and IPF sources. This feature is important if you 
  265.     want to create long paragraphs that will wrap correctly when a user resizes
  266.     the help window. It is advized ALWAYS to use this feature for paragraphs,
  267.     future versions of the Help Development Kit will allow greater formatting
  268.     control over paragraphs using this mechanism.
  269.  
  270.     The .PAR and .ENDPAR keywords can be used instead of the .PARAGRAPH and
  271.     .END-PARAGRAPH keywords.
  272.  
  273.  6. When a .PARAGRAPH is issued, a .END-PARAGRAPH MUST be specified at the
  274.     end of the paragraph. These commands must appear as the first words in
  275.     a line. The text after the .PARAGRAPH command is NOT part of the text 
  276.     of the help topic.
  277.  
  278.  7. The optional .KEYWORDS command can appear after the .TITLE command
  279.     (If there is one), or the .TOPIC header (otherwise), Use this command
  280.     to help the user search for sets of topics that are connected to a 
  281.     specific keyword. The syntax of this comand is :
  282.     .KEYWORDS keyword-1 keyword-2 ... 
  283.  
  284.  8. .POPUP and .END-POPUP (or .ENDPOP) are used to define popup topics that 
  285.     are displayed on the same screen as the original topic that includes the
  286.     link to them. Popup entries allow the user to consult a glossary, and 
  287.     not lose the topic he was reading. Popups are supported in the winhelp,
  288.     Native PX and Native Mem formats. In the other formats Popups are used 
  289.     as standard topics.
  290.  
  291.  9. In the Text target .POPUP entries will be automatically included in a 
  292.     Glossary file that you can add as an appendix to your documentation.
  293.  
  294. Additional commands include :
  295.  
  296. .TEXTCOLOR, .LINKCOLOR and .LINKHIGH - VGA colors of text and links in normal 
  297. and high (selected) states in the native help format.
  298.  
  299. The syntax of these commands is :
  300.  
  301. .TEXTCOLOR w 
  302.  
  303. or 
  304.  
  305. .LINKCOLOR x
  306.  
  307. or
  308.  
  309. .LINKHIGH y
  310.  
  311. Where w, x and y are the color of the text/link, which is a combination of the 
  312. color of the foreground with the color of the background multiplied by 16.
  313.  
  314. The colors that can be used for both fore and background are :
  315.  
  316.   Black     = 0
  317.   Blue      = 1
  318.   Green     = 2
  319.   Cyan      = 3
  320.   Red       = 4
  321.   Magenta   = 5
  322.   Brown     = 6
  323.   LightGray = 7
  324.  
  325. The colors that can be used only for the foreground are :
  326.  
  327.   DarkGray     = 8
  328.   LightBlue    = 9
  329.   LightGreen   = 10
  330.   LightCyan    = 11
  331.   LightRed     = 12
  332.   LightMagenta = 13
  333.   Yellow       = 14
  334.   White        = 15
  335.  
  336. For example : to set the normal color of a link to light green on blue, use
  337.  
  338. .LINKCOLOR 26
  339.  
  340. where 26 = 10 + 16 * 1. (10 = light green, 1 = blue).
  341.  
  342. Creating Multiple Source Projects :
  343.  
  344. Use the .INCLUDE commands in the source of your .HDF file, to include an
  345. additional source file.
  346.  
  347. For Example :
  348.  
  349.  .. some stuff 
  350.  
  351. .include 2ndfile.hdf
  352.  
  353.  .. additional stuff
  354.  
  355. will process 2NDFILE.HDF in the middle of our source file.
  356.  
  357. Please notice - .INCLUDE commands can be nested in your source file,
  358. it is however not recommended to nest them too deep, helpC does not
  359. close the input file when a .INCLUDEd file is processed, in order to
  360. minimize help generation time - there is however, a limit on the number
  361. of open files that can be used by a program - this is a limit set by dos.
  362.  
  363. GUI Font based targets :
  364.  
  365. The .FIXEDFONT command is used to define a non proportional font as the 
  366. default font of the help database. Currently the only targets affected
  367. by this command are windows winHelp v3.x. If you find that your help 
  368. databases are not aligned after they are converted to winHelp format, use 
  369. this command and re-compile. This command has no effect on targets that are 
  370. different from the targets mentioned before.
  371.  
  372. The .PCFONT command is used to define a font that has the standard pc 
  373. character set (Terminal - in windows). If you convert a text based 
  374. database that uses the PC's special characters, use this command to
  375. set the default font. This command has no effect on targets that are 
  376. different from the targets mentioned before.
  377.  
  378. Text targets :
  379.  
  380. The .PAGELENGTH and .PAGEWIDTH statements set the printed page length in
  381. rows, and width in columns. The syntax is .PAGELENGTH xx or .PAGEWIDTH yy .
  382.  
  383. *******************************************************************************
  384. *                             Conditional Defines                             *
  385. *******************************************************************************
  386.  
  387. The helpC compiler supports conditional define directives that allow you to
  388. tailor your source according to define symbols that are known to the compiler.
  389.  
  390. You can use the .ifdef, .ifndef, .else and .endif directives to test the
  391. target of your compile and do different things according to this target.
  392.  
  393. If for example you have a Windows bitmap you want to include in your generated
  394. RTF file, when you compile to winhelp format, but, you would like to use a
  395. statement in other targets that do not support graphics, you could do the 
  396. following :
  397.  
  398. .ifdef windows
  399.   some text {\bmc mybmp.bmp} some more text
  400. .else 
  401.   some text AND STATEMENT HERE some more text
  402. .endif
  403.  
  404. When the compiler will generate the code, the RTF command \bmc will be 
  405. inserted in the output of the compiler for windows targets (/W30, /W31), 
  406. and a simple text statement will be inserted otherwise.
  407.  
  408. The conditional directives supported are :
  409.  
  410. .ifdef  SYMBOL - Compile code only if SYMBOL is defined.
  411. .ifndef SYMBOL - Compile code only if SYMBOL is NOT defined.
  412. .endif         - Any .ifdef/.ifndef should be terminated by a .endif .
  413. .else          - Reverse the previous .ifdef/.ifndef
  414.  
  415. The following SYMBOLS are automatically defined by the compiler :
  416.  
  417. Symbol          When Defined
  418. ------          ------------
  419. DEF             /PX+
  420. W31             /W31
  421. W30             /W30
  422. THS             /TH+
  423. QHS             /QH+
  424. TVH             /TV+
  425. PHS             /PH+
  426. DVX             /XD+
  427. MEM             /MT+
  428. OS2             /OS2
  429. TXT             /TXT
  430. WINDOWS         /W30, /W31
  431. THELP           /TH+
  432. QUICKHELP       /QH+
  433. TVHC            /TV+
  434. NATIVEPARADOX   /PX+
  435. POPHELP         /PH+
  436. DESQVIEW/X      /XD+
  437. NATIVEMEMORY    /MT+
  438. VERx.y          When Compiling with helpC Vx.y 
  439. NATIVE          /PX+, /MT+
  440.  
  441. *******************************************************************************
  442. *                             Topic Index Format                              *
  443. *******************************************************************************
  444.  
  445.   The topic index table format is as follows :
  446.  
  447.   TOPIC     - 40 charcters string key - this is the topic "name".
  448.   FILENAME  - 38 characters string field - includes the name of the
  449.               help raw data file. (Notice - V1.0 ignores the value of this 
  450.               field, it is here for future expansion).
  451.   START     - longint (long) field that contains the offset from the data file
  452.               start, to the start of the topics text data, in bytes.
  453.   LEN       - longint (long) field that contains the length (in bytes) of the 
  454.               text data of the topic.
  455.   TITLE     - 70 characters string key - the title of the topic.
  456.   TTYPE     - 1 character - topic type. Currently supported types are :
  457.               'T' = Topic.
  458.               'P' = Popup.
  459.  
  460. *******************************************************************************
  461. *                             Links Index Format                              *
  462. *******************************************************************************
  463.  
  464.   The links index table format is as follows :
  465.  
  466.   TOPIC     - 40 characters string key - the name of the topic that 
  467.               has the link.
  468.   SEQ       - integer (int) key - contains the sequential number of 
  469.               the link in the topic. (This way you can assign the links
  470.               order in the topic).
  471.   LINK      - 40 characters string key - the name of the link topic to
  472.               display if the link is chosen.
  473.   LINE      - integer (int) field - the line (from the start of the topic) 
  474.               this link is displayed on.
  475.   COL       - integer (int) field - the column this link is displayed on.
  476.   TXT       - 70 characters string field - the text to display on the line.
  477.  
  478. *******************************************************************************
  479. *                            Keywords Index Table                             *
  480. *******************************************************************************
  481.  
  482.   The keywords index table format is as follows :
  483.  
  484.   KEYWORD   - 40 characters string key - the keyword.
  485.   TOPIC     - 40 characters string key - the topic name that this keyword is 
  486.               assigned to.
  487.  
  488.   Notice - the database will include a row for each keyword, that has the 
  489.   TOPIC field blank. This is used to display the first list of keywords, that
  490.   if chosen, will display the 2nd list of topics that have the chosen keyword
  491.   in their .KEYWORDS definition.
  492.  
  493. *******************************************************************************
  494. *                               Set File Format                               *
  495. *******************************************************************************
  496.  
  497.   The set file is a text file that contains one entry in each line, using
  498.  the following format :
  499.  
  500. help-database-engine
  501. version-of-generating-compiler
  502. topic-index-table name
  503. links-index-table name
  504. keyword-index-table-name
  505. help-raw-data-file name
  506. number-of-topics
  507. length-of-file
  508. link-normal-color
  509. link-high-color
  510. text-normal-color
  511.  
  512. The help-database-engine values available today are DEF=Paradox and 
  513. MEM=memory Tables.
  514.  
  515. *******************************************************************************
  516. *                               Implementation                                *
  517. *******************************************************************************
  518.  
  519.   Notice - The Paradox tables (Topic, Links) include one additional field
  520.  (wtGeneration) for future expansion purpose only.
  521.  
  522. *******************************************************************************
  523. *                                Distribution                                 *
  524. *******************************************************************************
  525.  
  526.   To distribute a database of your creation, compile the help definition
  527.  file, and include the HELPENG.EXE file with the .DB, .PX files, and the
  528.  .HDT file created by the compiler. 
  529.  
  530.   If you use the Native Mem Format, compile using the /MT+ switch, and
  531.  distribute HE.EXE with the .SET, .HDT and .HDX files created.
  532.  
  533.   If you generated the Windows (/W30, /W31) help file, you can complile the 
  534.  .HPJ and .RTF generated file, and distribute the resulting .HLP .
  535.  
  536.   If you generate QH, THELP, POPHELP or TVHC use these packages compilers to
  537.  compile you sources into native binary codes. (helpMake, HL, makeHelp and TVHC)
  538.  
  539.   To Generate Help databases for DESQview/X, use the MDVXHELP compiler
  540.  that can be found on the internet in the file DVXHLP10.ZIP.
  541.  
  542.   Distribute the .INF files that IPFC creates from the .IPF sources generated,
  543.  if you compile to OS/2.
  544.  
  545.   For examples on these compiler's command lines please refer to the quick
  546.  start section of HLPDK.DOC, or to your compiler's documentation.
  547.