Re: [NTG-context] Modes and conditional part of the source

2019-02-28 Thread Procházka Lukáš Ing .
{#1} {\grabbufferdata[dummy][bbb][eee]}} \let\eee\relax \enablemode[100] \starttext A \bbb{100} Inside mode 100 \eee \bbb{101} Inside mode 101 \eee \stoptext Depending on the actual use case, there might be simpler ways. Aditya -- Ing. Lukáš Procházka | mailto:l...@pontex.cz

Re: [NTG-context] Modes and conditional part of the source

2019-02-28 Thread Aditya Mahajan
conditional text from here ... B \e % ... to here \stoptext Modes don't work that way. You can do something like this: \define[1]\bbb {\doifnotmode{#1} {\grabbufferdata[dummy][bbb][eee]}} \let\eee\relax \enablemode[100] \starttext A \bbb{100} Inside mode 100 \eee \bbb{101} Inside

Re: [NTG-context] Grammar to parse TeX input?

2018-11-27 Thread Joseph Canedo
xpanded ? > > end > > \stopluacode > > \definebuffer[ZZZBuffer] > > \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} > > \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} > > \StartZZZ > > \

Re: [NTG-context] Grammar to parse TeX input?

2018-11-26 Thread Hans Hagen
On 11/26/2018 3:19 PM, Joseph Canedo wrote: \startluacode function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def

[NTG-context] Grammar to parse TeX input?

2018-11-26 Thread Joseph Canedo
function zzz_function(text) - How to process ‘text’ to get bits which are macros, groups etc… ? Eventually expanded ? end \stopluacode \definebuffer[ZZZBuffer] \def\StartZZZ{\grabbufferdata[ZZZBuffer][StartZZZ][StopZZZ]} \def\StopZZZ{\ctxlua{zzz_function(buffers.getcontent('ZZZBuffer'))}} \StartZZZ

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-14 Thread Rik Kabel
{? }}\GotoPar \input knuth \stopnarrower \stoptext Wolfgang I am applying it incorrectly, or it does not work with the buffers created by \grabbufferdata: \setupwhitespace[none] \setupindenting[none] \starttexdefinition unexpanded startBufTest   \bgroup   \dosingleempty

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
\stoptext Wolfgang I am applying it incorrectly, or it does not work with the buffers created by \grabbufferdata: \setupwhitespace[none] \setupindenting[none] \starttexdefinition unexpanded startBufTest   \bgroup   \dosingleempty\dostartBufTest \stoptexdefinition

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Wolfgang Schuster
it incorrectly, or it does not work with the buffers created by \grabbufferdata: \setupwhitespace[none] \setupindenting[none] \starttexdefinition unexpanded startBufTest \bgroup \dosingleempty\dostartBufTest \stoptexdefinition \starttexdefinition dostartBufTest [#SETUPS

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
with the buffers created by \grabbufferdata: \setupwhitespace[none] \setupindenting[none] \starttexdefinition unexpanded startBufTest   \bgroup   \dosingleempty\dostartBufTest \stoptexdefinition \starttexdefinition dostartBufTest [#SETUPS]   \getrawparameters[BufTest][xx=yy,#SETUPS

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Rik Kabel
}} {\define\Arg{yes}} {\define\Arg{no}}    \iffirstargument \define\First{yes}    \else \define\First{no}    \fi    \relax    \getrawparameters[BufTest][xx=yy,#SETUPS]    \grabbufferdata[TestBuffer][startBufTest][stopBufTest] \stoptexdefinition

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-13 Thread Hans Hagen
}}     {\define\Arg{no}}   \iffirstargument     \define\First{yes}   \else     \define\First{no}   \fi   \relax   \getrawparameters[BufTest][xx=yy,#SETUPS]   \grabbufferdata[TestBuffer][startBufTest][stopBufTest] \stoptexdefinition \starttexdefinition stopBufTest

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Henri Menke
}}     {\define\Arg{no}}   \iffirstargument     \define\First{yes}   \else     \define\First{no}   \fi   \relax   \getrawparameters[BufTest][xx=yy,#SETUPS]   \grabbufferdata[TestBuffer][startBufTest][stopBufTest] \stoptexdefinition \starttexdefinition stopBufTest

Re: [NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Aditya Mahajan
}} {\define\Arg{no}} \iffirstargument \define\First{yes} \else \define\First{no} \fi \relax \getrawparameters[BufTest][xx=yy,#SETUPS] \grabbufferdata[TestBuffer][startBufTest][stopBufTest] \stoptexdefinition \starttexdefinition stopBufTest \startparagraph

[NTG-context] How can I remove a blank leading line from a buffer

2018-08-12 Thread Rik Kabel
{no}} \iffirstargument \define\First{yes} \else \define\First{no} \fi \relax \getrawparameters[BufTest][xx=yy,#SETUPS] \grabbufferdata[TestBuffer][startBufTest][stopBufTest] \stoptexdefinition \starttexdefinition stopBufTest \startparagraph \dontleavehmode\llap{\Mark}\inlinebuffer

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .
Hello Wolfgang, On Tue, 03 Jul 2018 09:07:23 +0200, Wolfgang Schuster wrote: Hi Lukas, when you create the buffer with the grabbufferdata-command you already set the delimiter for the environment with the third argument, in the example below this is the \stopcontentexport command. To have

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Hans Hagen
\dostartcontentexport[#1]% {\iffirstargument   \edef\contentexportfile{#1}%   \else   \let\contentexportfile\empty   \fi   \grabbufferdata[contentexport][startcontentexport][stopcontentexport] } \def\stopcontentexport{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Wolfgang Schuster
Hi Lukas, when you create the buffer with the grabbufferdata-command you already set the delimiter for the environment with the third argument, in the example below this is the \stopcontentexport command. To have different start/stop-commands for your environment means you have to change all

Re: [NTG-context] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .
\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport] } \def\stopcontentexport{% \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport

Re: [NTG-context] Problem defining macro with Lua inside

2018-05-30 Thread Procházka Lukáš Ing .
de has to “see” \stopluacode. Use buffers: \unexpanded\def\startWord {\grabbufferdata[Word][startWord][stopWord]} \unexpanded\def\stopWord {\startluacode print(buffers.prepend("Word","context[[")) print(buffers.append("Word","]]")) \stopluacode

Re: [NTG-context] Problem defining macro with Lua inside

2018-05-30 Thread Henri Menke
On 05/30/2018 08:19 PM, Procházka Lukáš Ing. wrote: > Hello, > > I'm trying to define a macro (a MS Word -> clipboard -> Ctx tool), whose > simplified form is the following: > This cannot work \startluacode has to “see” \stopluacode. Use buffers: \unexpanded\def\startWo

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
,prefix=no,list=Aditya]}% \zerocount} This is perfect as I am already using `\grabbufferdata` in my code. I can easily adapt it to use `\buff_pickup` instead. Thanks!. Does what you want but of course it's sort of ugly for a module to do that. What we can do is this which is still ugly

Re: [NTG-context] Problem with Filter Module in latent context beta

2018-04-17 Thread Aditya Mahajan
} This is perfect as I am already using `\grabbufferdata` in my code. I can easily adapt it to use `\buff_pickup` instead. Thanks!. Does what you want but of course it's sort of ugly for a module to do that. What we can do is this which is still ugly but picking up verbatim is always ugly: \def

Re: [NTG-context] source code and result side by side

2017-08-04 Thread Henning Hraban Ramm
macros that >>> behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). >>> But in this case, there is a simpler solution: >>> >>> \defineframed >>> [CodeExampleFramed] >>> [ >>> frame=off, >>>

Re: [NTG-context] source code and result side by side

2017-08-03 Thread Henning Hraban Ramm
Am 2017-07-31 um 03:26 schrieb Aditya Mahajan <adit...@umich.edu>: > You can't do that with buffers. If you need to define your own macros that > behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). But > in this case, there is a simpler solution: >

Re: [NTG-context] source code and result side by side

2017-08-03 Thread Henning Hraban Ramm
Am 2017-07-31 um 03:26 schrieb Aditya Mahajan <adit...@umich.edu>: > You can't do that with buffers. If you need to define your own macros that > behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). But > in this case, there is a simpler solution: Thank y

Re: [NTG-context] source code and result side by side

2017-07-30 Thread Aditya Mahajan
ur own macros that behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). But in this case, there is a simpler solution: \defineframed [CodeExampleFramed] [ frame=off, width=0.5\textwidth, align=normal, ] \definebuffer [CodeExample] \define\stopCodeE

[NTG-context] How do I insert characters before \par

2017-03-31 Thread Rik Kabel
unexpanded startABC 3.\begingroup 4.\dosingleempty\dostartABC 5. \stoptexdefinition 6. \starttexdefinition dostartABC [#SETUPS] 7. \getrawparameters[ABC][inset=2em,#SETUPS] 8. \grabbufferdata[bu:ABC][startABC][stopABC] 9

[NTG-context] \savebuffer to merge of save contents

2017-03-21 Thread Jaroslav Hajtmar
\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport]} \def\stopcontentexport {\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% \getbufferdata[contentexport

Re: [NTG-context] Parallel output of source data

2016-12-04 Thread Procházka Lukáš Ing .
tore content and save it in a external file. \unexpanded\def\startcontentexport {\dosingleempty\dostartcontentexport} \def\dostartcontentexport[#1]% {\iffirstargument \edef\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startc

Re: [NTG-context] Parallel output of source data

2016-12-02 Thread Wolfgang Schuster
ort[#1]% {\iffirstargument \edef\contentexportfile{#1}% \else \let\contentexportfile\empty \fi \grabbufferdata[contentexport][startcontentexport][stopcontentexport]} \def\stopcontentexport {\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexpo

Re: [NTG-context] User-Defined Commands With Key-Value Options

2015-07-23 Thread Rik
\dosingleempty\dostartPoem \stoptexdefinition \starttexdefinition dostartPoem [#SETUPS] \getrawparameters[Poem][inset=2em,indent=0em,before=,font=, language=en,#SETUPS] \grabbufferdata[Poem][startPoem][stopPoem] \stoptexdefinition

Re: [NTG-context] How to define a new environment / function?

2015-06-20 Thread Wolfgang Schuster
]% \grabbufferdata[variable][startvariable][stopvariable]} \def\stopvariable {\directsetup{variable:content}% \endgroup} \startsetups[variable:content] \startlinealignment[middle] \variablealias \qquad \variablename \hfill \variablerange

Re: [NTG-context] vertical spacing and makeups

2015-04-19 Thread Pablo Rodriguez
of the box. \def\startSlide {\grabbufferdata[SlideContent][startSlide][stopSlide]} \def\stopSlide {\startmakeup[standard][align=middle] \vbox\bgroup \setupwhitespace[big] \begstrut\getbufferdata[SlideContent]\endstrut \egroup \stopmakeup} Many thanks for your reply

Re: [NTG-context] vertical spacing and makeups

2015-04-19 Thread Wolfgang Schuster
would be to use \blank instead of \par or a blank line, wouldn’t it be? You can flush the content of the buffer in a \vbox where you set the whitespace at the begin of the box. \def\startSlide {\grabbufferdata[SlideContent][startSlide][stopSlide]} \def\stopSlide {\startmakeup[standard][align

Re: [NTG-context] vertical spacing and makeups

2015-04-18 Thread Pablo Rodriguez
and end of your text you have to the \strut or \begstrut and \endstrut commands. \def\startSlide {\grabbufferdata[SlideContent][startSlide][stopSlide]} \def\stopSlide {\startmakeup[standard][align=middle] \begstrut\getbufferdata[SlideContent]\endstrut \stopmakeup} I tried to use

Re: [NTG-context] vertical spacing and makeups

2015-04-18 Thread Wolfgang Schuster
and \endstrut commands. In vertical centering for makeups, why does ascender or descender height affect to basline position? Sorry, but this is a problem for readability. And it think it is better to center the line instead than a group of glyphs. \def\startSlide {\grabbufferdata[SlideContent

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Pierre-François Bonnefoi
Second Slide \stopSlide \startSlide Third Slide \stopSlide \stoptext Method 2 === \def\startSlide {\dosingleempty\dostartSlide} \def\dostartSlide[#1]% {\doifelse{#1}{-} {\let\stopSlide\stopSlideNop} {\let\stopSlide\stopSlideYes}% \grabbufferdata[Slide

Re: [NTG-context] ConTeXt gobble my mind

2014-11-09 Thread Hans Hagen
\startSlide Third Slide \stopSlide \stoptext Method 2 === \def\startSlide {\dosingleempty\dostartSlide} \def\dostartSlide[#1]% {\doifelse{#1}{-} {\let\stopSlide\stopSlideNop} {\let\stopSlide\stopSlideYes}% \grabbufferdata[Slide][startSlide][stopSlide]} \let\stopSlideNop\relax

Re: [NTG-context] ConTeXt gobble my mind

2014-11-08 Thread Wolfgang Schuster
\stoptext Method 2 === \def\startSlide {\dosingleempty\dostartSlide} \def\dostartSlide[#1]% {\doifelse{#1}{-} {\let\stopSlide\stopSlideNop} {\let\stopSlide\stopSlideYes}% \grabbufferdata[Slide][startSlide][stopSlide]} \let\stopSlideNop\relax \def\stopSlideYes {\page

[NTG-context] First letter lost possible cause: \grabbfferdata

2014-06-25 Thread Rik Kabel
Recently there have been reports of the first letter of a line of text being lost in the database and letter modules. I tracked down what appears to be the same problem and developed a work-around. The problem appears to be with the \grabbufferdata command. Something has changed in the way

Re: [NTG-context] First letter lost possible cause: \grabbfferdata

2014-06-25 Thread Rik Kabel
On 2014-06-25 15:51, Rik Kabel wrote: Recently there have been reports of the first letter of a line of text being lost in the database and letter modules. I tracked down what appears to be the same problem and developed a work-around. The problem appears to be with the \grabbufferdata

Re: [NTG-context] First letter lost possible cause: \grabbfferdata

2014-06-25 Thread Hans Hagen
appears to be with the \grabbufferdata command. Something has changed in the way it works, and it now swallows the first token of the buffer that it grabs. It may also show up with other commands, but this is the only one I have found in my projects. And as soon as I post, I see that Hans has found

Re: [NTG-context] First letter lost possible cause: \grabbfferdata

2014-06-25 Thread Rik
and developed a work-around. The problem appears to be with the \grabbufferdata command. Something has changed in the way it works, and it now swallows the first token of the buffer that it grabs. It may also show up with other commands, but this is the only one I have found in my projects. And as soon

Re: [NTG-context] database module: the first letter is lost

2014-06-25 Thread Rik Kabel
case (shortened below), while removing #5 as Hans suggested does resolve it. % macros=mkvi \starttexdefinition unexpanded startTest \begingroup \dostartTest \stoptexdefinition \starttexdefinition dostartTest \grabbufferdata[Test][startTest][stopTest

[NTG-context] Movable code, was Re: starttexdefinition error in standalone, works in TL2013

2014-03-12 Thread Rik
On 2014-03-01 07:32, Wolfgang Schuster wrote: \unexpanded\def\startTranslation {\begingroup \dosingleempty\dostartTranslation} \def\dostartTranslation[#1]% {\iffirstargument \getrawparameters[Translation][setups=,language=en,#1]% \fi \grabbufferdata[Translation

Re: [NTG-context] starttexdefinition error in standalone, works in TL2013

2014-03-01 Thread Wolfgang Schuster
\getrawparameters[Translation][setups=,language=en,#1]% \fi \grabbufferdata[Translation][startTranslation][stopTranslation]} \def\stopTranslation {\language[\Translationlanguage]% \Translationsetups (\,\getbufferdata[Translation]\removeunwantedspaces\,)% \endgroup} \starttext

Re: [NTG-context] starttexdefinition error in standalone, works in TL2013

2014-03-01 Thread Rik Kabel
of the buffer mechanism to store text. \unexpanded\def\startTranslation {\begingroup \dosingleempty\dostartTranslation} \def\dostartTranslation[#1]% {\iffirstargument \getrawparameters[Translation][setups=,language=en,#1]% \fi \grabbufferdata[Translation][startTranslation

[NTG-context] Argument of \startInvoice has an extra }.

2013-11-09 Thread Peter Münster
Hi, How could I avoid that error here please: --8---cut here---start-8--- \def\beginInvoice{\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]} \def\startInvoice#1\stopInvoice{bla} \starttext

Re: [NTG-context] Argument of \startInvoice has an extra }.

2013-11-09 Thread Aditya Mahajan
On Sat, 9 Nov 2013, Peter Münster wrote: Hi, How could I avoid that error here please: --8---cut here---start-8--- \def\beginInvoice{\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]} \def

Re: [NTG-context] Argument of \startInvoice has an extra }.

2013-11-09 Thread Peter Münster
On Sat, Nov 09 2013, Aditya Mahajan wrote: One possibility is to restrict optional arguments to one line: \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice} \def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]} Thanks. How did you find the reason

Re: [NTG-context] letter module: File ended while scanning use of \buff_gobble

2013-09-01 Thread Peter Münster
On Mon, Mar 04 2013, Wolfgang Schuster wrote: \usemodule[letter] \startsetups[letter:section:content] \getbuffer[MyLetter] \stopsetups \setuplettersection[content][alternative=setups] \def\StartLetter {\starttext \grabbufferdata[MyLetter][StartLetter][StopLetter]} \def

Re: [NTG-context] letter module: File ended while scanning use of \buff_gobble

2013-09-01 Thread Wolfgang Schuster
\grabbufferdata[MyLetter][StartLetter][StopLetter]} \def\StopLetter {\placeletter \stoptext} \StartLetter \input tufte \StopLetter Thanks Wolfgang. How could I add something at the start and at the end of the letter? This does not work: --8---cut here

Re: [NTG-context] documents inside documents

2013-06-25 Thread Wolfgang Schuster
,compressseparator=] \stopbuffer % \startbuffer[extract:after] % % empty % \stopbuffer \def\startextract {\dosingleempty\dostartextract} \def\dostartextract[#1]% {\edef\extractfilename{#1}% \grabbufferdata[extract:content][startextract][stopextract]} \def\stopextract {\doifsomething\extractfilename

Re: [NTG-context] orphans and widows in poems

2013-06-17 Thread Wolfgang Schuster
\startlinescontent {\grabbufferdata[linescontent][startlinescontent][stoplinescontent]} \def\stoplinescontent {\ctxlua{userdata.linescontent.process()}} \starttext \startlinescontent One Two Three Four Five Six \stoplinescontent \stoptext Wolfgang

Re: [NTG-context] orphans and widows in poems

2013-06-17 Thread Hans Hagen
(buffers.getcontent(linescontent)) context.begingroup() for i=1,#lines do local l = lines[i] context(%s,l) context.par() end context.endgroup() end \stopluacode \def\startlinescontent {\grabbufferdata[linescontent

Re: [NTG-context] TEXpage filename

2013-05-04 Thread Alan Bowen
to create a pdf with the \typesetfile command. \startbuffer[extract:before] \startTEXpage \stopbuffer \startbuffer[extract:after] \stopTEXpage \stopbuffer \def\startextract {\dosingleempty\dostartextract} \def\dostartextract[#1]% {\edef\extractfilename{#1}% \grabbufferdata

Re: [NTG-context] TEXpage filename

2013-05-02 Thread Wolfgang Schuster
and tell context to create a pdf with the \typesetfile command. \startbuffer[extract:before] \startTEXpage \stopbuffer \startbuffer[extract:after] \stopTEXpage \stopbuffer \def\startextract {\dosingleempty\dostartextract} \def\dostartextract[#1]% {\edef\extractfilename{#1}% \grabbufferdata

Re: [NTG-context] letter module: File ended while scanning use of \buff_gobble

2013-03-04 Thread Wolfgang Schuster
to the letter module. \usemodule[letter] \startsetups[letter:section:content] \getbuffer[MyLetter] \stopsetups \setuplettersection[content][alternative=setups] \def\StartLetter {\starttext \grabbufferdata[MyLetter][StartLetter][StopLetter]} \def\StopLetter {\placeletter \stoptext

Re: [NTG-context] code after \stopbuffer

2013-02-14 Thread Meer, H. van der
Thanks, got the following now working: \def\startxmlbuffer{\grabbufferdata[xmlbuffer][startxmlbuffer][stopxmlbuffer]} \def\stopxmlbuffer{\endinput} .. \xmlprocessbuffer{dvd}{xmlbuffer}{} Hans van der Meer On 13 feb. 2013, at 22:34, Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Am

Re: [NTG-context] code after \stopbuffer

2013-02-13 Thread Wolfgang Schuster
] ..contents.. \stopbuffer % in execution followed by \command \def\startmybuffer {\grabbufferdata[mybuffer][startmybuffer][stopmybuffer]} \def\stopmybuffer {\startframedtext[width=max] \getbuffer[mybuffer] \stopframedtext} \starttext \startmybuffer \input knuth \stopmybuffer \stoptext

Re: [NTG-context] \setlayer on \startalign row

2013-02-06 Thread Aditya Mahajan
}% } \def\hidecomponent#1 {\let\StartS\StartStepping \let\StopS\StopStepping \def\StartStepping{\grabbufferdata[Stepping][StartStepping][StopStepping]} \component[#1] \let\StartStepping\StartS \let\StopStepping\StopS} \protect \stopmodule

Re: [NTG-context] Getting the content of source lines in a \startlines \stoplines env?

2013-02-04 Thread Wolfgang Schuster
then context({\\tt %s},l) context(true) else context(%s,l) context(true) end end context.stoplines() end \stopluacode \def\startlinescontent {\grabbufferdata[linescontent

Re: [NTG-context] Figure captions in margin

2013-01-20 Thread Marco Patzer
={outermargin, low}, command=\caption_command] \setupcaption [widefigure] [location={outermargin, low}, command=\caption_command] \newtoks\t_smart_figure_args \starttexdefinition startplacesmartfigure [#1] \t_smart_figure_args={#1} \grabbufferdata [smart_figure_buffer

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Sietse Brouwer
\begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe until \stopframe is stored in a buffer with the name “simplesteps”. (1) What does the \begingroup do? I could not find a \endgroup in the patch, nor

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Philipp Gesang
···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe until \stopframe is stored in a buffer with the name “simplesteps”. (1) What does

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Andre Caldas
%% begin example \grabbufferdata[mybuffer][thisisthestart][thisistheend] \thisisthestart My friend, you would not tell with such high zest To children ardent for some desparate glory, The old Lie: Dulce et decorum est Pro patria mori. \thisistheend \typebuffer[mybuffer] %% end example

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Marco Patzer
On 2012–12–15 Sietse Brouwer wrote: But when I tried to write a minimal example, I couldn't get it to compile. %% begin example \grabbufferdata[mybuffer][thisisthestart][thisistheend] \thisisthestart My friend, you would not tell with such high zest To children ardent for some desparate

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Hans Hagen
by the user, when the argument is used the content is typeset as \section. \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe until \stopframe is stored in a buffer with the name “simplesteps”. \let

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Wolfgang Schuster
Am 15.12.2012 um 11:40 schrieb Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de: ···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Philipp Gesang
···date: 2012-12-15, Saturday···from: Wolfgang Schuster··· Am 15.12.2012 um 11:40 schrieb Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de: ···date: 2012-12-15, Saturday···from: Sietse Brouwer··· \begingroup \grabbufferdata[simplesteps][startframe][stopframe

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Wolfgang Schuster
Am 15.12.2012 um 11:28 schrieb Sietse Brouwer sbbrou...@gmail.com: \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe until \stopframe is stored in a buffer with the name “simplesteps”. (1) What

Re: [NTG-context] New module: simplesteps.

2012-12-15 Thread Sietse Brouwer
in the background explanation. Cheers, Sietse On Sat, Dec 15, 2012 at 1:38 PM, Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Am 15.12.2012 um 11:28 schrieb Sietse Brouwer sbbrou...@gmail.com: \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Andre Caldas
\begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } \let\stopframe\simplestepsplaybuffer Cheers, André Caldas. ___ If your question is of interest to others as well, please add an entry to the Wiki

Re: [NTG-context] New module: simplesteps.

2012-12-14 Thread Wolfgang Schuster
is typeset as \section. \begingroup \grabbufferdata[simplesteps][startframe][stopframe]% } With the \grabbufferdata command the content beginning from \startframe until \stopframe is stored in a buffer with the name “simplesteps”. \let\stopframe\simplestepsplaybuffer This makes

Re: [NTG-context] New module: simplesteps.

2012-12-13 Thread Philipp Gesang
are very welcome. Honestly, it doesn’t work, but that’s a minor flaw! If you want to use buffers with indirection you have to take care of the argument delimiters. \grabbufferdata is excellent for that. I did some rewriting: stray globals and rough namespacing, mostly. On the practice of calling TeX

[NTG-context] A strange problem, probably with \startitemize[columns]

2012-07-28 Thread Marcin Borkowski
\egroup} \def\todo#1{{\em \kap{do dopisania}: #1}} %\setupinteraction[state=start] \enablemode[nauczyciel] %\disablemode[nauczyciel] \def\startteacher{\grabbufferdata[teacher][startteacher][stopteacher]} \doifmodeelse{nauczyciel}{\def\stopteacher{\par{\switchtobodyfont[small]\getbuffer[teacher]\par

[NTG-context] Two questions about buffers

2012-06-30 Thread Marcin Borkowski
Hello, I have two questions concerning buffers. 1. What is the difference between \grabbufferdata and \dostartbuffer? 2. I wanted to use buffers to define my own environment (as Wolfgang suggested to me a few days ago). However, there's a problem with \baselineskip; here is an example

Re: [NTG-context] Two questions about buffers

2012-06-30 Thread Hans Hagen
On 30-6-2012 14:25, Marcin Borkowski wrote: Hello, I have two questions concerning buffers. 1. What is the difference between \grabbufferdata and \dostartbuffer? 2. I wanted to use buffers to define my own environment (as Wolfgang suggested to me a few days ago). However, there's a problem

Re: [NTG-context] Two questions about buffers

2012-06-30 Thread Wolfgang Schuster
Am 30.06.2012 um 14:25 schrieb Marcin Borkowski: Hello, I have two questions concerning buffers. 1. What is the difference between \grabbufferdata and \dostartbuffer? 2. I wanted to use buffers to define my own environment (as Wolfgang suggested to me a few days ago). However

Re: [NTG-context] Two questions about buffers

2012-06-30 Thread Wolfgang Schuster
Am 30.06.2012 um 14:25 schrieb Marcin Borkowski: Hello, I have two questions concerning buffers. 1. What is the difference between \grabbufferdata and \dostartbuffer? There is no difference, \grabbufferdata is just the new name for \dostartbuffer in MkIV and it’s recommended to use

Re: [NTG-context] itemize in two columns and pagebreaks

2012-06-29 Thread Marcin Borkowski
[nauczyciel] \def\startteacher{\grabbufferdata[teacher][startteacher][stopteacher]} \doifmodeelse{nauczyciel}{\def\stopteacher{\getbuffer[teacher]}}{\def\stopteacher{}} \def\startanswer{\grabbufferdata[answer][startanswer][stopanswer]} \doifmodeelse{nauczyciel}{\def\stopanswer{\blank[small]{\sl

Re: [NTG-context] A problem with modes

2012-06-26 Thread Wolfgang Schuster
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

Re: [NTG-context] A problem with modes

2012-06-26 Thread Marcin Borkowski
: \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

Re: [NTG-context] A problem with modes

2012-06-26 Thread Wolfgang Schuster
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