[tex4ht] tex4ht puts the wrong link when splitting document. How to make the top of the page visible?

Nasser M. Abbasi nma at 12000.org
Thu Dec 31 03:24:21 CET 2015

When splitting a document, and clicking on a link from the
parent page to go to the child page, one would expect the
child page to open where the top of the page is visible.

But what happens now, is that when the child page opens
one has to use the slider to move it up a little to see
the top of the page, where chapter name and the
navigators are located (prev,tail,up), etc...

This is really annoying. Since each time I open a page, I have
to use the slider a little to see the top of the page in order

I noticed the link from parent to the child page has this
pattern:

page1.htm#x3-30001.1

And if the link is simply changed to just

page1.htm

Then now the child page will open with the top part visible.

Here is a MWE to explain the problem

-------------------------------------
\documentclass{report}%
\usepackage{lipsum}
\begin{document}
\tableofcontents

\chapter{HW}
This is a test
\section{HW1}
\lipsum
\lipsum
\lipsum
\end{document}
---------------------------

Compiled with

make4ht --lua -u foo.tex "htm,2,pic-align,notoc*"

And now from foo.htm, clicking on the link called HW1,
a new page is opened (the child page). Now you'll see
the problem. The top part of the page is not visible,
and you'll notice the web page slider of the browser is
little down the page. Tested on firefox and Chrome.

Is there a way to make the new child page open with
the top part visible? This is what one would expect.

TL 2015  on Linux mint.

Thank you,
--Nasser