HTML Indexer

Download the free demo!
Register HTML Indexer
Frequently Asked Questions
Tips and Techniques
HTML Indexer in Detail
Customer Feedback
Customer Examples
Why Create an Index?

Text-only version

Site index

HTML Indexer™ Tips and Techniques


Go to the list of tips

Include HTML files with other extensions

Normally, HTML Indexer recognizes three file extensions for HTML files: .htm, .html, and .asp. You can set up HTML Indexer to consider files with other extensions, too—such as .shtml or .jsp—but it requires editing the Indexer.ini file, which you should always approach with caution.

Important: You should only add extensions that represent HTML format files. To include a non-HMTL file, use the "external URL” feature. See the online help for instructions on adding external URLs.

If you aren't comfortable editing INI files by hand, just send yours as an e-mail attachment to support@html-indexer.com, tell us what other extensions (besides .htm, .html, and .asp) you want HTML Indexer to recognize, and we'll send it back as quickly as possible. The Indexer.ini file is in your Windows directory (typically C:\Windows).

If you want to do it yourself:

  1. Open your Windows directory (typically C:\Windows).

  2. Save a copy of the Indexer.ini file (such as "Copy of Indexer.ini").

    If anything goes wrong, you can always copy the copy back over the altered original. (Reinstalling HTML Indexer will not replace an existing Indexer.ini file.)

  3. Double-click on the original Indexer.ini file.

  4. Find the line that looks like this:

      Valid Extensions=htm;html;asp
  5. Add the extensions you want HTML Indexer to recognize.

    For example, to force HTML Indexer to include JSP and SHTML files in the Add Files dialog box, change the INI line to this:

      Valid Extensions=htm;html;asp;jsp;shtml

    Note that extensions are separated by semicolons, with no spaces, and the list does not end with a semicolon.

    Caution: If you alter the name of the key or the format of the list, HTML Indexer will behave incorrectly. At best, it will not recognize the key and will use the default extensions.


Go to the list of tips

Retain customizations when you rebuild the HTML index

HTML Indexer includes dozens of customization options (see the online help for details). These options address the needs of most of our customers, and we know they'll save you a lot of time when you rebuild the index. If there are other customizations you want to preserve, read on.

Other customizations

Try this method to preserve your customizations:

  1. Set up the output filename, such as MyIndex.html, and build the index once.

  2. Customize the output index as you like.

  3. Set up a new output filename, such as Temp.html.

  4. Each time you rebuild the index, copy the new index entries from Temp.html to MyIndex.html, preserving the customizations you already made in MyIndex.html.


Go to the list of tips

Create an index of indexes

You can create index entries in a master index that point to subindexes, and HTML Indexer will embed your index entries in the subindexes. But those embedded entries will be lost when you rebuild the subindexes.

Instead, use the "external URL" feature to create enduring entries for subindexes.

  1. Create your subindexes, such as Cats.html and Dogs.html.

  2. Open the master index project, such as Pets.ipj.

  3. From the Actions menu, choose Add External URLs to Project.

  4. Type the relative path from the master index, such as Pets.html, to each of the subindexes.

    Assume, for example, that the subindexes (Cats.html and Dogs.html) reside in subdirectories of the pets-dir directory.

    In the Enter URL field, type cats-dir/Cats.html and press Enter; then type dogs-dir/Dogs.html and press Enter again.

  5. Create index entries for each of the "external URLs" you just added for the subindexes.

Index entries for external URLs aren't embedded in the source files, so they won't be lost when you rebuild the subindexes.


Go to the list of tips

Create an index of external web sites

Your index project doesn't have to include any local files. For example, you can create indexes of topic-related sites all over the Web—like "bookmark" lists, only they're automatically alphabetized and formatted, and you can have as many of them as you want.

You do have to define a main directory, though, so HTML Indexer has a place to write the output file.


Go to the list of tips

Create multiple entries with a common top-level heading

To make sure index entries have a common top-level heading and save yourself a lot of typing, try this:

  1. Select all the targets that will share the top-level heading, and click on the Add Index Entry tool.

  2. Type the top-level heading followed by a comma, click on the Add button, then click on the Close button.

  3. In the index preview, click on the Index Entry column head to group the entries you just created.

  4. One at a time, double-click on each of the new identical entries, and add unique text after the space.

    (Note the target URL to remind yourself of the nature of the information at each target.)


Go to the list of tips

Prevent default entries from containing formatting tags

One of HTML Indexer's strengths is that you can include formatting in your index entries. But this can make default entries hard to read if the associated text contains a lot of formatting or other HTML mark-up.

As explained in the online help, the default entry for a file is the text in the first <Hn> tag found in the file (or the <TITLE> tag, if no <Hn> tag is found); the default entry for a named anchor is the text between the <A> and </A> tags.

In the current version of HTML Indexer, the only way to prevent default entries from including formatting is to make sure the formatting tags are outside the tags that define the default entries.

For example, change this:

  <H2><FONT FACE="Algerian" COLOR="#FF0000">All about dogs</FONT></H2>

to this:

  <FONT FACE="Algerian" COLOR="#FF0000"><H2>All about dogs</H2></FONT>

This technique is less straightforward when the formatting applies to a subset of the associated text, but you can still use it in many cases.

For example, change this:

  <A NAME="my-anchor">All about <EM>big</EM> dogs</A>

to this:

  All about <EM><A NAME="my-anchor">big</A></EM> dogs

The trade-off is that the default entry for my-anchor will be "big" rather than "All about big dogs." But the default entries are just that—defaults. They're useful on several levels, but we also assume most users will want to edit them, anyway.


Go to the list of tips

Run HTML Indexer in batch mode

If your web site meets these criteria, you might want to build indexes as part of an automated (or "batch") process:

  • You've set up the project, added files, and selected style options.

  • The names of the files in the project don't change often.

  • The contents of the files change too often for an indexer to keep up.

  • You code the files in such a way that the default entries are acceptable without modification.

For HTML Help, you might want to build the .hhk file as part of a batch process that compiles the help project.

Whatever your reason, you can build indexes from an existing project by running HTML Indexer in batch mode.

At the DOS prompt type:

  Indexer.exe  projectfile.ipj  [options]

Options:

  /makeindex

Example:

  "C:\Program Files\HTML Indexer\Indexer.exe"  "C:\My Web Projects\site-index.ipj"  /makeindex

When you use the /makeindex option, HTML Indexer loads the specified project, builds the indexes, and exits. A progress bar appears briefly, but there is no other visual display.

You must run HTML Indexer normally to create the project, manage files and index entries, specify output types and filenames, and set style options. Once you do, you could even write a batch job to create the project (.ipj) file, too.

The real purpose of this feature is to support batch creation of indexes for web sites that change content rapidly and that code source files to provide acceptable default index entries.


Go to the list of tips

Build a table of contents

You can use the "Sort As" feature to build a table of contents for your HTML documents:

  1. Create an index entry for each target:

    1. In the Formatted Index Entry field, enter the text you want to appear in the table of contents.

    2. In the Sort As field, precede the text with numbers that represent the target's position in the desired order.

    For example, to force Cats.html, Dogs.html, and Fish.html to appear in reverse order, create these index entries:
    Target URL Formatted
    Index Entry
    Sort As
    Cats.html cats 03
    Dogs.html dogs 02
    Fish.html fish 01

  2. Click on the Set Index Style tool, and exclude group headings; then click on the Make Index tool.

  3. In the output file, delete the links to headings at the top of the table of contents.


Go to the list of tips

Create "external" cross-references

HMTL Indexer 4 includes fully integrated cross-references, along with many other new features. Cross-references typically link one entry in your index to another, like this:

  garbage collector. See sanitation engineer

Remember, HTML Indexer maintains all aspects of these cross-references for you, automatically. All you have to do is decide the best text for the heading ("garbage collector") and locator ("sanitation engineer").

But what if you want to a create cross-reference that points to a location outside your finished index? With the latest version of HTML Indexer, you can use a simple technique to do so.

Important: If you deviate from these instructions, this technique may produce nested or unclosed anchors. They may work with your version of your favorite browser, but it is not valid HTML. Follow these steps carefully, test your index output file in as many browsers as possible, and let us know if you have any problems.

Note: This technique can be used in HTML indexes only—it will not work in an HTML Help or JavaHelp index.

To create an external cross-reference

  1. Using version 4.1.3 (or later), open your index project (.ipj) file.

  2. From the Actions menu, choose Create Cross-Reference.

  3. In the X-ref Heading text box, type this:

      garbage collector
  4. In the X-ref Locator text box, type this:

      </a><a href=\"http://www.saneng.org\">Society of Sanitation Engineers

    Make sure you precede each of the two double quotation marks with a backslash, as shown.

    Make sure you type the closing anchor tag before the opening anchor tag, as shown.

  5. Click on the OK button.

  6. From the Actions menu, choose Make Index.

  7. In your finished index, find the index entry:

      garbage collector. See Society of Sanitation Engineers
  8. Click on the hyperlinked text to display the Society's web site.

We call this an "external cross-reference" because the intended target of the cross-reference is outside the index file and because, like the External URL feature, you have to type the target URL by hand. (Remember, this is much less convenient than the new fully integrated cross-references, in which HTML Indexer maintains all aspects of the cross-reference for you, automatically.)

In fact, the target of your external cross-reference can be a page on your web site. For example, you could direct readers to a local page where you mention the Society of Sanitation Engineers. Just type this into the X-ref Locator text box:

  </a><a href=\"industrygroups.html#sse-org\">Society of Sanitation Engineers

assuming the industrygroups.html file resides in the same directory as your finished index (and assuming it contains an anchor named "sse-org"). As you may have guessed, you can use any valid URL, either relative or absolute.

Important: If you deviate from these instructions, this technique may produce nested or unclosed anchors. They may work with your version of your favorite browser, but it is not valid HTML. Follow these steps carefully, test your finished index in as many browsers as possible, and let us know if you have any problems.

Note: This technique can be used in HTML indexes only—it will not work in an HTML Help or JavaHelp index.


Go to the list of tips

Create hyperlinked common headings  New!

HMTL Indexer automatically handles nested entries for you. For a single entry (such as "cats, breeding") the HTML index includes this:

cats, breeding

As soon as you add another entry with the same heading (such as "cats, feeding"), HTML Indexer nests the entries appropriately. In the rebuilt HTML index, you see this:

cats
   breeding
   feeding

Delete the original entry, and the rebuilt HTML index includes this:

cats, feeding

HTML Indexer automatically handles nesting in your HTML Help and JavaHelp indexes, too.

While this is almost always the correct behavior, you may have an occasional need to create a group of entries like this:

common heading     (link to commontext.htm)
   subentry 1           (link to subtopic1.htm)
   subentry 2           (link to subtopic2.htm)
   subentry 3           (link to subtopic3.htm)

To achieve this effect, you must:

  • Embed the HTML code for the link to the common heading in the Index As field for each subentry.

  • Use the Sort As field to position each entry correctly in the finished index.

Important: If you deviate from these instructions, this technique may produce nested or unclosed anchors. They may work with your version of your favorite browser, but it is not valid HTML. Follow these steps carefully, test your finished index in as many browsers as possible, and let us know if you have any problems.

For subtopic1.htm:

Index As
  <a href=\"commontext.htm\">common heading</a>, subentry 1
Sort As
  common heading, subentry 1

For subtopic2.htm:

Index As
  <a href=\"commontext.htm\">common heading</a>, subentry 2
Sort As
  common heading, subentry 2

For subtopic3.htm:

Index As
  <a href=\"commontext.htm\">common heading</a>, subentry 3
Sort As
  common heading, subentry 3

Notes:

  • The common heading of every subentry must specify exactly the same URL, the one you want your reader to see when she clicks on the common heading.

  • Each double quotation mark must be preceded by a backslash, exactly as shown.

  • HTML Indexer cannot guarantee that your link to commonheading.htm will work, because you're typing it in by hand. (After all, HTML Indexer was designed to save you from having to do that!)

  • This change will be preserved when you update the index. (Of course, any errors will be preserved, too. Again, HTML Indexer was designed to eliminate that danger.)

  • You're on your own in debugging problems with this solution. We just give you the rope—what you do with it is up to you.

  • This technique can be used in HTML indexes only—it will not work in an HTML Help or JavaHelp index.

  • Important: If you deviate from these instructions, this technique may produce nested or unclosed anchors. They may work with your version of your favorite browser, but it is not valid HTML. Follow these steps carefully, test your index output file in as many browsers as possible, and let us know if you have any problems.

You can download a zipped project (.ipj) and index (.htm) file that demonstrate this techique.


Go to the list of tips

Specify a target frame or window

HMTL Indexer 4 includes the ability to create a framed index page and to specify a target frame or window for the entire index or for individual index entries, along with many other new features. Get the latest version!


Go to the list of tips

Split the HTML index into multiple files

HMTL Indexer 4 includes the ability to create a separate file for each letter group in the HTML index, along with many other new features. Get the latest version!

 


Copyright © 1998–2016 Brown Inc.