Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am converting documents to (X)HTML using tex4ht. The program works well, but the only thing that doesn't is the references.

I included a table of contents and made links using the hyperref package. However, when I use the links from the ToC or ref to labels (placed directly under the title), they come out wrong.

If I use the article documentclass, it doesn't show any section title at all, it just starts with the text. If I use the report documentclass it shows the title, but not: 'Chapter #'.

Minimal code is:

\documentclass{report}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\chapter{The first chapter}
\label{chap1}
Some text

\chapter{The second chapter}
Some text and \ref{chap1}.

\end{document}

I then used the MiKTeX version of tex4ht. However, I have tried on MacTeX and this gives the same result.

How can I show the full titles when using links?

share|improve this question
    
after htlatex filename the result looks like this: pastehtml.com/view/c1ztxuj4g.html . does you have different result? –  michal.h21 Jun 19 '12 at 9:08
    
right, if you add a lot of text, say a few paragraphs from www.lipsum.com, you will see that when using the links, the part 'chapter 1' is not shown –  bquast Jun 19 '12 at 9:37
    
I uploaded an example: pastehtml.com/view/c1zxy1q62.html –  bquast Jun 19 '12 at 9:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.