[Front] [Previous Chapter] [Next Chapter]

DOSBook Concepts

Overview

This chapter describes the pop-ups and links, DOSBook codes, formatting tags, and the tools used to build the DOSBook database.

Pop-ups and Links

There are two features that make DOSBook more useful to the user. They are pop-ups and links.

Pop-ups

Pop-ups are highlighted words or phrases in the text that can be selected to view a pop-up explanation of the word or phrase. In DOSBook you can select these highlighted words using the <Tab> key or your mouse. If you use the <Tab> key, select the word and press <Enter>. A box will appear containing the glossary definition of the highlighted word or phrase. The box is displayed for as long as you hold down the <Enter> key, or the left mouse button. Once you release the <Enter> key, or the mouse button, the box disappears leaving you at the same point in the text.

Links

Links are a word or phrase, highlighted differently, that you can select to take you to another section of DOSBook where there is more information. Use the <Tab> key or your mouse to select the highlighted word or phrase, then press the <Enter> key or click on your left mouse button. You are then taken to another section of text where there is more information. A link is similar to a ``See also'' in a manual. The ``See also'' refers you to information on the same subject that is elsewhere in the text.

Markers and References

Each location which is referred to by a pop-up or a link has a marker associated with it, and each pop-up or link has a cross-reference entry to the appropriate marker. A marker is similar to a label in a computer program and a reference is similar to a goto statement or a refer to.

The compiler can tell the difference between the two types of reference by the form of highlighting immediately before the cross-reference entry.

DOSBook Formatting Tags

Formatting tags are used to structure the ASCII text so that it can be displayed for online use. The formatting tags are recognised by the compiler (SVF2OLH) when the database is compiled. The tags help to structure the text, for example, there are different level heading tags and also tags to format tables and command prompts. There is a limit on the tags available to format text because the DOSBook display program can only display text in a small number of ways. Do not try to add your own tags because they will not be recognised.

For a full list of the tags and their definitions, refer to Appendix A, ``DOSBook Formatting Tags''.

DOSBook Database Codes

There are special codes within DOSBook that are used to create the links, pop-ups, and highlights. The codes are used for the following:

The DOSBook codes are inserted by the author in an ASCII text editor. The following table shows how these embedded codes appear when you look at them in a text editor.

In DOSBookIn ASCII
Bold<B>word<D>
For a pop-up<M=>word<D><$R[P#,reference]>
For a link<MO>word<D><$R[P#,reference]>
Marker<$M[marker name]>
Index Entry<$Iprimary entry;secondary entry>


Examples of DOSBook Codes

A typical paragraph in a DOSBook text file might look like the following when viewed in an ASCII text editor:

@BULLET = <$IDisks;hard disks>If you are planning to <B>install<D> the operating system on your hard disk, the disk must be prepared (<M=>formatted<D><$R[P#,format]> and divided into <M=>partitions<D><$R[P#,parti]>). A DOS primary partition (normally drive C:) must exist on your hard disk for the operating system. If you are using a new disk that has not been prepared, however, the INSTALL program will automatically detect this and run a program called FDISK <$M[hard-disk]>to prepare the disk. Refer to the section called <MO>Preparing a Hard Disk (FDISK)<D><$R[P#,prep-disk]> in this chapter.

In this example, the codes have been inserted by the author. The codes are described in the following table.

CodeDescription
@BULLET=A DOSBook formatting tag. Refer to the table in Appendix A, "DOSBook Formatting Tags" for a complete list of these.
<$IDisks;hard disks>An index entry. The phrase "Disks;hard disks" will only appear on the index screen.
<B>install<D>A bold. The phrase "install" will appear bold in the text.
<M=>partitions<D><$R[P#,parti]>A pop-up. The phrase "partitions" will appear bold in the text. The database codes themselves are not visible.
<MO>Preparing a Hard Disk (FDISK)<D><$R[P#,prep-disk]>A link. "Preparing a Hard Disk (FDISK)" will appear bold in the text. The database codes themselves are not visible.
<$M[hard-disk]>A marker. Used in conjunction with a reference to complete a link.

The DOSBook Tools

The following is a description of the tools used to produce DOSBook.

SVF2OLH

SVF2OLH.EXE is the compiler program that builds the DOSBook database. It takes as its input the publication (.PUB) file. There are various switches that you can use. The command format is

SVF2OLH [/?|/H] [d:][path]filename.ext [switches]
Command Switches
/? or /HDisplays the help text.
/L <name>Specifies the name of the help on help (.HOH) source file; name can be any text string. If you do not specify a path to this file, the compiler assumes the file is located in the same directory as the .PUB file.
/T <title>Specifies the database title. The title must always be given. Although you can use any text string, as the title is displayed at the top of the window, it is best to use the command name, in this case DOSBook, as the title.
/VVerbose mode. As the compiler scans through the publication file, it lists the file it is currently reading.
/EProduces a file containing all errors and warnings. The filename is the same as the publication filename but the extension is .ERR rather than .PUB.
/OProduces a file listing locations of index entries, references and markers. The filename will be the same as the publication filename but the file extension will be .OUT rather than .PUB.
/C <name>Country code.
/P <num>Code page.


The following example lists the name of each text file as the compiler scans the publication file DRDOS.PUB, produces an error file listing all errors and warnings (DRDOS.ERR), gives the filename of the .HOH file as DOSBOOK.HOH, and the title of the database as DOSBOOK.

SVF2OLH /V/E/L DOSBOOK /T ``DOSBOOK'' DRDOS.PUB
The .HOH file should be in the same directory as SVF2OLH.EXE unless you use the /L switch, in which case it must be in the same directory as the .PUB file.

OLH2CLH

This tool compresses the DOSBook database. The command format is as follows:

OLH2CLH [/?|/H] [d:][path]filename.ext [switches]
It will only compress languages which have spaces between words; therefore it would not compress a language such as Japanese.


[Front] [Previous Chapter] [Next Chapter]

info@caldera.com
Copyright © 1991, 1997 Caldera, Inc. All rights reserved.