Re: [NTG-context] A problem with modes
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 ___
Re: [NTG-context] A problem with modes
Dnia 2012-06-26, o godz. 22:44:40 Wolfgang Schuster 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 ___
Re: [NTG-context] A problem with modes
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 ___
Re: [NTG-context] A problem with modes
On 2012-06-26, at 10:12 PM, Marcin Borkowski 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 ___
[NTG-context] A problem with modes
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 ___