* Parallel output of source data
@ 2016-12-02 7:10 Procházka Lukáš Ing.
2016-12-02 19:04 ` Wolfgang Schuster
0 siblings, 1 reply; 7+ messages in thread
From: Procházka Lukáš Ing. @ 2016-12-02 7:10 UTC (permalink / raw)
To: ConTeXt
Hello,
is there a way to let ConTeXt to flush the input stream in parallel into an output buffer, like:
----
\starttext
A
\startoutput{Test.mkiv}
Hello!
\startitemize
\item Item
\stopitemize
\stopoutput
B
\stoptext
----
which would produce:
---- Test.mkiv
Hello!
\startitemize
\item Item
\stopitemize
----
Thank you in advance.
Best regards,
Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2016-12-02 7:10 Parallel output of source data Procházka Lukáš Ing.
@ 2016-12-02 19:04 ` Wolfgang Schuster
2016-12-05 7:26 ` Procházka Lukáš Ing.
2018-07-03 6:52 ` Procházka Lukáš Ing.
0 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2016-12-02 19:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1143 bytes --]
> Procházka Lukáš Ing. <mailto:LPr@pontex.cz>
> 2. Dezember 2016 um 08:10
> Hello,
>
> is there a way to let ConTeXt to flush the input stream in parallel
> into an output buffer, like:
>
> ----
> \starttext
>
> A
>
> \startoutput{Test.mkiv}
> Hello!
> \startitemize
> \item Item
> \stopitemize
> \stopoutput
>
> B
>
> \stoptext
> ----
>
> which would produce:
>
> ---- Test.mkiv
> Hello!
> \startitemize
> \item Item
> \stopitemize
> ----
You can use a buffer to store 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][startcontentexport][stopcontentexport]}
\def\stopcontentexport
{\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
\getbufferdata[contentexport]}
\starttext
A
\startcontentexport[Test.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
\stopcontentexport
B
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2301 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2016-12-02 19:04 ` Wolfgang Schuster
@ 2016-12-05 7:26 ` Procházka Lukáš Ing.
2018-07-03 6:52 ` Procházka Lukáš Ing.
1 sibling, 0 replies; 7+ messages in thread
From: Procházka Lukáš Ing. @ 2016-12-05 7:26 UTC (permalink / raw)
To: mailing list for ConTeXt users
Great, that's it! Thank you.
Best regards,
Lukas
On Fri, 02 Dec 2016 20:04:56 +0100, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>> Procházka Lukáš Ing. <mailto:LPr@pontex.cz>
>> 2. Dezember 2016 um 08:10
>> Hello,
>>
>> is there a way to let ConTeXt to flush the input stream in parallel
>> into an output buffer, like:
>>
>> ----
>> \starttext
>>
>> A
>>
>> \startoutput{Test.mkiv}
>> Hello!
>> \startitemize
>> \item Item
>> \stopitemize
>> \stopoutput
>>
>> B
>>
>> \stoptext
>> ----
>>
>> which would produce:
>>
>> ---- Test.mkiv
>> Hello!
>> \startitemize
>> \item Item
>> \stopitemize
>> ----
> You can use a buffer to store 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][startcontentexport][stopcontentexport]}
>
> \def\stopcontentexport
>{\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
> \getbufferdata[contentexport]}
>
> \starttext
>
> A
>
> \startcontentexport[Test.mkiv]
> Hello!
> \startitemize
> \item Item
> \stopitemize
> \stopcontentexport
>
> B
>
> \stoptext
>
> Wolfgang
>
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2016-12-02 19:04 ` Wolfgang Schuster
2016-12-05 7:26 ` Procházka Lukáš Ing.
@ 2018-07-03 6:52 ` Procházka Lukáš Ing.
2018-07-03 7:07 ` Wolfgang Schuster
2018-07-03 7:11 ` Hans Hagen
1 sibling, 2 replies; 7+ messages in thread
From: Procházka Lukáš Ing. @ 2018-07-03 6:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
Hello,
I tried to \let shortcuts for \startcontentexport and \stopcontentexport, but Ctx run fails.
I guess this is a basic misunderstanding, but - why?
----
\unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}
\def\dostartcontentexport[#1]%
{\iffirstargument
\edef\contentexportfile{#1}%
\else
\let\contentexportfile\empty
\fi
\grabbufferdata[contentexport][startcontentexport][stopcontentexport]
}
\def\stopcontentexport{%
\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
\getbufferdata[contentexport]
}
\let\bX=\startcontentexport % <---- Use of these two "shortcuts" is not possible,
\let\eX=\stopcontentexport % <---- I'm getting : ! TeX capacity exceeded, sorry [input stack size=10000]
\starttext
A
\startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
\stopcontentexport
B
\bX[t2~.out.mkiv]
Ahoj
\eX
\stoptext
----
HSo how to define "shortcuts" properly?
Best regards,
Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
[-- Attachment #2: t.mkiv --]
[-- Type: application/octet-stream, Size: 717 bytes --]
\unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}
\def\dostartcontentexport[#1]%
{\iffirstargument
\edef\contentexportfile{#1}%
\else
\let\contentexportfile\empty
\fi
\grabbufferdata[contentexport][startcontentexport][stopcontentexport]
}
\def\stopcontentexport{%
\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
\getbufferdata[contentexport]
}
\let\bX=\startcontentexport
\let\eX=\stopcontentexport
\starttext
A
\startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
\stopcontentexport
B
\bX[t2~.out.mkiv]
Ahoj
\eX
\stoptext
[-- Attachment #3: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2018-07-03 6:52 ` Procházka Lukáš Ing.
@ 2018-07-03 7:07 ` Wolfgang Schuster
2018-07-03 14:39 ` Procházka Lukáš Ing.
2018-07-03 7:11 ` Hans Hagen
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2018-07-03 7:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2216 bytes --]
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 names in the implementation of the contentxport-environment.
%%%%%%
\unexpanded\def\bH{....}
\def\dobH[#1]%
{...
\grabbufferdata[...][bH][eH]}
\def\eH
{....}
%%%%%%
Wolfgang
> Procházka Lukáš Ing. <mailto:LPr@pontex.cz>
> 3. Juli 2018 um 08:52
> Hello,
>
> I tried to \let shortcuts for \startcontentexport and
> \stopcontentexport, but Ctx run fails.
>
> I guess this is a basic misunderstanding, but - why?
>
> ----
> \unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}
>
> \def\dostartcontentexport[#1]%
> {\iffirstargument
> \edef\contentexportfile{#1}%
> \else
> \let\contentexportfile\empty
> \fi
> \grabbufferdata[contentexport][startcontentexport][stopcontentexport]
> }
>
> \def\stopcontentexport{%
>
> \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
>
> \getbufferdata[contentexport]
> }
>
> \let\bX=\startcontentexport % <---- Use of these two "shortcuts" is
> not possible,
> \let\eX=\stopcontentexport % <---- I'm getting : ! TeX capacity
> exceeded, sorry [input stack size=10000]
>
> \starttext
>
> A
>
> \startcontentexport[t~.out.mkiv]
> Hello!
> \startitemize
> \item Item
> \stopitemize
> \stopcontentexport
>
> B
>
> \bX[t2~.out.mkiv]
> Ahoj
> \eX
>
> \stoptext
> ----
>
> HSo how to define "shortcuts" properly?
>
> Best regards,
>
> Lukas
>
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 3874 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2018-07-03 6:52 ` Procházka Lukáš Ing.
2018-07-03 7:07 ` Wolfgang Schuster
@ 2018-07-03 7:11 ` Hans Hagen
1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2018-07-03 7:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 7/3/2018 8:52 AM, Procházka Lukáš Ing. wrote:
> Hello,
>
> I tried to \let shortcuts for \startcontentexport and
> \stopcontentexport, but Ctx run fails.
>
> I guess this is a basic misunderstanding, but - why?
>
> ----
> \unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}
>
> \def\dostartcontentexport[#1]%
> {\iffirstargument
> \edef\contentexportfile{#1}%
> \else
> \let\contentexportfile\empty
> \fi
> \grabbufferdata[contentexport][startcontentexport][stopcontentexport]
> }
>
> \def\stopcontentexport{%
>
> \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
>
> \getbufferdata[contentexport]
> }
>
> \let\bX=\startcontentexport % <---- Use of these two "shortcuts" is not
> possible,
> \let\eX=\stopcontentexport % <---- I'm getting : ! TeX capacity
> exceeded, sorry [input stack size=10000]
>
> \starttext
>
> A
>
> \startcontentexport[t~.out.mkiv]
> Hello!
> \startitemize
> \item Item
> \stopitemize
> \stopcontentexport
>
> B
>
> \bX[t2~.out.mkiv]
> Ahoj
> \eX
>
> \stoptext
> ----
>
> HSo how to define "shortcuts" properly?
impossible ... just define an extra grabbuffer
what has this to do with parallel texts
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Parallel output of source data
2018-07-03 7:07 ` Wolfgang Schuster
@ 2018-07-03 14:39 ` Procházka Lukáš Ing.
0 siblings, 0 replies; 7+ messages in thread
From: Procházka Lukáš Ing. @ 2018-07-03 14:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello Wolfgang,
On Tue, 03 Jul 2018 09:07:23 +0200, Wolfgang Schuster <schuster.wolfgang@gmail.com> 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 different start/stop-commands for your environment means you have
> to change all names in the implementation of the contentxport-environment.
>
> %%%%%%
> \unexpanded\def\bH{....}
>
> \def\dobH[#1]%
> {...
> \grabbufferdata[...][bH][eH]}
>
> \def\eH
> {....}
> %%%%%%
thank you for the explanation! - Much clearer for me how buffers work!
Best regards,
Lukas
> Wolfgang
>> Procházka Lukáš Ing. <mailto:LPr@pontex.cz>
>> 3. Juli 2018 um 08:52
>> Hello,
>>
>> I tried to \let shortcuts for \startcontentexport and
>> \stopcontentexport, but Ctx run fails.
>>
>> I guess this is a basic misunderstanding, but - why?
>>
>> ----
>> \unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}
>>
>> \def\dostartcontentexport[#1]%
>> {\iffirstargument
>> \edef\contentexportfile{#1}%
>> \else
>> \let\contentexportfile\empty
>> \fi
>> \grabbufferdata[contentexport][startcontentexport][stopcontentexport]
>> }
>>
>> \def\stopcontentexport{%
>>
>> \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
>>
>> \getbufferdata[contentexport]
>> }
>>
>> \let\bX=\startcontentexport % <---- Use of these two "shortcuts" is
>> not possible,
>> \let\eX=\stopcontentexport % <---- I'm getting : ! TeX capacity
>> exceeded, sorry [input stack size=10000]
>>
>> \starttext
>>
>> A
>>
>> \startcontentexport[t~.out.mkiv]
>> Hello!
>> \startitemize
>> \item Item
>> \stopitemize
>> \stopcontentexport
>>
>> B
>>
>> \bX[t2~.out.mkiv]
>> Ahoj
>> \eX
>>
>> \stoptext
>> ----
>>
>> HSo how to define "shortcuts" properly?
>>
>> Best regards,
>>
>> Lukas
--
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4
Mob.: +420 702 033 396
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-07-03 14:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 7:10 Parallel output of source data Procházka Lukáš Ing.
2016-12-02 19:04 ` Wolfgang Schuster
2016-12-05 7:26 ` Procházka Lukáš Ing.
2018-07-03 6:52 ` Procházka Lukáš Ing.
2018-07-03 7:07 ` Wolfgang Schuster
2018-07-03 14:39 ` Procházka Lukáš Ing.
2018-07-03 7:11 ` Hans Hagen
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).