ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: avoid newline after definestartstop
Date: Mon, 24 Oct 2016 19:51:30 +0200	[thread overview]
Message-ID: <94908bb7-38bd-8872-e981-3844ee9d9c63@uni-bonn.de> (raw)
In-Reply-To: <35B4AA28-3EC8-4FEC-BACE-33F476574CCE@gmail.com>

On 10/24/2016 05:08 PM, Otared Kavian wrote:
> Hi Michael,
>
> Maybe what Wolfgang meant by « putting the marks by hand » is something like: you define \StartCitation and \StopCitation in the following way:
>
> % begin quotation-note.tex
>
> \define\StartCitation{\startnarrower[left,right]«~}
> \define[1]\StopCitation{~»\footnote{#1}\stopnarrower}
>
> \starttext
> \input tufte
> \StartCitation
>  \input knuth
> \StopCitation{This is a Quote of Donald Knuth}
> \stoptext
> % end quotation-note.tex
>
> Indeed instead of the quotation marks « and » you can put whatever you wish.
> If you have quotations without footnotes, then you may define another start-stop.

Here would be my suggestion, which gives a syntax that is a bit more 
ConTeXt-like, I feel (but the coding can probably be improved):

\def\startQuote%
   {\dosingleempty\dostartQuote}

\def\dostartQuote[#1]%
   {\blank [line]
    \iffirstargument
     \getparameters[QQ][note=oops,#1]
     \def\stopQuote{\footnote{\QQnote}\stopnarrower\blank [line]}%
   \else
     \def\stopQuote{\stopnarrower\blank [line]}
   \fi
   \setupnarrower [left=1cm,right=2cm]
   \startnarrower}

\starttext

\input zapf

\startQuote
\input tufte
\stopQuote

\startQuote[note=Knuth]
\input knuth
\stopQuote

\stoptext

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

  parent reply	other threads:[~2016-10-24 17:51 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 [this message]
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
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=94908bb7-38bd-8872-e981-3844ee9d9c63@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).