Monday, February 04, 2002 Hans Hagen wrote:

HH> At 03:24 PM 2/3/2002 +0100, Giuseppe Bilotta wrote:


>>HH> [alternatively you can do things like
>>
>>HH>    \appendtoks\def\mycs{WHOW}\to\everysanitize
>>
>>HH> to get your own clean up in bookmarks]
>>
>>This solution doesn't seem to work (either because \everysanitize
>>is not issued by the PDF bookmark sanitizer or because it does not
>>become effective soon enough). I found that a possible alternative
>>is

HH> hm, before i look into it someone should make me a minimal test file (never 
HH> use bookmarks myself)

\setupinteraction[state=start]

\placebookmarks[chapter]

\def\thisisatest{This is a test}

\starttext

\chapter{\thisisatest}

\stoptext

>>\immediate\writeutility{%
>>     c \string\def\string\mycs{whatever we want}%
>>}

HH> that is a real terrible hack, isn't it?

Yes. I propose some form of "generic (PDF) sanitizer"
which gets called before the placebookmarks but can be configured
anywhere in the TeX source (and thus needs to be saved to the
auxiliary file). Something like:

\startPDFsanity
    commandname        {expansion in PDF form}
    anothercommandname {another expansion}
    andsoon            {and so forth}
\stopPDFsanity

You could even define sanitizer as a class and then have PDF
sanitizers, PS sanitizers etc, all with a common interface like
the above.

--
Giuseppe "Oblomov" Bilotta

Reply via email to