From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38792 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: {{ double braces }} Date: Wed, 23 Jan 2008 23:17:54 +0100 Message-ID: <111CFD7B-669B-4044-901A-0291DD898978@uni-bonn.de> References: <1DC0E56D-487C-41CB-941E-FC98B0597B36@st.estfiles.de> <20080123204948.GA10128@gaston.couberia.bzh> <20080123215013.GC11445@gaston.couberia.bzh> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v915) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1201126814 25765 80.91.229.12 (23 Jan 2008 22:20:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jan 2008 22:20:14 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 23 23:20:32 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JHnxK-0005EW-HA for gctc-ntg-context-518@m.gmane.org; Wed, 23 Jan 2008 23:20:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C51071FC7B; Wed, 23 Jan 2008 23:19:48 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21278-06-2; Wed, 23 Jan 2008 23:19:00 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 24B381FC5D; Wed, 23 Jan 2008 23:18:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 961061FC3E for ; Wed, 23 Jan 2008 23:18:56 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20535-01-11 for ; Wed, 23 Jan 2008 23:18:22 +0100 (CET) Original-Received: from mailout05.sul.t-online.com (mailout05.sul.t-online.de [194.25.134.82]) by ronja.ntg.nl (Postfix) with ESMTP id 8091E1FC51 for ; Wed, 23 Jan 2008 23:18:07 +0100 (CET) Original-Received: from fwd27.aul.t-online.de by mailout05.sul.t-online.com with smtp id 1JHnv3-0001XQ-02; Wed, 23 Jan 2008 23:18:05 +0100 Original-Received: from mini (SyFKOiZVwhCT1pQ6t0EfoXFs334NhzGdBu8RFymKJIF5ExDo3q5qdIGTBsK5mavQfn@[87.178.101.74]) by fwd27.aul.t-online.de with esmtp id 1JHnut-1FQusC0; Wed, 23 Jan 2008 23:17:55 +0100 In-Reply-To: <20080123215013.GC11445@gaston.couberia.bzh> X-Mailer: Apple Mail (2.915) X-ID: SyFKOiZVwhCT1pQ6t0EfoXFs334NhzGdBu8RFymKJIF5ExDo3q5qdIGTBsK5mavQfn@t-dialin.net X-TOI-MSGID: 9ef90a77-204b-41d5-810e-9ba8ce3ce279 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:38792 Archived-At: On Jan 23, 2008, at 10:50 PM, Peter M=FCnster wrote: > I've just seen, that it does not work for nested braces: > \footnote{x{y}z}: ok > \footnote{x{y{z}}}: not ok > > The next one (normal regexp, not extended) has support for up to one = > level > of nesting: > > \\footnote{[^{}]*\([^{}]*{[^{}]*\([^{}]*{[^{}]*}[^{}]*\)*[^{}]*} = > [^{}]*\)*[^{}]*} > > These examples seem to work: > \footnote{x{y}z} > \footnote{x{y{z}}} > \footnote{x{y}z} > \footnote{x{y{z}}x{y{z}}x{y}z} > \footnote{x{y{z}}x{y{z}y{z}y}x{y}z} > > Cheers, Peter You could also use a nice scripting language like ... lua!! lua has = support for "balanced strings," so no nesting trickery is needed, see http:= //www.lua.org/pil/20.2.html = (scroll to the bottom of the page). Or you could try and nag Hans = into giving a nice tutorial on the lua lpeg library at Bohinj! :-) All best Thomas ___________________________________________________________________________= ________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________