ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Typing in new command problems
@ 2003-09-23 14:00 ^Nitram^
  2003-09-23 14:33 ` Patrick Gundlach
  2003-09-23 21:28 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: ^Nitram^ @ 2003-09-23 14:00 UTC (permalink / raw)


Hi,

I try to define new command with typing in this way:
\def\Command#1%
{
 \framed[options]
 {
  \starttyping
  #1
  \stoptyping
 }
}
and use it in this way:
\Command{\getbuffer[name]}
but I have an error:
! Argument of \copyverbatimline has an extra }.

If I change to \def\Command#1#2%
I have:
! Paragraph ended before \Command was complete.

How I can do it - put ConTeXt code to own frame ?...

-- 
Best regards
Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Typing in new command problems
@ 2003-09-24 10:45 ^Nitram^
  0 siblings, 0 replies; 6+ messages in thread
From: ^Nitram^ @ 2003-09-24 10:45 UTC (permalink / raw)


Hi,

> > Is it impossible?
> Is this a real question?

No ;) But the real should be '... for newbie' :)

[cut]

Thank you very much. I did it in this way:

\defineframedtext[Frame][width=broad,bodyfont=9pt,align=right] 
%but align is a little strange = see new post Aligment?

\def\Command#1#2
{\setuptyping[before=\startFrame,after=\stopFrame]
\setupTABLE[frame=off]\bTABLE\bTR\bTD[width=.2\textwidth,align=left]
%align again
\bfx #2\eTD\bTD \typebuffer[#1] \eTD\eTR\eTABLE
\setuptyping[before=,after=]}

And now it is what I want ;) Probably there is another way to do this
but I'm in ConTeXt since 1-2 months ;)

-- 
Best regards
Martin

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

end of thread, other threads:[~2003-09-24 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-23 14:00 Typing in new command problems ^Nitram^
2003-09-23 14:33 ` Patrick Gundlach
2003-09-23 16:37   ` Hans Hagen
2003-09-23 16:56     ` Patrick Gundlach
2003-09-23 21:28 ` Hans Hagen
2003-09-24 10:45 ^Nitram^

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