From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96665 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: avoid newline after definestartstop Date: Wed, 26 Oct 2016 18:40:33 +0200 Message-ID: <5810DC81.3060705@gmail.com> References: <798B3A10-F75C-45C0-A90E-D3147B3DE207@arch.ethz.ch> <35B4AA28-3EC8-4FEC-BACE-33F476574CCE@gmail.com> <94908bb7-38bd-8872-e981-3844ee9d9c63@uni-bonn.de> <6F56E683-0FF5-4C78-B801-7E50FED8DC1F@arch.ethz.ch> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8284423613653137997==" X-Trace: blaine.gmane.org 1477500086 27363 195.159.176.226 (26 Oct 2016 16:41:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2016 16:41:26 +0000 (UTC) User-Agent: Postbox 5.0.5 (Macintosh/20161020) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 26 18:41:21 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzRGJ-0005Uy-HP for gctc-ntg-context-518@m.gmane.org; Wed, 26 Oct 2016 18:41:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B6F161BABB; Wed, 26 Oct 2016 18:40:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZYHFizg8pEZf; Wed, 26 Oct 2016 18:40:50 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id A16FB1BACD; Wed, 26 Oct 2016 18:40:50 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 80BC71BAB4 for ; Wed, 26 Oct 2016 18:40:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dZfPESZ4XeDw for ; Wed, 26 Oct 2016 18:40:48 +0200 (CEST) Original-Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 397A31BAAF for ; Wed, 26 Oct 2016 18:40:38 +0200 (CEST) Original-Received: by mail-lf0-f51.google.com with SMTP id b81so9954267lfe.1 for ; Wed, 26 Oct 2016 09:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=YDwSEVj1c3I0kuTwHk1POpUo4RdP3RNC8pcnPhilSFQ=; b=fDGRucYCxaRWare1Tw8lEF8DQnX0pRtQmU765+nxMOkZEi8ONHxb0huLbCVvDBX4wH 4I5VRBnkOBOctp5rdoDENAZ0KNagjLgBIFzJQt9AFWwT4pd0HbVe90+afmMM4nQup6z3 keSOHJMr36i+n0wjIGgTjondcGLYkSMZCDKLrtEGRrTqE91n3Pf1cly+eaiVvORdNl5J eZJoEIwU1J71AiaRFrWtnDLgovf+j9zMlTyv/7HWe1iaDKwipjj/bum04S0sH9hnazjS F/XlGs50KqmnnISPKerZx/M386gkinccuhOmEH8H0s7D3+iAfCdxXCcKLPzX4+p7c5DZ vcMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=YDwSEVj1c3I0kuTwHk1POpUo4RdP3RNC8pcnPhilSFQ=; b=d5Rd+ANA+KYrKUrxFWol2vxhkFdAMcy6heBFRWyy/bDDrFRTiffkIUU5y3o08rt0t6 Cb6ZXVHaOhx040aAebkA93VPCgaBmXMfFC1Xf4plhEVguuDGgH58vHQnZZt1nZ2wseNs SBOOxIRk+2I1zlj6OAxwe2l7HhFeL4mydijH4KZzHujSgol3lyhQrOHbRxivQXhcJ6vM Ido85mDTPm93yL5HKOf+CLDSF3kIZcF1obFYPZi2hA/gaOTAsbyXwpfvktyllyljKm5m Ptu1k5XFLa9VwhcsXjf6ExOXjQOVfr5iDgc7Yvm24/65exjbsVoHYQUCCjvREXwdLKQ1 AWPw== X-Gm-Message-State: ABUngvdsqSOy8yFUwL2O55383AYSszATASOvbztnAj69UPQgPdaeM+h3X7ITeCg6zG4clQ== X-Received: by 10.194.168.129 with SMTP id zw1mr3617504wjb.26.1477500037151; Wed, 26 Oct 2016 09:40:37 -0700 (PDT) Original-Received: from keima.localdomain (x2f275b8.dyn.telefonica.de. [2.242.117.184]) by smtp.gmail.com with ESMTPSA id m5sm4014330wmd.17.2016.10.26.09.40.35 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Oct 2016 09:40:36 -0700 (PDT) In-Reply-To: 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:96665 Archived-At: This is a multi-part message in MIME format. --===============8284423613653137997== Content-Type: multipart/alternative; boundary="------------050005050807070208030304" This is a multi-part message in MIME format. --------------050005050807070208030304 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Michael Eidenbenz > 26. Oktober 2016 um 16:30 > after some readings in the TeX book I came up with the following > solution that works for me without having to change all my instances > of startstopCitation in the text. This doesn’t work when you have more than one paragraph in the Citation environment. > \definestartstop > [Citation] > [ > before={\hangindent=20mm\hangafter=0\symbol[leftquotation]}, > after={\removeunwantedspaces\symbol[rightquotation]}, > ] > > \starttext > \startCitation > \input tufte > \stopCitation > \footnote{This is a Quote of Donald Knuth} > > \input tufte > \stoptext Here is a alternative version but you need a empty line or \par after \stopCitation. \define\startCitation {\startnarrower[left] \symbol[leftquotation]\ignorespaces} \define\stopCitation {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}% \AfterPar {\endgraf\stopnarrower}% \GetPar} \starttext \startCitation \input knuth \stopCitation \footnote{This is a Quote of Donald Knuth} \input knuth \stoptext Wolfgang --------------050005050807070208030304 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
26. Oktober 2016 um 16:30
after some readings in the TeX book I came up with the following solution that works for me without having to change all my instances of startstopCitation in the text.
This doesn’t work when you have more than one paragraph in the Citation environment.
\definestartstop
[Citation]
[
before={\hangindent=20mm\hangafter=0\symbol[leftquotation]},
after={\removeunwantedspaces\symbol[rightquotation]},
]

\starttext
\startCitation
\input tufte
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input tufte
\stoptext
Here is a alternative version but you need a empty line or \par after \stopCitation.

\define\startCitation
  {\startnarrower[left]
   \symbol[leftquotation]\ignorespaces}

\define\stopCitation
  {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}%
   \AfterPar {\endgraf\stopnarrower}%
   \GetPar}

\starttext

\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote of Donald Knuth}

\input knuth

\stoptext

Wolfgang
--------------050005050807070208030304-- --===============8284423613653137997== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8284423613653137997==--