home Cactus Home Page

vrypan@hol.gr Send me mail


The niceSgml2Html resources :


Here is a random number
A User's Guide to kdesgmltools Next Previous Table of Contents

5. Practice

If you have read the Theory Section it will be easy to understand how to use kdesgmltools.

5.1 --nice option

As stated above, when you type

sgml2html --nice <file>.sgml
you can insert html tags at certain poionts of your document. Those tags are read from the file named <file>.nif which MUST be present at the directory where you issue the sgml2html command.

The structure of this file is simple. It is a text file containing the html tags for the above mentioned sections. Each section begins with a line like this:

<--A-->
for SectionA. The lines
<--B-->
<--C-->
<--BarTags1-->
<--BarTags2-->
are used in the same way.

You must be careful since SectionB MUST contain a <BODY> tag.

A useful tip. If you use the word DOCNAME in any BarTags section it will be replaced by the title of the document.

5.2 --style=nice

In Theory I mentioned the substitution of sgml tags by html tabs which is done by Html2Html.pm (and consequently by niceSgml2Html.pm). This substitution is described in a file called mapping. This file is found somewhere in your sgml-tools tree and looks like this:

<name>          +       "<H3>"                  +
</name>         +       "</H3>"                 +     

These two lines state that the <name> tag will be replaced by <H3> tag and </name> tag by </H3>. The + signs indicate newline.

You may define alternative mappings. If you call sgml2html using the option --style=my, sgml-tools will look for a file named mymapping at the same directory where mapping resides. I have created a mapping called by --style=nice, which I find better. If you like it you may use it.

5.3 Navigation Icons

Just like the documents created by the original sgml2html, documents created with --nice in combination with --imagebuttons, will look for next.gif, prev.gif, toc.gif and an additional one, blank.gif.

blank.gif is only needed when using the --nice option and it is used when it does not make sence to put one of the other navigation buttons. For example, it is used where the next.gif would be used on the last page of our document, or in the place of toc.gif on the Table of Contents page.

What's more, nice looking icons are included in the kdesgmltools package and may be used instead of the original icons. These icons are created using The Gimp and are based on icons found at the http://www.iconbazaar.com/.

A User's Guide to kdesgmltools Next Previous Table of Contents