From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21238 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: literal escape strings in bookmarks Date: Thu, 07 Jul 2005 23:00:50 +0200 Message-ID: <42CD9802.6050703@wxs.nl> References: <1120691134.8923.8.camel@localhost.localdomain> <42CCD714.6010509@wxs.nl> <1120753748.8987.8.camel@localhost.localdomain> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120770073 13493 80.91.229.2 (7 Jul 2005 21:01:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2005 21:01:13 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 07 23:01:05 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DqdU5-0003TA-Tc for gctc-ntg-context-518@m.gmane.org; Thu, 07 Jul 2005 23:00:38 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7E94E12837; Thu, 7 Jul 2005 23:00:37 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25848-09-2; Thu, 7 Jul 2005 23:00:34 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E949D12831; Thu, 7 Jul 2005 23:00:33 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8815E12830 for ; Thu, 7 Jul 2005 23:00:32 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25759-05-6 for ; Thu, 7 Jul 2005 23:00:31 +0200 (CEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 962FF1282B for ; Thu, 7 Jul 2005 23:00:30 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j67L0PRq009263 for ; Thu, 7 Jul 2005 23:00:25 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 947A731214; Thu, 7 Jul 2005 22:24:37 +0200 (CEST) Original-Received: from [10.100.1.53] (unknown [10.100.1.53]) by server-1.pragma-net.nl (Postfix) with ESMTP id 4F5172F48B for ; Thu, 7 Jul 2005 20:24:36 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <1120753748.8987.8.camel@localhost.localdomain> X-Virus-Scanned: ClamAV version 0.85.1, clamav-milter version 0.85 on mailrelay02 X-Virus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21238 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21238 Stuart Jansen wrote: > On Thu, 2005-07-07 at 09:17 +0200, Hans Hagen wrote: > >>there some sanitizing mechanism, but i'm not sure if you wan that here; Why do >>you use the hard coded \char's? If you use the named access mechanisms they are >>normally handled ok in bookmarks > > > Mostly because I wasn't aware they existed. Your suggestion mostly > works. Unfortunately, I still have a problem with the braces. I'm doing > automated document generation, and I've had problems with stray spaces > finding their way into the document, so I've taken to always using > {\letterbar} or \letterunderscore{}. I suppose I might be able to solve > the problem instead with some creative post-processing, but it'd be > kinda tricky. Any simple solutions? > > ===== > \setupinteraction[state=start] > \starttext > \placebookmarks[chapter,section] > \chapter{test{\letterunderscore}chapter} > The underscore character needs to be escaped in certain situations. > \chapter{start\letterbar{}stop} > So does the pipe symbol. > \chapter{foo} > \section{bar} > How can I avoid literals escape strings in bookmarks? > \stoptext > ===== \setupinteraction[state=start] \placebookmarks[chapter,section] \starttext \chapter{test\getvalue{letterunderscore}chapter} The underscore character needs to be escaped in certain situations. \chapter{start\getvalue{letterbar}stop} So does the pipe symbol. \chapter{foo} \section{bar} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------