1

I'm writting a student book and i use the tasks package.

Compilation with Pdflatex work well but compilation with latex+dvips+ps2pdf break links beetween the table of contents and sections furthermore bookmarks don't work.

The pdf file work correctly with Sumatrapdf or firefoxplugin but dont work with Adobe Acrobat Reader DC (version 2020.006.20042)

here is a mimimal exemple :

\documentclass{article}
\usepackage{tasks}
\usepackage{hyperref}

\begin{document}

\tableofcontents

\newpage

\section{One section}

Some text

\begin{tasks}(2)
    \task First Task    
    \task   Seconde Task
\end{tasks}

\end{document}  

You can download the pdf file here

Does anyone understand what's going on ?

I use Miktex 2.9.7364 and GPL Ghostscript 9.27 on windows 8.

1

The adobe reader is right here: There is a syntax error in the pdf. The tasks package defines a counter representation for hyperref which contains the closing ), and on the dvips route this is not correctly escaped (such a parenthese is a special char in a pdf).

You can get around this like this:

\documentclass{article}
\usepackage{tasks}
\usepackage{hyperref}
\ExplSyntaxOn
\AtBeginDocument{\renewcommand\theHtask{\int_use:N \g__tasks_env_int . \number\value{\l__tasks_counter_tl}}}
\ExplSyntaxOff
\begin{document}

\tableofcontents

\newpage

\section{One section}

Some text

\begin{tasks}(2)
    \task First Task
    \task   Seconde Task
\end{tasks}

\end{document}
4
  • Thank you a lot, i understand and it work! Do you think I should notify the developer of the tasks package? – Manuel Cart Apr 19 '20 at 17:38
  • @ManuelCart I've already seen this and just uploaded a fixed version to CTAN :) – cgnieder Apr 19 '20 at 17:55
  • @cgnieder actually I think it is either a ghostscript bug or a hyperref bug. But I don't see an easy way around so it is better to avoid parentheses in destination names – Ulrike Fischer Apr 19 '20 at 17:57
  • @UlrikeFischer I agree – cgnieder Apr 19 '20 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.