ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: literal escape strings in bookmarks
Date: Thu, 07 Jul 2005 23:00:50 +0200	[thread overview]
Message-ID: <42CD9802.6050703@wxs.nl> (raw)
In-Reply-To: <1120753748.8987.8.camel@localhost.localdomain>

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
-----------------------------------------------------------------

  reply	other threads:[~2005-07-07 21:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 23:05 Stuart Jansen
2005-07-07  7:17 ` Hans Hagen
2005-07-07 16:29   ` Stuart Jansen
2005-07-07 21:00     ` Hans Hagen [this message]
2005-07-07 22:07       ` Stuart Jansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42CD9802.6050703@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).