From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76984 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: setupinteraction and macroexpansion Date: Tue, 19 Jun 2012 11:08:13 +0200 Message-ID: <2C224AA9-C0A7-4387-BBB7-F48646BE7206@googlemail.com> References: <275798233.20120619103939@gmx.de> <8ADC6791-A24A-4EBB-8A87-0A0CF86B4559@googlemail.com> <11410450325.20120619105929@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1340096905 32075 80.91.229.3 (19 Jun 2012 09:08:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2012 09:08:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 19 11:08:25 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SguQC-0001XX-FN for gctc-ntg-context-518@m.gmane.org; Tue, 19 Jun 2012 11:08:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60CFC101EE; Tue, 19 Jun 2012 11:08:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HiIm6iJ2CQc4; Tue, 19 Jun 2012 11:08:22 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D087C101FA; Tue, 19 Jun 2012 11:08:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55712101FA for ; Tue, 19 Jun 2012 11:08:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QMevwp3yGgjy for ; Tue, 19 Jun 2012 11:08:21 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 88E2C101EE for ; Tue, 19 Jun 2012 11:08:21 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q5J98Kx8005123 for ; Tue, 19 Jun 2012 11:08:21 +0200 Original-Received: by bkcjm19 with SMTP id jm19so6278024bkc.14 for ; Tue, 19 Jun 2012 02:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=subject:mime-version:content-type:from:x-priority:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=VskPkMLJO6gHFb+ZTkMaDp8+8SRxodY8fmdyFpS3TNs=; b=JW5+VLP1Jq1ffEFIPCnA8fBJ+pNmjcwJmsKXS2gPdurGQvHSS5Jd+3lnqPNLuaDiQz 6YkMrKMffI+wuOlkKild6g32bk37DNBOnohqcZo6aQyVIuxgbjs2d/rmMpUOVI70xZJs adV/24Dzs5UfuJ+7+CmCe5l0XbsuR+xZXnFK0bNFlG4vSjbZBlhQZGwX/kHEeRSTz0kK wwRaNpkQa15XJXMLVsfuhXnXSGbejC+MTG8QNg8nRBR2ppxtI28jGv5X1ti4aFu6jM2j vWbn6qFjaR07A5uckzOjilt7YVo/p1rpVnLik6Ui2hOZ2I+m40pcgbI1Fd4sIL7zbrnG OATQ== Original-Received: by 10.205.121.130 with SMTP id gc2mr7633316bkc.10.1340096900752; Tue, 19 Jun 2012 02:08:20 -0700 (PDT) Original-Received: from [192.168.2.36] (p54BAF3AB.dip.t-dialin.net. [84.186.243.171]) by mx.google.com with ESMTPS id x23sm22138162bkw.12.2012.06.19.02.08.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Jun 2012 02:08:19 -0700 (PDT) X-Priority: 3 (Normal) In-Reply-To: <11410450325.20120619105929@gmx.de> X-Mailer: Apple Mail (2.1278) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QHo98llQ - 0241ab5d81e0 - 20120619 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 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 Xref: news.gmane.org gmane.comp.tex.context:76984 Archived-At: Am 19.06.2012 um 10:59 schrieb Andreas Schneider: > On Tuesday, June 19, 2012, at 10:42 Wolfgang Schuster wrote: > = >> Am 19.06.2012 um 10:39 schrieb Andreas Schneider: > = >>> Hello, >>> = >>> I'm a bit lost with macro expansion here. I try to use some macros to >>> set the title (and subject) of the PDF document. The attached minimal >>> example shows what I want to achieve. >>> = >>> I tried def, edef, gdef, define, explicit expand, expandoneafter, etc. >>> etc. without any success. Whatever I do, the title field in the PDF >>> metadata always contains the raw "\date..." command instead of the >>> formatted date. >>> = >>> Any suggestions? > = >> You can=92t use \date (or any other unexpandable command) in an expandab= le context. > = >> Wolfgang > = > Hmm I see, so \date is simply not possible for that case. Ok, thanks > for explaining that I wasn't aware (until now) that commands can be > unexpandable. To explain it in a simple way: Commands which can be used in \edef\comecomm= and{=85} are expandable and commands which fail in \edef are unexpandable. It=92s al= so important to know that commands with optional arguments are always unexpandable becau= se the underlying mechanism to check for the optional bracket, brace etc. can= =92t be used in \edef, you can also make a expandable command (e.g. \def\foo{FOO}) unexp= andable by adding \unexpanded in front of the \def (e.g. \unexpanded\def\bar{BAR}). Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________