From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73597 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: redefining paragraph breaks Date: Tue, 3 Jan 2012 21:14:22 +0100 Message-ID: <9F11A96B-5ACD-49E6-BDEF-82A749DE113D@googlemail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1325621681 9565 80.91.229.12 (3 Jan 2012 20:14:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2012 20:14:41 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 03 21:14:36 2012 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 1RiAkl-0005Me-3D for gctc-ntg-context-518@m.gmane.org; Tue, 03 Jan 2012 21:14:35 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 633EECB1D3; Tue, 3 Jan 2012 21:14: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 hASAssDkgAzJ; Tue, 3 Jan 2012 21:14:30 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5811CB1C8; Tue, 3 Jan 2012 21:14:30 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C6860CB1C8 for ; Tue, 3 Jan 2012 21:14:29 +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 FV-4Ph-As8Gp for ; Tue, 3 Jan 2012 21:14:27 +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 BD117CB1C3 for ; Tue, 3 Jan 2012 21:14:27 +0100 (CET) Original-Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q03KEQ6j026861 for ; Tue, 3 Jan 2012 21:14:27 +0100 Original-Received: by eekc41 with SMTP id c41so18578487eek.14 for ; Tue, 03 Jan 2012 12:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=/0fw3igS/9pK5RVgGa+YO0PGOsO2Gd62paVqRHDFPHE=; b=UbEVcxeZj/Zq1AxgGpPAschZL2EaWzVJUrAjCmD5jVjTmugpto5rGrv/2SVbzalZQX vhEXFNST0sM3hruH2kdDdyW0Fs8IkMjMgFY2UsO4LQbHJe+pq0L41263Kz16j642oOX2 l7UycAvwMf34dcM8RqUVFuAduwcagYgW22e8g= Original-Received: by 10.14.2.71 with SMTP id 47mr22081766eee.16.1325621666563; Tue, 03 Jan 2012 12:14:26 -0800 (PST) Original-Received: from [192.168.2.35] (p57AFBBD9.dip.t-dialin.net. [87.175.187.217]) by mx.google.com with ESMTPS id s16sm210051477eef.2.2012.01.03.12.14.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jan 2012 12:14:25 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.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: 0HGh8eqLd - d557e8edb6ba - 20120103 (trained as not-spam) 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:73597 Archived-At: Am 03.01.2012 um 20:31 schrieb Chris Lott: > I know I could do it manually, but that makes the source ugly, so is > there a way to redefine paragraph breaks so that instead of actual > breaks in the output they are kept as running text separate by a > paragraph symbol, e.g.: > = > This is paragraph 1. > = > This is paragraph 2. > = > Becomes in the typeset document: > = > This is paragraph 1. =B6 This is paragraph 2. You can save the text in a buffer and replace the empty lines with the para= graph symbol. \startluacode userdata =3D userdata or { } function userdata.specialparagraph() local text =3D buffers.getcontent("specialparagraph") text =3D string.gsub(text,"\n\n"," =B6 ") context(text) end \stopluacode \def\startspecialparagraph {\dostartbuffer[specialparagraph][startspecialparagraph][stopspecialparag= raph]} \def\stopspecialparagraph {\ctxlua{userdata.specialparagraph()}} \starttext This is paragraph 1. \startspecialparagraph This is paragraph 2. This is paragraph 3. \stopspecialparagraph This is paragraph 4. \stoptext 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 ___________________________________________________________________________= ________