ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Can I use \startbuffer in other command?
Date: Thu, 23 Oct 2008 11:35:14 +0200	[thread overview]
Message-ID: <115224fb0810230235n35dda555qf1c59e3ec78835b1@mail.gmail.com> (raw)
In-Reply-To: <loom.20081023T083121-628@post.gmane.org>

On Thu, Oct 23, 2008 at 10:46 AM, Ruini Xue <xueruini@gmail.com> wrote:
> I have two questions:
>
> 1. How to define a start-stop command to accept options?
>
>   I want to define a start-stop command which can accept options (as
> \startitemize [packed]), however the \definestartstop does not support this.
> I found a solution in the list: http://www.ntg.nl/pipermail/ntg-
> context/2007/025969.html
>
> Unfortunately, when I use \startbuffer in it, context prints "*" in the
> terminal and waits for input. So it comes to the second question
>
> 2. Can \startbuffer be used in other commands?
>
> My code is as following:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \def\startabstract{%
>  \dosingleempty\dostartabstract}
>
> \long\def\dostartabstract[#1]#2\stopabstract{%
>  \startbuffer[#1] #2\stopbuffer}
>
> \let\stopabstract\relax

\def\dostartabstract
  {\dostartbuffer[abstract][startabstract][stopabstract]}

> \startabstract [long]
> a long abstract
> \stopabstract
>
> \startabstract [short]
> a short abstract
> \stopabstract

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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2008-10-23  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23  8:46 Ruini Xue
2008-10-23  9:35 ` Wolfgang Schuster [this message]

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=115224fb0810230235n35dda555qf1c59e3ec78835b1@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).