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 p5ELpUvK003593 for ; Tue, 14 Jun 2011 23:51:31 +0200 Received: (qmail 4151 invoked by alias); 14 Jun 2011 21:51:25 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 14 Jun 2011 21:51:25 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx034) with SMTP; 14 Jun 2011 23:51:25 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p5ELn6tQ004103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Jun 2011 23:49:07 +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 p5ELEs9R011894; Tue, 14 Jun 2011 23:49:06 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1230517 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 14 Jun 2011 23:49:06 +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 p5ELn6LW012091 for ; Tue, 14 Jun 2011 23:49:06 +0200 Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p5ELmsbL004027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 14 Jun 2011 23:48:57 +0200 Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mx.arcor.de (Postfix) with ESMTP id A81CC19783A; Tue, 14 Jun 2011 23:48:33 +0200 (CEST) Received: from mail-in-13.arcor-online.net (mail-in-13.arcor-online.net [151.189.21.53]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id A44F61575A0; Tue, 14 Jun 2011 23:48:33 +0200 (CEST) Received: from Semper (dslb-094-222-204-115.pools.arcor-ip.net [94.222.204.115]) (Authenticated sender: mailing_list@arcor.de) by mail-in-13.arcor-online.net (Postfix) with ESMTPSA id 5FAB1212352; Tue, 14 Jun 2011 23:48:33 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-13.arcor-online.net 5FAB1212352 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 References: <4DF7CBEF.6080402@arcor.de> <4DF7D114.3020601@morningstar2.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Whitelist: Message-ID: <4DF7D72A.7070401@arcor.de> Date: Tue, 14 Jun 2011 23:48:26 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Stephan Hennig Subject: Re: xparse and hyperref: Token not allowed in a PDF string (PDFDocEncoding) To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DF7D114.3020601@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p6zdxTM5oHCjQPZvS8GJdZW/saCWpEblRBSO8SPukxn9JxmS8B3tity8jz6B zuS09BzgflmWVmiyAGmHyGfbTwfbWMvTz16dffx/+EPfUouwd6OjMM+1MlWk4O43Q//6k8p28Dpd 55U0DR9q1MaBR+WdURR0xN6viBI2iftsmM6D2LJ3xRyQHpuAIsCWTeXCtHmDHG7BTVvFPRbja6nn 02upQxS0jphGkc=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: 6782 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. > In the case case you mention, I'm not sure why you have used > > \DeclareExpandableDocumentCommand{\foob}{m}{FooB} > > rather than > > \DeclareExpandableDocumentCommand{\foob}{}{FooB} > > which works fine. Well, because of this item from xparse documentation (sec. 1.7): > * The function must have at least one mandatory argument, and in > particular the last argument must be one of the mandatory types (l, m > or u). Do I miss something? Best regards, Stephan Hennig