<chapter>
element. Within a chapter, topics are organized into sections. Subtopics of an
<s1>
section are entered with <s2>
, subtopics of <s2>
entered as <s3>
, and so on.Either element, chapter or section, can follow the home topic. There is no visible difference to the user if you start your hierarchy with <chapter> or <s1> . Figure 2-1 shows a simple hierarchy that includes three chapters. Each chapter contains several first-level sections. The third chapter adds two second-level sections.
Figure 2-1 Help volume topic organization
Entities are useful for:
The Help System uses the meta information to display the title of a help volume and its copyright information. The abstract description is displayed by the desktop Help Viewer in the Front Panel. Other applications capable of displaying help volumes could also make use of this information.
Meta information can also include help topics that are not part of the normal topic hierarchy. Nonhierarchical topics placed in the meta information section are accessed with links.
"Creating Meta Information Topics" shows you how to create a meta information section.
The HelpTag markup language defines a hierarchy of elements that define high-level elements, such as chapters, sections, and subsections, and low-level elements, such as paragraphs, lists, and emphasized words.
<element> ... text ... <\element>
For example, to mark the start and end of a book title you use markup like this:
<book>Geographical Survey of Northern Wisconsin<\book>
Where <book> is the start tag, and <\book> is the end tag. Shorthand markup also simplifies the markup for many inline elements as well as stylistic changes. Rather than entering a begin and end tag, vertical bars are used to delimit the text like this:
<element| ... text ... |
For example, here's the short form of the <book> element shown previously:
<book| Geographical Survey of Northern Wisconsin|
If the element has parameters, they're entered before the first vertical bar like this:
<element parameters| ... text ... |
Some elements support an even shorter form where the start and end tags are replaced with a special two-character shortcut. For example, the <emph>
(emphasis
) element, whose normal syntax looks like this:
<emph> ... text ... <\emph>
can be entered using this shorthand form:
!! ... text ... !!
Chapter 3, "Writing a Help Topic,"
introduces shorthand markup and gives examples of the most frequently used elements. Chapter 5, "HelpTag Markup Reference,"
provides an alphabetical list of elements and describes each element in detail.
All entity declarations go here (before any other markup). <helpvolume> <metainfo> <title> Volume Title <copyright> Copyright topic goes here ... <abstract> The abstract describing your help volume goes here. There may be other meta information topics. . . . <\metainfo>
<hometopic> Home Topic Title Help volume introduction goes here ... <s1> Title of First Topic Goes Here Body of the first topic goes here ... <s1> Title of Second Topic Body of the second topic goes here ... <s2> Title of Suptopic Body of the subtopic goes here ... . . .
<glossary> The body of the glossary, which contains term definitions, goes here ... <\helpvolume>
.htg
) or formal (.ctg
) markup.Be sure your volume name is unique and meaningful. If your volume name is too general, it may conflict with another volume that someone else has created. If you are writing application help, one recommended practice is to use the application's class name. For example, the class name for the Icon Editor is Dticon, so its help volume is named Dticon.htg .
htg
file contains entity declarations and entity references to files that make up the help volume. Although HelpTag expects a single volume
.htg
file as input, you can separate your work into multiple source files. Additional files are sourced into the volume
.htg
file using file entities
. A file entity is like a pointer to another file. That file, in effect, is inserted wherever the entity's name appears in the volume
.htg
file. The referenced files can also contain entity references to yet other files. (Entities can also be used to reference text strings.).htg
file for the help volume includes file entities for each of the six files and a list of entity references that instruct the HelpTag software to process the files.
<!entity HomeTopic FILE "HomeTopic">
<!entity MetaInformation FILE "Metainfo">
<!entity TableOfContents FILE "TOC">
<!entity Tasks FILE "Tasks">
<!entity Reference FILE "Reference">
<!entity Glossary FILE "Glossary">
&HomeTopic;
&MetaInformation;
&TableOfContents;
&Tasks;
&Reference;
&Glossary;
The details of running HelpTag are covered in "To Create a Run_Time Help Volume.".ctg
and.htg
extensions) and one run-time file (.sdl
extension). If you double-click a markup file, your standard editor opens the file for editing. Double-clicking a .sdl
file displays the run-time file using the Help Viewer.Figure 2-2 File Manager view of help files
To create a run-time help volume, first select the .htg
or .ctg
file icon in File Manager. Then, choose Compile from the File Manager Selected menu.
help
directory. This step-by-step example demonstrates how to create and view a standalone help volume. (As a standalone volume, it does not involve interaction with an application.)To create and process a help volume, you follow these steps:
helptag.opt
file.
helpfiles
where you will create and process your help files.
Commands
in the directory just created.
For this example, all the information is put into a single file. Typically, you will use multiple files to fully explain the system or application you are writing help for.
The Commands file contains text and element tags. The element tags within the < and > (angle brackets) indicate the structure of the information.
Commands
file.
<hometopic> Command Summary <idx|commands| Your &product; is capable of the following operations:
<list bullet> * <xref ChannelChange> * <xref VolumeUp> * <xref VolumeDown> * <xref VolumeMute> <\list> Choose one of the hyperlinks (underlined phrases) to find out how to perform that operation. <s1 id=ChannelChange> Changing the Channel <idx|channel, changing| Speak the command: <ex> channel<\ex> followed by a number from one to ninety nine. <s1 id=VolumeUp> Turning Up the Volume <idx|volume, changing| Speak the command: <ex> volume up<\ex> For additional volume, speak the command: <ex> more<\ex> (See also <xref VolumeDown> ) <s1 id=VolumeDown> Turning Down the Volume <idx|volume, changing| Speak the command: <ex> volume down<\ex> To further reduce the volume, speak the command: <ex> more<\ex> (See also <xref VolumeUp> and <xref VolumeMute> ) <s1 id=VolumeMute> Turning Off the Sound <idx|volume, changing| <idx|sound, on/off| Speak the command: <ex> sound off<\ex> To restore the sound, speak the command: <ex> sound on<\ex> (See also <xref VolumeDown> and <xref VolumeUp> )
In this example, the following text is put into a file called Metainfo in the same directory as the Commands file.
<metainfo>
<title> Using the &product;
<copyright>
© 1995 Voice Activation Company. All rights reserved.
<abstract> Help for Using the &product;.
<\metainfo>
helpfiles
directory.
<!-- Declare an entity for each of the source text files. -->
<!entity MetaInformation FILE "Metainfo">
<!entity Commands FILE "Commands">
<!-- Define an entity that names the product and includes
the trademark symbol (&tm;). -->
<!entity product "VoAc&tm; Voice-Activated Remote Control">
<!-- Include the text files. -->
&MetaInformation;
&Commands;
onerror=go
memo
search=./
search=../
The onerror=go
option instructs the HelpTag software to continue processing input files even if an error occurred. See "Parser Options"
for an explanation of parser options. For a complete list and description of parser options, refer to the dthelptag(1)
man page.
echo $PATH
If the directory is not in your path, add it to your PATH environment variable. If you're not sure how to do this, refer to your system documentation or ask your system administrator.
build
subdirectory. Select the voiceact.htg
file icon and choose Compile from the Selected menu in File Manager.
This executes the HelpTag software which creates a run-time version of your online help volume (voiceact.sdl
). Status and error messages are placed in a new file, whose name is of the form volume
.err
.
To do so, execute the following command:
dthelptag -verbose voiceact.htg
The -verbose option tells HelpTag to display its progress on your screen.voiceact.sdl
file icon. This displays the help volume using the desktop Help Viewer. You can now scroll the information and jump to related information by choosing hyperlinks.
To do so, execute the following command. It displays the new help volume.
dthelpview -h voiceact.sdl
Additional levels of subtopics are entered with <s2>
, <s3>
, and so on. The HelpTag markup language supports nine topic levels, <s1>
to <s9>
. However, information more than three or four levels deep often leads many readers to feel lost.
When a help volume is displayed, the help window displays a list of topics in its topic tree. Any topic entered with a <chapter>
or <s1...s9>
tag automatically appears in the topic tree. This provides an easy way to browse and view topics.
To enable users to display other related information from within a topic, you create hyperlinks. To do so, you assign a unique ID to each destination topic. Hyperlinks make it possible to reference a specific ID anywhere in your help information.
Tutorial for New Users
Module 1: Getting Started
Module 2: Creating Your First Report
Module 3: Printing the Report
Module 4: Saving Your Work and Quitting
Task Reference
Starting and Stopping
To Start the Program
To Quit the Program
Creating Reports
To Create a Detailed Report
To Create a Summary Report
Concepts for Advanced Users
Using Report Hot Links
Sharing Reports within a Workgroup
Reference
Command Summary
Report Attributes Summary
Then the general outline of your help volume would look like this. (The body of each topic and IDs for the topics are not shown.)
<hometopic> Welcome to Report Master
<chapter> Tutorial for New Users
<s1> Module 1: Getting Started
<s1> Module 2: Creating Your First Report
<s1> Module 3: Printing the Report
<s1> Module 4: Saving Your Work and Quitting
<chapter> Task Reference
<s1> Starting and Stopping
<s2> To Start the Program
<s2> To Quit the Program
<s1> Creating Reports
<s2> To Create a Detailed report
<s2> To Create a Summary report
<chapter> Concepts for Advanced Users
<s1> Using Report Hot Links
<s1> Sharing Reports within a Workgroup
<chapter> Reference
<s1> Command Summary
<s1> Report Attributes Summary
Indentation is used here to make it easier to see the structure of the help volume. You do not have to indent your files.
- <hometopic> Title
Body of topic.
The preceding markup produces this output:<hometopic> Welcome to My Application Congratulations, you've entered the online help for My Application.
Here's a sample home topic that includes hyperlinks to its four subtopics:
<hometopic> Welcome to Report Master Welcome to the online help for Report Master. Choose one of the following hyperlinks: <list bullet> * <xref Tutorial> * <xref Tasks> * <xref Concepts> * <xref Reference> <\list> If you need help, press F1.
<s1 id=getting-started> Getting Started
<s2 id=starting-the-program> Starting the Program
Here's the body of the first subtopic.
<s2 id=stopping-the-program> Stopping the Program
Here's the body of the second subtopic.
The second <s2> is also a subtopic of the <s1>.
A secondary use of the meta information section is to enter help topics that are not part of the normal topic hierarchy. These nonhierarchical topics are useful for creating custom definition links that pop-up a topic in a quick help dialog box.
<metainfo>
<title> Volume Title Here
<copyright>
Body of copyright topic here.
.
.
.
<abstract>
Body of the abstract topic here.
Do not use any HelpTag markup within the abstract!
.
.
.
<\metainfo>
<head>
tag before the topic heading.
The <abstract>
section is recommended. Applications that access help volumes can use this information to present a brief description of the volume. Because the abstract might be displayed in plain text windows (that do not support multiple fonts and graphic formatting), avoid including any HelpTag markup in the abstract.
<metainfo>
<title> Report Master, Version 1.0
<copyright>
<otherhead> Report Master
<image>
Version 1.0
© Copyright Reports Incorporated 1995
All rights reserved.
<\image>
<abstract>
This is the online help for the mythical Report Master
application. This help includes a self-guided tutorial,
a summary of common tasks, general concepts, and quick
reference summaries.
<\metainfo>
The <image> element is used to preserve the author's line breaks. The © entity inserts the copyright symbol. <chapter>
or <s1...s9>
element tag automatically appear in the topic tree. When a title is selected in the topic tree, the corresponding help topic is displayed in a general help dialog box. However, sometimes you may want to create and display a topic independent of the topic hierarchy you have created. For example, you might want to display a topic in a separate, quick help window.
- <otherfront id=id><head> Topic Title
Body of topic.
You can add as many <otherfront> topics as you want. They may be in any order, but they must be the last topics in the <metainfo> ... <\metainfo> section.
<metainfo>
<title> My Help
<copyright>
This is My Help, Version 1.0. © 1995.
.
.
.
<otherfront id=my-popup-topic> <head> Pop-up!
This is a pop-up topic, displayed via a definition link
somewhere in my help volume.
<\metainfo>
<hometopic> Welcome to My Help
.
.
.
Presumably, within some other topic in the help volume, there's a definition link to display this topic.The link might look like this:
Here's a sample of a pop-up <link my-popup-topic Definition>
definition link<\link>.
The words "definition link" become the active hyperlink and will be displayed with a dashed underline. Selecting the link displays the "Pop-up!" topic in a quick help dialog box. If you are writing help for an application, IDs are also used by the application to identify particular topics to display when the user requests help. For example, you might write several topics that describe an application's menus. The IDs that you assign to the topics are used by the application developer. By defining identical IDs within the application code, the developer can integrate specific topics. This allows the application to access and display the correct topic when help is requested for a particular menu.
- <element id=id> ...
- <element id=id> ...
<location id=id> text <\location>
Where text
is any word or phrase where you want to add an ID. The <\location>
end tag is required. When you activate a link to a location ID, the Help Viewer displays the topic containing the ID and scrolls the window to the ID position.Here's the markup for a figure with the ID my-big-picture.
<figure id=my-big-picture entity=big-picture-TIFF>
Here's My Figure
<\figure>
Here's a paragraph where the phrase "easier than ever" has been assigned the ID easy-spot:
Getting help is <location id=easy-spot> easier than ever<\location>.
<!entity Entityname "text">
Where Entityname
is the name of the entity and text
is the string that you want substituted for every reference to the entity. Remember, all entity declarations must come before any other markup in your help volume.
&Entityname;
The & (ampersand) and ;(semicolon) characters are required for the HelpTag software to properly recognize the entity reference.
<!entity Assoc "Society of Agricultural Engineers">
The following sentence includes a reference to the entity:
Welcome to the &Assoc;.
When the help volume is processed with the HelpTag software, the entity reference is replaced with the value of the entity. So, the sentence reads: Welcome to the Society of Agricultural Engineers.
<!entity Entityname FILE "filename">
Where Entityname is the name of the entity and filename is the name of the file. The keyword FILE is required.
&Entityname;
The & (ampersand) and ; (semicolon) characters are required for the HelpTag software to properly recognize the entity reference.
<figure entity=Entityname ... >
Or:
<graphic entity=Entityname ... >
Or:
<p gentity=Entityname ... >
<!entity MetaInformation FILE "metainfo">
<!entity MyFirstFile FILE "file1">
<!entity MySecondFile FILE "file2">
<!entity MyThirdFile FILE "file3">
&MetaInformation;
<hometopic> My Home Title
Welcome to my application's help volume.
&MyFirstFile;
&MySecondFile;
&MyThirdFile;
<!entity MetaInformation FILE "metainfo">
<!entity MyPicture FILE "picture.tif">
&MetaInformation;
<hometopic> A Sample Graphic
Welcome to my application's help volume
<figure nonumber entity=MyPicture>
A Picture
<\figure>
The text "A Picture" is the figure's caption. The markup produces this output: