From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96670 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Eidenbenz Newsgroups: gmane.comp.tex.context Subject: Re: avoid newline after definestartstop Date: Wed, 26 Oct 2016 23:03:07 +0200 Message-ID: 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> <5810DC81.3060705@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/mixed; boundary="===============3896968675457717399==" X-Trace: blaine.gmane.org 1477515835 2099 195.159.176.226 (26 Oct 2016 21:03:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2016 21:03:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 26 23:03:50 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 1bzVML-0007GP-AT for gctc-ntg-context-518@m.gmane.org; Wed, 26 Oct 2016 23:03:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 44FE91BC0A; Wed, 26 Oct 2016 23:03:23 +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 9FCeODCrCjIv; Wed, 26 Oct 2016 23:03:22 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 813651BC17; Wed, 26 Oct 2016 23:03:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B934B1BC0C for ; Wed, 26 Oct 2016 23:03:21 +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 wzk_SRNyCSWw for ; Wed, 26 Oct 2016 23:03:19 +0200 (CEST) Original-Received: from edge20.ethz.ch (edge20.ethz.ch [82.130.99.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 5A1391BC0A for ; Wed, 26 Oct 2016 23:03:09 +0200 (CEST) Original-Received: from CAS22.d.ethz.ch (172.31.51.112) by edge20.ethz.ch (82.130.99.26) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Oct 2016 23:03:04 +0200 Original-Received: from [192.168.88.11] (212.51.141.26) by CAS22.d.ethz.ch (172.31.51.112) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Oct 2016 23:03:08 +0200 In-Reply-To: <5810DC81.3060705@gmail.com> X-Mailer: Apple Mail (2.3124) X-Originating-IP: [212.51.141.26] 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:96670 Archived-At: --===============3896968675457717399== Content-Type: multipart/alternative; boundary="Apple-Mail=_3089B176-6F79-4CF2-BE76-5520449F08CE" --Apple-Mail=_3089B176-6F79-4CF2-BE76-5520449F08CE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Dear Wolfgang,=20 thanks for your mail, that led me to the source in syst-aux where I = found the TeX approach, my final solution. \def\startCitation% { \startnarrower[left,right] \symbol[leftquotation] \removeunwantedspaces} \def\stopCitation#1\par% { \removeunwantedspaces \symbol[rightquotation] #1 \stopnarrower} =20 \starttext =20 \startCitation \input knuth \stopCitation \footnote{This is a Quote of Donald Knuth} \input knuth \stoptext > On 26 Oct 2016, at 18:40, Wolfgang Schuster = wrote: >=20 >> 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=E2=80=99t work when you have more than one paragraph in the = Citation environment. >> \definestartstop >> [Citation] >> [ >> before=3D{\hangindent=3D20mm\hangafter=3D0\symbol[leftquotation]}, >> after=3D{\removeunwantedspaces\symbol[rightquotation]}, >> ] >>=20 >> \starttext >> \startCitation >> \input tufte >> \stopCitation >> \footnote{This is a Quote of Donald Knuth} >>=20 >> \input tufte >> \stoptext > Here is a alternative version but you need a empty line or \par after = \stopCitation. >=20 > \define\startCitation > {\startnarrower[left] > \symbol[leftquotation]\ignorespaces} >=20 > \define\stopCitation > {\BeforePar{\removeunwantedspaces\symbol[rightquotation]}% > \AfterPar {\endgraf\stopnarrower}% > \GetPar} >=20 > \starttext >=20 > \startCitation > \input knuth > \stopCitation > \footnote{This is a Quote of Donald Knuth} >=20 > \input knuth >=20 > \stoptext >=20 > Wolfgang > = __________________________________________________________________________= _________ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_3089B176-6F79-4CF2-BE76-5520449F08CE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" Dear Wolfgang, 

thanks for your mail, that led me to the source in syst-aux = where I found the TeX approach, my final solution.

\def\startCitation%
  { = \startnarrower[left,right]
    = \symbol[leftquotation]
    = \removeunwantedspaces}

\def\stopCitation#1\par%
  { = \removeunwantedspaces
    = \symbol[rightquotation]
    #1
    \stopnarrower}
  
\starttext
  
\startCitation
  \input knuth
\stopCitation
\footnote{This is a Quote = of Donald Knuth}

\input knuth

\stoptext

On 26 Oct 2016, at 18:40, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

26.=20 Oktober 2016 um 16:30
after some readings in the TeX book I came up with the following solution=20 that works for me without having to change all my instances of=20 startstopCitation in the text.
This doesn=E2=80=99t work when you have more than one paragraph in the = Citation=20 environment.
\definestartstop
[Citation]
[
=20 before=3D{\hangindent=3D20mm\hangafter=3D0\symbol[leftquotation]},
=20 after=3D{\removeunwantedspaces\symbol[rightquotation]},
= ]

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

\input tufte
\stoptext
Here is a alternative version but you need a empty line or \par after=20 \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
= __________________________________________________________________________= _________
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://context.aanhet.net
archive  : = https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
_______________________________________________________________= ____________________

= --Apple-Mail=_3089B176-6F79-4CF2-BE76-5520449F08CE-- --===============3896968675457717399== 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 --===============3896968675457717399==--