Your first question is not so hard. Just create dummy sty
file, testcrosslink.sty
for example, testcrosslink.4ht
and put \usepackage{testcrosslink}
to your document preamble.
Content of testcrosslink.4ht
:
\def\my:nextlink{%
\ifx\nextCut\empty\relax\else[\Link[\nextCut]{}{}Next\EndLink]\fi
}
\def\my:prevlink{%
\ifx\prevCut\empty\relax\else[\Link[\prevCut]{}{}Prev\EndLink]\fi
}
\Configure{section}{\empty}{\empty}{\HCode{<h3>}\my:prevlink}{\my:nextlink\HCode{</h3>}}
\Configure{crosslinks+}{}{}{\empty}{\empty}
This configuration makes top crosslinks empty and redefines section to include links to previous and next file.
To change bottom crosslinks, you can try this:
\Configure{crosslinks}{}{}{ -> \macrofornexttitle [next]}{[prev] \macroforprevtitle <- }{}{}{}{}
\Configure{crosslinks*}{prev}{next}{}
For more information about various configuration options for crosslinks etc., see the CVR's blog
Problem is, I don't know how to automatically retrieve contents of prev and next sections, so how to define macros \macrofornexttitle
and \macroforprevtitle
must answer someone else. Maybe it could be done using nameref
or zref
and automatically generated labels, but what I have tried failed.
\Configure{crosslinks}{}{}{}{}{}{}{}{}
(eight parameters!) which seems to configure the way the navigation links behave. Unfortunately I never gottex4ht
to work, so I can't test it.:(