From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72410 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: feature request Date: Mon, 14 Nov 2011 03:47:44 -0500 (EST) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-44161793-1321260470=:25495" X-Trace: dough.gmane.org 1321260325 19345 80.91.229.12 (14 Nov 2011 08:45:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2011 08:45:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 14 09:45:21 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RPsAI-00083m-Cw for gctc-ntg-context-518@m.gmane.org; Mon, 14 Nov 2011 09:45:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 48551CB0ED; Mon, 14 Nov 2011 09:45:17 +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 dkJT-Mj7LR-0; Mon, 14 Nov 2011 09:45:14 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 94953CB0E3; Mon, 14 Nov 2011 09:45:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6137DCB0E3 for ; Mon, 14 Nov 2011 09:45:13 +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 R9Xj+4TqkcTD for ; Mon, 14 Nov 2011 09:45:02 +0100 (CET) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 466BDCB0E2 for ; Mon, 14 Nov 2011 09:45:02 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pAE8ixDK017591 for ; Mon, 14 Nov 2011 09:45:01 +0100 Original-Received: FROM adi-laptop (bas3-montreal02-1096680562.dsl.bell.ca [65.94.4.114]) By tombraider.mr.itd.umich.edu ID 4EC0D50A.51795.4024 ; Authuser adityam; 14 Nov 2011 03:44:58 EST In-Reply-To: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xFUUJ0GS - c011b9046c3a - 20111114 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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:72410 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-44161793-1321260470=:25495 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 11 Nov 2011, Steffen Wolfrum wrote: > quite often I wish we could have a kind of in line comment: > Something like =BFthis is my comment=A1 this. > > I assume it is not trivial due to catcode issues, to say the least. > But nevertheless, as it is getting close to christmas, I just wanted to m= ention this idea here. As long as there is no line break in the comment, the following lua based= =20 solution works (inspired by m-translate) \startluacode local comments =3D {} thirddata =3D thirddata or {} thirddata.comments =3D comments function comments.translate(s) return string.gsub(s, "=BF.-=A1","") end local textlineactions =3D resolvers.openers.helpers.textlineactions utilities.sequencers.appendaction(textlineactions,"after","thirddata.com= ments.translate") function comments.enable() utilities.sequencers.enableaction(textlineactions,"thirddata.comments.= translate") end function comments.disable() utilities.sequencers.disableaction(textlineactions,"thirddata.comments= =2Etranslate") end comments.disable() \stopluacode \def\enablecomments {\ctxlua{thirddata.comments.enable()}} \def\disablecomments{\ctxlua{thirddata.comments.disable()}} \appendtoks \enablecomments \to \everystarttext \starttext \section{An =BFin \iffalse comment=A1 works} Multiple =BFin \iffalse comment=A1 with something =BFin \iffalse comment= =A1 in betweeen \stoptext Aditya --8323328-44161793-1321260470=:25495 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 ___________________________________________________________________________________ --8323328-44161793-1321260470=:25495--