From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79304 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Annotation Module Date: Sun, 18 Nov 2012 21:14:12 +0100 Message-ID: <740E32A5-B8EF-4D13-9980-28F638FA86C9@gmail.com> References: <50A936BE.9050002@mmnetz.de> 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: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1353269663 15818 80.91.229.3 (18 Nov 2012 20:14:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Nov 2012 20:14:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 18 21:14:32 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 1TaBGC-0003mm-Ca for gctc-ntg-context-518@m.gmane.org; Sun, 18 Nov 2012 21:14:32 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C66F710331; Sun, 18 Nov 2012 21:14:21 +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 Ug-sIULTvlCO; Sun, 18 Nov 2012 21:14:20 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 2EC3410276; Sun, 18 Nov 2012 21:14:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9414210276 for ; Sun, 18 Nov 2012 21:14:18 +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 P6FL6zBLK4Gh for ; Sun, 18 Nov 2012 21:14:17 +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 CEECC10271 for ; Sun, 18 Nov 2012 21:14:17 +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 qAIKEGZG010318 for ; Sun, 18 Nov 2012 21:14:17 +0100 Original-Received: by mail-bk0-f41.google.com with SMTP id jg9so1961397bkc.14 for ; Sun, 18 Nov 2012 12:14:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=JY5TYMVBFN3k/D0Grbt/V79Y+6QE50ib6ffcMDUnex8=; b=qtoyQ+ONV3VW/I58Sg9D9tIE+ZtiLCKtbbMcEy5CTC1d1dxa79mOtKBiYb0jcARsPi +Ucdpcy2JSh26Kqi0wlV72biOk/YI7wTeS7PsdV37me061wJDd7/5WiYYschiuSRzg+a +Ft5v71c3Wif3amqOMk1Di2ZdKHyAB965SOEI6d07J4GuELMLElIGRIH6zxMIVh7pcQv lFTO2IrX9Tkn3tMoriox4SZ6S6UR6cNgX4zG5Q00vAbcRV10X2upzclHd4oaMWYTrFhj ThUZfpDpFCoglXWVkksIoFMy68eraBpKMUR9VKUShsbiIJKOupTbloKUxq+OfnBYBWOJ ZEXw== Original-Received: by 10.204.150.210 with SMTP id z18mr4067817bkv.53.1353269656384; Sun, 18 Nov 2012 12:14:16 -0800 (PST) Original-Received: from keima.localdomain (nrbg-4dbfab6b.pool.mediaWays.net. [77.191.171.107]) by mx.google.com with ESMTPS id g8sm3231156bkv.6.2012.11.18.12.14.14 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 12:14:15 -0800 (PST) In-Reply-To: <50A936BE.9050002@mmnetz.de> 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: 06Ip8eg8r - 5af73785454b - 20121118 (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:79304 Archived-At: Am 18.11.2012 um 20:27 schrieb H. =D6zoguz : > My question to your module: How can I customize the > = > \startannotation \stopannotation enovirnment, > = > s.t. it does not start with ", but with another symbol (or maybe without = any symbol)? The annotation module let you define a command/environment to collect text and format it in (nearly) any way you want, there is no distinction between \command{=85} and \startcommand =85\stopcommand. Copy this example and process it with context: \usemodule[annotation] \setuplayout [backspace=3D6cm, cutspace=3D2cm, width=3Dmiddle] \setupannotation[color=3Dblue] % one + two \defineannotation[one][alternative=3Dparagraph] \defineannotation[two][alternative=3Dtext] % three \define[2]\ThreeCommand {\startframedtext[middle] #2 \stopframedtext} \defineannotation[three][alternative=3Dcommand,command=3D\ThreeCommand] % four \startsetups [annotation:four] \startframedtext[width=3Dbroad,framecolor=3Dred] \placeannotationcontent \doifsomething{\annotationparameter{author}}{\wordright{\annotationparame= ter{author}}} \stopframedtext \stopsetups \defineannotationalternative[four][renderingsetup=3Dannotation:four] \defineannotation[four][alternative=3Dfour] \starttext \input knuth \one{\input ward } \input knuth \starttwo\input ward \stoptwo \input knuth \three{\input ward } \input knuth \startfour[author=3DWard]\input ward \stopfour \input knuth \stoptext In the example above I define four annotation command, while the first two use predefined alternatives the third and fourth use ones I define in the d= ocument. The command =93three=94 uses the =93command=94 alternative which expects a = command with two parameters, the first parameter can be used to print a title with = the content of the =93text=94 and =93title=94 keys (not used in my example) and the sec= ond parameters prints the content of the command/environment. The =93four=94 command (you could also have used \four[author=3DWard]{\inpu= t ward } in the document) uses a different approach to define a customized layout. Firs= t you create a new alternative with \defineannotationalternative where you specif= y a setup. The setup itself is created with \startsetups =85 \stopsetups where you can= use all context commands you like. Values from \setupannotation or optional arg= uments for \four or \startfour can be accessed with \annoationparameter{}. 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 ___________________________________________________________________________= ________