ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Michael Eidenbenz <eidenbenz@arch.ethz.ch>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: avoid newline after definestartstop
Date: Wed, 26 Oct 2016 23:03:07 +0200	[thread overview]
Message-ID: <A7F64BF3-B771-43AA-991C-6D5E4EA45407@arch.ethz.ch> (raw)
In-Reply-To: <5810DC81.3060705@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2282 bytes --]

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:
> 
>> Michael Eidenbenz <mailto:eidenbenz@arch.ethz.ch> 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
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5570 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2016-10-26 21:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  9:13 Michael Eidenbenz
2016-10-24 10:42 ` Michael Eidenbenz
2016-10-24 15:08   ` Otared Kavian
2016-10-24 16:07     ` Michael Eidenbenz
2016-10-24 17:09       ` Pablo Rodriguez
2016-10-24 17:51     ` Thomas A. Schmitz
2016-10-25 16:43       ` Michael Eidenbenz
2016-10-26 14:30         ` Michael Eidenbenz
2016-10-26 16:40           ` Wolfgang Schuster
2016-10-26 21:03             ` Michael Eidenbenz [this message]
2016-10-27  4:31               ` Wolfgang Schuster
2016-10-24 17:29 ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A7F64BF3-B771-43AA-991C-6D5E4EA45407@arch.ethz.ch \
    --to=eidenbenz@arch.ethz.ch \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).