27.7 Referencing split and extract files

You can use the predefined macro variables listed in Table 27-6 to refer to file names and titles of split and extract files. You can use these variables anywhere in a macro, including within JavaScript sections. They are valid in all parts of a file, including within the base part from which the other parts are split or extracted.

Table 27-6 Predefined macro variables for splits and extracts

Type

Variable

Description

File name

$$_basefile

Base name only of the parent file, without extension.

$$_currbase

Base name only of the current split part, without extension.

$$_currfile

Current split part: file name with extension

$$_currfilepath

Current split part: full path and file name with extension

$$_extrgraphid

Internal file name of first graphic referenced in an extract

$$_extrfile

Current extract file name

$$_extrgraph

File name of first graphic in an extract, as modified by any [Graphics]ExtrGraphSuffix; use for thumbnails (see §27.8.3 Replacing extracts with links in the parent file)

$$_extrgraphid

DITA2Go internal name of first graphic in an extract

$$_nextfile

Split part that follows $$_currfile

$$_prevfile

Split part that precedes $$_currfile

Title

$$_currtitle

Current file title, unaffected by extracts, so it can be used in an extract to get the parent file title.

$$_basetitle

Original document title, unaffected by splits.

$$_prevtitle

Title of $$_prevfile split part.

$$_nexttitle

Title of $$_nextfile split part.

$$_extrtitle

Current extracted-part title; used in a replacement macro for the extract, to reference the extract title.; see §27.8.3 Replacing extracts with links in the parent file.

Boolean

$$_firstfile

1 if this is the first split part, otherwise 0; intended for JavaScript use.

$$_lastfile

1 if this is the last split part; otherwise 0; intended for JavaScript use.

Previous Topic:  27.6.3 Using special sections to insert code in extracts

Next Topic:  27.8 Customizing and replacing extracts

Parent Topic:  27. Splitting and extracting files

Sibling Topics:

27.1 Splitting and extracting vs. chunking

27.2 Chunking DITA maps

27.3 Splitting files

27.4 Extracting files

27.5 Identifying split and extract files

27.6 Inserting HTML code in split and extract files

27.8 Customizing and replacing extracts

Table of ContentsIndex