ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Can I use \startbuffer in other command?
@ 2008-10-23  8:46 Ruini Xue
  2008-10-23  9:35 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Ruini Xue @ 2008-10-23  8:46 UTC (permalink / raw)
  To: ntg-context

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

\startabstract [long]
a long abstract
\stopabstract

\startabstract [short]
a short abstract
\stopabstract
%%%%%%%%%%%%%%%%

-- ruini

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-23  9:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23  8:46 Can I use \startbuffer in other command? Ruini Xue
2008-10-23  9:35 ` Wolfgang Schuster

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).