Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 9 Generating Microsoft HTML Help > 9.7 Creating related-topic links for HTML Help > 9.7.5 Using the same format or marker for ALink keywords and jumps > 9.7.5.6 Including multiple ALink keywords in a paragraph or marker

#### 9.7.5.6 Including multiple ALink keywords in a paragraph or marker

An enhanced version of the [ALinkButton] macro (see §9.7.5.4 Building an ALink button object from an ALink keyword list) parses each $$AlinkKeys list item for multiple ALink keywords, allowing you to include several keywords (separated by semicolons) in each ALinkTarget paragraph or Subject marker.

This version of the [ALinkButton] macro uses two additional macro variables:

$$ALinkKeyItem | Counts $$AlinkKeys list items (while $$ALinkParamNum counts keywords and labels the button-object keyword parameters, as before).
$$ItemContent | Holds a copy of each potentially multiple-keyword list item for chopping into individual ALink keywords.

This button macro invokes the same [ALinkButtonStart], [ALinkButtonParam], and [ALinkButtonEnd] macros described in §9.7.5.4 Building an ALink button object from an ALink keyword list:

[ALinkButton]

<$_if (Nkeys > 0)>

<$ALinkButtonStart><$$ALinkKeyItem=1><$$ALinkParamNum=1>\

<$_repeat ($$Nkeys)>\

<$$ALinkParamText=$$ALinkKeys[$$ALinkKeyItem]>\

<$$ALinkKeyItem++><$$ItemContent=$$ALinkParamText>\

<$_while ($$ItemContent contains ";")>\

<$$ALinkParamText=($$ItemContent before ";")>\

<$$ALinkParamNum++><$ALinkButtonParam>\

<$$ItemContent=($$ItemContent after ";")>\

<$_endwhile>

<$$ALinkParamText=$$ItemContent><$ALinkButtonParam>\

<$_endrepeat><$ALinkButtonEnd><$$ALinkParamCount=0>\

<$_endif>

See §28.6.4.3 Using loop structures for an explanation of loop controls $_repeat and $_while.

See §28.6.5 Specifying substrings in expressions for an explanation of string operators contains, before, and after.

> 9 Generating Microsoft HTML Help > 9.7 Creating related-topic links for HTML Help > 9.7.5 Using the same format or marker for ALink keywords and jumps > 9.7.5.6 Including multiple ALink keywords in a paragraph or marker

| Mif2Go User's Guide: 9.7.5.5 Positioning the ALink button in each HTML Help topic |  | Mif2Go User's Guide: 9.7.6 Creating buttons for other types of related-topic links |