Problem with table of contents

Issue #12 invalid
Charlie Hogg created an issue

Hi,

The pdfcomment package is really useful. I'm very grateful to the developers. Thanks.

I have a found a slight problem. When I make a table of contents or table of figures and I include the pdfcomment package, the line breaks in the the table of contents are lost.

Here is a simple example code with a png of the document produced.

I am running Latex through TeXnicCenter on Windows 7.

Is there any other information I can give? The latex error log doesn't produce any warnings, other than an overfull box in the table of contents.

Any work-arounds would be much appreciated.

Thanks, Charlie

\documentclass[12pt,chapterprefix,openright,twoside,a4paper,numbers=noenddot,DIV11,BCOR1cm]{scrbook}

% preamble
\usepackage[author={Charlie Hogg}]{pdfcomment}

\begin{document}

\tableofcontents

\section{Theory theory Theory theory Theory theory Theory theory Theory theory Theory theory Theory theory}

The 

\end{document}

Comments (6)

  1. Charlie Hogg reporter

    PS If there is something I could easily change about the other packages I use that would, please tell me. I'm a bit of a novice, so I can only do simple things at the mo. Thanks again.

  2. Josef Kleber repo owner

    Hi,

    i can not reproduce your problem while using pdflatex! So my guess is, you are using latex -> dvips -> ps2pdf. hyperref.sty (which is loaded by pdfcomment.sty) has a limitation of not supporting breakable hyperlinks on the dvips route.

    So my advice is to use pdflatex instead of latex. If you have a reason to use the dvips route, the last resort is to switch off the hyperlinks, as shown in the following example:

    \documentclass[12pt,chapterprefix,openright,twoside,a4paper,numbers=noenddot,DIV11,BCOR1cm]{scrbook}
    %\usepackage[author={Charlie Hogg}]{pdfcomment}
    \usepackage{hyperref}
    \hypersetup{draft}
    \begin{document}
    \tableofcontents
    \section{Theory theory Theory theory Theory theory Theory theory Theory theory Theory theory Theory theory}
    The 
    \end{document}
    

    I will close this issue, as it is no pdfcomment bug!

  3. Josef Kleber repo owner

    No pdfcomment bug, but limitation of unbreakable hyperlinks on the latex -> dvips -> ps2pdf route!

  4. Charlie Hogg reporter

    Thanks. You're right, I was using LaTex->ps->pdf. The problem goes away when I use LaTex->pdf.

    My figures are as .eps files, so with my current set up pdflatex won't work for me. Is there a simple package you know of that would make my eps figures work in the pdflatex route without having to convert all my figures? If so, I would do that.

    My concern with using pdfcomment at the moment is that if I use latex->ps, then I may end up with \pdfcomment statements throughout my documents which I need to take out when I come to finally publish it.

    Thanks again for the great package and the help.

  5. Josef Kleber repo owner

    \usepackage{epstopdf} does convert your eps into pdf on-the-fly. You must enable \write18, see the package doc.

    For your other concern, just use \usepackage[final]{pdfcomment} in the end and all PDF annotations are gone.

  6. Log in to comment