Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p5EMCbgi013494 for ; Wed, 15 Jun 2011 00:12:38 +0200 Received: (qmail 3392 invoked by alias); 14 Jun 2011 22:12:32 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 14 Jun 2011 22:12:31 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx115) with SMTP; 15 Jun 2011 00:12:31 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p5EMAaDE016828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Jun 2011 00:10:36 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p5EM19hc013891; Wed, 15 Jun 2011 00:10:35 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1231014 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 15 Jun 2011 00:10:35 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p5EMAZaX016179 for ; Wed, 15 Jun 2011 00:10:35 +0200 Received: from mail-bw0-f49.google.com (mail-bw0-f49.google.com [209.85.214.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p5EMAPN5009539 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Wed, 15 Jun 2011 00:10:29 +0200 Received: by bwz1 with SMTP id 1so14093bwz.22 for ; Tue, 14 Jun 2011 15:10:25 -0700 (PDT) Received: by 10.204.143.141 with SMTP id v13mr2522670bku.203.1308089425346; Tue, 14 Jun 2011 15:10:25 -0700 (PDT) Received: from irwin.vpn.uni-freiburg.de ([93.216.225.148]) by mx.google.com with ESMTPS id k10sm6015315bkq.10.2011.06.14.15.10.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2011 15:10:24 -0700 (PDT) Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 9F8165379; Wed, 15 Jun 2011 00:17:00 +0200 (CEST) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <4DF7CBEF.6080402@arcor.de> <4DF7D114.3020601@morningstar2.co.uk> <4DF7D72A.7070401@arcor.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20110614221700.GA9723@oberdiek.my-fqdn.de> Date: Wed, 15 Jun 2011 00:17:00 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: xparse and hyperref: Token not allowed in a PDF string (PDFDocEncoding) To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DF7D72A.7070401@arcor.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p5+9rLT6Q1jTx+YOdBDk/xp7j6UGn9LuDCnvseW9bd1EmaQjmOOSNolsl8s+ ajSL/qB/77jG0Dnb0gz6nq0VtgaGU5i18yLhoXthzDLRVqZ0by4y07uK03bu0pfGRl1Y1AvgtH4W +gBLWBtCIXccpUNmzKj0KJelhZDo2/JKX+UeY34U826K1O0GyjkoIkcxz44TNNT6QphcU3sK81aL oeHOTgaf3Zdv98=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6784 On Tue, Jun 14, 2011 at 11:48:26PM +0200, Stephan Hennig wrote: > schrieb Joseph Wright: > > On 14/06/2011 22:00, Stephan Hennig wrote: > >> > >> Is that expected behaviour? Would it be possible to make > >> \NewDocumentCommand macros work with hyperref bookmarks? I'd prefer > >> using \NewDocumentCommand macros because of the mandatory argument of > >> \DeclareExpandableDocumentCommand macros which I don't need in my context. > > > > That is not trivial in general because you need to know what definition > > to use in an expansion context (arguments or not). That can only really > > be done by a programmer, not an automated system. For example, in > > siunitx I do provide appropriate 'shortcut' definitions and hook them > > into hyperref using \pdfstringdefDisableCommands. Doing that means > > making some pretty careful judgements on what should happen in > > bookmarks: many things simply do not make sense there. > > OK, thanks! I'll have a look at how \pdfstringdefDisableCommands can > help me. I have already used \texorpdfstring, but having to maintain > two arguments is no fun. Example: \pdfstringdefDisableCommands{% \let\MyDocumentCommand\MyExpandableDocumentCommand } Yours sincerely Heiko Oberdiek