dostartMyCommand[#1]}
>
> \let\stopMyCommand\relax
>
> \normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92
> stopMyCommand}%
> {\endgroup
> % whatever #1 does
> \setbuffer[foo]#2\endbuffer
> \typebuffer[foo]
> \getbuffer[foo]}
\startMyCommand[#1]%
{\begingroup
\setcatcodetable\notcatcodes
\dostartMyCommand[#1]}
\let\stopMyCommand\relax
\normalexpanded{\def\noexpand\dostartMyCommand[#1]#2\expandtoken\notcatcodes92
stopMyCommand}%
{\endgroup
% whatever #1 does
\setbuffer[foo]#2\endbuffer
\typebuffer[foo
pily accept
>> these useful features?
> buffers are stored as-is so no catcode magic stored, contrary to macros
>
> you can use \setbuffer but that doesn't solve the argument passing
>
> however, you can nest buffers so you can make other \start\stop commands
>
I was wondering how I
should define or expand #2 in the MWE below to make TeX happily accept these
useful features?
buffers are stored as-is so no catcode magic stored, contrary to macros
you can use \setbuffer but that doesn't solve the argument passing
however, you can nest buffers so yo
}{#5}
\fi \else \let
\currentreg...
l.25 }
...l.11633 \stop
15
16 \registerctxluafile{page-run}{}
17
18 \unprotect
19
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21
22 \gdef\page_layo
15
16 \registerctxluafile{page-run}{}
17
18 \unprotect
19
20 \unexpanded\gdef\showprint{\dotripleempty\page_layouts_show_print}
21
22 \gdef\page_layouts_show_print[#1][#2][#3]% only english
23 {\setbuffer[crap]%
24 \unpro
stopbuffer
\getbuffer[Buf]
}
\def\T
{\setbuffer[Buf]a b ccc d e f\endbuffer
\getbuffer[Buf]}
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg
On 1/10/2018 6:30 PM, Wolfgang Schuster wrote:
dr. Hans van der Meer <mailto:havdm...@ziggo.nl>
10. Januar 2018 um 13:45
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put
something in this buffer.
But is it possible to add something at the end of this buffer at a
dr. Hans van der Meer <mailto:havdm...@ziggo.nl>
10. Januar 2018 um 13:45
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put
something in this buffer.
But is it possible to add something at the end of this buffer at a
later moment?
You can use the “buffers.appen
With \setbuffer[ABUFFER] .. \endbuffer I can program a macro to put something
in this buffer.
But is it possible to add something at the end of this buffer at a later moment?
Hans van der Meer
___
If your question
with alternatives like \startbuffer[lettercontent] … endbuffer. The \input problem remains: it appears that the buffer takes any command (\foo) as literal text.I tried moving the setbuffer … endbuffer part to elswhere in the document. I also experimented with \input a sample text of my own on my
rnalfilter@set_filenames
\setbuffer[\externalfilter@buffer_name]#3\endbuffer
\externalfilter@process_filter
\stoptexdefinition
\protect
\defineexternalfilter
[ASY]
[
filtercommand={asy -tex context \externalfilterinputfile\space -o
\externalfilteroutputfil
ument\externalfiter@set_indeed}
\starttexdefinition externalfiter@set_indeed [#1][#2]#3
% #1 = filter
% #2 = options
\begingroup
\edef\currentexternalfilter{#1}
\setupexternalfilter[#1][\c!name=,#2]
\externalfilter@set_filenames
\setbuffer[\externalfilter@buffer_name]#3\endb
]
[
filtercommand={asy -tex context \externalfilterinputfile\space -o
\externalfilteroutputfile}, output=\externalfilterbasefile.pdf,
purge=no,
cache=yes,
readcommand=\ReadImage,
]
\define[1]\ReadImage{\externalfigure[#1]}
\define[1]\mycircle{
#1 - XXX
\setbuffer[ASY]
import
ilter
[MARKDOWN]
[
filtercommand={pandoc -f markdown -t context
\externalfilterinputfile\space -o \externalfilteroutputfile},
cache=yes,
purge=no, % Just for testing. May be removed.
]
\define[1]\TEST
{\setbuffer[MARKDOWN]This is #1\endbuffer
\processMARKDOWNb
.
The getbuffer setup is not even reached, as is obvious.
I tried \xmltofile to put the data into an intermediate file, but to
no avail because it produces the following, leading at best to
recursion when processed by \xmlprocessfile.
bufferdata
Is there a solution to this?
\set
30. März 2016 um 10:11
>
>
> \startbuffer .. \stopbuffer is parsed special
>
> so use:
>
> \def\Buffer#1#2
> {\setbuffer[#1]{\input #2\relax}}
>
> \def\Buffer#1#2%
> {\setbuffer[#1]\input{#2}\endbuffer}
>
> Wolfgang
>
>
> __
Hans Hagen <mailto:pra...@wxs.nl>
30. März 2016 um 10:11
\startbuffer .. \stopbuffer is parsed special
so use:
\def\Buffer#1#2
{\setbuffer[#1]{\input #2\relax}}
\def\Buffer#1#2%
{\setbuffer[#1]\input{#2}\endbuffer}
Wo
t;
>> \stoptext
>>
>> -
>>
>>
>> Context gives me the following error on this:
>>
>>
>> tex error > tex error on line 9 in file
>> C:/Users/emargraf/Documents/buffer.tex: ! Undefined control sequence
>>
&g
use:
\def\Buffer#1#2
{\setbuffer[#1]{\input #2\relax}}
\Buffer{bla}{knuth}
but i'm not sure what you gain here as it will still input tufte each time
Hans
-
Hans Hagen | PR
...
\stopmyinput
\stopbuffer
but now not executed at once, but stored in and executable from a buffer with
\getbuffer[mystoragebuffer].
\setbuffer[foo]bar\endbuffer
But of course there might be a better way to execute the same code more than
once within one run of TeX.
for that to answer
Hi,
as far as I have understood MathML, elements tagged with mathvariant=bold
should be set upright bold, not bold-italic.
Could this be corrected, please?
Thank you very much!
Steffen
---
\usemodule[mathml] \starttext
\placeformula\startformula[9pt]
\setbuffer http://www.w3.org/1998
line-breaking.
Aditya
> ---
>
> \placeformula\startformula[9pt]
> \setbuffer http://www.w3.org/1998/Math/MathML";>
> http://www.w3.org/1998/Math/MathML";>
>
> C
> E
>
>
> A
>
>
> http://www.w3.org/1998/Math/MathML";>=
> ht
4
5
6 \usemodule[mathml] \starttext
7
8
9 \setbuffer http://www.w3.org/1998/Math/MathML";>
10 >> http://www.w3.org/1998/Math/MathML"; mathvariant="bold">a
11 http://www.w3.org/1998/Math/MathML";>∈
12 http://www.w3
Hi,
usually it is possible to break long formulas.
But is there a way to do so, when formula is coded in mathml (see example
below)?
Thanks, Steffen
---
\placeformula\startformula[9pt]
\setbuffer http://www.w3.org/1998/Math/MathML";>
http://www.w3.org/1998/Math/MathML";>
Hi,
any idea, how to get it
p
typeset in bold??
Steffen
---
\usemodule[mathml] \starttext
\placeformula\startformula[9pt]
\setbuffer http://www.w3.org/1998/Math/MathML";>
http://www.w3.org/1998/Math/MathML";>π
http://www.w3.org/1998/Math/MathML";>=
http://www
.
>>> Is there a way to solve the error "! Argument of \buff_gobble has an extra
>>> }."
>>
>> You can’t use \startbuffer … \stopbuffer in other commands but with
>> \setbuffer
>> there is a command which can be used here.
>>
>> \sym{\
>> }."
>
> You can’t use \startbuffer … \stopbuffer in other commands but with \setbuffer
> there is a command which can be used here.
>
> \sym{\setbuffer … \endbuffer\processxmlbuffer}
great, thanks. but this immediately gives the next error: "invalid
Am 08.06.2013 um 12:53 schrieb Steffen Wolfrum :
> Hi friends,
>
> we need to run MathML inside \sym (see below).
> Is there a way to solve the error "! Argument of \buff_gobble has an extra }."
You can’t use \startbuffer … \stopbuffer in other commands but with \setbuf
t;
>> Because running this in isolation goes without a problem, I suspect the
>> change has to do with the project structure in which I use the buffer. But
>> again, it worked in the past.
>> Does it works with
>> \setbuffer[abc]
>> whatever
>> \endbuffe
> Because running this in isolation goes without a problem, I suspect the
>> change has to do with the project structure in which I use the buffer. But
>> again, it worked in the past.
>>
> Does it works with
> \setbuffer[abc]
> whatever
> \endbuffer
> ?
&g
.
Does it works with
\setbuffer[abc]
whatever
\endbuffer
?
It works with these macros, yes. Thanks.
But is \setbuffer..\endbuffer something new? I do not see it on the Reference
page of the wiki. Also it doesn't seem in line with ConTeXt's regular naming
scheme of \startsomething..\st
> \startbuffer[abc]
> whatever
> \stopbuffer
>
> Now I get: ! Missing } inserted.
>
> Because running this in isolation goes without a problem, I suspect the
> change has to do with the project structure in which I use the buffer. But
> again, it worked in the past.
>
Does i
On 4-11-2011 18:18, "Stefan Müller" wrote:
On 3-11-2011 23:01, "Stefan Müller" wrote:
\define\Doesnt{\startxtable \startxrow \startxcell does not work
\stopxcell \stopxrow \stopxtable}
>
> \starttext
> \Works \stopxtable
> %\Doesnt
> \
> On 3-11-2011 23:01, "Stefan Müller" wrote:
> >> \define\Doesnt{\startxtable \startxrow \startxcell does not work
> >> \stopxcell \stopxrow \stopxtable}
> >> > >
> >> > > \starttext
> >> > > \Works \stopxtabl
On 4-11-2011 11:11, Thomas A. Schmitz wrote:
On 11/4/11 10:38 AM, Hans Hagen wrote:
\def\test
{\setbuffer[demo]
\startxtable
\startxrow
\startxcell does not work \stopxcell
\stopxrow
\stopxtable
\endbuffer
\processxtablebuffer[demo]}
Hans,
is the solution to my xml problem along these lines
On 11/4/11 10:38 AM, Hans Hagen wrote:
\def\test
{\setbuffer[demo]
\startxtable
\startxrow
\startxcell does not work \stopxcell
\stopxrow
\stopxtable
\endbuffer
\processxtablebuffer[demo]}
Hans,
is the solution to my xml problem along these
On 3-11-2011 23:01, "Stefan Müller" wrote:
\define\Doesnt{\startxtable \startxrow \startxcell does not work
\stopxcell \stopxrow \stopxtable}
> >
> > \starttext
> > \Works \stopxtable
> > %\Doesnt
> > \stoptext
\def\test
{\setbuffer[d
.5,4],"44","above");text([3.5,2],"44","right");stroke="red";fontfill="red";line([1,0],[1,4]);text([1,2],"?","right");'
>>> />
>>>
>>
>> Write the whole block to a external file and read
.
\startxmlsetups xml:embed
\setbuffer[embed]\xmlflush{#1}\endbuffer
\savebuffer[embed][embed.svg]
\externalfigure[embed.svg]
\stopxmlsetups
remind me to make a \xmltofile some time
,[3,0],[0,0]]);text([2.5,4],"44","above");text([3.5,2],"44","right");stroke="red";fontfill="red";line([1,0],[1,4]);text([1,2],"?","right");'
> />
Write the whole block to a external file and read import it
Am 13.12.2010 um 12:04 schrieb Yury G. Kudryashov:
> Hi!
>
> Why the following doesn't work?
>
> \def\mybuf{\startbuffer[a]b\stopbuffer}
\def\mybuf{\setbuffer[a]b\endbuffer}
Wolfgang
___
If
tartbuffer writes it to an external file. Something that combines the
two will
be great.
Such a feature will be handy for inline syntax highlighting with the t-vim
module.
\setbuffer[bla]more bla\endbuffer
That does not work in mkii and does not look right for the user interface.
For pret
onality is already there. \type parses the contents correctly,
and
\startbuffer writes it to an external file. Something that combines the
two will
be great.
Such a feature will be handy for inline syntax highlighting with the t-vim
module.
\setbuffer[bla]more bla
box{#2}}
{\startTEXapplication[#1]{\usemodule[pstric]}#2\stopTEXapplication}}
for \startTEXapplication see
page-app.tex
\long\def\dostartTEXapplication[#1]#2#3\stopTEXapplication
{\bgroup
\bgroup
\let\f!temporaryextension\c!tex
\setbuffer[\@@texapp]%
\starttext
#2% pr
Wolfgang Schuster wrote:
Am 14.02.2009 um 10:09 schrieb Wolfgang Schuster:
Hi Hans,
why is \setbuffer not defined as \long, I want to use it as part
of a macro and need it to allow paragraphs as content.
Can you change this?
no need as \dosetbuffer is defined as \long and \setbuffer
Am 14.02.2009 um 10:09 schrieb Wolfgang Schuster:
Hi Hans,
why is \setbuffer not defined as \long, I want to use it as part
of a macro and need it to allow paragraphs as content.
Can you change this?
TIA,
Wolfgang
On Sat, Feb 14, 2009 at 10:09 AM, Wolfgang Schuster
wrote:
> Hi Hans,
>
> why is \setbuffer not defined with \long, I want to use it as part
> of a macro and need it to allow paragraphs as content.
>
> Can you change this?
&
Am 14.02.2009 um 10:09 schrieb Wolfgang Schuster:
Hi Hans,
why is \setbuffer not defined with \long, I want to use it as part
of a macro and need it to allow paragraphs as content.
Can you change this?
TIA,
Wolfgang
Hi Hans,
why is \setbuffer not defined with \long, I want to use it as part
of a macro and need it to allow paragraphs as content.
Can you change this?
TIA,
Wolfgang
___
If your question is of interest to others
gt;
> >>> I defined my environment in this way:
> >>>
> >>> \def\startFOO#1\stopFOO{...}
> >>>
> >>> This means TeX reads everything from \startFOO till \stopFOO and
> looks
> >>> afterwards at the replacement text.
> >>&
gt;
>>
>>> I used tried the first way with saving the content into a buffer and
>>> using the buffer content.
>>>
>> If you want to write to a buffer and later use it, there are low level
>> macros to define your own buffer commands. Have a look at the
>>
>>
>>> I used tried the first way with saving the content into a buffer and
>>> using the buffer content.
>>>
>> If you want to write to a buffer and later use it, there are low level
>> macr
; \unprotect
> \def\??lily{lilypond-}
> %...
> \newcount\lily!figures
> %...
> \long\def\dodostartlilypond[#1]#2\stoplilypond{%
> \egroup% from \dostartlilypond
> \bgroup%
> %...
> \global\advance\lily!figures\plusone
> \startmode[*\v!first]%
>
artlilypond[#1]#2\stoplilypond{%
\egroup% from \dostartlilypond
\bgroup%
%...
\global\advance\lily!figures\plusone
\startmode[*\v!first]%
\def\obeyedlines{\string^^J}%
\convertargument#2\to\ascii
\expanded{%
\setbuffer[lilypond-\the\lily!figures]%
%>> here it works, all
echansim will never be
> perfect (or close to perfect) in the sense of parsing arbitrary input.
The most dummy solution that I could think of (using slightly modified
Hans's ruby script):
\unprotect
\def\startstatistics
{\dodoubleempty\dostartstatistics}
\def\dostartstatistics[
block.
>
> Please try this:
>
> \bgroup
>
> \catcode`\^^M=\active
>
> \gdef\StartLong{\begingroup\obeylines\let^^M^^J\doStartLong}
>
> \egroup
>
> \def\doStartLong#1\StopLong{%
> \setbuffer[x]#1\endbuffer
> \endgroup
> \getbuffer[x]
> }
let^^M^^J\doStartLong}
\egroup
\def\doStartLong#1\StopLong{%
\setbuffer[x]#1\endbuffer
\endgroup
\getbuffer[x]
}
\starttext
\StartLong
\starttyping
abcde
\stoptyping
and now
for something
completely different
\StopLong
\stoptext
Christopher
___
nt
[EMAIL PROTECTED] wrote:
is it possible anything like the following ?
\def\MySomeTable#1%
{
\startbuffer
#1
\stopbuffer
}
buffers use catcode trickery, so cannot be used in macros'; you can use
\setbuffer[name]{...} with \getbuffer[name]
\MySomeTable{
\starttable
blah blah blah...
\stop
in context for processign snippets, something along
the lines:
\long\def\dostartTEXapplication[#1]#2#3\stopTEXapplication
{\bgroup
\bgroup
\let\f!temporaryextension\c!tex
\setbuffer[\@@texapp]%
\ifx\starttext\undefined
\pdfoutput=1
\pdfcompresslevel=9
60 matches
Mail list logo