From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79806 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Doubled annotation content Date: Fri, 7 Dec 2012 14:04:27 +0100 Message-ID: References: <20121206202408.GC26897@homerow> <20121207092608.GE26897@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: multipart/mixed; boundary="===============0714639447==" X-Trace: ger.gmane.org 1354885477 18966 80.91.229.3 (7 Dec 2012 13:04:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2012 13:04:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 07 14:04:51 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 1Tgxbm-00062s-64 for gctc-ntg-context-518@m.gmane.org; Fri, 07 Dec 2012 14:04:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B4F0F10223; Fri, 7 Dec 2012 14:04:37 +0100 (CET) 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 56j5XfN1PNep; Fri, 7 Dec 2012 14:04:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3915510204; Fri, 7 Dec 2012 14:04:35 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3BDBE10204 for ; Fri, 7 Dec 2012 14:04:34 +0100 (CET) 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 AN+c40ofNwro for ; Fri, 7 Dec 2012 14:04:29 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 7B46A101F2 for ; Fri, 7 Dec 2012 14:04:29 +0100 (CET) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qB7D4SLi020461 for ; Fri, 7 Dec 2012 14:04:28 +0100 Original-Received: by mail-bk0-f41.google.com with SMTP id jg9so255884bkc.14 for ; Fri, 07 Dec 2012 05:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to:x-mailer; bh=wDd48ih4SoIaYD1nDNk78gci9PnSftj6Fg2Q2DDLyRs=; b=J2+tZfapYAVjWeiscEly5NvK6rzB7kCvXXU4UnIfAzS4EuV3b6d64fdzlH5BPSaSVF u5K8QI7wFjZQaHry9JMONWDVd0sI7XBj+CM2PSziPbTqSQCD5HOUwyWgStNY09SyYm6a rAuBix3BW8lcjfuG3b+1oPhKUj8SNv682L4a7c3EQpPmFL+Lte8AggSlLFzc1wPee1wo eN4FZ1FQ4OGJAvbIGVOGsY+fqcvg6VuFD8yyu0QZSfpar60DdwmIjIEnNtzaT5carkiX Q78o84geR+m1XDyugft7McT8YVcsqHmajPtTVxXNYAlQ2ossb0Dl6Fyzxx2u/ON2Dlf+ 5vCw== Original-Received: by 10.204.11.208 with SMTP id u16mr1945528bku.81.1354885467886; Fri, 07 Dec 2012 05:04:27 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4dbfa592.pool.mediaWays.net. [77.191.165.146]) by mx.google.com with ESMTPS id q22sm9099051bkv.16.2012.12.07.05.04.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Dec 2012 05:04:27 -0800 (PST) In-Reply-To: <20121207092608.GE26897@homerow> X-Mailer: Apple Mail (2.1499) 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: 06IwB4sCe - ca5d86d27e96 - 20121207 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79806 Archived-At: --===============0714639447== Content-Type: multipart/alternative; boundary="Apple-Mail=_220A076D-865A-4E55-ADA9-7AEEE40EA14A" --Apple-Mail=_220A076D-865A-4E55-ADA9-7AEEE40EA14A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 07.12.2012 um 10:26 schrieb Marco Patzer : > On 2012=9612=9607 Wolfgang Schuster wrote: >=20 >> The argument for the command keys has to be a macro with two = parameters, >> the first parameters contains the formatted header and the second = argument >> the formatted content of the environment. >=20 > That's how I used it in the past, but after an update I got an error > which vanished after I removed the two arguments. I thought the > interface might have changed. >=20 > I used it as follows. What's wrong with that? >=20 > %% macros=3Dmkvi > \usemodule [annotation] >=20 > \defineannotation > [myannotation] > [alternative=3Dcommand, > command=3D\cmd] >=20 > \starttexdefinition cmd #first #second > \placeannotationcontent > \stoptexdefinition Commands need to be unexpandable because when you use the =93command=94. This is necessary because I check for a command and this needs = \unexpanded\def to work. You can create a unexpandable command with \starttexdefintion by adding the unexpanded keyword as first argument to the environment. \starttexdefinition unexpanded cmd #first #second \placeannotationcontent \stoptexdefinition Wolfgang= --Apple-Mail=_220A076D-865A-4E55-ADA9-7AEEE40EA14A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 homerow@lavabit.com>:
On = 2012=9612=9607 Wolfgang Schuster wrote:

The argument for the command keys has to be a macro with = two parameters,
the first parameters contains the formatted header = and the second argument
the formatted content of the = environment.

That's how I used it in the past, but = after an update I got an error
which vanished after I removed the two = arguments. I thought the
interface might have changed.

I used = it as follows. What's wrong with that?

%% = macros=3Dmkvi
\usemodule [annotation]

\defineannotation
=  [myannotation]
 [alternative=3Dcommand,
=   command=3D\cmd]

\starttexdefinition cmd #first = #second
=  \placeannotationcontent
\stoptexdefinition
=

Commands need to be unexpandable because when you use the = =93command=94.

This is necessary because I check for = a command and this needs \unexpanded\def to = work.

You can create a unexpandable = command with \starttexdefintion by adding
the = unexpanded keyword as first argument to the = environment.

\starttexdefinition unexpanded cmd #first #second
 \placeannotationcontent

Wolfgang
= --Apple-Mail=_220A076D-865A-4E55-ADA9-7AEEE40EA14A-- --===============0714639447== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0714639447==--