Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

13 Converting to HTML/XHTML > 13.11 Providing hover text for terms in HTML


13.11 Providing hover text for terms in HTML

Hover text in HTML is produced from the value of the HTML title attribute of a tag (usually a <span> tag) that encloses the term. The attribute value may not contain a carriage return, nor the symbols <, >, ", or &.

Mif2Go provides two ways to assign hover text to terms in your document:

Assign hover text with a marker

Assign hover text with a character format.

Assign hover text with a marker

To provide hover text for a single instance of a term, in FrameMaker place an attribute marker within or immediately before the character format that encloses the term. The content of the marker is the text that will show on hover. See §29.2.4 Using attribute markers for HTML or XML.

Assign hover text with a character format

To provide the same hover text for every instance of a given term, or to provide hover text for multiple terms, apply a dedicated character format (for example Term) to the material in question. Assign format property GlossTitle to the character format:

[HTMLCharStyles]

Term = GlossTitle

Hover text is captured from content

When Mif2Go encounters in your document character format Term, Mif2Go does the following:

1. Collects the content enclosed by the character format.

2. Removes all characters except letters and digits.

3. Uses the result as a key to locate the required hover text.

Hover text can be in your configuration file or in separate files:

Keep hover text in a configuration file

Keep hover text in separate text files.

Keep hover text in a configuration file

If the hover text you wish to provide is relatively brief, such as spelling out the names represented by acronyms used in your document, you can list the terms and their definitions in your project or document configuration file. For example:

[GlossTitles]

ATT = American Telephone and Telegraph

DEC = Digital Equipment Corporation

HP = Hewlett-Packard

Keep hover text in separate text files

If Mif2Go does not find the key in configuration section [GlossTitles], Mif2Go looks for it in the following section:

[GlossFiles]

ATT = att

If found, Mif2Go looks for a file by the assigned name with extension .txt (in this example, att.txt) and uses the contents of that file as the hover text for the term. If you have a set of similar terms that should use the same hover text, you can use wildcards; for example:

[GlossFiles]

ATT* = att

In this example, any term that begins with AT&T (or ATT) and has the hover-text character format or marker would get hover text from file att.txt.

By default, Mif2Go looks in the project directory for hover-text files. Most likely you will want to keep the files in some other central location. To specify where to find these files:

[HTMLOptions]

; GlossTitlePath = path to definition files used for HTML hover text

GlossTitlePath = C:/path/to/definitions/

The path must use forward slashes, and must not contain spaces.

If Mif2Go does not find the key listed either in [GlossTitles] or in [GlossFiles], Mif2Go uses the key itself as the base file name, and looks for key.txt.

Precedence of hover-text definitions

The precedence of methods by which Mif2Go finds hover text for a term is as follows:

1. A marker, if present

2. A [GlossTitles] setting

3. A [GlossFiles] setting

4. A file named by the term content.



13 Converting to HTML/XHTML > 13.11 Providing hover text for terms in HTML