* A problem with modes
@ 2012-06-26 20:12 Marcin Borkowski
2012-06-26 20:40 ` Aditya Mahajan
2012-06-26 20:44 ` Wolfgang Schuster
0 siblings, 2 replies; 5+ messages in thread
From: Marcin Borkowski @ 2012-06-26 20:12 UTC (permalink / raw)
To: ConTeXt mailing list
Hello,
this doesn't work for me:
\definestartstop[amode][before={\startmode[a]},
after={\stopmode}]
\starttext
All modes.
\startamode
``A'' mode.
\stopamode
\stoptext
Can I use \startmode with \definestartstop? Or is there a better way
to do something like this?
TIA
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with modes
2012-06-26 20:12 A problem with modes Marcin Borkowski
@ 2012-06-26 20:40 ` Aditya Mahajan
2012-06-26 20:44 ` Wolfgang Schuster
1 sibling, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2012-06-26 20:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 2012-06-26, at 10:12 PM, Marcin Borkowski <mbork@wmi.amu.edu.pl> wrote:
> Hello,
>
> this doesn't work for me:
>
> \definestartstop[amode][before={\startmode[a]},
> after={\stopmode}]
>
> \starttext
>
> All modes.
> \startamode
> ``A'' mode.
> \stopamode
>
> \stoptext
>
> Can I use \startmode with \definestartstop? Or is there a better way
> to do something like this?
>
(Untested): try the \doifmodeelse version.
Aditya
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with modes
2012-06-26 20:12 A problem with modes Marcin Borkowski
2012-06-26 20:40 ` Aditya Mahajan
@ 2012-06-26 20:44 ` Wolfgang Schuster
2012-06-26 21:25 ` Marcin Borkowski
1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2012-06-26 20:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.06.2012 um 22:12 schrieb Marcin Borkowski:
> Hello,
>
> this doesn't work for me:
>
> \definestartstop[amode][before={\startmode[a]},
> after={\stopmode}]
>
> \starttext
>
> All modes.
> \startamode
> ``A'' mode.
> \stopamode
>
> \stoptext
>
> Can I use \startmode with \definestartstop?
No you can’t.
> Or is there a better way to do something like this?
It depends on what you want to do. You can create a buffer command:
\def\startamode{\grabbufferdata[amode][startamode][stopamode]}
%\def\stopamode {\getbuffer[amode]}
\starttext
All modes.
\startamode
“A” mode.
\stopamode
\stoptext
or you use my annotation module:
\usemodule[annotation]
\defineannotation[amode][alternative=text]
%\defineannotation[amode][alternative=none]
\starttext
All modes.
\startamode
“A” mode.
\stopamode
\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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with modes
2012-06-26 20:44 ` Wolfgang Schuster
@ 2012-06-26 21:25 ` Marcin Borkowski
2012-06-27 3:23 ` Wolfgang Schuster
0 siblings, 1 reply; 5+ messages in thread
From: Marcin Borkowski @ 2012-06-26 21:25 UTC (permalink / raw)
To: ntg-context
Dnia 2012-06-26, o godz. 22:44:40
Wolfgang Schuster <schuster.wolfgang@googlemail.com> napisał(a):
>
> Am 26.06.2012 um 22:12 schrieb Marcin Borkowski:
>
> > Hello,
> >
> > this doesn't work for me:
> >
> > \definestartstop[amode][before={\startmode[a]},
> > after={\stopmode}]
> >
> > \starttext
> >
> > All modes.
> > \startamode
> > ``A'' mode.
> > \stopamode
> >
> > \stoptext
> >
> > Can I use \startmode with \definestartstop?
>
> No you can’t.
I was afraid of this...
> > Or is there a better way to do something like this?
>
> It depends on what you want to do. You can create a buffer command:
>
> \def\startamode{\grabbufferdata[amode][startamode][stopamode]}
> %\def\stopamode {\getbuffer[amode]}
>
> \starttext
>
> All modes.
> \startamode
> “A” mode.
> \stopamode
>
> \stoptext
Thanks, it worked. One question: is there any difference between
\def\starta{...}
\def\stopa{...}
and
\definestartstop[a][before={...},after={...}]
?
> Wolfgang
Best,
--
Marcin Borkowski
http://mbork.pl
___________________________________________________________________________________
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: A problem with modes
2012-06-26 21:25 ` Marcin Borkowski
@ 2012-06-27 3:23 ` Wolfgang Schuster
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2012-06-27 3:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 26.06.2012 um 23:25 schrieb Marcin Borkowski:
>>> Or is there a better way to do something like this?
>>
>> It depends on what you want to do. You can create a buffer command:
>>
>> \def\startamode{\grabbufferdata[amode][startamode][stopamode]}
>> %\def\stopamode {\getbuffer[amode]}
>>
>> \starttext
>>
>> All modes.
>> \startamode
>> “A” mode.
>> \stopamode
>>
>> \stoptext
>
> Thanks, it worked. One question: is there any difference between
>
> \def\starta{...}
> \def\stopa{...}
>
> and
>
> \definestartstop[a][before={...},after={…}]
Yes because in my definition for \startamode I start a buffer which reads everything
untill the delimiting \stopamode and stores it in memory, afterwards you can access
the stored content with \getbuffer[…]. When you use \definestartstop to create
the environment you have only two commands which perform a few things at the begin
and end of the environment but you can do much with the content itself, the only
way to gobble the content is to store it in a box but than the buffer method is easier.
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-27 3:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-26 20:12 A problem with modes Marcin Borkowski
2012-06-26 20:40 ` Aditya Mahajan
2012-06-26 20:44 ` Wolfgang Schuster
2012-06-26 21:25 ` Marcin Borkowski
2012-06-27 3:23 ` 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).