* bookmarks
[not found] <200201312002.VAA20337@smail.let.uu.nl>
@ 2002-02-01 9:11 ` Hans Hagen
2002-02-03 14:24 ` bookmarks Giuseppe Bilotta
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2002-02-01 9:11 UTC (permalink / raw)
At 09:02 PM 1/31/2002 +0100, owner-ntg-context@let.uu.nl wrote:
>hi all
>
>is it possible to use typeset chapter headings and pdf bookmarks at the same
>time?
>
>
>i want to bookmark
>
> \def\mycs{Abbreviation}
>
> \chapter{\mycs\ Heading}
>
>but it fails while processing file.tuo. \sanitizePDFdocencoding is not happy
>about something, it says "! Undefined control sequence." when it hits \mycs.
the \def\my... needs to go before the \placebookmarks, otherwise it is
indeed unknown; tex works top-bottom
also, it may make sense to use \abbreviation[mycs]{...} since those
commands are normally taken care of in decent ways
[alternatively you can do things like
\appendtoks\def\mycs{WHOW}\to\everysanitize
to get your own clean up in bookmarks]
hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bookmarks
2002-02-01 9:11 ` bookmarks Hans Hagen
@ 2002-02-03 14:24 ` Giuseppe Bilotta
2002-02-04 11:18 ` bookmarks Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2002-02-03 14:24 UTC (permalink / raw)
Cc: ntg-context
Friday, February 01, 2002 Hans Hagen wrote:
>>i want to bookmark
>>
>> \def\mycs{Abbreviation}
>>
>> \chapter{\mycs\ Heading}
>>
>>but it fails while processing file.tuo. \sanitizePDFdocencoding is not happy
>>about something, it says "! Undefined control sequence." when it hits \mycs.
HH> the \def\my... needs to go before the \placebookmarks, otherwise it is
HH> indeed unknown; tex works top-bottom
[snip]
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
\immediate\writeutility{%
c \string\def\string\mycs{whatever we want}%
}
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bookmarks
2002-02-03 14:24 ` bookmarks Giuseppe Bilotta
@ 2002-02-04 11:18 ` Hans Hagen
2002-02-04 11:58 ` Re[2]: bookmarks Giuseppe Bilotta
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2002-02-04 11:18 UTC (permalink / raw)
Cc: ntg-context
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
hm, before i look into it someone should make me a minimal test file (never
use bookmarks myself)
>\immediate\writeutility{%
> c \string\def\string\mycs{whatever we want}%
>}
that is a real terrible hack, isn't it?
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re[2]: bookmarks
2002-02-04 11:18 ` bookmarks Hans Hagen
@ 2002-02-04 11:58 ` Giuseppe Bilotta
2002-02-04 18:57 ` Berend de Boer
0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2002-02-04 11:58 UTC (permalink / raw)
Cc: ntg-context
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re[2]: bookmarks
2002-02-04 11:58 ` Re[2]: bookmarks Giuseppe Bilotta
@ 2002-02-04 18:57 ` Berend de Boer
0 siblings, 0 replies; 5+ messages in thread
From: Berend de Boer @ 2002-02-04 18:57 UTC (permalink / raw)
Cc: Hans Hagen, ntg-context
Giuseppe Bilotta <bourbaki@bigfoot.com> writes:
> 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
The problem is perhaps that bookmark writing does occur at the start
of processing the .tex file and not at \starttext? The macro is
defined before \starttext.
As I recently encountered this problem too, I looked up an old
discussion in 1999. There you gave me this macro:
\long\def\sanitizePDFdocencoding#1\to#2%
{\enablePDFcrlf
\enablePDFdocencoding
%\honorunexpanded % otherwise problems with "e etc in de
\edef#2{#1}}
The \honorunexpanded was new than. I have no idea why it is
commented out now?
(this is a 10 months old ConText or so, haven't got around to get the
new font stuff working).
--
Groetjes,
Berend. (-:
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-02-04 18:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200201312002.VAA20337@smail.let.uu.nl>
2002-02-01 9:11 ` bookmarks Hans Hagen
2002-02-03 14:24 ` bookmarks Giuseppe Bilotta
2002-02-04 11:18 ` bookmarks Hans Hagen
2002-02-04 11:58 ` Re[2]: bookmarks Giuseppe Bilotta
2002-02-04 18:57 ` Berend de Boer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).