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