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

Michal Hoftich michal.h21 at gmail.com
Thu Dec 31 15:03:50 CET 2015


Hi Nasser,

destination link is inserted after section number, which in the case
of chapter, where linebreak in inserted after chapter number, causes
that links directed to chapter go to the chapter title. I don't think
that it is something we should change, but you can change that in your
document with some configurations like:

---------------
\Preamble{xhtml}

\newcommand\MyConfSection[2]{%
\Configure{#1}{}{}
{\IgnorePar\EndP\HCode{<#2} \HCode{ class="#1Head">}%
 }{\HCode{</#2>}\IgnoreIndent\par}
 }

\MyConfSection{chapter}{h2}
\MyConfSection{likechapter}{h2}
\MyConfSection{section}{h3}
\MyConfSection{likesection}{h3}
\MyConfSection{subsection}{h3}
\MyConfSection{likesubsection}{h3}
\MyConfSection{subsubsection}{h3}
\MyConfSection{likesubsubsection}{h3}
\Css{.chapterHead .titlemark{display:block;}}

\newcommand\ChapterLink[2]{\Link{}{#2}\TitleMark}

\Configure{toTocLink}{\ChapterLink}{\EndLink}

\begin{document}
\EndPreamble
-----------

all section levels must be fixed with `\MyConfSection`, because of the
change in `\Configure{toTocLink}`, the `\TitleMark` is printed twice
otherwise.

Best regards,
Michal


More information about the tex4ht mailing list