##### 18.7.5.1 Creating a list of ALink keywords from paragraphs

Suppose you use paragraph format ALinkTarget for ALink keywords. To capture keywords from ALinkTarget paragraphs, assign properties to extract the paragraph content:

    [HTMLParaStyles]
    ALinkTarget=ALink Raw CodeStore CodeAfter

ALink property

The ALink property specifies that the content of each ALinkTarget paragraph is to be used for the ALink Name property of an HTML Help ALink object (not the button object, which you will construct with macros); see §16.6.4.2 Adding related-topic keywords via format properties.

Raw property

The Raw property suppresses any HTML tags that would otherwise be generated; see §30.2.4 Stripping paragraph properties.

CodeStore property

The CodeStore property causes the content of the ALinkTarget paragraph to be stored in macro variable $$ALinkTarget. (The value of a macro variable that has the same name as a paragraph format is the content of the current paragraph in that format; see §37.3.1 Creating and invoking macro variables.) The CodeStore property also removes the paragraph from text output; see §37.3.5.2 Inserting code with the CodeStore property.

CodeAfter property

The CodeAfter property provides the means to do something further with macro variable $$AlinkTarget, which now contains an ALink keyword, plucked from the ALinkTarget paragraph:

    [ParaStyleCodeAfter]
    ALinkTarget=<$$Nkeys++><$$ALinkKeys[$$Nkeys]=$$ALinkTarget>

Store paragraph content in a list variable

The [ParaStyleCodeAfter] code does the following:

- Increments a counter, Nkeys (which will be initialized to zero before each topic).
- Uses Nkeys to index a list variable, $$ALinkKeys (see §37.4 Using multiple-value list variables).
- Stores the content of macro variable $$ALinkTarget in the Nkeys slot in list variable $$AlinkKeys.

As DITA2Go processes DITA input for a topic, the $$ALinkKeys list gathers keywords from ALinkTarget paragraphs until it is time to create the ALink button object for a topic, described in §18.7.5.3 Building an ALink button object from an ALink keyword list.

See also:

§18.7.5.2 Initializing the ALink keyword list counter

§18.7.5.3 Building an ALink button object from an ALink keyword list

§18.7.5.4 Positioning the ALink button in each HTML Help topic

Previous Topic: 18.7.5 Using the same format for ALink keywords and jumps

Next Topic: 18.7.5.2 Initializing the ALink keyword list counter

Parent Topic: 18.7.5 Using the same format for ALink keywords and jumps

Sibling Topics:

18.7.5.2 Initializing the ALink keyword list counter

18.7.5.3 Building an ALink button object from an ALink keyword list

18.7.5.4 Positioning the ALink button in each HTML Help topic

18.7.5.5 Including multiple ALink keywords in a paragraph or marker