Skip to content

destination names with parentheses are not correctly escaped on the dvips route  #138

@u-fischer

Description

@u-fischer

Related: https://tex.stackexchange.com/a/539499/2388

\documentclass{article}
\usepackage{l3pdf}
\ExplSyntaxOn
\pdf_uncompress:
\ExplSyntaxOff

\usepackage{hyperref}
\renewcommand\theHsection{\alph{section})}
\begin{document}
\tableofcontents
\section{sectiontoc)}
Some text
\end{document}  

After compilation with latex + dvips + ps2pdf

In the postscript all parentheses are escaped in the same way:

SDict begin [/View [/XYZ H.V]/Dest (section.a\)) cvn /DEST pdfmark end

SDict begin [/Subtype /Link/Dest (section.a\)) cvn/H /I/Border [0 0
1]BorderArrayPatch/Color [1 0 0] H.B /ANN pdfmark end

SDict begin [/Count -0/Dest (section.a\)) cvn/Title (sectiontoc\))
/OUT pdfmark end

but in the pdf the escaping in the name tree is wrong:

<<
/Limits [
(Doc-Start)
(section.a))    %<----------- missing \
]
/Names [
(Doc-Start) 9 0 R
(page.1) 6 0 R
(section*.1) 10 0 R
(section.a)) 19 0 R] %<-------- missing \
>>

The bookmark entry looks ok (apart from a ascii 0 which prevents copy&paste.

The question is if this is a ghostscript bug or if hyperref would have to escape the string differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions