From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89137 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Pierre-Fran=E7ois_Bonnefoi?= Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt gobble my mind Date: Thu, 6 Nov 2014 13:36:12 +0100 Message-ID: <9633DF54-A96A-4B64-B9C8-05293983DF67@unilim.fr> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/mixed; boundary="===============0553794922==" X-Trace: ger.gmane.org 1415277450 10917 80.91.229.3 (6 Nov 2014 12:37:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2014 12:37:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 06 13:37:26 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XmMJY-0006Bz-HS for gctc-ntg-context-518@m.gmane.org; Thu, 06 Nov 2014 13:37:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 19AC410220 for ; Thu, 6 Nov 2014 13:37:24 +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 hGseDRkfr_Pb for ; Thu, 6 Nov 2014 13:37:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 6F60210230 for ; Thu, 6 Nov 2014 13:36:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 708AA101E7 for ; Thu, 6 Nov 2014 13:36:47 +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 UU_FrUlY7Ovk for ; Thu, 6 Nov 2014 13:36:46 +0100 (CET) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 3A8A8101E3 for ; Thu, 6 Nov 2014 13:36:46 +0100 (CET) Original-Received: from smtp.unilim.fr (mail.unilim.fr [164.81.1.78]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id sA6CaiK0011815 for ; Thu, 6 Nov 2014 13:36:45 +0100 Original-Received: from [192.168.0.100] (home.libpfb.so [109.190.20.216]) (authenticated bits=0) by smtp.unilim.fr (8.13.1/8.13.1) with ESMTP id sA6CaCQP007126 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Thu, 6 Nov 2014 13:36:13 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Univ-Limoges-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (smtp.unilim.fr [164.81.1.45]); Thu, 06 Nov 2014 13:36:14 +0100 (CET) X-Univ-Limoges-MD: Pas de virus trouve X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-Scanned-By: MIMEDefang 2.67 on 164.81.1.45 X-Univ-Limoges-MailScanner-Information: Serveur Anti-virus Please contact postmaster@unilim.fr for more information X-Univ-Limoges-MailScanner-ID: sA6CaCQP007126 X-Univ-Limoges-MailScanner: Found to be clean X-Univ-Limoges-MailScanner-Envelope-From: bonnefoi@unilim.fr X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=164.81.1.78; country=FR; region=Haute-Vienne; city=Limoges; latitude=45.8315; longitude=1.2578; http://maps.google.com/maps?q=45.8315,1.2578&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08NccAImf - 9a3324f817ee - 20141106 (trained as not-spam) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" Xref: news.gmane.org gmane.comp.tex.context:89137 Archived-At: --===============0553794922== Content-Type: multipart/alternative; boundary="Apple-Mail=_0564D09E-45CB-4DC4-BC10-DF1E310C84C0" --Apple-Mail=_0564D09E-45CB-4DC4-BC10-DF1E310C84C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hello Luigi, thank you for proposing a solution, but it's not suitable to my needs as = it modifies the content of the typing region : the backlash is displayed I want to be able to gobble or not the typing region by using a macro = without modifying it. On 06 Nov 2014, at 12:16, luigi scarso wrote: >=20 >=20 > On Thu, Nov 6, 2014 at 10:35 AM, Pierre-Fran=E7ois Bonnefoi = wrote: > Hello, >=20 > I've made a lot of improvement to my slides format for my teaching = material and I've run into a serious issue with gobbleinput that I can = express with with simple lines : >=20 > \starttext > \gobbleuntil\stoptyping > \starttyping > { printf("%d", data); } > \stoptyping > This is ignored !=20 > \stoptext >=20 > How can I use correctly gobbleinput to make it works ? >=20 >=20 > "%d"=20 > in this situation means ["][ token comment ] =20 > --- \gobbleuntil neutralizes \starttyping that changes the catcode of = '%' --- > so you are left with an open group (the { before printf) > that needs to be closed. >=20 > So the first step is to make '%' a letter token >=20 > \starttext > %\tracingall > \gobbleuntil\stoptyping > \starttyping > { printf("\%d", data); } > \stoptyping > %\tracingnone > This is not more ignored !=20 > \stoptext >=20 > =20 >=20 > --=20 > luigi > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --=20 Bonnefoi Pierre-Francois | E-mail : bonnefoi@unilim.fr = http://libpfb.so/ Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38 123 av Albert Thomas | Mrs. Peel, we're needed... 87060 Limoges CEDEX - FRANCE | The Avengers. --Apple-Mail=_0564D09E-45CB-4DC4-BC10-DF1E310C84C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Hello = Luigi,

thank you for proposing a solution, but it's = not suitable to my needs as it modifies the content of the typing region = : the backlash is displayed

I want to be able = to gobble or not the typing region by using a macro without modifying = it.



On 06 Nov = 2014, at 12:16, luigi scarso <luigi.scarso@gmail.com> = wrote:



On = Thu, Nov 6, 2014 at 10:35 AM, Pierre-Fran=E7ois Bonnefoi <bonnefoi@unilim.fr> wrote:
Hello,

I've made a lot of improvement to = my slides format for my teaching material and I've run into a serious = issue with gobbleinput that I can express with with simple lines = :

\starttext
\gobbleuntil\stoptypi= ng
\starttyping
{ printf("%d", data); = }
\stoptyping
This is ignored = ! 
\stoptext

How can I use = correctly gobbleinput to make it works = ?


"%d" 
in this situation means ["][ token comment ] <other = tokens> 
--- \gobbleuntil neutralizes \starttyping = that changes the catcode of '%'  ---
so you are left = with an open group  (the { before printf)
that needs to = be closed.

So the first step is to make '%' a = letter = token

\starttext
%\tracingall
\gobbleuntil\stoptyping
\starttyping
  =   { printf("\%d", data); = }
\stoptyping
%\tracingnone
This is not = more ignored = ! 
\stoptext

 

-- 
luigi
_____________________________________________________________= ______________________
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.sup= elec.fr/projects/contextrev/
wiki     : = http://contextgarden.net
_____________________________________________________________= ______________________

Bonnefoi Pierre-Francois     =            |    E-mail : bonnefoi@unilim.fr http://libpfb.so/
<= font class=3D"Apple-style-span" face=3D"Courier" size=3D"3">Universite de = Limoges, Laboratoire XLIM |       Tel : 06 28 18 03 = 38
123 av Albert Thomas       =              |  Mrs. Peel, we're = needed...
87060 Limoges CEDEX - FRANCE     =        |             =     The Avengers.