27.2 Crosslinks in Header and Footer

In Makefile.nw, we specify the next option to TEX4ht via the variable HTLATEXARGS. That makes the “next” button to jump linearly through the text in contrast to the section-wise default.

The following code generates a “Home” button (crosslinks+), provides three navigation buttons (crosslink*), and configures the buttons in such a way that they will not disappear when inactive (crosslinks-).

3364ht crosslinks 336  (331)
\Configure{crosslinks+}
   {\IgnorePar\EndP
     \HCode{<!--l. \the\inputlineno-->%
            <div class="crosslinks"><p class="noindent">%
            <a target="\string_top" href="\projectname.html">[Home]</a> }}
   {\ \ \ \ ((\currentfile))\HCode{</p></div>}%
     \xdef\@currentfile{\currentfile}\par\ShowPar}
   {\IgnorePar\EndP
     \HCode{<!--l. \the\inputlineno-->%
            <div class="crosslinks"><p class="noindent">%
            <a target="\string_top" href="\projectname.html">[Home]</a> }}
   {\ \ \ \ ((\@currentfile))\HCode{</p></div>}\par\ShowPar}
\Configure{crosslinks*}{prev}{up}{next}{}
\Configure{crosslinks-}{[}{]}

Uses currentfile 228a, html 380, and projectname 127.