##### 29.3.1.2 Understanding equivalent browse macros and macro variables

For links between book files, DITA2Go provides two additional browse macros that are used by indirection: <$_seqprev> and <$_seqnext>. Table 29-1 shows the default definitions of these macros.

Table 29-1 Indirect navigation macros for files in a book

Macro | Default definition
    <$_seqprev>
    <a href="<$$_seqprevfile>"><$$_seqprevtitle></a>
    <$_seqnext>
    <a href="<$$_seqnextfile>"><$$_seqnexttitle></a>

Because of the equivalences listed in Table 29-2, you do not need to use <$_seqprev> and <$_seqnext>. You can link together all the HTML pages split from all the DITA files in the sequence, using only macros <$_prev> and <$_next>.

When you are converting a book rather than a single DITA file, for the first split part of any but the very first file in the book, the definition of <$_prev> changes to use predefined macro <$_seqprev>, which links to the last HTML file split from the previous DITA file in the book. Likewise, for the last HTML file split from any but the last DITA file in the book, the definition of <$_next> changes to use predefined macro <$_seqnext>, which links to the first HTML file split from the next DITA file in the book. Table 29-2 shows how browse macros and macro variables are equivalent depending on the position of a file in the sequence.

Table 29-2 Equivalent browse macros and variables by file position

File position | Equivalent macros, macro variables, and values
First file split from first DITA file in the sequence |
    <$_prev> = <$_seqprev> (produces At Start)
    <$$_prevfile> = <$$_seqprevfile> = <$$_seqcurrfile>
    <$$_prevtitle> = <$$_seqprevtitle> = <$$_seqcurrtitle>
First file split from each non-first DITA file, and all non-first unsplit files |
    <$_prev> = <$_seqprev>
    <$$_prevfile> = <$$_seqprevfile>
    <<$_prevtitle> = <$$_seqprevtitle>
Last file split from last DITA file in the sequence |
    <$_next> = <$_seqnext>  (produces At End)
    <$$_nextfile> = <$$_seqnextfile> = <$$_seqcurrfile>
    <$$_nexttitle> = <$$_seqnexttitle> = <$$_seqcurrtitle>
Last file split from each non-last DITA file, and all non-last unsplit files |
    <$_next> = <$_seqnext>
    <$$_nextfile> = <$$_seqnextfile>
    <<$_nexttitle> = <$$_seqnexttitle>

Previous Topic: 29.3.1.1 Understanding how browse macros vary by file position

Next Topic: 29.3.1.3 Understanding how browse macros employ macro variables

Parent Topic: 29.3.1 Understanding how browse macros work

Sibling Topics:

29.3.1.1 Understanding how browse macros vary by file position

29.3.1.3 Understanding how browse macros employ macro variables