HTML support

Problem type developers can take advantage of the internal HTML browser if they wish to provide online help.

HelpWindow

  1. Create a directory named html inside your Problem Type directory
  1. Call HelpWindow "CUSTOM_HELP" "problem_type_name" , where problem_type_name is the name of your problem type with the .gid extension (e.g. Examples/cmas2d.gid).
  1. The function HelpWindow opens the file "index.html" which must be inside the html folder.

It is a good idea to call the function HelpWindow "CUSTOM_HELP" "problem_type_name" using the menu functions (see Managing menus ).

EXAMPLE: Adding a customized HTML help in the Help menu for the CMAS2D problem type:

GiDMenu::InsertOption "Help" [list "Help CMAS2D"] 0 PREPOST {HelpWindow "CUSTOM_HELP" "Examples/cmas2d.gid"} "" "" insert _

GiDMenu::UpdateMenus

Note: In order to test this example, must provide the html file:

'problemtypes/Examples/cmas2d.gid/html/index.html'

GiDCustomHelp

With GiD version 7.4 and later, problem type developers can take advantage of the new help format. It is essentially the same html content, but now with an enhanced look and structure. The GiDCustomHelp procedure below is how you can show help using the new format:

GiDCustomHelp ?args?

where args is a list of pairs option value. The valid options are:

-start html-version

-start html-tutorials/tutorial_1

Structure of the help content

Assuming that html has been chosen as the base directory for the multilingual help content, the following structure is possible:

html

\__ en - English content

\__ es - Spanish content

Each content will probably have a directory structure to organize the information. By default the help system builds a tree resembling the directory structure of the help content. In this way there will be an internal node for each subdirectory, and the html documents will be the terminal nodes of the tree.

You can also provide a help.conf configuration file in order to provide more information about the structure of the help. In a help file you can specify a table of contents (TocPage), help subdirectories (HelpDirs) and an index of topics (IndexPage).

HelpDirs

With HelpDirs we can specify which of the subdirectories will be internal nodes of the help tree. Moreover, we can specify labels for the nodes and a link to load when a particular node is clicked. The link is relative the node. For instance:

HelpDirs {html-version "GiD Help" "intro/intro.html"} \

{html-customization "GiD Customization"} \

{html-faq "Frequently Asked Questions"} \

{html-tutorials "GiD Tutorials" "tutorials_toc.html"} \

{html_whatsnew "What's New"}

TocPage

TocPage defines an html page as a table of contents for the current node (current directory). We have considered two ways of specifying a table of contents:

<UL> <LI> ... </UL> (default)

<DT> <DL> ... </DT>

The first is the one generated by texinfo.

For instance:

TocPage gid_toc.html

TocPage contents.ht DT

IndexPage

If we specify a topic index by IndexPage, we can take advantage of the search index. In IndexPage we can provide a set of html index pages along with the structure type of the index. The type of the index could be:

<DIR> <LI> ... </DIR> (default)

<UL> <LI> ... </UL> (only one level of <UL>)

The first is the one generated by texinfo.

For instance:

IndexPage html-version/gid_18.html html-faq/faq_11.html