[pdftex] Not a bug
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Tue May 13 20:14:08 CEST 2014
On 13.05.2014 19:51, Ramón Casares wrote:
> Sorry! You are right, balanced pairs of parentheses
> within a string require no special treatment.
>
> I was misled by the Jhove verifier and also by the
> explanation of the macro \pdfescapestring in
> "The pdfTEX user manual" November 23, 2010 Rev. 655:
>
> \pdfescapestring general text (expandable)
>
> Starting from version 1.30.0, pdfTEX provides a mechanism
> for converting a general text into pdf string.
> Many characters that may be needed inside such a text
> (especially parenthesis), have a special meaning
> inside a pdf string object and thus, can’t be used literally.
> The primitive replaces each special pdf character
> by its literal representation by inserting a backslash
> before that character. Some characters (e. g. space) are
> also converted into 3--digit octal number. In example,
> \pdfescapestring{Text (1)} will be expanded
> to Text\040\(1\). This ensures a literal interpretation
> of the text by the pdf viewer. The primitive was
> introduced in pdfTEX 1.30.0.
Strictly only unbalanced parentheses need to be escaped. But it
simplifies the code a great deal, if it does not have to
check for balanced parentheses to exclude them from escaping.
Yours sincerely
Heiko Oberdiek
More information about the pdftex
mailing list